Coder Social home page Coder Social logo

naemazam / real-time-face-recognition-using-facenet Goto Github PK

View Code? Open in Web Editor NEW
34.0 2.0 7.0 13.1 MB

Real time face recognition Using Facenet , pytorch, Tensorflow

License: MIT License

Python 100.00%
facenet facenet-model facenet-pytorch facenet-trained-models mtcnn-face-detection naemazam python3 pytourch tensorflow tensorflow2

real-time-face-recognition-using-facenet's Introduction

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 ๐Ÿ”ฑ

real-time-face-recognition-using-facenet's People

Contributors

naemazam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

real-time-face-recognition-using-facenet's Issues

Where is the requirements.txt file?

Hi Naem Azam, this is one of the best project.

But, I'm looking all of your commit and browse files, but ca't finding the requirements.txt file.
So where do you put that?, have you push the file to this repository?

Thanks,
Tri Nanda

Is it fit for the real world?

Because, When I run this codes it takes 30-40 seconds to start.
And the warning is
WARNING:tensorflow:5 out of the last 118 calls to <function Model.make_predict_function..predict_function at 0x0000017B38050940> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.

suggest me better way to run this code. Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.