Skip to content
zuis2Public

About

Source code of EC-UNETR

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EC-UNETR

Source code of "Ensemble Cross UNet Transformers for Augmentation of Atomic Electron Tomography" [Project] https://github.com/zuis2/EC-UNETR

  • We used the monai package, you can find and unzip it in "thirdparty" folder, or install it by "pip install monai"

Dataset

Download datasets from Baidu net disk:

dataset link:  https://pan.baidu.com/s/1yjDck2m8ss31ifwhIVSyUw 
key: kikx 

Unzip to a folder:

# root path of the datasets 
datasets/
├── BF5_FCC 
├── BF3.2_FCC
└── BF5_Amor

Config

If you want to change any training or testing parameter, please check the config file in our source code folder:

config/
└── config.json

Train

Set config

{
    "model_name":"EC_UNETR_W",      //model name
    "datasets_path":"path_of_dataset", //root path of the datasets
    "dataset_name":"BF5_FCC",      //dataset name BF5_FCC, BF3.2_FCC, BF5_Amor,
    "batch_size":1,
    "gpu_id":"",
    "start_epoch":0,  //only change for resume
    "N_epoch":100,    // epoch
    "resume_state":"",//path of resume state
    "output_file":"",//for output 
    "output":false,//for output
    "train":true,
    "test":false,
    "save_folder":"./experiments/",
    "block_size":144
}

Run:

    python main.py

Test

Set config

{
    "model_name":"EC_UNETR_W",      //model name
    "datasets_path":"path_of_dataset", //root path of the datasets
    "dataset_name":"BF5_FCC",      //dataset name BF5_FCC, BF3.2_FCC, BF5_Amor,
    "batch_size":1,
    "gpu_id":"",
    "start_epoch":0,  //only change for resume
    "N_epoch":100,    // epoch
    "resume_state":"path_of_pretrained_model",//path of resume state
    "output_file":"",//for output 
    "output":false,//if you want to  output augmented tomograms in test mode, use 'true' here
    "train":false,
    "test":true,
    "save_folder":"./experiments/",
    "block_size":144
}

Run:

    python main.py

Download pre-trained model from Baidu net disk:

dataset link:  https://pan.baidu.com/s/1Hglt_UgZWpKwesAyHzvd6A 
key: qme9

Augment a single raw tomogram

Set config

{
    "model_name":"EC_UNETR_W",      //model name
    "datasets_path":"path_of_dataset", //root path of the datasets
    "dataset_name":"BF5_FCC",      //dataset name BF5_FCC, BF3.2_FCC, BF5_Amor,
    "batch_size":1,
    "gpu_id":"",
    "start_epoch":0,  //only change for resume
    "N_epoch":100,    // epoch
    "resume_state":"path_of_pretrained_model",//path of resume state
    "output_file":"path_of_input_tomogram",//for output 
    "output":false,//
    "train":false,
    "test":false,
    "save_folder":"./experiments/",
    "block_size":144
}

Run:

    python main.py

About

Source code of EC-UNETR

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages