MHubAI / models

Stores the MHub models dockerfiles and scripts.
MIT License
8 stars 16 forks source link

BAMF Liver and Tumor segmentation #84

Open jithenece opened 3 months ago

jithenece commented 3 months ago

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

jithenece commented 3 months ago

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 commented 3 months ago

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

jithenece commented 2 months ago

/review

@LennyN95 could you please review this.

jithenece commented 2 months ago

/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
jithenece commented 1 month ago

Generating segmentation permanent link for testing output.zip

sample: idc_version: 15.0 data:

jithenece commented 1 month ago

/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) ```yaml 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 commented 1 month ago
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 commented 3 weeks ago

@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 commented 3 weeks ago

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.

jithenece commented 2 weeks ago

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