This facial detector and anonymizer is able to utilize machine learning algorithms to detect and recognize human faces from an input image, applying image transformation such as gaussian blur and superimposing a black bar on detected faces. The goal is to make the faces undetectable from the processed image to achieve facial anonymization or deidentification.
First, build the prototype using a pre-trained face detection model and validate the data processing pipeline:
Choose three pre-trained face detection models: MTCNN, Caffe, and Haar Cascade.
Create a customized dataset with different sizes of images and different angles of faces.
Compare three models based on processing speed and precision. A non-exhaustive comparison of face detectors is shown below:
2. Perform face detection using MTCNN
Our python program will read an image from command-line arguments.
Use MTCNN to extract the Region of Interest (ROI) from an image.
Experiment with various hyperparameters values, looking for the best performance in face detection accuracy.
3. Design face anonymization method (Gaussian, Blackbar, Scharr, and Soble) with OpenCV and TensorFlow.
4. Replace the face with the processed image.
5. Assess the system's effectiveness using various datasets
Download four datasets: FER-2013(Facial Expression Recognition), LFW(Labeled Faces in the Wild), Landscape, and Animals Faces. FER-2013 consists of 35,000 images of faces, and LFW contains more than 13,000 images of faces collected from the web. Landscape and Animal Faces datasets are used for testing false positives.
Run MTCNN on the anonymization images to check how many faces could be re-detected.
Produce an evaluation table to summarize the results.
6. Improve the program usability using Tkinter (Python GUI library), and perform face anonymization in real-time using the webcam video feed.
The system performs well in face detection and anonymization, as shown below in Fig 2. All face anonymization methods (Blackbar, Gaussian Blur, Median Blur, Scharr, and Soble) perform well in the testing image. It also works on webcams to anonymize real-time faces. In addition, the empirical tests shown in Table 1 suggest that the system can achieve 99% robustness. The performance improves dramatically with increased Gaussian blur intensity. Table 2 shows that the false positive rate on landscape datasets is low, while it is evident on animal faces datasets. From Fig 3, It is clear that the false positive happens on wildlife faces like lions or foxes, as well as human face sculptures.
In conclusion, the proposed face anonymizer can detect faces from an input image and anonymize it with blurring or other image transformations. Various approaches were investigated to get to this point. The group concluded that the direction chosen was successful, as it generated promising preliminary results in both still and live images.
In the empirical tests, the system achieved 99% robustness levels. Experimental results demonstrate that our methods perform well among different types of shots. Therefore, the proposed architecture is successful and could be improved further.