-
Notifications
You must be signed in to change notification settings - Fork 18
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
SMIT CT Lung GTV segmentation model #108
base: main
Are you sure you want to change the base?
Conversation
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.
Thank you for your contribution 🚀
- Can we avoid using conda and instead install all requirements with uv? Our base image comes with uv installed and a virtual environment set-up. However, it is suggested that you create your own virtual environment with uv, e.g.,
uv venv -p 3.10 .venv310
- The contents of the
meta.json
are used to populate the model card on our website under mhub.ai/models. The more information, the better. - To test-build the model and to move forward with our test routine, an mhub.toml file needs to be created.
|
||
@IO.Instance() | ||
@IO.Input('scan', 'nifti:mod=ct', the='input ct scan') | ||
@IO.Output('gtv_mask', 'gtv_mask.nii.gz', 'nifti:mod=seg:model=SMIT:roi=GTV',data='scan', the='predicted lung gtv') |
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.
@IO.Instance() | ||
@IO.Input('scan', 'nifti:mod=ct', the='input ct scan') | ||
@IO.Output('gtv_mask', 'gtv_mask.nii.gz', 'nifti:mod=seg:model=SMIT:roi=GTV',data='scan', the='predicted lung gtv') | ||
def task(self, instance: Instance, scan: InstanceData, gtv_mask: InstanceData) -> None: |
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.
The input ct image is available under scan.abspath
, the segmentation mask generated by the model should be written or copied into gtv_mask.abspath
.
@IO.Output('gtv_mask', 'gtv_mask.nii.gz', 'nifti:mod=seg:model=SMIT:roi=GTV',data='scan', the='predicted lung gtv') | ||
def task(self, instance: Instance, scan: InstanceData, gtv_mask: InstanceData) -> None: | ||
|
||
workDir = os.path.join(os.environ['WORK_DIR'],'models','msk_smit_lung_gtv','src') # Needs to be defined in docker file as ENV WORK_DIR=path_to_dir e.g. /app/models/SMIT/workDir |
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.
Could we use pathlib
for all path concatenations to increase readability?
#condaEnvDir = os.path.join(wrapperInstallDir,'conda-pack') | ||
#condaEnvActivateScript = os.path.join(condaEnvDir, 'bin', 'activate') | ||
wrapperPath = os.path.join(workDir,'bash_run_SMIT_Segmentation.sh') | ||
load_weight_name = os.path.join(workDir,'trained_weights','model.pt') |
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 multiple weights trained for this model architecture? Otherwise, I'd suggest we make this parameter fixed, to increase the readability.
@LennyN95 Thank you for the in-depth feedback! We're working to address the suggestions. I have an additional question: when we upload our test data to Zenodo (for the mhub.toml), should we refer to the mHub DOI# 13785615 or create a new DOI from an independent/new entry? |
I would recommend renaming the PR to "SMIT CT Lung GTV segmentation model" (or something similar). |
You're more than welcome. Thank you and your team for the great work.
@locastre We mainly use Zenodo for it's reproducible storage mechanism, so you can create a new DOI for your sample & reference. |
@locastre FYI; There are also some errors in the compliance check that need to be resolved:
|
Submitting the SMIT CT Lung GTV segmentation model for mHub