Paper (conference version) Paper (journal version) [Supp]() [Presentation]() [Poster]()
This code is built by Guolei Sun. For questions, please contact sunguolei.kaust@gmail.com
This respority uses some functions from PRM.
CountSeg
├── Nest-pytorch
├── ...
├── PRM-pytorch
├── ...
├── ...
pip install git+https://github.com/ZhouYanzhao/Nest.git
nest module install ./PRM-pytorch prm
Validate the installation by "nest module list --filter prm", you should see something like this.
## Output:
#
# 3 Nest modules found.
#[0] prm.fc_resnet50 (1.0.0)
#[1] prm.peak_response_mapping (1.0.0)
#[2] prm.prm_visualize (1.0.0)
If you get some error, it is because that you miss some packages. Install them and do the validation again until you can get something like above
nest module install ./Nest-pytorch pytorch
cd path/CountSeg/dataset
chmod +x pascal_download.sh
./pascal_download.sh
Before running the script, do not forget to change the save_path_2007 and save_path_2012 in pascal_download.sh to the path where you want to save pascal 2007 and 2012 dataset.
Go to "CountSeg/demo" and run demo.
To reproduce the results reproted in the paper.
cd path/CountSeg
jupyter notebook
Then open eval_counting_pascal07.ipynb and simply run each cell inside it. Make sure you change the data path in eval_counting_pascal07.ipynb.
cd path/CountSeg/experiments
jupyter notebook
Then open main-pascal.ipynb or main-coco.ipynb to do training on Pascal or COCO, respectively. Make sure you change the data path in config_counting_pascal07.yml and config_counting_coco14.yml.
If you find the code useful for your research, please cite:
@INPROCEEDINGS{cholakkal_sun2019object,
author = {Cholakkal, Hisham and Sun, Guolei and Khan, Fahad Shahbaz and Shao, Ling},
title = {Object Counting and Instance Segmentation with Image-level Supervision},
booktitle = {CVPR},
year = {2019}
}
@article{cholakkal_sun2020towards,
title={Towards Partial Supervision for Generic Object Counting in Natural Scenes},
author={Cholakkal, Hisham and Sun, Guolei and Khan, Salman and Khan, Fahad Shahbaz and Shao, Ling and Gool, Luc Van},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI)},
year={2020}
}