- Framework : Python 3.7 + , Pytorch 1.4.0, FastAPI 0.1.0
The implementation of popular face recognition algorithms in pytorch framework, including arcface.
In this repository, we use a pre-trained MobliefaceNet model.
PyQt5 pillow requests opencv-python bcolz matplotlib numpy pandas scikit-learn tensorboardX tqdm
fastapi uvicorn email_validator aiofiles sqlalchemy mysql-connector-python pyjwt passlib[bcrypt] python-multipart
POST /api/identify
{
group_id: str
threshold: float = None
img : str # base64 bytes string
}
POST /api/person
{
group_id : str
person_id : str
person_name : str = None
img : str # base64 bytes string
}
wujiyang/Face_Pytorch
MuggleWang/CosFace_pytorch
foamliu/MobileFaceNet-PyTorch
Xiaoccer/MobileFaceNet_Pytorch
TreB1eN/InsightFace_Pytorch
deepinsight/insightface
KaiyangZhou/pytorch-center-loss
tengshaofeng/ResidualAttentionNetwork-pytorch
-
download and unzip or [git clone]
download this project and unzip
move the directory
cd [project] -
install anaconda 3.x
-
create virtual environment and activate
conda create -n [project name] python=3.7
conda activate [project name] -
download pre-trained model
download latest model_mobilefacenet.pth to the [project] directory -
(additional) for GPU version
install CUDA Toolkit
install cuDNN -
install Pytorch and Cuda toolkit
- GPU (nvidia product only)
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
(need to check your cuda version) - CPU
conda install pytorch torchvision cpuonly -c pytorch
- GPU (nvidia product only)
-
(additional) for windows > before install requirements install "Microsoft Build Tools 2015 Update 3" for bcolz package
(visualcppbuildtools_full.exe) -
install requirement packages
pip install -r requirements.txt
(could not install some packages by conda install)
cd [project] directory
python server.py
- open chrome
http://127.0.0.1:8000/docs