From f062983c2b9f731ba155ad65fb490682f3b89662 Mon Sep 17 00:00:00 2001 From: Jia Guo Date: Fri, 26 Jan 2018 23:33:51 +0800 Subject: [PATCH 1/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 905fcf4..ae4fee8 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,7 @@ export MXNET_ENGINE_TYPE=ThreadedEnginePerDevice 4. Start to run megaface development kit to produce final result. ### Pretrained-Models -   1. [LResNet34E-IR@BaiduDrive](https://pan.baidu.com/s/1qZvZOxI) +   1. [LResNet34E-IR@BaiduDrive](https://pan.baidu.com/s/1jKahEXw) Performance: From c11bc8726821644fb61290e0fe010177ec8544c8 Mon Sep 17 00:00:00 2001 From: Jia Guo Date: Sat, 27 Jan 2018 23:13:42 +0800 Subject: [PATCH 2/6] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ae4fee8..3142f60 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,9 @@ ### Recent Update - 2018.01.26: Today we provide a pretrained *LResNet34E-IR* model on public drive. We also offer a simple python program to help you deploy this model to build your own face recognition application. The only requirement is using your own face detector to crop a face image before sending it to our program, no alignment needed. For single cropped face image(112x112), total inference time is only 17ms on my testing server(Intel E5-2660 @ 2.00GHz, Tesla M40, *LResNet34E-IR*). This model can archieve 99.65% on *LFW* and 96.7% on *MegaFace Rank1 Acc*. Please see deployment section for detail. + **`2018.01.27`**: MS1M clean list now available at [here](https://pan.baidu.com/s/1eTn6O62). Aligned facescrub images(112x112) can be downloaded [here](https://pan.baidu.com/s/1ghcpIH9). + + **`2018.01.26`**: Today we provide a pretrained *LResNet34E-IR* model on public drive. We also offer a simple python program to help you deploy this model to build your own face recognition application. The only requirement is using your own face detector to crop a face image before sending it to our program, no alignment needed. For single cropped face image(112x112), total inference time is only 17ms on my testing server(Intel E5-2660 @ 2.00GHz, Tesla M40, *LResNet34E-IR*). This model can archieve 99.65% on *LFW* and 96.7% on *MegaFace Rank1 Acc*. Please see deployment section for detail. ### License From 9f76f43d164067c237b8aa63df1420db4fa2d088 Mon Sep 17 00:00:00 2001 From: Jia Guo Date: Mon, 29 Jan 2018 09:38:05 +0800 Subject: [PATCH 3/6] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 3142f60..edf38ee 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ ### Recent Update + **`2018.01.29`**: Caffe *LResNet34E-IR* model is available now. We get it by converting original MXNet model to Caffe format but there's some performance drop. See [Pretrained-Models](#pretrained-models) for detail. + **`2018.01.27`**: MS1M clean list now available at [here](https://pan.baidu.com/s/1eTn6O62). Aligned facescrub images(112x112) can be downloaded [here](https://pan.baidu.com/s/1ghcpIH9). **`2018.01.26`**: Today we provide a pretrained *LResNet34E-IR* model on public drive. We also offer a simple python program to help you deploy this model to build your own face recognition application. The only requirement is using your own face detector to crop a face image before sending it to our program, no alignment needed. For single cropped face image(112x112), total inference time is only 17ms on my testing server(Intel E5-2660 @ 2.00GHz, Tesla M40, *LResNet34E-IR*). This model can archieve 99.65% on *LFW* and 96.7% on *MegaFace Rank1 Acc*. Please see deployment section for detail. @@ -227,6 +229,14 @@ export MXNET_ENGINE_TYPE=ThreadedEnginePerDevice | Method | LFW(%) | CFP-FF(%) | CFP-FP(%) | AgeDB-30(%) | MegaFace1M(%) | | ------- | ------ | --------- | --------- | ----------- | ------------- | | Ours | 99.65 | 99.77 | 92.12 | 97.70 | **96.70** | + + 2. Caffe [LResNet34E-IR@BaiduDrive](https://pan.baidu.com/s/1bpRsvYR), got by converting above MXNet model. + + Performance: + + | Method | LFW(%) | CFP-FF(%) | CFP-FP(%) | AgeDB-30(%) | MegaFace1M(%) | + | ------- | ------ | --------- | --------- | ----------- | ------------- | + | Ours | 99.46 | 99.60 | 87.75 | 96.00 | **93.29** | ### Deployment **Note:** In this part, we assume you are in the directory **`$INSIGHTFACE_ROOT/deploy/`**. From 181822d7f180e839d61212a2ab14484a1e939efc Mon Sep 17 00:00:00 2001 From: Jia Guo Date: Mon, 29 Jan 2018 09:39:50 +0800 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index edf38ee..26a9b07 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,7 @@ export MXNET_ENGINE_TYPE=ThreadedEnginePerDevice | ------- | ------ | --------- | --------- | ----------- | ------------- | | Ours | 99.65 | 99.77 | 92.12 | 97.70 | **96.70** | - 2. Caffe [LResNet34E-IR@BaiduDrive](https://pan.baidu.com/s/1bpRsvYR), got by converting above MXNet model. + 2. **`Caffe`** [LResNet34E-IR@BaiduDrive](https://pan.baidu.com/s/1bpRsvYR), got by converting above MXNet model. Performance: From 91d6c956063089a48677cda59994032fb2a365a0 Mon Sep 17 00:00:00 2001 From: nttstar Date: Mon, 29 Jan 2018 23:03:01 +0800 Subject: [PATCH 5/6] add FGHIJ end setting --- src/symbols/symbol_utils.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/symbols/symbol_utils.py b/src/symbols/symbol_utils.py index c4493dc..70accd9 100644 --- a/src/symbols/symbol_utils.py +++ b/src/symbols/symbol_utils.py @@ -23,13 +23,19 @@ def get_fc1(last_conv, num_classes, fc_type): fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='pre_fc1') fc1 = mx.sym.BatchNorm(data=fc1, fix_gamma=True, eps=2e-5, momentum=bn_mom, name='fc1') elif fc_type=='F': - bn1 = mx.sym.BatchNorm(data=body, fix_gamma=False, eps=2e-5, momentum=bn_mom, name='bn1') - relu1 = Act(data=bn1, act_type='relu', name='relu1') - body = mx.symbol.Dropout(data=relu1, p=0.4) + body = mx.sym.BatchNorm(data=body, fix_gamma=False, eps=2e-5, momentum=bn_mom, name='bn1') + body = mx.symbol.Dropout(data=body, p=0.4) + fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='fc1') + elif fc_type=='G': + body = mx.sym.BatchNorm(data=body, fix_gamma=False, eps=2e-5, momentum=bn_mom, name='bn1') + fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='fc1') + elif fc_type=='H': + fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='fc1') + elif fc_type=='I': + body = mx.sym.BatchNorm(data=body, fix_gamma=False, eps=2e-5, momentum=bn_mom, name='bn1') fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='pre_fc1') fc1 = mx.sym.BatchNorm(data=fc1, fix_gamma=True, eps=2e-5, momentum=bn_mom, name='fc1') - elif fc_type=='G': - body = mx.symbol.Dropout(data=body, p=0.4) + elif fc_type=='J': fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='pre_fc1') fc1 = mx.sym.BatchNorm(data=fc1, fix_gamma=True, eps=2e-5, momentum=bn_mom, name='fc1') else: From 76eedb0601bf08d5f262a007be37963abc3a0cde Mon Sep 17 00:00:00 2001 From: nttstar Date: Tue, 30 Jan 2018 13:05:04 +0800 Subject: [PATCH 6/6] fix model_slim --- deploy/model_slim.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/deploy/model_slim.py b/deploy/model_slim.py index 5d62f6b..cd5e932 100644 --- a/deploy/model_slim.py +++ b/deploy/model_slim.py @@ -2,19 +2,11 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function -from scipy import misc import sys import os import argparse -import tensorflow as tf import numpy as np import mxnet as mx -import random -import cv2 -import sklearn -from sklearn.decomposition import PCA -from time import sleep -from easydict import EasyDict as edict parser = argparse.ArgumentParser(description='face model slim') # general