Skip to content

YongChen-Exact/CFNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CFNet

This repository contains the supported pytorch code and configuration files to reproduce of CFNet.

CFNet

Parts of codes are borrowed from nn-UNet. For detailed configuration of the dataset, please refer to nn-UNet.

Environment

Please prepare an environment with Python 3.7, Pytorch 1.7.1, and Windows 10.

Dataset Preparation

Datasets can be acquired via following links:

Dataset Set

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/

Preprocess Data

  • CFNet_convert_decathlon_task -i D:\Codes\Medical_image\UploadGitHub\CFNet\DATASET\CFNet_raw\CFNet_raw_data
  • CFNet_plan_and_preprocess -t 2

Functions of scripts

  • 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

Train Model

  • python run_training.py 3d_fullres CFNetTrainerV2_cfnet_synapse 2 0

Test Model

  • 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

Acknowledgements

This repository makes liberal use of code from:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages