Simple implementation of live face recognition using OpenCV Python implementing LBPH algorithm for recognizing faces and HaarCascade pretrained model to detect faces.
Use the package manager pip to install the needed library. If you haven't installed pip, go check their website
Install numpy
pip install numpyInstall OpenCV
pip install opencv-contrib-pythonInstall Pillow
pip install pillowThere are 3 python file in this repository
- register-face.py
- train.py
- scan.py
To use this application :
- run the
register-face.pyto record faces that you want to recognize - the recorded face data will be saved under the data directory
- after recording faces, run the
training.pyto train the recognizer and the output will be a file namedtraining.xml - run the
scan.pyto implement thetraining.xmland enjoy a simple live face recognition on your PC
I know my codes are messy and ineffective, so I am always happy to accept your pull request to fix my messy code.
Please make sure to update tests as appropriate.