-
Notifications
You must be signed in to change notification settings - Fork 16
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
MHub / GC - Add GC nnUNet Pancreas model #39
Conversation
…, mhaimporter and specific gcnnunetpancreasrunner * Fixed Dockerfile with nocuda for now using the new base image * Added two utils for this runner (MHAImporter, custom GCnnunetPancreasRunner) * Marked bunch of things as TODO
Hi Sil, Great work! Some comments:
We'll inspect the segmentations and update them to SegDB |
Great, I'll target the
Ah, I found that while the Runner modules get automatically picked up, this doesn't happen with converters (I added it as a |
Converters will be picked up automatically only if the file and class names are identical (which implies a one-module per class policy). |
Okay, that makes sense. On a related note, what is the current status of using |
I just updated our MHA conversion module. You now can specify
|
I have updated this PR:
Some open issues:
|
The algorithm delineates the following ROI. NOTE: We will add them to our SegDB shortly. Some need clarification (what is delineated, in what context, complete/incomplete, etc.). A visual demonstration would be ideal to ensure correct usage of SCT codes.
|
Not sure if there is (great) value in adding the incomplete structures, even on a general SCT. @fedorov what do you think? |
Added the following IDs to SegDB: |
Yes, that's the 3D render of the DicomSEG in Slicer.
EDIT: I just added them to SegDB, you can use |
Hi, we spoke to Natália today and she says that we should exclude the Bile Duct, Cysts, and Renal vein outputs, as these are not properly validated segmentations. The evaluation of Natália's algorithm was focused on the cancer probability maps and specifically the maximum value of those for the overall case cancer probability. We will add the overall case cancer probability statistic as an output, remove the bile duct cysts and renal veins from the output DICOM segmentation, and add some comments about the limitations of the original output segmentation. |
…ction to runner, add case-level likelihood to config and meta MHubAI#39
/review This model has been updated significantly and needs to be reviewed again. A new test file will be provided that contains all the output segmentations for the segmentation output map and also the new case-level likelihood value. I'll send it via Slack. |
/test sample:
idc_version: 17
data:
- SeriesInstanceUID: 1.3.6.1.4.1.14519.5.2.1.98806944896875131873924657854330253112
aws: 5475d74e-33db-497e-ace0-00faba1a6a9a
path: dicom
reference:
url: https://github.com/MHubAI/models/files/14125409/output.zip Test Results (24.02.08_14.58.03_52I9eOKFVS)checked_files:
- path: /app/test/src/1.3.6.1.4.1.14519.5.2.1.98806944896875131873924657854330253112/nnunet_pancreas.seg.mha
checker: ImageFileCheck
findings:
- label: Dice Score
description: Dice score between reference and test image
info: 0.999966
- path: /app/test/src/1.3.6.1.4.1.14519.5.2.1.98806944896875131873924657854330253112/nnunet_pancreas.seg.mha
checker: SizeCheck
findings:
- label: Size Difference
description: file size is smaller than reference
info:
src_size: 83269
ref_size: 83270
diff_size: -1
- path: /app/test/src/1.3.6.1.4.1.14519.5.2.1.98806944896875131873924657854330253112/nnunet_pancreas.seg.dcm
checker: DicomsegContentCheck
- path: /app/test/src/1.3.6.1.4.1.14519.5.2.1.98806944896875131873924657854330253112/nnunet_pancreas_case_level_likelihood.json
checker: DataFileCheck
- path: /app/test/src/1.3.6.1.4.1.14519.5.2.1.98806944896875131873924657854330253112/nnunet_pancreas_case_level_likelihood.json
checker: SizeCheck
- path: /app/test/src/1.3.6.1.4.1.14519.5.2.1.98806944896875131873924657854330253112/nnunet_pancreas_heatmap.mha
checker: ImageFileCheck
findings:
- label: Exception
description: An exception occurred during check
info: 'could not convert string to float: '''''
- path: /app/test/src/1.3.6.1.4.1.14519.5.2.1.98806944896875131873924657854330253112/nnunet_pancreas_heatmap.mha
checker: SizeCheck
findings:
- label: Size Difference
description: file size is smaller than reference
info:
src_size: 9389151
ref_size: 9389181
diff_size: -30
summary:
files_missing: 0
files_extra: 0
checks:
ImageFileCheck:
files: 2
findings:
Dice Score: 1
Exception: 1
SizeCheck:
files: 3
findings:
Size Difference: 2
DicomsegContentCheck:
files: 1
DataFileCheck:
files: 1
conclusion: false |
/test sample:
idc_version: 17.0
data:
- SeriesInstanceUID: 1.3.6.1.4.1.14519.5.2.1.237127321134041099456397194653519856815
aws_url: s3://idc-open-data/be1ba92c-7476-4853-a305-47c8e3e32660/*
path: dicom
reference:
url: https://github.com/MHubAI/models/files/14211021/output.zip Test Results (24.02.08_19.39.01_bQJenUOogX)checked_files:
- file: nnunet_pancreas.seg.mha
path: /app/test/src/1.3.6.1.4.1.14519.5.2.1.237127321134041099456397194653519856815/nnunet_pancreas.seg.mha
checks:
- checker: ImageFileCheck
notes:
- label: Data Type
description: Data type of the reference image
info: uint8
- label: Dice Score
description: Dice score between reference and test image
info: 0.999981
- file: nnunet_pancreas.seg.dcm
path: /app/test/src/1.3.6.1.4.1.14519.5.2.1.237127321134041099456397194653519856815/nnunet_pancreas.seg.dcm
checks:
- checker: DicomsegContentCheck
notes:
- label: Segment Count
description: The number of segments identified in the inspected dicomseg file.
info: 5
- file: nnunet_pancreas_case_level_likelihood.json
path: /app/test/src/1.3.6.1.4.1.14519.5.2.1.237127321134041099456397194653519856815/nnunet_pancreas_case_level_likelihood.json
checks:
- checker: DataFileCheck
- checker: SizeCheck
- file: nnunet_pancreas_heatmap.mha
path: /app/test/src/1.3.6.1.4.1.14519.5.2.1.237127321134041099456397194653519856815/nnunet_pancreas_heatmap.mha
checks:
- checker: ImageFileCheck
notes:
- label: Data Type
description: Data type of the reference image
info: float32
- label: Image Diff Stat
description: Statistics of the diff image between src and ref.
info:
MIN: -0.000488
AVE: 0.0
MAX: 0.000488
MAE: 0.0
MSE: 0.0
DIF: 1082396.0
NUM: 77856768.0
summary:
files_missing: 0
files_extra: 0
checks:
ImageFileCheck:
files: 2
DicomsegContentCheck:
files: 1
DataFileCheck:
files: 1
SizeCheck:
files: 1
conclusion: true |
@LennyN95 I missed your comment below on slack, and it struck me just now that you changed the format of how AWS path is communicated. If you see my response, I say you need the URL. The UUID is not sufficient to locate the folder in AWS. |
If you want to use just the UUID, you will need: 1) change the label from "aws" to "crdc_series_uuid" - since that is what it is; 2) add a step in your workflow to resolve |
This PR contains the required code for the GC nnUNet Pancreas model.
GitHub Repo: https://github.com/DIAGNijmegen/CE-CT_PDAC_AutomaticDetection_nnUnet
GC page: https://grand-challenge.org/algorithms/pdac-detection/
Algorithm I/O
6-cysts, 7-renal veinCaveats
The PR target ismain
, but should be something likem-gc-nnunet-pancreas
In the Dockerfile the MHub model repo integration is currently markedTODO
since it requires the creation of the appropriate branch for this code first.This implementation still uses arun.py
script because the MHAConverter doesn't have the panimg backend yet.I added a temporaryHEATMAP = Meta(mod="heatmap")
which might be moved toMHubio/core/templates.py
The segmentation regions for this algorithm are not yet part of dseg repo, hence I have added a dseg.json file