Skip to content

Commit 94f1420

Browse files
updated sw_overlap for organ seg (#409)
Adjusted sliding_window_overlap in prostate organ seg back to 0.5. Updated requirements.txt to be compatible with more recent packages. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c970bdf commit 94f1420

16 files changed

Lines changed: 912 additions & 1168 deletions

prostate-mri-lesion-seg/README.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,60 @@
11
# Prostate MRI Lesion Segmentation - MONAI Deploy MAP
22

3+
<p float="left">
4+
<img src="imgs/workflow-diagram.png" width="900"/>
5+
</p>
6+
7+
This workflow takes T2, ADC, and HighB MRI series as input and produces several NIfTI files as output. These outputs contain organ and lesion segmentations and lesion probability maps.
8+
39
<p float="left">
410
<img src="imgs/organ_seg.png" width="300" />
511
<img src="imgs/lesion_prob.png" width="300" />
612
<img src="imgs/lesion_mask.png" width="300" />
713
</p>
814

9-
This workflow takes T2, ADC, and HighB MRI series as input and produces several NIfTI files as output. These outputs contain organ and lesion segmentations and lesion probability maps.
10-
1115
## Software and Setup
1216

13-
In order to run this workflow and build a MAP you will need to [install MONAI Deploy App SDK](https://docs.monai.io/projects/monai-deploy-app-sdk/en/latest/getting_started/installing_app_sdk.html). The workflow is currently verified against version 2.0.0. On most systems this can be easily done with the command `pip install monai-deploy-app-sdk==2.0.0`.
17+
In order to run this workflow and build a MAP you will need to [install MONAI Deploy App SDK](https://docs.monai.io/projects/monai-deploy-app-sdk/en/latest/getting_started/installing_app_sdk.html). This can be installed along with all other software dependencies by running `pip install -r prostate_mri_lesion_seg_app/requirements.txt`.
18+
19+
It is recommended to have an NVIDIA GPU with at least 12 GB of memory available.
20+
21+
## Models
22+
23+
The models needed to build and execute the pipeline (1 organ segmentation model, 5 lesion segmentation models, 1 classification model) are hosted separately on [Google Drive here](https://drive.google.com/drive/folders/1EpjrlzEdV7CcaCYqGTIEzOapamP4Ag6M?usp=sharing).
1424

15-
It is also recommended to have an NVIDIA GPU with at least 12 GB of memory available.
25+
Download these models and put them inside a folder named `prostate_mri_lesion_seg_app/models` alongside the rest of the application code. Pipeline creation and execution will not complete if the model file path is changed or renamed.
1626

1727
## Using this Repository
1828

19-
The easiest way to get started with this workflow is to run on a test image taken from the [ProstateX](https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=23691656) dataset. The `build_and_run.ipynb` file walks through this process using ProstateX-0004 which can be [downloaded separately](https://drive.google.com/drive/folders/1besSncSLlbeiv7UWveRJoOYQXOzu3JkU?usp=sharing) and placed in a `test-data/` directory.
29+
The easiest way to get started with this workflow is to run a test image taken from the [ProstateX](https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=23691656) dataset. The `build_and_run.ipynb` file walks through this process using ProstateX-0004 which can be [downloaded separately](https://drive.google.com/drive/folders/1besSncSLlbeiv7UWveRJoOYQXOzu3JkU?usp=sharing) and placed in a `test-data/` directory.
2030

2131
After validating on test data, you can test this image on your own study or dataset. One of the main considerations when adapting to a new dataset will be the making sure the [DICOM Series Selector Operator](https://docs.monai.io/projects/monai-deploy-app-sdk/en/latest/modules/_autosummary/monai.deploy.operators.DICOMSeriesSelectorOperator.html#monai.deploy.operators.DICOMSeriesSelectorOperator) is configured to properly differentiate between the different naming schemes and properties of the new dataset.
2232

2333
If all three (T2, ADC, HighB) series are not detected properly in the study, the pipeline will not complete. If any of these modalities are incorrectly routed, the pipeline results will not be accurate. The workflow currently saves intermediate copies (in NIfTI) of these series in the output folder so it is possible to verify they were picked up (and preprocessed) correctly.
2434

2535
The current set of rules in `app.py` filter based on SeriesDescription, ImageType, etc., and work with ProstateX. Please refer to MONAI documentation for guidance on modifying these rules for custom filtering.
2636

27-
There are also scripts in the `scripts/` directory that test the workflow locally (i.e., not containerized) and test the workflow build with a MAP. These should help test incremental changes to the code or series selection rules.
37+
## Scripts
2838

29-
## Models
39+
There are several scripts to help with validation and development included in the `scripts/` directory.
3040

31-
The models needed to build and execute the pipeline (1 organ segmentation model, 5 lesion segmentation models, 1 classification model) are hosted separately on [Google Drive here](https://drive.google.com/drive/folders/1EpjrlzEdV7CcaCYqGTIEzOapamP4Ag6M?usp=sharing).
41+
- `scripts/test_local.sh`: Execute workflow locally on test images without building a MAP.
42+
- `scripts/test_MAP.sh`: Execute MAP workflow on test images with option to rebuild MAP.
43+
- `scripts/compare_output.sh`: Computes organ and lesion DICE scores for two output directories.
3244

33-
Download these models and put them inside a folder named `prostate_mri_lesion_seg_app/models` alongside the rest of the application code. Pipeline creation and execution will not complete if the model file path is changed or renamed.
45+
## Publications
46+
47+
Several publications have leveraged this workflow either in part or in full.
48+
49+
Esengur, Omer Tarik, et al. ["Assessing the Impact of Transition and Peripheral Zone PSA Densities Over Whole‐Gland PSA Density for Prostate Cancer Detection on Multiparametric MRI."](https://onlinelibrary.wiley.com/doi/abs/10.1002/pros.24863) The Prostate (2025): e24863.
50+
51+
Yilmaz, Enis C., et al. ["External Validation of a Previously Developed Deep Learning–based Prostate Lesion Detection Algorithm on Paired External and In-House Biparametric MRI Scans."](https://pubs.rsna.org/doi/abs/10.1148/rycan.240050) Radiology: Imaging Cancer 6.6 (2024): e240050.
52+
53+
Lin, Yue, et al. ["Evaluation of a Cascaded deep learning–based algorithm for prostate lesion detection at biparametric MRI."](https://pubs.rsna.org/doi/abs/10.1148/radiol.230750) Radiology 311.2 (2024): e230750.
54+
55+
Simon, Benjamin D., et al. ["Automated detection and grading of extraprostatic extension of prostate cancer at MRI via cascaded deep learning and random forest classification."](https://www.sciencedirect.com/science/article/abs/pii/S1076633224002204) Academic Radiology 31.10 (2024): 4096-4106.
56+
57+
Johnson, Latrice A., et al. ["Automated prostate gland segmentation in challenging clinical cases: comparison of three artificial intelligence methods."](https://link.springer.com/article/10.1007/s00261-024-04242-7) Abdominal Radiology 49.5 (2024): 1545-1556.
3458

3559
## License
3660

0 commit comments

Comments
 (0)