Detection and recognition of a person in real time live video sequences using FaceNet-Keras and SVM classifier. Currently, working on optimizing the cpu usage.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
OpenCV-Python libraries (CV2)
Keras - Deep learning framework
Numpy library
- Create a custom dataset of users/people.
- Extract face embeddings from the faces using pretrained keras facenet model in numpy-zip format.
- Train an SVM classifier using these face embeddings in (.npz) format, save the model using pickle.
- Use this model to predict the face in a video sequence.
-
Create a dataset of the people involved in the "data/" folder. The hierarchy that should be followed is below:
data/
train/
person1/
image1
image2
(...)
.
.
personn/
val/
person1/
(...)
.
.
personn/ -
Run the dataset_prep.py program using python3.
python3 dataset_prep.py
-
Run the extract_embeddings.py using python3.
python3 extract_embeddings.py
-
Run the svm_classifier.py.
python3 svm_classifier.py
-
Run webcam.py
python3 webcam.py