Skip to content
Branch: master
Find file History
Latest commit b1c747e Dec 4, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
rcnn add config items Dec 4, 2019
Makefile RetinaFace impl May 3, 2019
README.md Update README.md Oct 8, 2019
retinaface.py cascade retinaface Oct 16, 2019
test.py RetinaFace test May 3, 2019
test_widerface.py cascade retinaface Oct 16, 2019
train.py py36 fix Dec 4, 2019

README.md

RetinaFace Face Detector

Introduction

RetinaFace is a practical single-stage SOTA face detector which is initially described in arXiv technical report

demoimg1

demoimg2

Data

  1. Download our annotations (face bounding boxes & five facial landmarks) from baidu cloud or dropbox

  2. Download the WIDERFACE dataset.

  3. Organise the dataset directory under insightface/RetinaFace/ as follows:

  data/retinaface/
    train/
      images/
      label.txt
    val/
      images/
      label.txt
    test/
      images/
      label.txt

Install

  1. Install MXNet with GPU support.
  2. Install Deformable Convolution V2 operator from Deformable-ConvNets if you use the DCN based backbone.
  3. Type make to build cxx tools.

Training

Please check train.py for training.

  1. Copy rcnn/sample_config.py to rcnn/config.py

  2. Download ImageNet pretrained models and put them into model/(these models are not for detection testing/inferencing but training and parameters initialization).

    ImageNet ResNet50 (baidu cloud and dropbox).

    ImageNet ResNet152 (baidu cloud and dropbox).

  3. Start training with CUDA_VISIBLE_DEVICES='0,1,2,3' python -u train.py --prefix ./model/retina --network resnet.
    Before training, you can check the resnet network configuration (e.g. pretrained model path, anchor setting and learning rate policy etc..) in rcnn/config.py.

  4. We have two predefined network settings named resnet(for medium and large models) and mnet(for lightweight models).

Testing

Please check test.py for testing.

RetinaFace Pretrained Models

Pretrained Model: RetinaFace-R50 (baidu cloud or dropbox) is a medium size model with ResNet50 backbone. It can output face bounding boxes and five facial landmarks in a single forward pass.

WiderFace validation mAP: Easy 96.5, Medium 95.6, Hard 90.4.

To avoid the confliction with the WiderFace Challenge (ICCV 2019), we postpone the release time of our best model.

Third-party Models

yangfly: RetinaFace-MobileNet0.25 (baidu cloud). WiderFace validation mAP: Hard 82.5. (model size: 1.68Mb)

clancylian: C++ version

References

@inproceedings{yang2016wider,
title = {WIDER FACE: A Face Detection Benchmark},
author = {Yang, Shuo and Luo, Ping and Loy, Chen Change and Tang, Xiaoou},
booktitle = {CVPR},
year = {2016}
}
  
@inproceedings{deng2019retinaface,
title={RetinaFace: Single-stage Dense Face Localisation in the Wild},
author={Deng, Jiankang and Guo, Jia and Yuxiang, Zhou and Jinke Yu and Irene Kotsia and Zafeiriou, Stefanos},
booktitle={arxiv},
year={2019}
}
You can’t perform that action at this time.