LesionSegmenter / README.md
ChrisXzZ's picture
Update README.md
aeebe00 verified
metadata
license: cc-by-4.0

This repository provides the nnUNet v2 checkpoint for multi-organ lesion segmentation from abdominal CT images.

The model was trained on a large-scale multi-center CT dataset with expert-annotated lesion masks across multiple organs (liver, pancreas, kidney, colon).

Label Definitions

"labels": {
        "background": 0,
        "liver_segment_1": 1,
        "liver_segment_2": 2,
        "liver_segment_3": 3,
        "liver_segment_4": 4,
        "liver_segment_5": 5,
        "liver_segment_6": 6,
        "liver_segment_7": 7,
        "liver_segment_8": 8,
        "pancreas_head": 9,
        "pancreas_body": 10,
        "pancreas_tail": 11,
        "kidney_left": 12,
        "kidney_right": 13,
        "colon": 14,
        "liver_lesion": 15,
        "pancreatic_lesion": 16,
        "kidney_lesion": 17,
        "colon_lesion": 18
    }

1. Installation

git clone https://github.com/MIC-DKFZ/nnUNet.git
cd nnUNet
pip install -e .

2. Inference

2.1 Create a folder (e.g., nnUNet_eval), rename all your ct files and put them in the folder.

nnUNet_eval/
 └── Dataset1351/
      └── imagesTs/
           β”œβ”€β”€ ct001_0000.nii.gz
           β”œβ”€β”€ ct002_0000.nii.gz

2.2 Place the checkpoint into

nnUNet_results/
└── Dataset1351/nnUNetTrainer__nnUNetResEncUNetLPlans__3d_fullres/fold_all/

2.3 Run inference

export nnUNet_N_proc_DA=36
export nnUNet_results="./nnUNet_results"
export nnUNet_predictions="./nnUNet_predictions"
export nnUNet_eval="./nnUNet_eval"

GPU_ID=0 
DATASET=1351

TRAINER=nnUNetTrainer 

CUDA_VISIBLE_DEVICES=$GPU_ID nnUNetv2_predict -d $DATASET -i $nnUNet_eval/ -o $nnUNet_predictions/ -tr $TRAINER -d $DATASET -c 3d_fullres -f all -p nnUNetResEncUNetLPlans --continue_prediction