This is the repository for SS-DCNet, presented in our paper:
From Open Set to Closed Set: Supervised Spatial Divide-and-Conquer for Object Counting
Haipeng Xiong1, Hao Lu2, Chengxin Liu1, Liang Liu1, Chunhua Shen2, Zhiguo Cao1
1Huazhong University of Science and Technology, China
2The University of Adelaide, Australia
The mean average error (MAE) of SS-DCNet against its previous version, S-DCNet, over 5 challenging counting datasets are reported on the table:
SHA | SHB | UCF_CC_50 | UCF-QNRF | TRANCOS | MTC | |
---|---|---|---|---|---|---|
S-DCNet (cls) | 58.3 | 6.7 | 204.2 | 104.4 | 2.92 | 5.6 |
SS-DCNet (cls) | 56.1 | 6.6 | 179.2 | 81.9 | 2.42 | 3.9 |
Please install required packages according to requirements.txt
.
Testing data for ShanghaiTech and UCF-QNRF dataset have been preprocessed. You can download the processed dataset from:
ShanghaiTech PartA [Baidu Yun] with code: po1v or [Google Drive]
ShanghaiTech PartB [Baidu Yun] with code: po1v or [Google Drive]
UCF-QNRF [Baidu Yun] with code: po1v or [Google Drive]
Pretrained weights can be downloaded from:
ShanghaiTech PartA [Baidu Yun] with code: weng or [Google Drive]
ShanghaiTech PartB [Baidu Yun] with code: weng or [Google Drive]
UCF-QNRF [Baidu Yun] with code: weng or [Google Drive]
Download the code, data and model.
Organize them into one folder. The final path structure looks like this:
-->The whole project
-->data
-->SH_partA
-->SH_partB
-->UCF-QNRF_ECCV18
-->model
-->SHA
-->SHB
-->QNRF
-->Network
-->base_Network_module.py
-->merge_func.py
-->class_func.py
-->SSDCNet.py
-->all_main.py
-->main_process.py
-->Val.py
-->load_data_V2.py
-->IOtools.py
Run the following code to reproduce our results. The MAE will be SHA: 55.571, SHB: 6.645 and QNRF: 81.864 . Have fun:)
for ShanghaiTech PartA: python all_main.py --dataset SHA
for ShanghaiTech PartB: python all_main.py --dataset SHB
for UCF-QNRF: python all_main.py --dataset QNRF
If you find this work or code useful for your research, please cite:
@misc{xiong2020open,
title={From Open Set to Closed Set: Supervised Spatial Divide-and-Conquer for Object Counting},
author={Haipeng Xiong and Hao Lu and Chengxin Liu and Liang Liu and Chunhua Shen and Zhiguo Cao},
year={2020},
eprint={2001.01886},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
and
@inproceedings{xhp2019SDCNet,
title={From Open Set to Closed Set: Counting Objects by Spatial Divide-and-Conquer},
author={Xiong, Haipeng and Lu, Hao and Liu, Chengxin and Liang, Liu and Cao, Zhiguo and Shen, Chunhua},
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
year={2019},
pages = {8362-8371}
}