Home

Awesome

PyramidBox: A Context-assisted Single Shot Face Detector

Introduction

A MXNet implementation of PyramiBbox:A Context-assisted Single Shot Face Detector. If you want to learn more details,please refer to the original paper.

@inproceedings{Tang2018PyramidBoxAC,
  title={PyramidBox: A Context-Assisted Single Shot Face Detector},
  author={Xu Tang and Daniel K. Du and Zeqiang He and Jingtuo Liu},
  booktitle={ECCV},
  year={2018}
}

I train PyramidBox with WIDER FACE dataset,results are as follows:

  Easy mAPMedium mAPHard mAP
paper96.195.088.9
this repo92.590.883.3

I think mainly reasons that this repo can not get the same precision as paper as follows:

Here are several examples of succesful detection outputs:

Details

I implement following structures metioned in the paper:

Dependencies

Implement Details

Preparation

git clone git@github.com:JJXiangJiaoJun/gluon_PyramidBox.git
cd gluon_PyramidBox

Download and prepare data

  1. download WIDER FACE dataset into widerface/downloads
$$ tree widerface/downloads
widerface/downloads
├── eval_tools.zip
├── Submission_example.zip
├── wider_face_split.zip
├── WIDER_test.zip
├── WIDER_train.zip
└── WIDER_val.zip
  1. Prepare data: unzip data, annotations and eval_tools to ./widerface
python tool/prepare.py
$$ tree widerface -L 1
widerface
├── downloads
├── eval_tools
├── wider_face_split
├── WIDER_train
└── WIDER_val
  1. Prepare custom val dataset for quick validation (crop and resize to 640)
$$ python tool/build_custom_val.py
$$ tree widerface -L 1
widerface
├── downloads
├── eval_tools
├── WIDER_custom
├── wider_face_split
├── WIDER_train
└── WIDER_val

Train on WIDER FACE Datasets

train vgg16 based pyramidbox with 1 gpus.I only implement VGG16 as backbone currently:

python train_end2end.py --use-bn

or you can see more details:

python train_end2end.py --help

Evalution

eval your own model on WIDER FACE Datasets:

python eval.py --use-bn --model models/pyramidbox/pyramidbox_best.params

Reference