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

Fix QC for soft segmentations that have light regions close to 1.0 (e.g. 0.999) #4193

Merged
merged 2 commits into from Aug 16, 2023

Conversation

joshuacwnewton
Copy link
Member

Description

In #4133, we added a heuristic-based check for segmentations by making sure the values 0.0 or 1.0 are the most common in the image.

However, some softsegs have light regions that are not exactly 1.0:

image

So, this PR rounds the segmentation values to 1 decimal place, which ensure that values >0.95 and <0.05 must be the most common values in the image, rather than exactly 1.0 and 0.0.

image

Linked issues

Fixes #4178.
Fixes QC issues in #4189.

This accounts for softseg images with light regions that are close to 1.0, but not exactly 1.0.
Copy link
Member

@mguaypaq mguaypaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also has the effect of bucketing all the other values into intervals of size 0.1, which makes binary_most_common a more stringent test, so probably a bit more robust.

LGTM, although I still think the long-term solution is for the QC report code to keep track of which images are intended to be segmentations.

@mguaypaq mguaypaq merged commit 9992a37 into master Aug 16, 2023
24 checks passed
@mguaypaq mguaypaq deleted the jn/4178-fix-softseg-qc-0.999 branch August 16, 2023 19:15
@mguaypaq mguaypaq mentioned this pull request Aug 24, 2023
@joshuacwnewton joshuacwnewton added bug category: fixes an error in the code sct_qc context: labels Oct 30, 2023
@joshuacwnewton joshuacwnewton added this to the 6.1 milestone Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug category: fixes an error in the code sct_qc context:
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect soft QC report
2 participants