- opencv
- numpy
- pillow
- Collecting face data (your face pictures) and labels and save to dataset folder. (code 1)
- Input face data and labels into model to train a recognition model. (code 2)
- Open up your webcam to start real time face recognition. (code 3)
-
Download this repository as zip file and unzip it to a folder.
-
Crate two empty folders named 'dataset' and 'trainer' in the above folder.
- Run the first code, enter number '1' (for first person), then computer will take your face pictures and save into 'dataset' folder. When finish taking pictures, "[INFO] Exiting Program and cleanup stuff" pops up.
(3.5. Run the first code again, enter number '2' (for second person), follow the same procedure.)
-
Run the second code, just wait several seconds to train the model.
-
Run the third code, it will open your camera and start real time face recognition.