项目作者: JJXiangJiaoJun

项目描述 :
PyramidBox implemented with mxnet
高级语言: Python
项目地址: git://github.com/JJXiangJiaoJun/gluon_PyramidBox.git
创建时间: 2019-01-26T16:05:02Z
项目社区:https://github.com/JJXiangJiaoJun/gluon_PyramidBox

开源协议:

下载


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.

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

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

   Easy mAP Medium mAP Hard mAP
paper 96.1 95.0 88.9
this repo 92.5 90.8 83.3

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

  • I use batch size 4 because of memory limitations,which is 16 in the paper
  • some parameters are not metioned in the paper

Here are several examples of succesful detection outputs:


Details

I implement following structures metioned in the paper:

  • Low-Level FPN
  • max-in-out layer
  • PyramidAnchors
  • Context-sensitive Prediction Module
  • Data-anchor sampling
  • Learning rate warmup and cosine decay

    Dependencies

Implement Details

  • Ubuntu 16.04 LTS
  • CUDA 9.0
  • cuDNN 7.0.5

Preparation

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

Download and prepare data

  1. download WIDER FACE dataset into widerface/downloads

    1. $$ tree widerface/downloads
    2. widerface/downloads
    3. ├── eval_tools.zip
    4. ├── Submission_example.zip
    5. ├── wider_face_split.zip
    6. ├── WIDER_test.zip
    7. ├── WIDER_train.zip
    8. └── WIDER_val.zip
  2. Prepare data: unzip data, annotations and eval_tools to ./widerface

    1. python tool/prepare.py
    2. $$ tree widerface -L 1
    3. widerface
    4. ├── downloads
    5. ├── eval_tools
    6. ├── wider_face_split
    7. ├── WIDER_train
    8. └── WIDER_val
  3. Prepare custom val dataset for quick validation (crop and resize to 640)

    1. $$ python tool/build_custom_val.py
    2. $$ tree widerface -L 1
    3. widerface
    4. ├── downloads
    5. ├── eval_tools
    6. ├── WIDER_custom
    7. ├── wider_face_split
    8. ├── WIDER_train
    9. └── WIDER_val

Train on WIDER FACE Datasets

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

  1. python train_end2end.py --use-bn

or you can see more details:

  1. python train_end2end.py --help

Evalution

eval your own model on WIDER FACE Datasets:

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

Reference