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

Void pixels in ground truth labels #31

Open
ShanyCohen opened this issue Oct 30, 2021 · 1 comment
Open

Void pixels in ground truth labels #31

ShanyCohen opened this issue Oct 30, 2021 · 1 comment

Comments

@ShanyCohen
Copy link

Hello,

I'm trying to figure out how the void pixels affect the mIou and the loss computation.
The labels are being decremented by 1 in the code so that class numbers in the prediction and the ground truth labels will match.
So to my understanding, there are pixels with the value -1 in the label image but the prediction doesn't include void pixels.
Are those pixels being ignored or being considered as true/false predictions?

Thanks,
Shany

@mona0809
Copy link
Collaborator

mona0809 commented Nov 2, 2021

Void is ignored during both training and mIoU.
For cross entropy loss the index -1 is ignored (see: https://github.com/TUI-NICR/ESANet/blob/main/src/utils.py#L27-L30)
For mIoU, both prediction and ground truth are filtered, such that only those pixels are taken into account, that are not void in ground truth. (see: https://github.com/TUI-NICR/ESANet/blob/main/train.py#L437-L460)

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