-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
41 lines (38 loc) · 4.09 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import argparse
parser = argparse.ArgumentParser(description='Brain age estimation')
parser.add_argument('--model_name', default="SKC_BF_Atte_Crop108_best_model.pth.tar", type=str, help="Checkpoint file name for testing")
parser.add_argument('--pretrained_model', default=None, type=str, help="The absolute path of pretrained model, used in the training of stage two")
parser.add_argument('--output_dir', default="./snapshots/exp1/",type=str, help="Output dictionary, which will contains training log and model checkpoint")
parser.add_argument('--save_dir', default="./Infer/exp1/", type=str, help="The saving path of inferred images")
parser.add_argument('--train_img_folder' ,default="../QSM/train/", type=str, help="The path of training set data")
parser.add_argument('--train_mask_folder' ,default="../NewLabel/train/", type=str, help="The path of training set masks")
parser.add_argument('--test_img_folder' ,default="../QSM/test/", type=str, help="The path of test set data")
parser.add_argument('--test_mask_folder' ,default="../NewLabel/test/", type=str, help="The path of test set masks ")
parser.add_argument('--excel_path' ,default="../sub_info.xlsx" ,type=str, help="The Excel file path ")
parser.add_argument('--gpu' ,default='0' ,type=str, help="The used gpu count")
parser.add_argument('--model', default='SKC_BF_Atte_Crop',type=str, help="The name of the model")
parser.add_argument('--ismixup' ,default=False ,type=bool, help="whether or not to use mixup")
parser.add_argument('--alpha' ,default=1 ,type=float, help="The alpha of beta distribution")
parser.add_argument('--use_gender' ,default=True ,type=bool, help="Whether or not to use gender")
parser.add_argument('--num_workers' ,default=18 ,type=int, help="The number of worker for dataloader")
parser.add_argument('--eva_iter' ,default=50 ,type=int, help="The number of steps for uncertainty evaluation")
parser.add_argument('--num_filters' ,default=32 ,type=int, help="The number of filters")
parser.add_argument('--batch_size' ,default=4 ,type=int, help="Batch size during training process")
parser.add_argument('--num_classes' ,default=9 ,type=int, help="The number of segmentation classes")
parser.add_argument('--epochs' ,default=200 ,type=int, help="Total training epochs")
parser.add_argument('--base_lr' ,default=1e-4 ,type=float, help="Initial learning rate of model")
parser.add_argument('--power' ,default=0.9 ,type=float, help="The power of adjusting learning rate")
parser.add_argument('--print_freq' ,default=10 ,type=int, help="The interval of printing log")
parser.add_argument('--patience' ,default=100 ,type=int, help="The waiting steps of early stopping")
parser.add_argument('--weight_decay',default=1e-3 ,type=float, help="L2 weight decay ")
parser.add_argument('--dropout_rate',default=0.5 ,type=float, help="The probability of dropout")
parser.add_argument('--atte_drop_rate',default=0.5 ,type=float, help="The probability of attention dropout")
parser.add_argument('--nblock_end' ,default=6 ,type=int, help="The number of Segmentation Transformer Layer")
parser.add_argument('--inplace' ,default=1 ,type=int, help="Input channel")
parser.add_argument('--seg_loss', default='EdgeFLDice' ,type=str, help="The loss fuction of segmentation")
parser.add_argument('--dice_weight', default=0.2 ,type=float, help="The weight of dice loss")
parser.add_argument('--gamma', default=2 ,type=float, help="The gamma of focal loss")
parser.add_argument('--age_loss', default='mae', type=str, help="The loss fuction of brain age prediction")
parser.add_argument('--lam1', default=1 ,type=float, help="The lambda of seg loss")
parser.add_argument('--lam2', default=0 ,type=float, help="The lambda of age loss")
opt = parser.parse_args()