/Aesthetic-Face-De-Identification

Aesthetic Preserving Face De-Identification

Primary LanguageJupyter Notebook

Scalable Aesthetic-Preserving Face De-Identification

A scalable approach protect the privacy of people in the background of the frame via a face de-identification filter. This filter is also developed to be aesthetic and semantic preserving. The filter is under development and we have a desktop and android version to test the filter.

Tech Stack

android

Build Instructions

1. OpenCV

Need to set up OpenCV yourself, here are the instructions link

2. Android Compile

You can use the standard Android studio build methods to run the application on a phone or the emulator. Instructions can be found here.

Watch the video for an overview (needs access) https://user-images.githubusercontent.com/31789203/205481780-cd96bfdf-5b0b-4ff9-8535-e386caa4f7b8.mp4

App Description:

You can download the app apk from here

1. App UI


Image Process Screen
Button Set: There is a set of 3 buttons which from top to button have the following uses:
  • Save: Saves the filtered iamge to the gallery
  • Process: Processes the Image and de-identifies the faces
  • Back: Goes to previous screen
Faces Detected : Will display the number of faces detected in the image
Threshhold Scale : Correspondes to the threshhold value used in the adaptive thresholding algorithm.
The higher the value, the fewer faces will be de-identified. This is due to the threshhold value being lowered as it is divided by the scale value.
N_Clusers : Defines the number of clusters or the number of colors the images is quantized to. The lower the value the more colors in the image.
Min Area : Defines the minimum area of the contour to be drawn.
Poly Epsilon : Defines the "approximation accuracy" or the maximum distance between the original curve and its approximation.
You can read more here

2. App Demo:

You can find the demo for the app here https://drive.google.com/file/d/1RlTHRILh1cd_j9feUgFJkHeQJrICpAvK/view?usp=sharing

2. Desktop App

We have also created a desktop python based application

You can run the dockerized version of the application directly:

$ docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix vinayak1998th/face_filter:latest

Notes:

  1. For the docker version to run, you have to open disply control first. On unix machines the following should work:
$ xhost +
  1. To passthrough file access use the '-v' flag to pass any existing image dir into the docker container. Ex:
$ docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/usr/Pictures:/home/usr/Pictures vinayak1998th/face_filter:latest

This will mount the '/home/usr/Pictures' directory into the docker container with the same path