Network for CenterNet. The pytorch implementation for "Objects as Points ".
- Clone this repository
git clone https://github.com/Runist/torch_CenterNet
- Install torch_CenterNet from source.
cd torch_CenterNet
pip install -r requirements.txt
- Download the Pascal dataset or COCO dataset. Create new folder name call "data" and symbolic link for your dataset.
mkdir data
cd data
ln -s xxx/VOCdevkit VOCdevkit
cd ..
- Prepare the classes information file and place it in "data" directory, the txt file format is:
aeroplane
bicycle
...
tvmonitor
- Configure the parameters in tools/args.py.
- Start train your model.
python tools/train.py
or use Linux shell to start.
sh scripts/train_yolo.sh
- Open tensorboard to watch loss, learning rate etc. You can also see training process and training process and validation prediction.
tensorboard --logdir ./weights/yolo_voc/log/summary
- After train, you can run evaluate.py to watch model performance.
python tools/evaluate.py
As well as use Linux shell to start.
sh scripts/eval_yolo.sh
- Get prediction of model.
python tools/predict.py
Or use script to run
sh scripts/predict.sh
We provide three dataset format for this repository "yolo", "coco", "voc",You need create new annotation file for "yolo", the format of "yolo" is:
image_path|1,95,240,336,19
image_path|305,131,318,151,14|304,142,354,160,3
"coco", "voc" is follow the format of their dataset. And prepare the classes information file and place it in "data" directory.
Train Dataset | Val Dataset | weight | mAP 0.5 | mAP 0.5:0.95 |
---|---|---|---|---|
VOC07+12 | VOC-Test07 | resnet50-CenterNet.pt | 0.622 | 0.436 |
Appreciate the work from the following repositories:
Code and datasets are released for non-commercial and research purposes only. For commercial purposes, please contact the authors.