Implementation of FaceNet: A Unified Embedding for Face Recognition and Clustering to find the celebrity whose face matches the closest to yours. The input face is encoded with a pretrained inception model into a vector and then its geometric distance is calculated with the encoded vectors of all the images present in the dataset and the image with the least distance is selected.
- Create a new conda environment using
conda create --name nearest_celeb_face
- Activate the
activate nearest_celeb_face
if you are on Windows andsource activate nearest_celeb_face
if you are on Linux - Clone the repository using
git clone https://github.com/soumik12345/Nearest-Celebrity-Face
- Enter the root directory using
cd Nearest-Celebrity-Face
- Install the required dependencies using
pip install -r requirements.txt
The TestCases
folder contains two folders Actual
that contains full sized images of individuals and Preprocessed
containing the faces manually cropped out of the full sized images. Any number of testcases can be added provided that one image each is present in the Actual
and Preprocessed
folders with the exact same filename and the preprocessed image should have the face manually cropped out for best performance. Refer to the already cropped images for further detail on how to crop. Once the tescases are setup, run python main.py
or python3 main.py
to run the program.
@article{1503.03832,
Author = {Florian Schroff and Dmitry Kalenichenko and James Philbin},
Title = {FaceNet: A Unified Embedding for Face Recognition and Clustering},
Year = {2015},
Eprint = {arXiv:1503.03832},
Doi = {10.1109/CVPR.2015.7298682},
}