Skip to content

Files

Latest commit

fdd410e · Oct 16, 2023

History

History

3D

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 30, 2023
Aug 30, 2023
Aug 23, 2023
Aug 19, 2023
Oct 16, 2023
Aug 19, 2023
Aug 19, 2023
Aug 30, 2023
Aug 23, 2023
Aug 19, 2023

3D D-LKA Net

Instructions for the 3D D-LKA Net.

Environment Setup

  1. Create a new conda environment with python version 3.8.16:
    conda create -n "d_lka_net_3d" python=3.8.16
    conda activate d_lka_net_3d
  2. Install PyTorch and torchvision
    pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
  3. Install the requirements with:
    pip install -r requirements.txt
  4. Install 3D deformable convolutions.
    cd dcn/
    bash make.sh

Model weights

You can download the learned weights of the D-LKA-Net in the following table.

Task Learned weights
Multi organ segmentation D-LKA Net
Pancreas D-LKA Net

Synapse Dataset

  1. Download the Synapse dataset from here: Synapse
  2. Rename each folder containing 'unetr_pp' to 'd_lka_former'. THIS IS IMPORTANT.
  3. Adjust the paths in the run_training_synappse.sh
  4. Run the following lines:
    cd 3D
    bash run_training_synapse.sh
  5. After the training is finished, run the evaluation:
    run_evaluation_synapse.sh

For further instructions, refer to the nnFormer repository.

Pancreas Dataset

  1. Download the pancreas dataset from here: dataset
  2. The folder structure should be as follows:
    /pancreas_code
    --/dataset_pancreas
    ----/Pancreas
    ----/PANCREAS_0001.h5
    .
    .
    .
    ----/PANCREAS_82.h5
  3. Adjust the paths in the train_pancreas.py file.
  4. Run
    cd 3D/pancreas_code
    python train_pancreas.py
  5. Test
    python test_pancreas.py