DeepFace is a deep learning facial recognition system created by a research group in Facebook Labs. It identifies human faces in digital images. It employs a nine-layer neural network with over 120 million connection weights and was trained on four million images uploaded by Facebook users. This paper shows the implementation of DeepFace and evaluate its performance on images, video and live stream from USB camera.
Read Me –
- Files –
- dataset – (contains images for training)
- swayam – 6 images
- bill gates – 8 images
- steve jobs – 7 images
- unknown – 5 images
- image_test – contains images of people for training.
- video_test – contains images of people for testing.
- face_detection_model
- deploy.protxt
- res10_300x300_ssd_iter_140000.caffemodel
- shape_predictor_68_face_landmarks.dat
- output –
- dataset_roi – extracted faces
- swayam – 6 images
- bill gates – 8 images
- steve jobs – 7 images
- unknown – 5 images
- embeddings.pickle
- le.pickle
- recognizer.pickle
- dataset_roi – extracted faces
- pyimagesearch
- init.py
- pycache
- centroidtracker.pyc
- init.pyc
- centroidtracker.py
- openface_nn4.small2.v1.t7
- align.py
- faceTracker1.py
- faceTracker2.py
- deepFaceTrained1.py
- deepFaceTrained2.py
- deepFaceTrained2_video.py
- deepFaceTrained2_webcam.py
- dataset – (contains images for training)
- Requirements –
- Web Camera
- Python Version – 3.7.6
- Numpy
- OpenCv
- Pyimagesearch
- Argparse
- Imutils
- Pickle
- Scikit Learn
- dlib
- Steps to run face recognition –
- Download all the files into the same directory.
- In the terminal run the following scripts from top to down:
-
If having more than two python version installed in your system (Mac Users) – 1. Face Tracker 1 – Extract faces and align them – python3 faceTracker1.py 2. Face Tracker 2 – Normalize the face and embed it to a pickle file – python3 faceTracker2.py 3. Deep Face Trained 1 – Train the model – python3 deepFaceTrained1.py 4. Deep Face Trained 2 –
- Test on Still Images – python3 deepFaceTrained2.py –i image_test/image_file_name
- Test on Videos – python3 deepFaceTrained2_video.py -v video_test/video_file_name
- Test on Live Stream or Web Camer – python3 deepFaceTrained2_webcam.py
-
Other Users –
- Face Tracker 1 – Extract faces and align them – python faceTracker1.py
- Face Tracker 2 – Normalize the face and embed it to a pickle file – python faceTracker2.py
- Deep Face Trained 1 – Train the model – python deepFaceTrained1.py
- Deep Face Trained 2 –
- Test on Still Images – python deepFaceTrained2.py –i image_test/image_file_name
- Test on Videos – python deepFaceTrained2_video.py -v video_test/video_file_name
- Test on Live Stream or Web Camer – python deepFaceTrained2_webcam.py
-
References –
- Harry Li OpenCV.
- Martin Krasser Face Recognition.
- Object Tracking - Simple object tracking with OpenCV
- Face Tracking - OpenCV Face Recognition