/Face-Recognition-using-dlib

Recognizing faces of "Game of Thrones" Character

Primary LanguagePython

Face-Recognition-using-dlib

Recognizing faces of "Game of Thrones" Character

This is fun project I did to learn about face recognition and because I was missing GOT episodes :-(

Following blogs helped me to complete this project and to learn about face recognition

Link to Dataset - Google Drive Link

Note: You can also run dataset.py to create your own dataset.

This project directory contains following files:

  • dataset.py - used to create your own dataset
  • face_encoding.py - used to create encoding for faces in dataset
  • recognize_faces.py - used to test and recognize faces

Steps to follow

Step 1: Create a directory named "dataset" and various sub-directories inside it with the names of people whose face you want to recognize. Run following command for various characters of Game of Thrones:

python dataset.py --query "Jon Snow" --output dataset/Jon_Snow

Step 2: Run following command to create encodings of all the faces. At last, it will save a serialized database containing encodings of various faces which will be used in the next step.

python face_encoding.py --dataset dataset --encodings encodings.pickle

Step 3: Run following command to recognize faces from "test" directory. Recognized faces will be saved in the "results" directory and are shown below.

python recognize_faces.py --image test/pic1.jpg

Results

Jon and Ramsay Jon and Arya Danny and Tyrion