Files
insightface/README.md

73 lines
4.2 KiB
Markdown
Raw Normal View History

2017-11-29 16:39:30 +08:00
# InsightFace
2017-09-01 08:36:52 +08:00
Face Recognition Project
2017-11-29 16:39:30 +08:00
2017-12-07 09:45:20 +08:00
### How to use
2017-12-07 16:29:51 +08:00
1. Download pre-aligned training dataset from our data repo which is a large binary file in MXnet .rec format(maybe ready soon), or align your dataset by yourself and then pack them to prevent random small files accessing. Check those scripts under src/common and src/align.
2017-12-07 09:45:20 +08:00
2. Run src/train_softmax.py to train your model and set proper parameters. For example, loss-type=0 means pure softmax while loss-type=1 means SphereLoss. It will output LFW accuracy every 2000 batches and save the model if necessary.
2017-12-07 09:58:35 +08:00
### Notes
2017-11-29 16:39:30 +08:00
Default image size is 112x96 if not specified, all face images are aligned.
2017-12-07 09:45:20 +08:00
In ResNet setting, \_v1 means original residual units. \_v2 means pre-activation units. \_v3 means BCBACB residual units. LResNet means we use conv33+stride11 in its first convoluition layer instead of common conv77+stride22 to preserve high image resolution. For ResNet50, we do not use bottleneck layers. For ResNet101 or ResNeXt101, we use.
2017-11-30 19:15:34 +08:00
2017-12-01 14:59:54 +08:00
In last several layers, some different options can be tried to determine how embedding layer looks like and it may affect the performance. The whole network architecture can be thought as {ConvLayers(->GlobalPool)->EmbeddingLayer->Softmax}. Embedding size is set to 512 expect for optionA, as embedding size in optionA is determined by the filter size of last convolution group.
2017-12-01 14:56:49 +08:00
2017-12-08 13:00:57 +08:00
- Option\*X: Same with Option\* but use dropout after GP. OptionAX is the default setting for inceptions.
2017-12-07 16:29:51 +08:00
- OptionA: Use global pooling layer(GP). This is the default setting for all networks except inceptions.
2017-12-01 14:56:49 +08:00
- OptionB: Use one FC layer after GP.
- OptionC: Use FC->BN after GP.
- OptionD: Use FC->BN->PRelu after GP.
2017-12-07 16:29:51 +08:00
- OptionE: Use BN->Dropout->FC->BN after last conv layer.
- OptionF: Use BN->PRelu->Dropout->FC->BN after last conv layer.
2017-12-07 09:45:20 +08:00
2017-12-07 09:58:35 +08:00
### Experiments
2017-12-07 09:45:20 +08:00
- **Softmax only on VGG2@112x112**
2017-12-07 16:29:51 +08:00
| Network/Dataset | LFW | ------ | ------ |
| :--------------------: | :--------------: | :--------------: | :--------------: |
| ResNet50D_v1 | 0.99350+-0.00293 | | |
| SE-ResNet50A\_v1 | 0.99367+-0.00233 | | |
| SE-ResNet50B_v1 | 0.99200+-0.00407 | | |
| SE-ResNet50C_v1 | 0.99317+-0.00404 | | |
| SE-ResNet50D_v1 | 0.99383+-0.00259 | | |
| SE-ResNet50E\_v1 | 0.99267+-0.00343 | | |
| SE-ResNet50F\_v1 | 0.99367+-0.00194 | | |
| SE-LResNet50C_v1 | 0.99567+-0.00238 | | |
| SE-LResNet50D_v1 | 0.99600+-0.00281 | | |
| SE-LResNet50E_v1 | 0.99650+-0.00174 | - | - |
| SE-LResNet50A_v3 | 0.99583+-0.00327 | | |
| SE-LResNet50D_v3 | 0.99617+-0.00358 | - | - |
| SE-LResNet50E_v3 | 0.99767+-0.00200 | - | - |
2017-12-08 13:00:57 +08:00
| LResNet50E_v3 | 0.99750+-0.00250 | | |
2017-12-07 16:29:51 +08:00
| SE-LResNet50F_v3 | | | |
2017-12-08 13:00:57 +08:00
| SE-LResNet50BX_v3 | 0.99350+-0.00263 | | |
2017-12-07 16:29:51 +08:00
| SE-ResNet101D_v3 | 0.99517+-0.00252 | | |
| SE-ResNet101E_v3 | 0.99467+-0.00221 | | |
| SE-ResNet152E_v3 | 0.99500+-0.00307 | | |
2017-12-08 13:00:57 +08:00
| Inception-ResNetBX | 0.99417+-0.00375 | - | - |
2017-12-07 16:29:51 +08:00
| SE-Inception-ResNet-v2 | - | - | - |
| MobileNetD | 0.99150+-0.00425 | - | - |
2017-12-08 13:00:57 +08:00
| LMobileNetD | 0.99383+-0.00409 | - | - |
| LMobileNetE | 0.99633+-0.00314 | - | - |
| LMobileNetF | 0.99617+-0.00211 | - | - |
2017-12-07 16:29:51 +08:00
| LResNeXt101E_v3 | | | |
2017-12-21 15:41:54 +08:00
How weight decay affects:
SE-LResNet50E-v3/vggface2/softmax:
2017-12-21 15:42:41 +08:00
2017-12-21 15:41:54 +08:00