mirror of
https://github.com/deepinsight/insightface.git
synced 2025-12-30 08:02:27 +00:00
Update README.md
This commit is contained in:
95
README.md
95
README.md
@@ -50,36 +50,6 @@ Please click the image to watch the Youtube video. For Bilibili users, click [he
|
||||
**`2018.10.16`**: We achieved state-of-the-art performance on [Trillionpairs](http://trillionpairs.deepglint.com/results) (name: nttstar) and [IQIYI_VID](http://challenge.ai.iqiyi.com/detail?raceId=5afc36639689443e8f815f9e) (name: WitcheR).
|
||||
|
||||
|
||||
### Major Modules
|
||||
|
||||
- **Deep Face Recognition**
|
||||
|
||||
In this module, we provide training data, network settings and loss designs for deep face recognition.
|
||||
The training data includes, but not limited to the cleaned MS1M, VGG2 and CASIA-Webface datasets, which were already packed in MXNet binary format.
|
||||
The network backbones include ResNet, MobilefaceNet, MobileNet, InceptionResNet_v2, DenseNet, etc..
|
||||
The loss functions include Softmax, SphereFace, CosineFace, ArcFace, Sub-Center ArcFace and Triplet (Euclidean/Angular) Loss.
|
||||
Training and validation can be started with a single command.
|
||||
|
||||
Please check the detail page of [ArcFace](https://github.com/deepinsight/insightface/tree/master/recognition/ArcFace)(which accepted in CVPR-2019) and [SubCenter-ArcFace](https://github.com/deepinsight/insightface/tree/master/recognition/SubCenter-ArcFace)(which accepted in ECCV-2020).
|
||||
|
||||
|
||||
- **Face Detection**
|
||||
|
||||
RetinaFace is a practical single-stage [SOTA](http://shuoyang1213.me/WIDERFACE/WiderFace_Results.html) face detector which is initially introduced in [arXiv technical report](https://arxiv.org/abs/1905.00641) and then accepted by [CVPR 2020](https://openaccess.thecvf.com/content_CVPR_2020/html/Deng_RetinaFace_Single-Shot_Multi-Level_Face_Localisation_in_the_Wild_CVPR_2020_paper.html). We provide training code, training dataset, pretrained models and evaluation scripts.
|
||||
|
||||
Please check the detail page of [RetinaFace](https://github.com/deepinsight/insightface/tree/master/RetinaFace).
|
||||
|
||||
RetinaFaceAntiCov is an experimental module to identify face boxes with masks. Please check the detail page of [RetinaFaceAntiCov](https://github.com/deepinsight/insightface/tree/master/RetinaFaceAntiCov)
|
||||
|
||||
|
||||
- **Face Alignment**
|
||||
|
||||
SDUNet(short for ``Stacked Dense U-Nets with Dual Transformers for Robust Face Alignment``) which accepted by BMVC-2018 was introducted in [alignment-heatmapReg](https://github.com/deepinsight/insightface/tree/master/alignment/heatmapReg) page. We also provide other network settings such as classic hourglass. You can find all of training code, training dataset and evaluation scripts.
|
||||
|
||||
On the other hand, in contrast to heatmap based approaches, we provide some lightweight facial landmark models with fast coordinate regression. The input of these models is loose cropped face image while the output is the direct landmark coordinates. See detail at [alignment-coordinateReg](https://github.com/deepinsight/insightface/tree/master/alignment/coordinateReg) page. Only pretrained models available in this module.
|
||||
|
||||
|
||||
|
||||
## Contents
|
||||
[Deep Face Recognition](#deep-face-recognition)
|
||||
- [Introduction](#introduction)
|
||||
@@ -91,9 +61,14 @@ Training and validation can be started with a single command.
|
||||
- [512-D Feature Embedding](#512-d-feature-embedding)
|
||||
- [Third-party Re-implementation](#third-party-re-implementation)
|
||||
|
||||
[Face Alignment](#face-alignment)
|
||||
|
||||
[Face Detection](#face-detection)
|
||||
- [RetinaFace](#retinaface)
|
||||
- [RetinaFaceAntiCov](#retinafaceanticov)
|
||||
|
||||
[Face Alignment](#face-alignment)
|
||||
- [DenseUNet](#denseunet)
|
||||
- [CoordinateReg](#coordinatereg)
|
||||
|
||||
|
||||
[Citation](#citation)
|
||||
|
||||
@@ -103,31 +78,32 @@ Training and validation can be started with a single command.
|
||||
|
||||
### Introduction
|
||||
|
||||
In this repository, we provide training data, network settings and loss designs for deep face recognition.
|
||||
The training data includes the normalised MS1M, VGG2 and CASIA-Webface datasets, which were already packed in MXNet binary format.
|
||||
The network backbones include ResNet, MobilefaceNet, MobileNet, InceptionResNet_v2, DenseNet, DPN.
|
||||
The loss functions include Softmax, SphereFace, CosineFace, ArcFace and Triplet (Euclidean/Angular) Loss.
|
||||
In this module, we provide training data, network settings and loss designs for deep face recognition.
|
||||
The training data includes, but not limited to the cleaned MS1M, VGG2 and CASIA-Webface datasets, which were already packed in MXNet binary format.
|
||||
The network backbones include ResNet, MobilefaceNet, MobileNet, InceptionResNet_v2, DenseNet, etc..
|
||||
The loss functions include Softmax, SphereFace, CosineFace, ArcFace, Sub-Center ArcFace and Triplet (Euclidean/Angular) Loss.
|
||||
|
||||
You can check the detail page of our work [ArcFace](https://github.com/deepinsight/insightface/tree/master/recognition/ArcFace)(which accepted in CVPR-2019) and [SubCenter-ArcFace](https://github.com/deepinsight/insightface/tree/master/recognition/SubCenter-ArcFace)(which accepted in ECCV-2020).
|
||||
|
||||

|
||||
|
||||
Our method, ArcFace, was initially described in an [arXiv technical report](https://arxiv.org/abs/1801.07698). By using this repository, you can simply achieve LFW 99.80%+ and Megaface 98%+ by a single model. This repository can help researcher/engineer to develop deep face recognition algorithms quickly by only two steps: download the binary dataset and run the training script.
|
||||
Our method, ArcFace, was initially described in an [arXiv technical report](https://arxiv.org/abs/1801.07698). By using this module, you can simply achieve LFW 99.83%+ and Megaface 98%+ by a single model. This module can help researcher/engineer to develop deep face recognition algorithms quickly by only two steps: download the binary dataset and run the training script.
|
||||
|
||||
### Training Data
|
||||
|
||||
All face images are aligned by [MTCNN](https://kpzhang93.github.io/MTCNN_face_detection_alignment/index.html) and cropped to 112x112:
|
||||
All face images are aligned by ficial five landmarks and cropped to 112x112:
|
||||
|
||||
Please check [Dataset-Zoo](https://github.com/deepinsight/insightface/wiki/Dataset-Zoo) for detail information and dataset downloading.
|
||||
|
||||
|
||||
* Please check *src/data/face2rec2.py* on how to build a binary face dataset. Any public available *MTCNN* can be used to align the faces, and the performance should not change. We will improve the face normalisation step by full pose alignment methods recently.
|
||||
* Please check *src/data/face2rec2.py* on how to build a binary face dataset. You can either choose *MTCNN* or *RetinaFace* to align the faces.
|
||||
|
||||
### Train
|
||||
|
||||
1. Install `MXNet` with GPU support (Python 2.7).
|
||||
1. Install `MXNet` with GPU support (Python 3.X).
|
||||
|
||||
```
|
||||
pip install mxnet-cu90
|
||||
pip install mxnet-cu101 # which should match your installed cuda version
|
||||
```
|
||||
|
||||
2. Clone the InsightFace repository. We call the directory insightface as *`INSIGHTFACE_ROOT`*.
|
||||
@@ -136,7 +112,7 @@ pip install mxnet-cu90
|
||||
git clone --recursive https://github.com/deepinsight/insightface.git
|
||||
```
|
||||
|
||||
3. Download the training set (`MS1M-Arcface`) and place it in *`$INSIGHTFACE_ROOT/datasets/`*. Each training dataset includes at least following 6 files:
|
||||
3. Download the training set (`MS1M-Arcface`) and place it in *`$INSIGHTFACE_ROOT/recognition/datasets/`*. Each training dataset includes at least following 6 files:
|
||||
|
||||
```Shell
|
||||
faces_emore/
|
||||
@@ -151,11 +127,7 @@ git clone --recursive https://github.com/deepinsight/insightface.git
|
||||
The first three files are the training dataset while the last three files are verification sets.
|
||||
|
||||
4. Train deep face recognition models.
|
||||
In this part, we assume you are in the directory *`$INSIGHTFACE_ROOT/recognition/`*.
|
||||
```Shell
|
||||
export MXNET_CPU_WORKER_NTHREADS=24
|
||||
export MXNET_ENGINE_TYPE=ThreadedEnginePerDevice
|
||||
```
|
||||
In this part, we assume you are in the directory *`$INSIGHTFACE_ROOT/recognition/ArcFace/`*.
|
||||
|
||||
Place and edit config file:
|
||||
```Shell
|
||||
@@ -171,7 +143,7 @@ We give some examples below. Our experiments were conducted on the Tesla P40 GPU
|
||||
CUDA_VISIBLE_DEVICES='0,1,2,3' python -u train.py --network r100 --loss arcface --dataset emore
|
||||
```
|
||||
It will output verification results of *LFW*, *CFP-FP* and *AgeDB-30* every 2000 batches. You can check all options in *config.py*.
|
||||
This model can achieve *LFW 99.80+* and *MegaFace 98.3%+*.
|
||||
This model can achieve *LFW 99.83+* and *MegaFace 98.3%+*.
|
||||
|
||||
(2). Train CosineFace with LResNet50E-IR.
|
||||
|
||||
@@ -220,7 +192,7 @@ COM(θ) = cos(m_1*θ+m_2) - m_3
|
||||
|
||||
For training with `m1=1.0, m2=0.3, m3=0.2`, run following command:
|
||||
```
|
||||
CUDA_VISIBLE_DEVICES='0,1,2,3' python -u train_softmax.py --network r100 --loss combined --dataset emore
|
||||
CUDA_VISIBLE_DEVICES='0,1,2,3' python -u train.py --network r100 --loss combined --dataset emore
|
||||
```
|
||||
|
||||
Results by using ``MS1M-IBUG(MS1M-V1)``
|
||||
@@ -263,13 +235,28 @@ For single cropped face image(112x112), total inference time is only 17ms on our
|
||||
- Tensorflow: [InsightFace-tensorflow](https://github.com/luckycallor/InsightFace-tensorflow)
|
||||
- TensorRT: [wang-xinyu/tensorrtx](https://github.com/wang-xinyu/tensorrtx)
|
||||
|
||||
## Face Alignment
|
||||
|
||||
Please check the [Menpo](https://github.com/jiankangdeng/MenpoBenchmark) Benchmark and [Dense U-Net](https://github.com/deepinsight/insightface/tree/master/alignment) for more details.
|
||||
|
||||
## Face Detection
|
||||
|
||||
Please check [RetinaFace](https://github.com/deepinsight/insightface/tree/master/RetinaFace) for more details.
|
||||
### RetinaFace
|
||||
|
||||
RetinaFace is a practical single-stage [SOTA](http://shuoyang1213.me/WIDERFACE/WiderFace_Results.html) face detector which is initially introduced in [arXiv technical report](https://arxiv.org/abs/1905.00641) and then accepted by [CVPR 2020](https://openaccess.thecvf.com/content_CVPR_2020/html/Deng_RetinaFace_Single-Shot_Multi-Level_Face_Localisation_in_the_Wild_CVPR_2020_paper.html). We provide training code, training dataset, pretrained models and evaluation scripts.
|
||||
|
||||
Please check the detail page of [RetinaFace](https://github.com/deepinsight/insightface/tree/master/RetinaFace).
|
||||
|
||||
### RetinaFaceAntiCov
|
||||
|
||||
RetinaFaceAntiCov is an experimental module to identify face boxes with masks. Please check the detail page of [RetinaFaceAntiCov](https://github.com/deepinsight/insightface/tree/master/RetinaFaceAntiCov)
|
||||
|
||||
## Face Alignment
|
||||
|
||||
### DenseUNet
|
||||
|
||||
Please check the [Menpo](https://github.com/jiankangdeng/MenpoBenchmark) Benchmark and our [Dense U-Net](https://github.com/deepinsight/insightface/tree/master/alignment/heatmapReg) for detail. We also provide other network settings such as classic hourglass. You can find all of training code, training dataset and evaluation scripts there.
|
||||
|
||||
### CoordinateReg
|
||||
|
||||
On the other hand, in contrast to heatmap based approaches, we provide some lightweight facial landmark models with fast coordinate regression. The input of these models is loose cropped face image while the output is the direct landmark coordinates. See detail at [alignment-coordinateReg](https://github.com/deepinsight/insightface/tree/master/alignment/coordinateReg) page. Only pretrained models available in this module.
|
||||
|
||||
|
||||
## Citation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user