Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inference problem #29

Open
tongpinmo opened this issue Jan 15, 2020 · 3 comments
Open

Inference problem #29

tongpinmo opened this issue Jan 15, 2020 · 3 comments

Comments

@tongpinmo
Copy link

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
Copy link
Collaborator

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

@tongpinmo
Copy link
Author

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants