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

Why mIoU uses sum(intersect)/sum(union) instead of mean over IoU? #271

Open
hubert0527 opened this issue Dec 13, 2021 · 1 comment
Open

Comments

@hubert0527
Copy link

I found the mIoU evaluation codes here:

iou = intersection_meter.sum / (union_meter.sum + 1e-10)

I am wondering what is the motivation of using sum(intersect)/sum(union) instead of the mean over sample-wise intersect / union? The former one seems to disregard the testing samples are iid.

Thanks!

@apple2373
Copy link

This appears to be a common issue in semantic segmentation. Some use global IoU, while others use the average per-image IoU.

IvLabs/stagewise-knowledge-distillation#12 (comment)
https://stats.stackexchange.com/questions/554724/is-there-an-official-procedure-to-compute-miou-mean-intersection-over-union

I've noticed others raising similar queries, and unfortunately, there's no universally accepted method. I think it's crucial to specify which approach you're using, and to ensure that you compare the same mIoU when publishing a paper.

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