Skip to content

bamf-health/aimi-lung-ct

Repository files navigation

CT Lung Nodule Segmentation

This container combines the output of two models.

Nodule segmentation model

This model segments lung nodules (3-30mm diameter) from ct scans. This model was trained on the DICOM-LIDC-IDRI-Nodules dataset.

Lung segmentation model The lung segmentation model was trained on 411 and 111 lung CT scans from NSCLC Radiomics and NSCLC Radiogenomics respectively.

Both models were trained using nnU-Net framework. The outputs of these two models are combined to produce the final output, with nodules taking precedence over lung segmentation.

The model_performance notebook contains the code to evaluate the model performance on the following IDC collections against a validation evaluated by a radiologist and a non-expert.

Running instructions

  • Create an input_dir_ct containing list of dcm files corresponding to a given series_id for CT modality

  • Create an output_dir to store the output from the model. This is a shared directory mounted on container at run-time. Please assign write permissions to this dir for container to be able to write data

  • Next, pull the image from dockerhub:

    • docker pull bamfhealth/bamf_nnunet_ct_lung:latest
  • Finally, let's run the container:

    • docker run --gpus all -v {input_dir_ct}:/app/data/input_data/ct:ro -v {output_dir}:/app/data/output_data bamfhealth/bamf_nnunet_ct_lung:latest
  • Once the job is finished, the output inference mask(s) would be available in the {output_dir} folder

  • Expected output from after successful container run is:

    • If nifty to dcm conversion is a success:
      • {output_dir}/seg_nodules_ensemble.dcm
      • {output_dir}/seg_lesions_ensemble.dcm
    • Else:
      • {output_dir}/seg_nodules_ensemble.nii.gz
      • {output_dir}/seg_lesions_ensemble.nii.gz