This code is use to train and evaluate the hornet backbone in CenterNet. For more technical details, please refer to the arXiv paper.
CenterNet is an one-stage detector which gets trained from scratch. On the MS-COCO dataset, CenterNet achieves an AP of 47.0%, which surpasses all known one-stage detectors, and even gets very close to the top-performance two-stage detectors.
Please first install Anaconda and create an Anaconda environment using the provided package list.
conda create --name CenterNet --file conda_packagelist.txt
After you create the environment, activate it.
source activate CenterNet
cd <CenterNet dir>/models/py_utils/_cpools/
python setup.py install --user
cd <CenterNet dir>/external
make
cd <CenterNet dir>/data/coco/PythonAPI
make
- Download the training/validation split we use in our paper from here (originally from Faster R-CNN)
- Unzip the file and place
annotations
under<CenterNet dir>/data/coco
- Download the images (2014 Train, 2014 Val, 2017 Test) from here
- Create 3 directories,
trainval2014
,minival2014
andtestdev2017
, under<CenterNet dir>/data/coco/images/
- Copy the training/validation/testing images to the corresponding directories according to the annotation files
To train HrCenterNet:
python train.py HRNet
We provide the configuration file (HRNet.json
) and the model file (HRNet-104.py
) for CenterNet in this repo.
To continue training:
- modify the
pretrained
inHRNet.json
python train.py HRNet --iter 10000
To train DLANet:
python train.py DLANet
To test HRNet:
python test.py HRNet --testiter 480000 --split validation
To test DLANet:
python test.py DLANet --testiter <iter> --split <split>