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

Question about meanIoU binary #30

Open
roywithfiringblade opened this issue Aug 18, 2020 · 3 comments
Open

Question about meanIoU binary #30

roywithfiringblade opened this issue Aug 18, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@roywithfiringblade
Copy link

Thanks for sharing your work! I am a little confused about the metrics. It is said in the code that the mean IoU binary regards all class as one foreground class. But why the results between mean IoU and mean IoU binary are different in 1-way setting? I mean there is only one class which is foreground class,right?

@roywithfiringblade
Copy link
Author

roywithfiringblade commented Aug 20, 2020

just check the code, i think the mIoU binary is the binary-IoU in the article. But i think in n ways situation.the code might be wrong:

if target_idx_j: # if ground-truth contains this class tp_arr[label] = len(set.intersection(pred_idx_j, target_idx_j)) fp_arr[label] = len(pred_idx_j - target_idx_j) fn_arr[label] = len(target_idx_j - pred_idx_j)
in the IoU compute process, the tp,fp,fn are involved only when the GT contains the label. But if there is a class that is contained in pred_label but not in ground truth label, it should be false poistive. And the real meanIoU should be lower due to the larger value of false poistive.
Not sure whether i understand the metric correctly, looking forward to your reply!

@kaixin96
Copy link
Owner

kaixin96 commented Aug 30, 2020

Hi @704051419 , sorry for the late reply. You are right about the n ways situation. if target_idx_j will cause underestimation of FP when target image does not contain all classes in n-ways. Thank you for pointing it this bug. I will refactor the code.

@kaixin96 kaixin96 added the bug Something isn't working label Aug 30, 2020
@EvgeniaChroni
Copy link

Is this bug fixed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants