Real time face recognition Using Facenet , pytorch, Tensorflow
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.
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.
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