CommissarMa / CSRNet-pytorch

The simple implemention of CSRNet.
MIT License
50 stars 10 forks source link

generate ground truth density-map #1

Open WangDaDa6348 opened 5 years ago

WangDaDa6348 commented 5 years ago

hello thinks your code ! I'm running it .But in data_preparation/k_nearest_gaussian_kernel.py, I don't find gt . I want to know how to set this parameter.

CommissarMa commented 5 years ago

gt is points. I forget to change this annotation.

WangDaDa6348 commented 5 years ago

gt is points. I forget to change this annotation.

Thank you for your answer, I am trying to run it

WangDaDa6348 commented 4 years ago

Hello author, I see that the csrnet code has been updated. I ran the code before the update. Is there any difference in learning to the crowd before and after the update?

CommissarMa commented 4 years ago

I change the visualization tool from Visdom to TensorboardX which seems more great. Besides, update the GT density maps generation code which doesn't do well in the previous version. And some little change in train.py. Thank you for your attention.

WangDaDa6348 commented 4 years ago

Thanks to the author, I have encountered some problems with crowd learning. If the front-end is designed for multi-channel learning, multi-channel features are merged in the middle layer, such as concat. Will this cause repeated accumulation of crowd counts?

CommissarMa commented 4 years ago

I think more parameters can boost your performance on the public datasets. However, if you do some application for real scenes, it may be overfitting. I think VGG-based architecture is enough. If the dataset is very huge, you can use resnet. Another idea is that you can use some semantic segmentation to construct more accurate density map, there are some related papers in CVPR2019 and ICCV2019.

WangDaDa6348 commented 4 years ago

Thanks I see that the trained model performs better than expected in Part A. Has this changed? The down-sampled estimation map is generated during the test. The original density map seems to be up-sampled.

CommissarMa commented 4 years ago

The performance in PartA not change. The size of generated densitymap is 1/8 of the original image both in height and width. The new version applys an upsample layer to keep the size of density map same with original image.

WangDaDa6348 commented 4 years ago

Is the upsampling process a test application? Is 8x downsampling used during training?

CommissarMa commented 4 years ago

Both.

WangDaDa6348 commented 4 years ago

Is the downsampling true density map during training?

CommissarMa commented 4 years ago

you can see Model.py. image

WangDaDa6348 commented 4 years ago

Thanks ,I know The actual number of code generated is different from the picture displayed in the original text.

WangDaDa6348 commented 4 years ago

For the 11th picture of the A test, the original display is 1608, I generated 1601

CommissarMa commented 4 years ago

Yeah. And the performance on the dataset is pretty well.

anuragvij264 commented 4 years ago

Hey @CommissarMa is there a way to automatically generate the ground truth ".mat" file for new unseen test image?