Home

Awesome

S-DCNet

This is the repository for S-DCNet, presented in our paper in the ICCV 2019:

From Open Set to Closed Set: Supervised Spatial Divide-and-Conquer for Object Counting

Haipeng Xiong<sup>1</sup>, Hao Lu<sup>2</sup>, Chengxin Liu<sup>1</sup>, Liang Liu<sup>1</sup>, Zhiguo Cao<sup>1</sup>, Chunhua Shen<sup>2</sup>

<sup>1</sup>Huazhong University of Science and Technology, China

<sup>2</sup>The University of Adelaide, Australia

News !!!

An extended version of S-DCNet, i.e., SS-DCNet is now available !!!

Contributions

Environment

Please install required packages according to requirements.txt.

Data

Testing data for ShanghaiTech dataset have been preprocessed. You can download the processed dataset from:

Baidu Yun (314M) with code: ou3b

Google Drive (314M)

Model

Pretrained weights can be downloaded from:

Baidu Yun (210MB) with code: 1tcb

Google Drive (210MB)

A Quick Demo

  1. Download the code, data and model.

  2. Organize them into one folder. The final path structure looks like this:

-->The whole project
    -->Test_Data
        -->SH_partA_Density_map
        -->SH_partB_Density_map
    -->model
        -->SHA
        -->SHB
    -->Network
        -->class_func.py
        -->merge_func.py
        -->SDCNet.py
    -->SHAB_main.py
    -->main_process.py
    -->Val.py
    -->load_data_V2.py
    -->IOtools.py
  1. Run the following code to reproduce our results. The MAE will be SHA: 57.575, SHB: 6.633. Have fun:)

    python SHAB_main.py
    

References

If you find this work or code useful for your research, please cite:

@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}
}