Member-only story
OpenCV Series — 11 — DoppelGanger App — Using Dlib’s Face Recognition resnet Model
In this post , we are going to discuss about a project that I did as part of my OpenCV course. This project is used for identifying the celebrity lookalikes using Dlib’s pre-trained face-recognizer resnet model. There is no training involved , we will be just enrolling new celebrity faces to the model and use the Euclidean distance between the DoppelGanger image and the Celebrity images to identify the relevance between them for the look-alike. The model reshapes & converts the images to 128 X 1 vector , a point in 128 Dimensional space. We then use these array of vectors to calculate the Euclidean distance for the given image.
The sample dataset is used as given as below, 5 images per celebrity in each folder,
The celebrity names and the folders are mapped using a dictionary in a python numpy array file called celeb_mapping.npy
{'n00000001': 'A.J. Buckley',
'n00000002': 'A.R. Rahman',
'n00000003': 'Aamir Khan'…