/Real-time-face-recognition-Using-Facenet

Real time face recognition Using Facenet , pytorch, Tensorflow

Primary LanguagePythonMIT LicenseMIT

Real time face recognition Using Facenet 🧔 🤖 🔍

Linux Mac OS Windows Python PyCharm Vim

visitors

Description 📰

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.

Functionalities added 🕵️‍♂️

  1. Using face align functionality from dlib to predict effectively while live streaming.

Python Implementation 👨‍🔬

  1. Network Used- Inception Network
  2. Original Paper - Facenet by Google
  3. Constant Face Location and Acknowledgment - Naem Azam

If you face any problem, kindly raise an issue

File Organization 🗄️

├── 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

Dependencies 💾

This code was working properly on tensroflow 2.3.0.

  • Tensorflow 2.X
  • numpy
  • opencv-python
  • mtcnn
  • scikit-learn
  • scipy

Code Requirements 🦄

You can install Conda for python which resolves all the dependencies for machine learning.

pip install requirements.txt

Menual dependencies install with pip 👨‍🔬

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

SetUp 🖥️

  1. Download facenet_keras_weights.h5 and put it accoding to our file Organization

  2. Make a directory of your name inside the Faces folder and upload your 2-3 pictures of you.

  3. Train Your System

python train_v2.py

Real time face recognition 🧔 🤖 🔍

Run this for real time Face recognition, it will open your camera and start detection

python detect.py

Results 📊

Thesis 📰

Constant Face Location and Acknowledgment By Naem Azam DOI:10.13140/RG.2.2.35497.2672

References 🔱