Arcface is a efficient and effective face recognition algorithm, which can train on tens of millions identity on a single server. Real-time face recognition in unconstrained environments. Using Shuffle Attention MobileNetV3 Architecture as Backbone, and modified ArcFace as loss function.
This module can get a number of names as input for tracking the specific face.
Attempt | Parameters | Madds | Top1-acc |
---|---|---|---|
Mobile Face Net | |||
SA-MobileNetV3-Large with modified ArcFace loss |
1- Install pytorch (torch>=1.6.0).
2- install requirements
pip install -r requirements.txt
3- MobileNet weights exist in ./weights
directory. if you want ResNet weights, download with this command:
python download_weights.py
Download the dataset from here.
To train a model, run train.py
with the path to the configs. for example if you want train SA-MobileNetV3, run this command:
python train.py configs/webface_samnv3
Train on multi GPUs:
python -m torch.distributed.launch --nproc_per_node=4 --nnodes=1 --node_rank=0 train.py configs/webface_samnv3
other configs are available in ./configs
Run the following command for evaluation trained model on test dataset:
python ...
Run the following command for classification images:
python predict.py --input input/sajjad_0.jpg
For feature extraction, run this command:
python inference_compare.py --input1 input/sajjad_0.jpg --input2 input/sajjad_1.jpg
Put your input images or videos in ./input directory. The output will be saved in ./output. In root directory of project, run the following command:
python inference_video.py --input "./input/sample.mp4" --update
or
python inference_image.py --input "./input/sajjad.jpg" --update
Use -sh for representation of results during code running or not
Note that you can pass some other arguments. Take a look at --help
argument for each command.
@inproceedings{deng2019arcface,
title={Arcface: Additive angular margin loss for deep face recognition},
author={Deng, Jiankang and Guo, Jia and Xue, Niannan and Zafeiriou, Stefanos},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
pages={4690--4699},
year={2019}
}
A simple personal website powered by flask in python
In this repository, I include all my notes and whatever I learn, so that everyone can benefit from them
Computer vision and Deep learning
Visualizing Yolov5's layers using GradCam
A toolkit full of handy functions including most used models and utilities for deep-learning practitioners!
A collection of ML related stuff including notebooks, codes and a curated list of various useful resources such as books and softwares. Almost everything mentioned here is free (as speech not free food) or open-source.
In this repository, I share codes of the introduction to python courses published on my youtube channel