We release the code of our CC-Det-v2 proposed in our paper.
- We recommend you to use Anaconda to create a conda environment:
conda create -n ccdet python=3.6
- Then, activate the environment:
conda activate ccdet
- Requirements:
pip install -r requirements.txt
PyTorch >= 1.9.1 and Torchvision >= 0.10.1
- Backbone: ResNet
- Neck: Dilated Encoder
- Feature Aggregation: PaFPN
- Head: DecoupledHead
- Download COCO.
cd <FreeYOLOv2_HOME>
cd dataset/scripts/
sh COCO2017.sh
- Check COCO
cd <FreeYOLOv2_HOME>
python dataset/coco.py
Main results on COCO:
Model | Size | FPS 2080ti |
Param | FLOPs | APval | APtest | weight |
---|---|---|---|---|---|---|---|
CCDet-R18 | 640 | 132 | 21.9 M | 29.5 B | 37.7 | 37.7 | github |
CCDet-R50 | 640 | 68 | 36.3 M | 50.1 B | 41.8 | 41.8 | github |
CCDet-R101 | 640 | 45 | 56.3 M | 81.2 B | 42.6 | 42.6 | github |
sh train.sh
You can change the configurations of train.sh
, according to your own situation.
sh train_ddp.sh
You can change the configurations of train_ddp.sh
, according to your own situation.
python test.py -d coco --cuda -v ccdet_r18 -size 640 --weight path/to/weight --show
voc ccdet_r50
... ...
python eval.py -d coco-val --cuda -v ccdet_r18 -size 640 --weight path/to/weight
voc ccdet_r50
... ...
I have provide some images in data/demo/images/
,
so you can run following command to run a demo:
python demo.py --cuda \
--mode image \
--path_to_img data/demo/images/ \
-v ccdet_r18 \
-size 640 \
--weight path/to/weight
If you want run a demo of streaming video detection,
you need to set --mode
to video
, and give the path to video --path_to_vid
。
python demo.py --cuda \
--mode video \
--path_to_img data/demo/videos/video_file \
-v ccdet_r18 \
-size 640 \
--weight path/to/weight
If you want run video detection with your camera,
you need to set --mode
to camera
。
python demo.py --cuda \
--mode camera \
-v ccdet_r18 \
-size 640 \
--weight path/to/weight
If you are using our code, please consider citing our paper.
@article{yang2022novel,
title={A novel fast combine-and-conquer object detector based on only one-level feature map},
author={Yang, Jianhua and Wang, Ke and Li, Ruifeng and Qin, Zhonghao and Perner, Petra},
journal={Computer Vision and Image Understanding},
volume={224},
pages={103561},
year={2022},
publisher={Elsevier}
}