Instructions for the 3D D-LKA Net.
- 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
- 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
- Install the requirements with:
pip install -r requirements.txt
- Install 3D deformable convolutions.
cd dcn/ bash make.sh
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 |
- Download the Synapse dataset from here: Synapse
- Rename each folder containing 'unetr_pp' to 'd_lka_former'. THIS IS IMPORTANT.
- Adjust the paths in the run_training_synappse.sh
- Run the following lines:
cd 3D bash run_training_synapse.sh
- After the training is finished, run the evaluation:
run_evaluation_synapse.sh
For further instructions, refer to the nnFormer repository.
- Download the pancreas dataset from here: dataset
- The folder structure should be as follows:
/pancreas_code --/dataset_pancreas ----/Pancreas ----/PANCREAS_0001.h5 . . . ----/PANCREAS_82.h5
- Adjust the paths in the train_pancreas.py file.
- Run
cd 3D/pancreas_code python train_pancreas.py
- Test
python test_pancreas.py