A facial recognition system is a technology capable of identifying or verifying a person from a digital image or a video frame from a video source. There are multiples methods in which facial recognition systems work, but in general, they work by comparing selected facial features from given image with faces within a database.
- Using face align functionality from dlib to predict effectively while live streaming.
- Network Used- Inception Network
- Original Paper - Facenet by Google
- Constant Face Location and Acknowledgment - Naem Azam
If you face any problem, kindly raise an issue
├── Real-time-face-recognition-Using-Facenet (Current Directory)
├── encodings
├── architecture.py
├── detect.py
├── facenet_keras_weights.h5
├── train_v2.py
├── requirements.txt
├── Faces
├── Azam
└── winnie
└── JackieChan
└── readme.md
This code was working properly on tensroflow 2.3.0.
- Tensorflow 2.X
- numpy
- opencv-python
- mtcnn
- scikit-learn
- scipy
You can install Conda for python which resolves all the dependencies for machine learning.
pip install requirements.txt
Install python 3.x and Conda
pip install virtualenv
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
python3 -m pip install tensorflow
Verify install:
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/
python3 -m pip install tensorflow
Verify install:
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
pip install opencv-python
python -m venv sklearn-venv
sklearn-venv\Scripts\activate
pip install -U scikit-learn
pip install mtcnn
python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
-
Download facenet_keras_weights.h5 and put it accoding to our file Organization
-
Make a directory of your name inside the Faces folder and upload your 2-3 pictures of you.
-
Train Your System
python train_v2.py
Run this for real time Face recognition, it will open your camera and start detection
python detect.py
Constant Face Location and Acknowledgment By Naem Azam DOI:10.13140/RG.2.2.35497.2672
- Florian Schroff, Dmitry Kalenichenko, James Philbin (2015). FaceNet: A Unified Embedding for Face Recognition and Clustering
- Yaniv Taigman, Ming Yang, Marc'Aurelio Ranzato, Lior Wolf (2014). DeepFace: Closing the gap to human-level performance in face verification
- The pretrained model we use is inspired by Victor Sy Wang's implementation and was loaded using his code: https://github.com/iwantooxxoox/Keras-OpenFace.
- Our implementation also took a lot of inspiration from the official FaceNet github repository: https://github.com/davidsandberg/facenet