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

Is values of heatmap plane comparable? #24

Open
mrgloom opened this issue Mar 22, 2018 · 1 comment
Open

Is values of heatmap plane comparable? #24

mrgloom opened this issue Mar 22, 2018 · 1 comment

Comments

@mrgloom
Copy link

mrgloom commented Mar 22, 2018

For example I have 2 classes and for single image I have heatmap with shape [H,W,N_CLASSES]. I train my model with sigmoid + binary crossentropy. At prediction time when I use larger image as network input, at each pixel I want my classes to be exclusive, so I need to compare heatmap values with np.argmax to get 'best' class, so my questions is values in heatmaps are really comparable?

I tried to dump min, max values of heatmap for single image:

i 0
np.min(heatmap[:,:,i]),np.max(heatmap[:,:,i]) -38.4533 19.9384
i 1
np.min(heatmap[:,:,i]),np.max(heatmap[:,:,i]) -20.2977 34.8101 

As I can see range of values are different and heatmaps are not normalized.

Is there a way to normalize all planes of heatmap to [0,1] range and make them comparable?

@linzhiqiu
Copy link

Hey @mrgloom are you able to solve this question? I actually have a related question: Is the values of heat map inter-comparable? I.e. if the max value of heat map 1 is 34, and the max value of heat map 2 is 19, can we see that the max value cell of heat map 1 contribute more to the final class score than heat map 2?

I feel like the answer is yes, but was having a hard time justifying this. Let me know your thoughts on this!

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