Skip to content
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

BAMF Liver and Tumor segmentation #84

Open
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

jithenece
Copy link

Pretrained model for 3D semantic image segmentation of the liver and liver lesions from ct scan

@jithenece
Copy link
Author

This model was trained on the LiTS 2017 dataset. The liver is a common site of primary (i.e. originating in the liver like hepatocellular carcinoma, HCC) or secondary (i.e. spreading to the liver like colorectal cancer) tumor development.

@LennyN95
Could you add common entry for tumor in segdb so that LIVER+TUMOR can be used here? It has both primary and secondary tumor.

@vanossj
Copy link
Contributor

vanossj commented Jul 11, 2024

@jithenece can you use NEOPLASM_MALIGNANT as the custom roi? the model output isn't specific to colorectal cancer liver lesions.

@jithenece jithenece marked this pull request as ready for review July 30, 2024 19:31
@jithenece
Copy link
Author

jithenece commented Aug 8, 2024

/review

@LennyN95 could you please review this.

@github-actions github-actions bot added the REQUEST REVIEW Attach this label to your PR when your submission is "in progress" and is ready to be reviewed by us label Aug 8, 2024
@jithenece
Copy link
Author

/test

sample:
  idc_version: "Data Release 2.0 April 25, 2023"
  data:
  - SeriesInstanceUID: 1.3.6.1.4.1.14519.5.2.1.9203.8273.254242588659825836950462054011
    aws_url: s3://idc-open-data/a192c6ca-69b0-4195-bfa5-4fe9962b2da6/*
    path: dicom

reference:
  url: https://drive.google.com/file/d/1id1W7sXydHq52NTKa8GJqRycatyhkQaR/view?usp=sharing

Copy link
Member

@LennyN95 LennyN95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great implementation, thank you for your work! Below some questions and comments.

models/bamf_ct_liver_tumor/dockerfiles/Dockerfile Outdated Show resolved Hide resolved
models/bamf_ct_liver_tumor/config/default.yml Outdated Show resolved Hide resolved
models/bamf_ct_liver_tumor/dockerfiles/Dockerfile Outdated Show resolved Hide resolved
models/bamf_ct_liver_tumor/meta.json Outdated Show resolved Hide resolved
models/bamf_ct_liver_tumor/meta.json Outdated Show resolved Hide resolved
models/bamf_ct_liver_tumor/meta.json Show resolved Hide resolved
models/bamf_ct_liver_tumor/meta.json Outdated Show resolved Hide resolved
models/bamf_ct_liver_tumor/utils/NNUnetRunnerV2.py Outdated Show resolved Hide resolved
models/bamf_ct_liver_tumor/utils/PostProcessor.py Outdated Show resolved Hide resolved
models/bamf_ct_liver_tumor/meta.json Show resolved Hide resolved
@jithenece jithenece changed the title BAMF Liver and lesions segmentation BAMF Liver and Tumor segmentation Aug 21, 2024
@vanossj vanossj mentioned this pull request Aug 22, 2024
@jithenece jithenece requested a review from LennyN95 August 26, 2024 10:30
@jithenece
Copy link
Author

Generating segmentation permanent link for testing
output.zip

sample:
idc_version: 15.0
data:

  • SeriesInstanceUID: 1.3.6.1.4.1.14519.5.2.1.9203.8273.254242588659825836950462054011
    aws_url: s3://idc-open-data/a192c6ca-69b0-4195-bfa5-4fe9962b2da6/*
    path: input_data

@jithenece
Copy link
Author

jithenece commented Aug 27, 2024

/test

sample:
  idc_version: 15.0
  data:
  - SeriesInstanceUID: 1.3.6.1.4.1.14519.5.2.1.9203.8273.254242588659825836950462054011
    aws_url: s3://idc-open-data/a192c6ca-69b0-4195-bfa5-4fe9962b2da6/*
    path: input_data

reference:
  url: https://github.com/user-attachments/files/16762679/output.zip

Test Results (24.08.29_15.15.30_AkoraywFNq)
id: d32a4d3d-671c-427b-89f7-d09cbb356acf
date: '2024-08-29 15:21:09'
missing_files:
- case_study1/flair.seg.dcm
- case_study1/t1ce.seg.dcm
- case_study1/t2.seg.dcm
- case_study1/t1.seg.dcm
- 1.3.6.1.4.1.14519.5.2.1.9203.8273.254242588659825836950462054011/bamf_ct_liver_tumor.seg.dcm
summary:
  files_missing: 5
  files_extra: 0
  checks: {}
conclusion: false

@jithenece
Copy link
Author

missing_files:
- case_study1/flair.seg.dcm

Could you provide verbose logs from the docker to check the issue. I could see case_study1/flair.seg.dcm which is related to brain-mr is listed here.

@LennyN95
Copy link
Member

@jithenece maybe some files were included in the reference by mistake? I updated the test pipeline during the past week which now is drastically simplified. It will require some minor updates and I hope simplified procedure makes up for that ;)

@LennyN95
Copy link
Member

Please note, we updated our base image. All mhub dependencies are now installed in a virtual environment under /app/.venv running Python 3.11. Python, virtual environment and dependencies are now managed with uv. If required, you can create custom virtual environments, e.g., uv venv -p 3.8 .venv38 and use uv pip install -p .venv38 packge-name to install dependencies and uv run -p .venv3.8 python script.py to run a python script.

We also simplified our test routine. Sample and reference data now have to be uploaded to Zenodo and provided in a mhub.tom file at the project root. The process how to create and provide these sample data is explained in the updated testing phase article of our documentation. Under doi.org/10.5281/zenodo.13785615 we provide sample data as a reference.

@github-actions github-actions bot added INVALID TEST REQUEST The contributor requested a test but the test block is not valid. and removed TEST REQUESTED labels Sep 30, 2024
@jithenece
Copy link
Author

@LennyN95 I have updated the test files in the required format. Could you share the Test results if this fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INVALID TEST REQUEST The contributor requested a test but the test block is not valid. REQUEST REVIEW Attach this label to your PR when your submission is "in progress" and is ready to be reviewed by us
Projects
Status: Ready for Testing
Development

Successfully merging this pull request may close these issues.

3 participants