ServiceNow / LCFCN

ECCV 2018 - Where are the Blobs: Counting by Localization with Point Supervision. This is a ServiceNow Research project that was started at Element AI.
Apache License 2.0
169 stars 58 forks source link

Inference problem #29

Open tongpinmo opened 4 years ago

tongpinmo commented 4 years ago

After I train the network with multiple classes(11), the inference result is confusing. In applyOnImage.py: The first problem is in the line: imsave(save_path, ut.combine_image_blobs(image_raw, pred_blobs)): ValueError: Invalid shape for image array: (10, w,h, c); the counts[None]: [[7. 0. 0. 0. 0. 0. 0. 0. 0. 0.]]

so I add pred_blobs_max = np.argmax(pred_blobs,axis=0), imsave(save_path, ut.combine_image_blobs(image_raw, pred_blobs_max)) and it works

However, here the second problem comes: the visualization result of prediction images is very confusing, it seems that the count is correct but the pixel location is not on the object

the dataset is the same to pascal.py

Thank you very much! @IssamLaradji

IssamLaradji commented 4 years ago

hmmm strange. Is your dataset publicly available? I can test it on my end. Thanks.

tongpinmo commented 4 years ago

hmmm strange. Is your dataset publicly available? I can test it on my end. Thanks.

Ok, my dataset is NWPU VHR-10, the link is: https://1drv.ms/u/s!AmgKYzARBl5cczaUNysmiFRH4eE from page http://www.escience.cn/people/gongcheng/NWPU-VHR-10.html Thanks, I wonder know whether my dataset.py is right

IssamLaradji commented 4 years ago

Hi @tongpinmo the code has been refactored and should work better now. Did you try it with this new version of the code? Thanks.