LCFCN icon indicating copy to clipboard operation
LCFCN copied to clipboard

Inference problem

Open tongpinmo opened this issue 5 years ago • 3 comments

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

tongpinmo avatar Jan 15 '20 10:01 tongpinmo

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

IssamLaradji avatar Feb 05 '20 14:02 IssamLaradji

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

tongpinmo avatar Feb 06 '20 02:02 tongpinmo

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

IssamLaradji avatar Aug 05 '20 12:08 IssamLaradji