Coder Social home page Coder Social logo

The threshold parameter of `sct_deepseg` doesn't work with the model `seg_sc_contrast_agnostic` for soft segmentation. about spinalcordtoolbox HOT 8 OPEN

simonqueric avatar simonqueric commented on June 27, 2024 1
The threshold parameter of `sct_deepseg` doesn't work with the model `seg_sc_contrast_agnostic` for soft segmentation.

from spinalcordtoolbox.

Comments (8)

naga-karthik avatar naga-karthik commented on June 27, 2024 1

yes! But it was a bad quick fix given the urgency at the time. Surely, a cleaner way exists ...

@joshuacwnewton let me know if you're looking into it or should I. In case you are looking into it, please note that the default threshold we decided was 0.1. That means, if a user explicitly requires softseg then SCT should output a result with 0.1 threshold. This threshold value was chosen based on comparing different thresholds and their downstream effects on the spinal cord CSA! (details here)

from spinalcordtoolbox.

simonqueric avatar simonqueric commented on June 27, 2024 1

Thank you for finding this issue! That's very strange... I'm happy to investigate!

In the short term, does -thr 0.01 work for you?

Yes this threshold works on the branch master. Notice that the soft-segmentation works on the branch nk/4481-add-monai-postprocessing.

from spinalcordtoolbox.

joshuacwnewton avatar joshuacwnewton commented on June 27, 2024

Thank you for finding this issue! That's very strange... I'm happy to investigate!

In the short term, does -thr 0.01 work for you?

from spinalcordtoolbox.

jcohenadad avatar jcohenadad commented on June 27, 2024

I think @naga-karthik fixed it here

from spinalcordtoolbox.

joshuacwnewton avatar joshuacwnewton commented on June 27, 2024

Taking a look at this now! My apologies for the delay.

from spinalcordtoolbox.

joshuacwnewton avatar joshuacwnewton commented on June 27, 2024

I was able to fix this issue and generate a softseg, and I'll be pushing a fix ASAP.

Off-topic

However, I noticed when I test with t2.nii.gz, there are negative values in the output softseg? Also, the max value is > 1?

This surprised me, as I expect softsegs to be in the range [0, 1]. Have you experienced this from the contrast agnostic model in the past?

from spinalcordtoolbox.

jcohenadad avatar jcohenadad commented on June 27, 2024

However, I noticed when I test with t2.nii.gz, there are negative values in the output softseg? Also, the max value is > 1?

could this be caused by interpretation when the prediction is resampled back to the input image resolution? But this would only happen with spline interpolation of order 2+ (which should not be used for segmentation anyway)

from spinalcordtoolbox.

joshuacwnewton avatar joshuacwnewton commented on June 27, 2024

@jcohenadad You're exactly right, opening a new issue. :)

from spinalcordtoolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.