-
Notifications
You must be signed in to change notification settings - Fork 1
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
Segment SC using contrast agnostic model #44
Conversation
…tible with soft segmentations)
… light CSF to improve SC seg
@@ -0,0 +1,352 @@ | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there specific differences between this script and https://github.com/sct-pipeline/contrast-agnostic-softseg-spinalcord/blob/4694169352fb962f607e7684fe778677adc123dc/monai/run_inference_single_image.py to justify duplication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scripts are the same. There is a note about that at the end of this README. I duplicated the script because I did not want to create dependency on another repo's branch. I am aware that this duplication is suboptimal. We could move the run_inference_single_image.py script to the ivadomed/utilities repo to avoid further duplications. Tagging @naga-karthik.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the plan is to have it inside SCT, right @naga-karthik? The faster we get it inside SCT, the faster we can remove the duplicates and all work on the SCT-based implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the plan is to get it inside SCT. That is my action task for this week!
@@ -240,6 +240,36 @@ def keep_largest_object(predictions): | |||
return predictions | |||
|
|||
|
|||
# Adapted from ivadomed: | |||
# https://github.com/ivadomed/ivadomed/blob/e101ebea632683d67deab3c50dd6b372207de2a9/ivadomed/postprocessing.py#L224-L245 | |||
def remove_small_objects(data, size_min): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i suggest working with atomic PRs-- ie: first, merge this one, and then create a new PR where you implement the remove_small functionality
…t_label_vertebrae as well as sct_label_utils (to avoid SC straightening)
The |
This PR adds a
segment_sc_contrast-agnostic.sh
bash script.The script:
run_inference_single_image.py
script is just a copy of the contrast-agnostic script, see this comment for details)sct_label_vertebrae