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

mIoU with background in semantic segmentaion #554

Open
Gil-TakKong opened this issue Dec 12, 2022 · 1 comment
Open

mIoU with background in semantic segmentaion #554

Gil-TakKong opened this issue Dec 12, 2022 · 1 comment

Comments

@Gil-TakKong
Copy link

Hi!

I have a question about background in the calculation of the mIoU.

When we calculate the mIoU of the segmentaion, usually IoU of the background is included.

In that case, mIoU is at least 0.45 even the model didn't catch anything because of the IoU(background).

I wondering about
Is the calculation(mIoU with background) correct or reasonable?
If the calculation is not reasonable, then how can we measure the performance of the segmentation model?

Thank you.

@jaswindersingh2
Copy link

Hi @Gil-TakKong

I think, background can ignored by passing class_indexes argument to the sm.metrics.IOUScore() function.

For example, to ignore background during IoU evaluation (for 3 classes CLASSES = ['sky', 'building', 'pole', 'unlabelled/background']), sm.metrics.IOUScore() function can be modified as follows:

metrics = [sm.metrics.IOUScore(threshold=0.5,class_indexes=[0,1,2]), sm.metrics.FScore(threshold=0.5,class_indexes=[0,1,2])]

Cheers

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