Views
No views yet

git clone https://huggingface.co/ChrisXiao/AutoSeg4Sinonasal1pip install -r requirements.txt
2source /path/to/VIRTUAL_ENVIRONMENT/bin/activate cd <path to repo>/deepatlas/preprocess1python registration_training.py
2-bp <full path of base dir>
3-ip <relative path to nifti images dir>
4-sp <relative path to labels dir>
5-ti <task id> -sl LabelValue1 LabelName1 LabelValue2 LabelName2 LabelValue3 LabelName3 ...L-MS and R-MS and I want L-MS matched to label 1 and R-MS to label 2 (Pay attention to the order)python registration_training.py -bp /Users/mikamixiao/Desktop -ip images -sp labels -sl 1 L-MS 2 R-MSbase_dir/deepatlas_raw_data_base/task_id/Training_dataset/images && base_dir/deepatlas_raw_data_base/task_id/Training_dataset/labels1python crop_flip_training.py
2-fp <if need to flip data, use flag for true and not use for false>
3-ti <task id>
4-rs <customized resized shape>base_dir/deepatlas_preprocessed/task_id/Training_dataset/images && base_dir/deepatlas_preprocessed/task_id/Training_dataset/labels1cd <path to repo>/deepatlas/scripts
2python deep_atlas_train.py
3--config <configuration file of network parameters>
4--continue_training <check if need to resume training>
5--train_only <only training or training plus test>
6--plot_network <whether to plot the neural network architecture>-h to see more instructions
Before training, a folder named deepatlas_results is created automatically under the repository directory. All training results are stored in this folder. A clear structure is shown below:1DeepAtlas/deepatlas_results/
2 ├── Task001_ET
3 | └── results
4 | └── RegNet
5 | |── anatomy_loss_reg.txt
6 | |── anatomy_reg_losses.png
7 | |── reg_net_best.pth
8 | |── reg_net_training_losses.png
9 | |── regularization_loss.txt
10 | |── regularization_reg_losses.png
11 | |── similarity_loss_reg.txt
12 | |── similarity_reg_losses.png
13 | └── SegNet
14 | |── anatomy_loss_seg.txt
15 | |── anatomy_seg_losses.png
16 | |── seg_net_best.pth
17 | |── seg_net_training_losses.png
18 | |── supervised_loss_seg.txt
19 | |── supervised_seg_losses.png
20 | └── training_log.txt
21 | └── dataset.json
22 ├── Task002_Nasal_Cavitypython deep_atlas_test.py
-gpu <id of gpu device to use>
-op <relative path of the prediction result directory>
-ti <task id and name>DeepAtlas_dataset/Task_id_and_Name directory. For example,1DeepAtlas/DeepAtlas_dataset/
2 ├── Task001_ET
3 | └── results
4 | └── RegNet
5 | |── anatomy_loss_reg.txt
6 | |── anatomy_reg_losses.png
7 | |── reg_net_best.pth
8 | |── reg_net_training_losses.png
9 | |── regularization_loss.txt
10 | |── regularization_reg_losses.png
11 | |── similarity_loss_reg.txt
12 | |── similarity_reg_losses.png
13 | └── SegNet
14 | |── anatomy_loss_seg.txt
15 | |── anatomy_seg_losses.png
16 | |── seg_net_best.pth
17 | |── seg_net_training_losses.png
18 | |── supervised_loss_seg.txt
19 | |── supervised_seg_losses.png
20 | └── training_log.txt
21 | └── prediction
22 | └── RegNet
23 | |── reg_img_losses.txt
24 | |── reg_seg_dsc.txt
25 | |── figures containing fixed, moving, warped scans deformation field and jacobian determinant
26 | |── warped scans and labels in nifti format
27 | └── SegNet
28 | |── seg_dsc.txt
29 | |── predicted labels in nifti format
30 | └── dataset.json
31 ├── Task002_Nasal_Cavity