资源算法InsightFace_Pytorch

InsightFace_Pytorch

2020-01-02 | |  36 |   0 |   0

InsightFace_Pytorch

Pytorch0.4.1 codes for InsightFace


1. Intro

  • This repo is a reimplementation of Arcface(paper), or Insightface(github)

  • For models, including the pytorch implementation of the backbone modules of Arcface and MobileFacenet

  • Codes for transform MXNET data records in Insightface(github) to Image Datafolders are provided

  • Pretrained models are posted, include the MobileFacenet and IR-SE50 in the original paper


2. Pretrained Models & Performance

IR-SE50 @ BaiduNetdisk, IR-SE50 @ Onedrive

LFW(%)CFP-FF(%)CFP-FP(%)AgeDB-30(%)calfw(%)cplfw(%)vgg2_fp(%)
0.99520.99620.95040.96220.95570.91070.9386

Mobilefacenet @ BaiduNetDisk, Mobilefacenet @ OneDrive

LFW(%)CFP-FF(%)CFP-FP(%)AgeDB-30(%)calfw(%)cplfw(%)vgg2_fp(%)
0.99180.98910.89860.93470.94020.8660.9100

3. How to use

  • clone

    git clone https://github.com/TropComplique/mtcnn-pytorch.git

3.1 Data Preparation

3.1.1 Prepare Facebank (For testing over camera or video)

Provide the face images your want to detect in the data/face_bank folder, and guarantee it have a structure like following:

data/facebank/
        ---> id1/
            ---> id1_1.jpg
        ---> id2/
            ---> id2_1.jpg
        ---> id3/
            ---> id3_1.jpg
           ---> id3_2.jpg

3.1.2 download the pretrained model to work_space/model

If more than 1 image appears in one folder, an average embedding will be calculated

3.2.3 Prepare Dataset ( For training)

download the refined dataset: (emore recommended)

Note: If you use the refined MS1M dataset and the cropped VGG2 dataset, please cite the original papers.

  • after unzip the files to 'data' path, run :

    python prepare_data.py

    after the execution, you should find following structure:

faces_emore/
            ---> agedb_30
            ---> calfw
            ---> cfp_ff
            --->  cfp_fp
            ---> cfp_fp
            ---> cplfw
            --->imgs
            ---> lfw
            ---> vgg2_fp

3.2 detect over camera:

- facebank/
         name1/
             photo1.jpg
             photo2.jpg
             ...
         name2/
             photo1.jpg
             photo2.jpg
             ...
         .....
    if more than 1 image appears in the directory, average embedding will be calculated
  • 4 to start

    python face_verify.py

3.3 detect over video:

```
python infer_on_video.py -f [video file name] -s [save file name]
```

the video file should be inside the data/face_bank folder

3.4 Training:

```
python train.py -b [batch_size] -lr [learning rate] -e [epochs]

# python train.py -net mobilefacenet -b 200 -w 4
```

4. References

PS

  • PRs are welcome, in case that I don't have the resource to train some large models like the 100 and 151 layers model

  • Email : treb1en@qq.com


上一篇:uipath_deoldify

下一篇:mediapipe-models

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...