Static Face Detection using OpenCV
- Python 3.x
- OpenCV
- Numpy
- Create 2 empty Folders named "dataset" and "trainer "in the same directory where the python scripts are.
OR
- Clone the repo and delete the files in trainer and dataset folder.
First run the 01_face_dataset.py which will ask you to enter a unique id to create face samples with your face.(I added Elon Musk's picture with Id - 1 and this Id will refered in 03_face_recognition.py)
Then run 02_face_training.py (Before that check the images in dataset folder)
After this a trainer.yml will be created in the trainer folder. Now Finally run 03_face_recognition.py
The accuracy was less maybe due to using a image from mobile. It gives approx ~70% to 80% accuracy most of times.