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

Semantic Segmentation Bugfix #815

Merged
merged 1 commit into from
Nov 5, 2024
Merged

Semantic Segmentation Bugfix #815

merged 1 commit into from
Nov 5, 2024

Conversation

czaloom
Copy link
Collaborator

@czaloom czaloom commented Nov 4, 2024

Issue

Summing was performed on the wrong axes for counting unmatched pixels. This did not raise issues as it only occurred in certain edge cases.

Testing

Added an edge case test. It checks the output of an intermediate confusion matrix.

The structure of the intermediate is as follows.

Position (0, 0) is count of background pixels.
Slice (0, 1:) are unmatched prediction counts.
Slice (1:, 0) are unmatched ground truth counts.

# before fix
[[ 0 -1 -1  3 -1]
 [ 1  0  0  1  0]
 [ 1  0  0  1  0]
 [-3  0  0  1  0]
 [ 1  0  0  1  0]]

# after fix
[[0 0 0 0 0]
 [0 0 0 1 0]
 [0 0 0 1 0]
 [0 0 0 1 0]
 [0 0 0 1 0]]

@czaloom czaloom linked an issue Nov 4, 2024 that may be closed by this pull request
1 task
@czaloom czaloom self-assigned this Nov 4, 2024
@czaloom czaloom added the bug Something isn't working label Nov 4, 2024
@czaloom czaloom marked this pull request as ready for review November 4, 2024 23:13
@czaloom czaloom merged commit 09f804b into main Nov 5, 2024
13 checks passed
@czaloom czaloom deleted the czaloom-bug-lite-semseg-814 branch November 5, 2024 14:28
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

Successfully merging this pull request may close these issues.

BUG: Semantic Segmentation not tracking missing predictions properly.
2 participants