This Python script aims to recognize people and their genders. It works with OpenCV and Face Recognition API. By facial recognition, a person is predicted and sex is estimated using Deep Neural Network from OpenCV. The script must analyze an image within a specific folder (with one or n people) and will return 128-dimension face encoding for each face in the image. Then, predict sex using the neural network.
- Python 3.6.10
- OpenCV 4.2.0
- Face Recognition 1.2.3
- Dlib 19.8.1
- Numpy 1.18.1
- Python 3.6
-
OpenCV
pip install opencv-python -
Face Recognition
pip install face_recognition -
Dlib
pip install dlibIf you are in Windows and the first method does not do, try this:
python -m pip install https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0694c5d703c8e037e6aba2e865f9bae22ed63c/dlib-19.8.1-cp36-cp36m-win_amd64.whl#sha256=794994fa2c54e7776659fddb148363a5556468a6d5d46be8dad311722d54bfcf -
NumPy
pip install numpy -
Matplotlib(optional)
pip install matplotlib
First of all, you need to run in terminal
python menu.pyThis will open a window called Face Recognition, which will recognize and distinguish people according to the photos in the people folder. If you want to close the window just press "q".
If you have any question or are getting any issue, contact-me.
E-mail

