Skip to content

JJXiangJiaoJun/gluon_PyramidBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 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

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

About

PyramidBox implemented with mxnet

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages