This my implementation of CenterNet(Objects as Points) in pure TensorFlow.You can refer to the official code.Because I use light backbone without DCN, this implementation doesn't work as well as official version. The main special features of this repo inlcude:
- tf.data pipeline
- light backbone:resnet18, mobilenetV2
- all codes were writen by pure TensorFlow ops (no keras or slim)
- support training on your own dataset.
- python3
- tensorflow>=1.12
- opencv-python
- tqdm
Download Pascal VOC Dataset and reorganize the directory as follows:
VOC
├── test
| └──VOCdevkit
| └──VOC2007
└── train
└──VOCdevkit
└──VOC2007
└──VOC2012
Generate ./data/dataset/voc_train.txt
and ./data/dataset/voc_test.txt
, some codes of this part are from yolov3:
$ cd ./data/dataset
$ python voc_annotation.py --data_path D:/dataset/VOC
You can get pre-train weights of resnet or mobilenet from my other repo. Put npy file in pretrained_weights
folder.
$ python train.py
Update ckpt_path
in inference.py
,and run demo:
$ python inference.py
The result for the example images should look like:
$ tensorboard --logdir=./log
[1] official code and paper
[2] YunYang1994's YOLOv3 repo