Whole-gland Prostate Segmentations for PI-CAI: Public Training and Development Dataset

Whole-gland Prostate Segmentations for PI-CAI: Public Training and Development Dataset  

  By: joeran.bosma on June 15, 2022, 10:23 a.m.

Whole-gland Prostate Segmentations for all 1500 multi-center, multi-vendor cases of the PI-CAI: Public Training and Development Dataset are now online! The prostate glands were segmented by this algorithm. Please read its documentation before using any of these segmentations! Although we did a quick quality check of the generated prostate segmentations, keep in mind that these whole-gland prostate segmentations are AI-derived, and can contain weird and systematic issues.

Please monitor this thread for all updates and fixes regarding this dataset, and feel free to let us know about any issues you encounter!

Known issues:

  • Segmentation for 11050_1001070 is completely off.
 Last edited by: anindo on Aug. 15, 2023, 12:56 p.m., edited 1 time in total.

Re: Whole-gland Prostate Segmentations for PI-CAI: Public Training and Development Dataset  

  By: JMitura on June 29, 2022, 10:29 a.m.

Hello I am trying to run infrence with your algorithm for whole gland prostate segmentation, using your pretrained model - yet I have a problem I want to run it in my docker container - it is complicated to run docker in docker - hence I am trying to adapt your code

I had copied your repository. Created my own copy of process.py with modifications * self.nnunet_inp_dir, nnunet_out_dir,self.prostate_segmentation_path - to custom location * self.nnunet_results - to location of results in your cloned repository * self.scan_paths - I concatenated all paths of t2w, adc and hbv files into one big array

now I run

> alg=ProstateSegmentationAlgorithm()
> 
> alg.process()

preprocessed nii.gz files appears in input folder.

generated command looks like

['nnUNet_predict', '-t', 'Task2202_prostate_segmentation', '-i', '/home/sliceruser/data/for_host_whole_gland_segm/nnunet/input', '-o', '/home/sliceruser/data/for_host_whole_gland_segm/nnunet/output', '-m', '3d_fullres', '-tr', 'nnUNetTrainerV2_Loss_FL_and_CE_checkpoints', '--num_threads_preprocessing', '2', '--num_threads_nifti_save', '1']

Now I get error

NotADirectoryError: [Errno 20] Not a directory: 'nnUNet_predict'

Hovewer I do not se also nnUNet_predict file/folder in your github repository non the command to create it in your dockerfile, basically I am looking for an executable.

thanks for any advice!

 Last edited by: JMitura on Aug. 15, 2023, 12:56 p.m., edited 4 times in total.

Re: Whole-gland Prostate Segmentations for PI-CAI: Public Training and Development Dataset  

  By: joeran.bosma on June 29, 2022, 12:41 p.m.

Hi Jakub,

Runnning inference within your Docker container, rather than calling a different Docker container within your Docker container, indeed seems like the best option.

The nnUNet_predict command should be available once you install nnU-Net. The prostate segmentation container installs nnU-Net using a requirements.txt file: ... nnunet==1.7.0 ...

This step is executed here in the Dockerfile. To run inference with nnU-Net, this needs to be added to your Dockerfile as well. Additionally, these files need to be copied into the nnU-Net installation. Please also note that nnU-Net expects pytorch to be installed, which I did by using the pytorch base image, please make sure this is correctly set up for you as well.

After this, the nnUNet_predict should run.

Please note that the way process.py is set up, it expects a single bpMRI case to segment (with axial T2-weighted, ADC and high b-value scans). To segment a folder with multiple cases, to increase efficiency, the code in process.py needs to be adapted accordingly.

If the problem persists, please provide a minimal working example (preferably through a GitHub repo), so I can troubleshoot more effectively.

Hope this helps, Joeran