This repository contains the supported pytorch code and configuration files to reproduce of CFNet.
Parts of codes are borrowed from nn-UNet. For detailed configuration of the dataset, please refer to nn-UNet.
Please prepare an environment with Python 3.7, Pytorch 1.7.1, and Windows 10.
Datasets can be acquired via following links:
After you have downloaded the datasets, you can follow the settings in nnUNet for path configurations and preprocessing procedures. Finally, your folders should be organized as follows:
./cfnet/
./DATASET/
├── CFNet_raw/
├── CFNet_raw_data/
├── Task01_ACDC/
├── imagesTr/
├── imagesTs/
├── labelsTr/
├── labelsTs/
├── dataset.json
├── Task02_Synapse/
├── imagesTr/
├── imagesTs/
├── labelsTr/
├── labelsTs/
├── dataset.json
├── Task03_tumor/
├── imagesTr/
├── imagesTs/
├── labelsTr/
├── labelsTs/
├── dataset.json
├── Task04_Heart/
├── imagesTr/
├── imagesTs/
├── labelsTr/
├── labelsTs/
├── dataset.json
├── CFNet_cropped_data/
├── CFNet_trained_models/
├── CFNet_preprocessed/
- CFNet_convert_decathlon_task -i D:\Codes\Medical_image\UploadGitHub\CFNet\DATASET\CFNet_raw\CFNet_raw_data
- CFNet_plan_and_preprocess -t 2
- Network architecture:
- CFNet\cfnet\network_architecture\CFNet_acdc.py
- CFNet\cfnet\network_architecture\CFNet_synapse.py
- CFNet\cfnet\network_architecture\CFNet_tumor.py
- CFNet\cfnet\network_architecture\CFNet_heart.py
- Trainer for dataset:
- CFNet\cfnet\training\network_training\CFNetTrainerV2_cfnet_acdc.py
- CFNet\cfnet\training\network_training\CFNetTrainerV2_cfnet_synapse.py
- CFNet\cfnet\training\network_training\CFNetTrainerV2_cfnet_tumor.py
- CFNet\cfnet\training\network_training\CFNetTrainerV2_cfnet_heart.py
- python run_training.py 3d_fullres CFNetTrainerV2_cfnet_synapse 2 0
-
python predict.py -i D:\Codes\Medical_image\UploadGitHub\CFNet\DATASET\CFNet_raw\CFNet_raw_data\Task002_Synapse\imagesTs -o D:\Codes\Medical_image\UploadGitHub\CFNet\DATASET\CFNet_raw\CFNet_raw_data\Task002_Synapse\imagesTs_infer -m D:\Codes\Medical_image\UploadGitHub\CFNet\DATASET\CFNet_trained_models\CFNet\3d_fullres\Task002_Synapse\CFNetTrainerV2_CFNet_synapse__CFNetPlansv2.1 -f 0
-
python CFNet/inference_synapse.py
This repository makes liberal use of code from:
