leeyeehoo / CSRNet-pytorch

CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes
647 stars 261 forks source link

Density Map generation #86

Open wuzhe71 opened 3 years ago

wuzhe71 commented 3 years ago

In density map generation, the gaussian_filter_density function will lead to slight variation. So i change the code:

density += scipy.ndimage.filters.gaussian_filter(pt2d, sigma, mode='constant')

to

map = scipy.ndimage.filters.gaussian_filter(pt2d, sigma, mode='constant') map = map / map.sum() density += map

This could avoid the slight variation, but would it affect the training?

WYG-2021 commented 3 years ago

the map.sum() is 1,I think it didn't work, did it?