Project-MONAI / research-contributions

Implementations of recent research prototypes/demonstrations using MONAI.
https://monai.io/
Apache License 2.0
1.02k stars 336 forks source link

Invalid organ segmentation nii file produced from prostate_mri_lesion_seg_app #351

Open deepakri201 opened 10 months ago

deepakri201 commented 10 months ago

Describe the bug I am trying create and run my own prostate_mri_lesion_seg_app. For this, I am using data from the QIN-Prostate-Repeatability collection. I've modified the app.py file to correctly select the appropriate T2, ADC, and high b value series. I've successfully deployed my own MAP, but when I go to run it, the organ segmentation nifti produced is invalid. Because of this, it does not get to the lesion segmentation stage. I've confirmed that the series were correctly identified, as the correct T2, ADC, and high b value nifti files are saved out.

To Reproduce Steps to reproduce the behavior:

  1. I modified the Rules_T2, Rules_ADC and Rules_HIGHB to match the ImageType and SeriesDescription constraints from QIN-Prostate-Repeatability.
  2. I deployed my own MAP with no obvious errors.
  3. I then tried running the MAP on a study from QIN-Prostate-Repeatability. It correctly saved out t2/t2.nii.gz, adc/adc.nii.gz and highb/highb.nii.gz. I visually confirmed the correct series were chosen, and that the data looked okay, in Slicer.
  4. During running of the ProstateSegOperator, the following occurred for the prostate segmentation:

    Value range: (0.0, 0.0) Output Seg image numpy array shaped: (30, 512, 512) Output Seg image pixel max value: 0 Output Seg image pixel min value: 0

    A nifti file was somehow saved out as organ/organ.nii.gz, with 0 for ImageDimensions and the wrong pixel spacing.

Expected behavior

  1. I expected to have:

    Value range: (0.0, 1.0) Output Seg image numpy array shaped: (30, 512, 512) Output Seg image pixel max value: 1 Output Seg image pixel min value: 0

  2. I also expected to have the volume information match what was seen in the T2/ADC/highB values.

Screenshots

prostate_lesion_seg_monai_error_01_12_24

prostate_lesion_seg_monai_error_2_01_12_24

Environment (please complete the following information):

jtetrea commented 1 month ago

Sorry for not being able to provide feedback earlier @deepakri201. There were just some recent updates made to the prostate-mri-lesion-seg repository. Could you try the newer version and see if you get same issue?