How to extract the classification probability of each class?
Juliachang opened this issue · 3 comments
Hi @jiwoon-ahn,
I am trying to output the classification probability of 20 classes of VGG-based model. Can I take the probabilities from infer_cls.py? (e.g.,
Line 28 in b091fe8
Since in infer_cls.py, you only do forward_cam instead of forward, I am wondering if you can take the outputted probability of each class from here. My understanding is, I can only obtain the CAMs from here. If my understanding is wrong, do you have any suggestions about how to take the probability of each class of the multi-label classifier out? Thanks a lot!
Perhaps, you could reuse
Lines 121 to 124 in ff17bf5
Here, x means the classification probabilities before sigmoid function.
Hi @jiwoon-ahn,
Thanks for answering. I found the classification probabilities successfully.
Another question is, I use the VGG weights that you provided on github to check the accuracy of CAMs. But I cannot achieve the mIoU that you reported. (VGG-16: Train(mIoU):48.9, Val(mIoU):46.6)
I scaled the outputed cam response to 0-1 and set a threshold to 0.15. If the response is over the threshold, I count the IoU with the segmentation ground truth. My counted mIoU is 36.4. Can you tell me how you obtain the mIoU numbers? Do I need to keep training your model based on the provided weights?
It would be so great if you can share your experience with me. Thanks a lot!
Hi @jiwoon-ahn,
Thanks for answering. I found the classification probabilities successfully.
Another question is, I use the VGG weights that you provided on github to check the accuracy of CAMs. But I cannot achieve the mIoU that you reported. (VGG-16: Train(mIoU):48.9, Val(mIoU):46.6)I scaled the outputed cam response to 0-1 and set a threshold to 0.15. If the response is over the threshold, I count the IoU with the segmentation ground truth. My counted mIoU is 36.4. Can you tell me how you obtain the mIoU numbers? Do I need to keep training your model based on the provided weights?
It would be so great if you can share your experience with me. Thanks a lot!
How do you calculate mIOU? Where to download GT? Could you refer to any source code or reference regarding this?
Thanks a lot!