xhp-hust-2018-2011 / S-DCNet

Implementaion of S-DCNet (ICCV 2019)
MIT License
133 stars 27 forks source link

The field in matlab gt file are not the same with what provided in original dataset #10

Closed Cli98 closed 4 years ago

Cli98 commented 4 years ago

Hi @xhp-hust-2018-2011

Thank you for your excellent work.

I want to ask questions for the shanghai tech dataset you used. In your implementation("Loaddata.py"), ground true files for training mat has a field called "crop_gtdens" and for test mat you have a field called "density_map". Both of them are not available in original dataset.

Can you explain what "crop_gtdens" is? Maybe density map for cropped image?

Thank you

xhp-hust-2018-2011 commented 4 years ago

For training, the orignal images and density maps are croped to 1/4 size of the orignal images, and 'crop_gtdens' denotes cropped gt density maps. For testing, there is no need to crop the image. And for testing, in load_data_V2.py line 107, 'target = mat['all_num']' means we use the number of the dot annotation as the ground truth count number.

The orignial dataset provides dot annotations, and we need to generate density maps from dot annotations. Some codes for generating density maps can be found at https://github.com/leeyeehoo/CSRNet-pytorch/blob/master/make_dataset.ipynb.

Cli98 commented 4 years ago

Thank you, I appreciate your help.