Skip to content

This face recognition system is implemented upon a pre-trained FaceNet model achieving a state-of-the-art accuracy. This system comes with both Live recognition & Image recognition.

Notifications You must be signed in to change notification settings

TheAnkurGoswami/Face-Recognition-using-FaceNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face-Recognition-using-FaceNet

This face recognition system is implemented upon a pre-trained FaceNet model achieving a state-of-the-art accuracy. The system comes with both Live recognition & Image recognition. It is trained on faces of some celebrities.

For any queries Contact: Ankur Goswami

  • Installing dependencies:

    • For Anaconda users: conda install --file requirements.txt
    • For python users: pip install -r requirements.txt
      (even Anaconda users can use this if they use anaconda prompt instead of terminal)
  • Downloading the model:
    The repository requires an additional file to work. The file is too large to upload here. So I've provided a Google Drive link of it. Download the file and keep it inside /data/model/ directory.
    Click Here to download the file.

  • Training on other faces:
    To train model on different faces, follow the given steps:

    1. Put the images containing clear frontal face in /data/images/ directory.
    2. Open the repository directory in terminal and run following commands in given order:
      1. cd script
      2. python generate_data.py
    3. Follow program instructions.
  • Testing/Detecting faces:

    1. Face Recognition from Images:

      1. Put the images containing the faces to predict in /test/ directory.
      2. Open the repository directory in terminal and run following command:
          python image_recognition.py
      
      1. Output images will then be available in /test/predicted/ directory.
    2. Live Face Recognition(Obviously using camera):
      Open the repository directory in terminal and run following command:

      python live_recognition.py
      

Examples:

NOTE: Faces with Unidentified labels are faces on which the model is not trained.

Example #1:
Before:

After:

Example #2:
Before:

After:

Example #3:
Before:

After:

Example #4:
Before:

After:(Need to zoom)

Example #5:
In this example, the model was trained on faces of my friends.
Before:

After:

About

This face recognition system is implemented upon a pre-trained FaceNet model achieving a state-of-the-art accuracy. This system comes with both Live recognition & Image recognition.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages