-
Applied K Nearest Neighbour classification algorithm in face recognition using opencv and HaarCascades CNN Model for frontal face detection.
-
Tech Stack - Python, ML(KNN), OpenCV
-
It is written completely in Python 3.6.
- OpenCV 3+ (pip3 installed opencv-python)
- NumPy (pip3 install numpy)
- You will also need to have the harcascade frontal face classifier(included here).
- You should have a webcam attached to your system.
Open the collect.py file and run it will collect the datas and store it in a directory named "data". Then open the recognizer.py file to start recognizing faces.
If you have multiple cameras set up to your system change the id in cv2.VideoCapture according to it. Usually attached webcams have id 0.