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

Lung segmentation - extra segment outsize the body mass #22

Closed
stergioc opened this issue Apr 30, 2020 · 5 comments
Closed

Lung segmentation - extra segment outsize the body mass #22

stergioc opened this issue Apr 30, 2020 · 5 comments

Comments

@stergioc
Copy link

Dear @JoHof,

thanks for sharing this work. I am posting this issue just because it seems like a simple fix that can increase the robustness of the whole pipeline. While checking the performance on some scans I figured than in some cases, the model produced an additional segment outside of the body mass along with the left/right labels. I found cases with both 1 and 2 as label for this extra segment. Here is an example:

issue

I would guess that a simple counting of the connected components in the final segmentation could fix this issue.

@JoHof
Copy link
Owner

JoHof commented Apr 30, 2020

Hi,

thanks for reporting this. That's weird, post-processing should take care of this. Are you eventually using an older version? Otherwise this is a bug. Could you eventually share such a case?

@stergioc
Copy link
Author

stergioc commented May 1, 2020

Hello, I am indeed using the latest version lungmask==0.2.3. Looking a bit closer to the intermediate results it seems that the problem can be identified after this line:

regionmask = skimage.measure.label(label_image > 0)

in the case that the left/right lung are touching then they both belong to the same label mask and therefore the second largest region is outside of the lung region.

I hope this helps.

@JoHof
Copy link
Owner

JoHof commented May 1, 2020

Absolutely! Thank you so much! Will fix that shortly...

@JoHof
Copy link
Owner

JoHof commented May 1, 2020

Should be fixed. Let me know if there are any other issues...

@stergioc
Copy link
Author

stergioc commented May 4, 2020

Indeed it is fixed for the examples I checked. Cool 👌

@JoHof JoHof closed this as completed May 4, 2020
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