All Projects → wujiyang → Face_pytorch

wujiyang / Face_pytorch

Licence: apache-2.0
face recognition algorithms in pytorch framework, including arcface, cosface, sphereface and so on

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Face pytorch

Artificial Intelligence
Awesome Artificial Intelligence Projects
Stars: ✭ 330 (-45.9%)
Mutual labels:  face-recognition
Facerecognitionapp
Face Recognition Android App
Stars: ✭ 391 (-35.9%)
Mutual labels:  face-recognition
Aidlearning Framework
🔥🔥AidLearning is a powerful mobile development platform, AidLearning builds a linux env supporting GUI, deep learning and visual IDE on Android...Now Aid supports OpenCL (GPU+NPU) for high performance acceleration...Linux on Android or HarmonyOS
Stars: ✭ 4,537 (+643.77%)
Mutual labels:  face-recognition
Face Recognition
Deep face recognition with Keras, Dlib and OpenCV
Stars: ✭ 342 (-43.93%)
Mutual labels:  face-recognition
Curated List Of Awesome 3d Morphable Model Software And Data
The idea of this list is to collect shared data and algorithms around 3D Morphable Models. You are invited to contribute to this list by adding a pull request. The original list arised from the Dagstuhl seminar on 3D Morphable Models https://www.dagstuhl.de/19102 in March 2019.
Stars: ✭ 375 (-38.52%)
Mutual labels:  face-recognition
Imdb Face
A new large-scale noise-controlled face recognition dataset.
Stars: ✭ 399 (-34.59%)
Mutual labels:  face-recognition
Largemargin softmax loss
Implementation for <Large-Margin Softmax Loss for Convolutional Neural Networks> in ICML'16.
Stars: ✭ 319 (-47.7%)
Mutual labels:  face-recognition
Facecropper
✂️ Crop faces, inside of your image, with iOS 11 Vision api.
Stars: ✭ 479 (-21.48%)
Mutual labels:  face-recognition
Cdp
Code for our ECCV 2018 work.
Stars: ✭ 391 (-35.9%)
Mutual labels:  face-recognition
Amsoftmax
A simple yet effective loss function for face verification.
Stars: ✭ 443 (-27.38%)
Mutual labels:  face-recognition
Ganfit
Project Page of 'GANFIT: Generative Adversarial Network Fitting for High Fidelity 3D Face Reconstruction' [CVPR2019]
Stars: ✭ 350 (-42.62%)
Mutual labels:  face-recognition
Fawkes
Fawkes, privacy preserving tool against facial recognition systems. More info at https://sandlab.cs.uchicago.edu/fawkes
Stars: ✭ 4,362 (+615.08%)
Mutual labels:  face-recognition
Deepface
Deep Learning Models for Face Detection/Recognition/Alignments, implemented in Tensorflow
Stars: ✭ 409 (-32.95%)
Mutual labels:  face-recognition
Libfacerec
Face Recognition Library for OpenCV.
Stars: ✭ 341 (-44.1%)
Mutual labels:  face-recognition
Face Pose Net
Estimate 3D face pose (6DoF) or 11 parameters of 3x4 projection matrix by a Convolutional Neural Network
Stars: ✭ 464 (-23.93%)
Mutual labels:  face-recognition
Face recognition
🍎 My own face recognition with deep neural networks.
Stars: ✭ 328 (-46.23%)
Mutual labels:  face-recognition
Face specific augm
Face Renderer to perform Domain (Face) Specific Data Augmentation
Stars: ✭ 398 (-34.75%)
Mutual labels:  face-recognition
Php Opencv
PHP extensions for OpenCV
Stars: ✭ 524 (-14.1%)
Mutual labels:  face-recognition
Learn To Cluster
Learning to Cluster Faces (CVPR 2019, CVPR 2020)
Stars: ✭ 480 (-21.31%)
Mutual labels:  face-recognition
Tp Gan
Official TP-GAN Tensorflow implementation for paper "Beyond Face Rotation: Global and Local Perception GAN for Photorealistic and Identity Preserving Frontal View Synthesis"
Stars: ✭ 412 (-32.46%)
Mutual labels:  face-recognition

2019.07.14
Currently, I have graduated from campus and doing another kind of job. So this project may not be updated again.

Face_Pytorch

The implementation of popular face recognition algorithms in pytorch framework, including arcface, cosface and sphereface and so on.

All codes are evaluated on Pytorch 0.4.0 with Python 3.6, Ubuntu 16.04.10, CUDA 9.1 and CUDNN 7.1. Partially evaluated on Pytorch 1.0.

Data Preparation

For CNN training, I use CASIA-WebFace and Cleaned MS-Celeb-1M, aligned by MTCNN with the size of 112x112. For performance testing, I report the results on LFW, AgeDB-30, CFP-FP, MegaFace rank1 identification and verification.

For AgeDB-30 and CFP-FP, the aligned images and evaluation images pairs are restored from the mxnet binary file provided by insightface, tools are available in this repository. You should install a mxnet-cpu first for the image parsing, just do ' pip install mxnet ' is ok.
LFW @ BaiduNetdisk, AgeDB-30 @ BaiduNetdisk, CFP_FP @ BaiduNetdisk

Results

MobileFaceNet: Struture described in MobileFaceNet
ResNet50: Original resnet structure
ResNet50-IR: CNN described in ArcFace paper
SEResNet50-IR: CNN described in ArcFace paper

Verification results on LFW, AgeDB-30 and CFP_FP

Small Protocol: trained with CASIA-WebFace of data size: 453580/10575
Large Protocol: trained with DeepGlint MS-Celeb-1M of data size: 3923399/86876

Model Type Loss LFW AgeDB-30 CFP-FP Model Size protocol
MobileFaceNet ArcFace 99.23 93.26 94.34 4MB small
ResNet50-IR ArcFace 99.42 94.45 95.34 170MB small
SEResNet50-IR ArcFace 99.43 94.50 95.43 171MB small
MobileFaceNet ArcFace 99.58 96.57 92.90 4MB large
ResNet50-IR ArcFace 99.82 98.07 95.34 170MB large
SEResNet50-IR ArcFace 99.80 98.13 95.60 171MB large
ResNet100-IR ArcFace 99.83 98.28 96.41 256MB large

There exists an odd result fact that when training under small protocol, CFP-FP performances better than AgeDB-30, while when training with large scale dataset, CFP-FP performances worse than AgeDB-30.

MegaFace rank 1 identifiaction accuracy and [email protected]=1e-6 results

Model Type Loss MF Acc. MF Ver. MF [email protected] MF [email protected] SIZE protocol
MobileFaceNet ArcFace 69.10 84.23 81.15 85.86 4MB small
ResNet50-IR ArcFace 74.31 88.23 87.44 89.56 170MB small
SEResNet50-IR ArcFace 74.37 88.32 88.30 89.65 171MB small
MobileFaceNet ArcFace 74.95 88.77 89.47 91.03 4MB large
ResNet50-IR ArcFace 79.61 96.02 96.58 96.78 170MB large
SEResNet50-IR ArcFace 79.91 96.10 97.01 97.60 171MB large
ResNet100-IR ArcFace 80.40 96.94 97.60 98.05 256MB large

Usage

  1. Download the source code to your machine.
  2. Prepare the train dataset and train list, test dataset and test verification pairs.
  3. Set your own dataset path and any other parameters in train.py.
  4. Run train.py file, test accuracy will print into log file during training process.

  1. Every evaluate file can work independently for the model test process. just set your own args in the file.

Visualization

Visdom support for loss and accuracy during training process.
avatar

Softmax Loss vs Softmax_Center Loss. Left: softmax training set. Right: softmax + center loss training set.

train train

References

MuggleWang/CosFace_pytorch
Xiaoccer/MobileFaceNet_Pytorch
TreB1eN/InsightFace_Pytorch
deepinsight/insightface
KaiyangZhou/pytorch-center-loss
tengshaofeng/ResidualAttentionNetwork-pytorch

Todo

  1. Report the test results on DeepGlint Trillion Pairs Challenge.
  2. Add C++ api for fast deployment with pytorch 1.0.
  3. Train the ResNet100-based model.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].