» Facial Recognition «

by Vadim Pidoshva (Geleus)

Description

The program built to recognize faces present in the dataset and/or add unrecognized ones for later assignment. Whenever program is launched it’s looking for faces and checks for matches with the faces present in the dataset, using built in computer camera. If face is found program greets the person by the name out loud, however, if the face is not found program greets the stranger and adds his/her face to the dataset.
!The program runs until terminated.

Implementation

Implemented using the following imported libraries:

  • opencv-python
  • face_recognition
  • numpy
  • gTTS
  • os
  • imutils

main.py – responsible for facial recognition and capturing faces; face_training.py – responsible for dataset structure and addition of new faces; pronounce.py – responsible for audio module that pronounces messages out loud.

When main.cpp is launched the program adds all the present images from “Faces” directory to the dataset. Then it starts recognizing faces and highlighting the ones that were recognized into green and the ones that were not recognized into red. Alt text
If the face was NOT recognized it is automatically added to the dataset and stays red, since it wasn’t loaded initially this session. Alt text If another unknown face shows up it is then added as “Unknown_2”, etc.

At the end we have newly added cropped face at “/Faces/Unknown_1” folder:
Alt text