svishwa / crowdcount-mcnn

Single Image Crowd Counting via MCNN (Unofficial Implementation)
MIT License
499 stars 179 forks source link

is your get_density_map_gaussian implementation difference from the papers #14

Open yoyoismee opened 6 years ago

yoyoismee commented 6 years ago

in file "get_density_map_gaussian.m" it seem that you have a fix value of sigma to 4.0 (line 19) whereas in the paper the sigma are change according to mean KNN distance for each head? (session 2.2) am I missing something of it really difference?

svishwa commented 6 years ago

You are correct. The ground-truth density maps are calculated differently as compared to the paper. Neverthless, I get comparable results as in the paper.

yoqim commented 6 years ago

From your code, the density map was computed by the original frames. And when the original frame was resized, the density map was resized as the same way. Is that right? or Should I compute the density map with function (get_density_map_gaussian.m) again according to the resized map?

svishwa commented 6 years ago

Note that the density map after resizing are normalized (see line 43).

image

So, resizing of input image and density map are not exactly similar.

yoqim commented 6 years ago

hi~ Can you share how did you deal with the number difference between the gt density map before and after downsample? Specifically, when I trained the model, I found the number of people (groundtruth) calculated by the ground truth density map before and after downsampling is different. So, if I train with the downsampled gt map, the ground truth number in the final MSE is the sum of downsampled map or the original gt number? Thank you.