Mentor: Stojoc Vladimir
Seeing as the children are victims of abuse and is are potential witnesses at criminal proceedings, sharing the videos which show the faces of the children subjects the children to potential harm such as victimisation and/or retribution. For this reason, our team developed an application that will blurry the children's faces in videos.
In order to develop the model for video processing, we combined two neural networks, one for face recognition and the second one, for face classification. As Convolutiona Neural Network for classification, we used the pretrained 101-layered ResNet net=resnet101()
, on 10 epochs, that gave us the following results:
The dataset used to train the classificator was composed of two classes: kids and adults, therefore, the train data consisted of 1820 images each class and test length was 780 per each class.
For face recognition, we used OpenCV β DNN method as it is pretty fast and very accurate, even for small sized faces. It also detects faces at various angles and with different light conditions. Actually, DNN detects the face and passes it to the classificator, if the class is greater that 0.5 and less than 1.0, it is a child and this face should be blurred. In order to blur a face, we cut it taking in consideration the coordinates of the face box, we blur it using ImageFilter.GuassianBlur()
and we put back this face. Also, we keep the audio of the video, if it exists using MoviePy
module.
- Clone the repo:
git clone https://github.com/IuraCPersonal/popolo
- Install and update using pip:
pip install -r requirements.txt
- To run the application, use the
flask
command orpython -m flask
:
flask run
- https://susanqq.github.io/UTKFace/
- https://www.mathworks.com/help/deeplearning/ref/resnet18.html
- https://towardsdatascience.com/face-detection-models-which-to-use-and-why-d263e82c302c
- https://www.c-sharpcorner.com/article/detecting-faces-from-image-and-video-using-python/
- https://pytorch.org/docs/stable/index.html
- https://zulko.github.io/moviepy/