sct-pipeline / contrast-agnostic-softseg-spinalcord

Contrast-agnostic spinal cord segmentation project with softseg
MIT License
4 stars 3 forks source link

Simplify inference script #100

Closed naga-karthik closed 6 months ago

naga-karthik commented 6 months ago

Instead of creating a whole datalist file when running inference on a single image, this PR simplifies the inference procedure by directly loading the image using the standard Dataset/Dataloader.

Additionally, the script is also updated to output a binarized predicition thresholded at 0.5. Previously, a soft output was generated with values ranging in [0.5, 1].

The PR is the result @joshuacwnewton's suggestion https://github.com/spinalcordtoolbox/spinalcordtoolbox/pull/4345#discussion_r1456523090 the review of PR https://github.com/spinalcordtoolbox/spinalcordtoolbox/pull/4345.