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

Real time face recognition Using Facenet , pytorch, Tensorflow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 πŸ”±

About

Real time face recognition Using Facenet , pytorch, Tensorflow

License:MIT License


Languages

Language:Python 100.0%