-
Notifications
You must be signed in to change notification settings - Fork 41
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
Get the confidence of the segmented class during test tme #24
Comments
@juntang-zhuang here is a small update on the above issue.
|
@poornimajd Hi, sorry for the late reply, quite busy recently. I suspect the scaled prob occurs when reshape the predicted logits map to the same size as the actual image size, so it depends on the interpolation method it might output probability larger than 1. A walk-around might be to interpolate the logits rather than the probability, then perform softmax on resized feature map to get probability. |
Thank you for the reply.
I tried to interpolate the 'out' from this line to [720,1280] as this is my test image shape: ShelfNet/ShelfNet18_realtime/evaluate.py Line 55 in ea7b9f4
This is then given to the softmax function.But in the crop_eval function,I get an error in this line: ShelfNet/ShelfNet18_realtime/evaluate.py Line 93 in ea7b9f4
The reason being prob and prob_chip do not have same shape. Is this something to change with the dataloader? But I have already trained the model with the given dataloader. I am just thinking if the following works-
Yes,I agree,but given the time constraints,I wanted to know if I can do something with the existing sources itself. |
Hi, sorry for the late reply. I'm not so sure about the shape mismatch, it has been too long since this work and I don't remember the details, I remember the network is predicting patch by patch (perhaps for each patch it predicts at different scales, then scale it back to the original size, need to check the code), and there are even overlaps between patches to get better smoothness. This might be the cause of error. Taking the mean of probability might be fine, again I'm not sure, I would use Bayesian methods for uncertainty, rather than on the output probability. Also note that if we care about accuracy, not uncertainty, it doesn't matter whether it's normalized probability, or logits of probability; all we need to do is to find the max index (corresponding to a class) for each pixel, it may not even be a meaningful probability if we only care about the correct max index. |
Hello,
I am trying to figure out if there is a way to get the shelfnet network also give the confidence of the segmented class during test time.Basically give how accurate the network thinks the segmentation output is.
Any suggestion is greatly appreciated.
Thank you
The text was updated successfully, but these errors were encountered: