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

MeanIoU metric gives ValueError #49

Open
Barthas255 opened this issue Mar 27, 2023 · 1 comment
Open

MeanIoU metric gives ValueError #49

Barthas255 opened this issue Mar 27, 2023 · 1 comment

Comments

@Barthas255
Copy link

Barthas255 commented Mar 27, 2023

Hi, Im testing DeepLabV3+ for 2 class segmentation task and wanted to change the metric. Accuracy is pretty useless in my scenario, since I'm trying to detect buldings on orthophotomap, and the rest is just background.
But when I try to change metric to IoU (or MeanIoU) I'm welcomed with this ValueError:

image
image

I tried looking for the answer on the internet, wasn't successful.
I tried to implement my own IoU like this:

image

but this sometimes gives values outside of range (0,1), which is bad.
Also I believe somehow y_pred and y_true don't have the same dimensions, which is odd for me:

image

I might be missing something obvious
Any solutions?

@DoraPist
Copy link

Hello everyone! I have the same issue... I would like to use MeanIoU as a metric, but I get the above error too. If someone knows how to solve it, please, let an answer here. It would be very helpful.
Thank you in advance!

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