Posts

Project 2: DoppelGanger - Find Celebrity Look-Alike

  1) Overview (What this code is doing) This code implements a face recognition workflow using Dlib’s face recognition model. The key idea is broken into two segments: Enrollment: for each known celebrity image, compute a 128-dimensional embedding and store it with the person’s label. Testing: for each unknown/test image, compute its 128D embedding and find the closest enrolled embedding using a minimum distance rule. The closest match is shown as the “look-alike”. The deep network is trained once on a large dataset, and the application enrolls a small number of images per identity to build a searchable database of embeddings. 2) Imports and Matplotlib configuration python import os,random,glob import dlib import cv2 import numpy as np import matplotlib.pyplot as plt import time %matplotlib inline Explanation os/random/glob: filesystem traversal, picking random folders, and finding test images. dlib: provides: frontal face detector facial landmark predictor face recogn...