Skip to content

Commit 9bb0035

Browse files
authored
Update README.md
1 parent a3e8627 commit 9bb0035

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

README.md

+23-13
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
# MobileFaceNet_Tutorial_Pytorch
2-
This repo illustrates how to implement MobileFaceNet and Arcface for face recognition task.
32

4-
## Demo
3+
* This repo illustrates how to implement MobileFaceNet and Arcface for face recognition task.
4+
* Pretrained model is posted for tests over picture, video and cam
5+
* Help document on how to implement MTCNN+MobileFaceNet is available
6+
* Scripts on transforming MXNET data records in [Insightface](https://github.com/deepinsight/insightface/wiki/Dataset-Zoo) to images are provided
7+
* Scripts on train and evaluation of MobileFaceNet model are provided
8+
9+
## MobileFaceNet Video Demo
510

611
<img src="images/ipy_pic/output.gif" width="700" style="float: left;">
712

8-
## Test
13+
## Test over Picture, Video and Cam
914
1. Test Picture
1015
```
1116
python MTCNN_MobileFaceNet.py -img {image_path}
1217
```
1318
2. Take Picture for Face Database
14-
* From cam
19+
* over cam
1520
```
1621
python take_picture.py -n {name}
1722
```
18-
* From photo
23+
* over photo
1924
```
2025
python take_ID.py -i {image_path} -n {name}
2126
```
2227
3. Test Video
23-
* From cam
28+
* over cam
2429
```
2530
python cam_demo.py
2631
```
27-
* From video file
32+
* over video file
2833
```
2934
python video_demo.py
3035
```
@@ -33,8 +38,7 @@ This repo illustrates how to implement MobileFaceNet and Arcface for face recogn
3338
MobileFaceNet_Step_by_Step.ipynb
3439
```
3540
## Train
36-
Download training and evaluation data from [Model Zoo](https://github.com/deepinsight/insightface/wiki/Dataset-Zoo).
37-
Put images and annotation files into "data_set" folder. The structure should be arranged as follows:
41+
Download training and evaluation data from [Model Zoo](https://github.com/deepinsight/insightface/wiki/Dataset-Zoo). All training data has been cropped, aligned and resized as 112 x 112. Put images and annotation files into "data_set" folder. The structure should be arranged as follows:
3842
```
3943
data_set/
4044
---> AgeDB-30
@@ -43,11 +47,11 @@ Put images and annotation files into "data_set" folder. The structure should be
4347
---> faces_emore_images
4448
---> LFW
4549
```
46-
1. Convert .bin and .rec file to images
50+
1. The following script is provided to convert .bin and .rec file to images:
4751
```
4852
python data_set/load_images_from_bin.py
4953
```
50-
2. Generate annotation file
54+
2. Generate the corresponding annotation files
5155
```
5256
python data_set/anno_generation.py
5357
```
@@ -59,7 +63,8 @@ Put images and annotation files into "data_set" folder. The structure should be
5963
```
6064
MobileFaceNet_Training_Step_by_Step.ipynb
6165
```
62-
The training results are shown below:
66+
The training results over faces_emore data (5822653 images / 85742 ids) are shown below:
67+
6368
<table><tr>
6469
<td> <img src="images/ipy_pic/loss_train.png" width="500" style="float: left;"> </td>
6570
<td> <img src="images/ipy_pic/accuracy_train.png" width="500" > </td>
@@ -69,7 +74,7 @@ The training results are shown below:
6974
```
7075
python Evaluation.py
7176
```
72-
Here is the evaluation result. 'Flip' the image can be applied to encode the embedding feature vector with ~ 0.07% higer accuracy. L2 distance score slightly outperforms cos similarity (not necessarily the same trend for other cases, but it is what we conclude in this work)
77+
Here is the evaluation result. 'Flip' the image could be applied to encode the embedding feature vector with ~ 0.07% higer accuracy. L2 distance score slightly outperforms cos similarity (not necessarily the same trend for other cases, but it is what we conclude in this work)
7378

7479
| Eval Type | Score | LFW | AgeDB-30 | CFP-FP
7580
|:--------------:|:---------:|:-------:|:--------:|:-------
@@ -79,3 +84,8 @@ Here is the evaluation result. 'Flip' the image can be applied to encode the emb
7984
|UnFlip | Cos | 99.45 | 95.65 | 93.10
8085

8186
Don't forget to star the repo if it is helpful for your research
87+
88+
## Reference
89+
* https://github.com/deepinsight/insightface
90+
* https://github.com/wujiyang/Face_Pytorch
91+
* https://github.com/TreB1eN/InsightFace_Pytorch

0 commit comments

Comments
 (0)