https://github.com/theankurgoswami/face-recognition-using-facenet
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.
https://github.com/theankurgoswami/face-recognition-using-facenet
computer-vision deep-learning face-detection face-recognition facenet-model opencv-python python-3-6
Last synced: 17 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/theankurgoswami/face-recognition-using-facenet
- Owner: TheAnkurGoswami
- Created: 2019-08-26T18:07:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-24T23:16:06.000Z (about 2 years ago)
- Last Synced: 2025-03-23T19:23:12.910Z (about 1 month ago)
- Topics: computer-vision, deep-learning, face-detection, face-recognition, facenet-model, opencv-python, python-3-6
- Language: Python
- Homepage:
- Size: 9.02 MB
- Stars: 21
- Watchers: 1
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://github.com/Ankur1401/)
* __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/`](https://github.com/Ankur1401/Face-Recognition-using-FaceNet/tree/master/data/model) directory.
[Click Here](https://drive.google.com/open?id=1PZ_6Zsy1Vb0s0JmjEmVd8FS99zoMCiN1) 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/`](https://github.com/Ankur1401/Face-Recognition-using-FaceNet/tree/master/data/images) directory.
1. Open the repository directory in terminal and run following commands in given order:
1. `cd script`
1. `python generate_data.py`
1. Follow program instructions.
* __Testing/Detecting faces:__
1. __Face Recognition from Images__:
1. Put the images containing the faces to predict in [`/test/`](https://github.com/Ankur1401/Face-Recognition-using-FaceNet/tree/master/test) directory.
1. Open the repository directory in terminal and run following command:
```
python image_recognition.py
```
1. Output images will then be available in [`/test/predicted/`](https://github.com/Ankur1401/Face-Recognition-using-FaceNet/tree/master/test/predicted) directory.
1. __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: