-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
66 lines (66 loc) · 1.63 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
CONFIG = {
"name": "XRay",
"n_gpu": 1,
"arch": {
"type": "ConvolutionalPoseMachines",
"args": {
"x_channels": 5,
"stage_channels": 5,
"num_stages": 3,
"num_classes": 23,
"depthwise_separable_convolution": False,
"dilation": 4,
"squeeze_excitation": False
}
},
"data_loader": {
"type": "XRayDataLoader",
"args": {
"data_dir": "data/XRay/Patient_0",
"batch_size": 1,
"shuffle": False,
"validation_split": 0.5,
"num_workers": 0,
"custom_args": {
'isTraining': True,
'sigma': 80,
'sigma_reduction_factor': 0.95,
'sigma_reduction_factor_change_rate': 0.0005,
'fraction_of_dataset': 1,
}
}
},
"optimizer": {
"type": "Adam",
"args": {
"lr": 0.001,
"weight_decay": 0,
"amsgrad": True
}
},
"loss": "smooth_l1_loss",
"metrics": [
"percentage_correct_keypoints",
"keypoint_distance_loss",
"mse_loss"
],
"lr_scheduler": {
"type": "StepLR",
"args": {
"step_size": 50,
"gamma": 0.1
}
},
"trainer": {
"epochs": 200,
"save_dir": "saved/",
"save_period": 1,
"verbosity": 2,
"monitor": "min val_loss",
"early_stop": 10,
"tensorboardX": True,
"keep_only_latest_checkpoint": False
},
'threshold': 0.4,
'prediction_blur': 1
}