Qengineering / Face-Recognition-Jetson-Nano

Recognize 2000+ faces on your Jetson Nano with database auto-fill and anti-spoofing
https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html
BSD 3-Clause "New" or "Revised" License
112 stars 32 forks source link

Half & Quarter Faces being stored #10

Open rsingh2083 opened 3 years ago

rsingh2083 commented 3 years ago

Hi Sir,

Why is it that partial faces and heavily blurred faces are also getting stored in database ? For example if you look at these images then these are not even full faces and one of them is heavily blurred. https://ibb.co/rbTx6Gj https://ibb.co/myrW0wV https://ibb.co/cX7kvtT https://ibb.co/Ybrd03y

Secondly, also the orientation/angle of saved faces is also bad. There is black background in most of them.

Why isnt the algorithm waiting for complete face to appear and only then save the faces.

Qengineering commented 3 years ago

As soon as the face detection recognize a face in front of the camera, it will test if the face is in the all ready made database. If not, it should be added (AUTO_FILL_DATABASE = true). Now we may have a problem. Faces can be detected, even partial in front of the camera. Next, the warp algorithm centers the faces, hence the black borders. To overcome this phenomenon, I've put a blur detection in front of the storage of faces in the database (BLUR_FILTER_STRANGER). Probably not be best solution, but for me it worked when running a movie with faces. To improve, you could check the locations of the eye's, nose and mouth in the picture. See SHOW_LANDMARKS on how to get these points. Only store if they are located at the right regions.