Skip to content

Commit 2683582

Browse files
committed
2 parents 5072597 + cb2a683 commit 2683582

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Facial-Recognition-Using-FaceNet-Siamese-One-Shot-Learning
2+
This program is used to implement Facial Recognition using Siamese Network architecture. The implementation of the project is based on the research paper :
3+
4+
> FaceNet: A Unified Embedding for Face Recognition and Clustering
5+
> [arXiv:1503.03832](https://arxiv.org/abs/1503.03832) by [Florian Schroff](https://arxiv.org/search/cs?searchtype=author&query=Schroff%2C+F), [Dmitry Kalenichenko](https://arxiv.org/search/cs?searchtype=author&query=Kalenichenko%2C+D), [James Philbin](https://arxiv.org/search/cs?searchtype=author&query=Philbin%2C+J)
6+
7+
Facenet implements concept of Triplet Loss function to minimize the distance between anchor and positive images, and increase the distance between anchor and negative images.
8+
9+
### Prerequisites
10+
11+
h5py==2.8.0
12+
Keras==2.2.4
13+
tensorflow==1.13.0rc2
14+
dlib==19.16.0
15+
opencv_python==3.4.3.18
16+
imutils==0.5.1
17+
numpy==1.15.2
18+
matplotlib==3.0.0
19+
scipy==1.1.0
20+
21+
Install the packages using `pip install -r requirements.txt`
22+
23+
### Usage
24+
To use the facial recognition system, you need to have a database of images through which the model will calculate image embeddings and show the output.
25+
The images which are in the database are stored as .jpg files in the directory `./images`.
26+
27+
28+
To generate your own dataset and add more faces to the system, use the following procedure:
29+
30+
> Sit in front of your webcam.
31+
> Use the Image_Dataset_Generator.py script to save 50 images of your face.
32+
> Use this command: `python Image_Dataset_Generator.py` to generate images which will be saved in images folder.
33+
34+
To use the facial recognition system, run the command :
35+
`python face_recognizer.py`
36+
37+
### References
38+
39+
1. The code has been implemented using deeplearning.ai course Convolutional Networks Week 4 Assignment, which has the files `fr_utils.py` and `inception_blocks_v2.py`
40+
2. The keras implementation of the model is by Victor Sy Wang's implementation and was loaded using his code: [https://github.com/iwantooxxoox/Keras-OpenFace](https://github.com/iwantooxxoox/Keras-OpenFace).

0 commit comments

Comments
 (0)