This is a project where face recognition using CNNs is done for 30 actors in the IMDB-WIKI dataset. From this dataset, I only used the actors in the IMDB dataset and not in Wikipedia. More specifically, I extracted at least 25 colored images for 30 actors from the imdb_8.tar subset of the IMDB dataset. All of the images used for these 30 actors (15 male and 15 female of varying skintones) were stored in the train, valid and test folders on my Google Drive.
The dataset folder I used can be found here: Dataset I used (Google Drive link)
- Data collection and preprocessing
- Face Detection using MTCNN
- Face Recognition using VGGFace models
- Face Recognition using FaceNet
All of the code I wrote was run in a Google Colab notebook. To rerun the code, you would do the following:
-
You would need to change all of the filepaths to wherever those directories are stored on your machine or on Google Drive. In addition, you will notice that some filepaths contain gdrive instead of drive. This is because I ran out of Colab GPU on my main Google account, which is why I needed to continue writing code on a google colab notebook which was on a separate account than where my dataset was stored.
-
Delete the train_new, valid_new, and test_new folders (these contained the faces after face detection). Then, uncomment the code in the section that says Setup Stuff to create those folders. After that, run that code along with the face detection to populate those folders with all of the faces.
-
Laslty, you can run the VGGFace and FaceNet code just as it is.
To see the results look at the end of the VGGFace section and the end of the FaceNet section.