Face Recognition pipeline using SOTA ArcFace using Pytorch is inspired from the paper ArcFace: Additive Angular Margin Loss for Deep Face Recognition
Git repo: Insightface_Pytorch
The problem statement for face recognition task can be found SkylarkLabs-ai-link
The folders contain around 50 cropped face images of each avenger can be found from kaggle Avengers face recognition!
- Chris Evans (Captain America)
- Chris Hemsworth (Thor)
- Mark Ruffalo (Hulk)
- Robert DowneyJr (The Iron man)
- Scarlett Johansson (Black Widow)
The dataset zip file or folder can be found from drive link
The detailed code implementation for the ArcFace implementation using pytorch can be found from colab notebook
- We have choosen MobileFacenet model, which is a lightweight model as compared to the vailable pre-trained IR-SR50 model,
- We have done transfer learning using pre-trained mobile-facenet model trained on MS1M, VGG2, Emore dataset.
- The trained best model evaluated on validation data(lowest validation loss) can be foudn here
- More on the models, implementation can be found InsightFace_Pytorch - Arcface Pytorch Implementation github
The train.py, test.py and related utilities to execute train, test pipeline can be found from utilities folder
git clone [repo_name]
- Navigate to repo to install dependencies from - requirements.txt
cd Face-Recognition-pipeline-using-SOTA-ArcFace
pip install -r requirements.txt
- Navigate to "utilities folder" which contains dependencies to run the pipeline - utilities_path
cd [utilities_path]
- Execute train pipeline - pre-trained-mobilefacenet model folder. The train_pipeline code can be tweaked little to change the pre-trained model file.
python train.py -dataset [dataset_path] -model [pre-trained-mobilefacenet model folder]
- Execute test pipeline -
- trained_mode_folder. The train_pipeline code can be tweaked little to change the pre-trained model file.
- csv_folder_demo, the path where the train, valid, test csv files are stored from the dataframe
python test.py -dataset [dataset_path] -model [trained_mode_folder] -df [csv_folder]
- A simple demo of that train, test pipeline can be found here.
- Docker implementation in colab can be found here, though it needs more testing to execute the layers.
- How to train a deep learning model using docker?
- ArcFace: Additive Angular Margin Loss for Deep Face Recognition - paperwithcode-reference
- InsightFace_Pytorch - Arcface Pytorch Implementation github
- MobileFaceNets: Efficient CNNs for Accurate Real-Time Face Verification on Mobile Devices
- Docker Documentation
- Docker For Data Scientists
- Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks
- Additive Margin Softmax Loss (AM-Softmax)
- The difference between Softmax and Softmax-Loss