File tree Expand file tree Collapse file tree 13 files changed +2634
-0
lines changed Expand file tree Collapse file tree 13 files changed +2634
-0
lines changed Original file line number Diff line number Diff line change
1
+ # ------------------------------------------------------------------------
2
+ # Copyright (c) 2021 megvii-model. All Rights Reserved.
3
+ # ------------------------------------------------------------------------
4
+ # Modified from BasicSR (https://github.com/xinntao/BasicSR)
5
+ # Copyright 2018-2020 BasicSR Authors
6
+ # ------------------------------------------------------------------------
7
+ # general settings
8
+ name : GoPro-MAENet-test
9
+ model_type : TestImageEventRestorationModel
10
+ scale : 1
11
+ num_gpu : 1
12
+ manual_seed : 10
13
+
14
+ datasets :
15
+ test :
16
+ name : gopro-bestmodel-test
17
+ type : H5ImageDataset
18
+
19
+ dataroot : /data/zhijing/GOPRO_rawevent/asynav_test # for debug
20
+
21
+ # add
22
+ norm_voxel : true
23
+ return_voxel : true
24
+ return_gt_frame : true
25
+ return_mask : false
26
+ use_mask : false
27
+
28
+ crop_size : ~
29
+ use_flip : false
30
+ use_rot : false
31
+ io_backend :
32
+ type : h5
33
+
34
+ dataset_name : GoPro
35
+
36
+ # network structures
37
+ network_g :
38
+ type : Baseline_Biattention_CrossRecurrent_FC
39
+ in_chn : 3
40
+ ev_chn : 6
41
+ width : 64
42
+ middle_blk_num : 3
43
+ enc_blk_nums : [2,2,2]
44
+ dec_blk_nums : [2,2,2]
45
+ num_heads : [2,4,4]
46
+
47
+ # path
48
+ path :
49
+ pretrain_network_g : /model/zhijing/Baseline_Biattention/experiments/Baseline_Biattention_CrossRecurrent_FC/models/net_g_latest.pth
50
+ strict_load_g : true
51
+ resume_state : ~ # save current trainig model states, for resume
52
+ root : /model/zhijing/Baseline_Biattention
53
+
54
+ # validation settings
55
+ val :
56
+ save_img : true
57
+ save_img_path : /output
58
+ grids : ~
59
+ crop_size : ~
60
+ rgb2bgr : false
61
+ max_minibatch : 8
62
+ metrics : {
63
+ PSNR : {
64
+ type : calculate_psnr,
65
+ crop_border : 0
66
+ }
67
+ }
68
+
69
+ # dist training settings
70
+ dist_params :
71
+ backend : nccl
72
+ port : 29500
Original file line number Diff line number Diff line change
1
+ # general settings
2
+ name : MAENet_ERGB_test # debug
3
+ model_type : TestImageEventRestorationModel
4
+ scale : 1
5
+ num_gpu : 1 # 4
6
+ manual_seed : 10
7
+
8
+ datasets :
9
+ test :
10
+ name : ERGB-h5-test
11
+ type : H5ImageDataset
12
+
13
+ dataroot : /data/zhijing/GOPRO_rawevent/HS_ERGB_test # for debug
14
+
15
+ norm_voxel : true
16
+ return_voxel : true
17
+ return_gt_frame : true
18
+ return_mask : false
19
+ use_mask : false
20
+
21
+ io_backend :
22
+ type : h5
23
+
24
+ crop_size : ~
25
+ use_flip : false
26
+ use_rot : false
27
+
28
+ dataset_name : ERGB
29
+
30
+ # network structures
31
+ network_g :
32
+ type : Baseline_Biattention_CrossRecurrent_FC
33
+ in_chn : 3
34
+ ev_chn : 6
35
+ width : 64
36
+ middle_blk_num : 3
37
+ enc_blk_nums : [2,2,2]
38
+ dec_blk_nums : [2,2,2]
39
+ num_heads : [2,4,4]
40
+
41
+ # path
42
+ path :
43
+ pretrain_network_g : /model/zhijing/Baseline_Biattention/experiments/Baseline_Biattention_CrossRecurrent_FC_ERGB/models/net_g_latest.pth
44
+ # param_key_g: params
45
+ strict_load_g : true
46
+ resume_state : ~
47
+ # training_states: ~ # save current trainig model states, for resume
48
+ root : /model/zhijing/Baseline_Biattention
49
+
50
+ # validation settings
51
+ val :
52
+ save_img : true
53
+ save_img_path : /output
54
+ grids : ~
55
+ crop_size : ~
56
+ rgb2bgr : false
57
+ max_minibatch : 8
58
+ metrics : {
59
+ PSNR : {
60
+ type : calculate_psnr,
61
+ crop_border : 0
62
+ }
63
+ }
64
+ # dist training settings
65
+ dist_params :
66
+ backend : nccl
67
+ port : 29500
Original file line number Diff line number Diff line change
1
+ # general settings
2
+ name : MAENet_REBlur_test
3
+ model_type : TestImageEventRestorationModel
4
+ scale : 1
5
+ num_gpu : 1 # set num_gpu: 0 for cpu mode
6
+ manual_seed : 10
7
+
8
+ # dataset and data loader settings
9
+ datasets :
10
+ test :
11
+ name : gopro-bestmodel-test
12
+ type : H5ImageDataset
13
+
14
+ dataroot : /data/zhijing/GOPRO_rawevent/REBlur_testav6 # for debug
15
+
16
+ # add
17
+ norm_voxel : true
18
+ return_voxel : true
19
+ return_gt_frame : true
20
+ return_mask : false
21
+ use_mask : false
22
+
23
+ crop_size : ~
24
+ use_flip : false
25
+ use_rot : false
26
+ io_backend :
27
+ type : h5
28
+
29
+ dataset_name : REBlur
30
+
31
+ # network structures
32
+ network_g :
33
+ type : Baseline_Biattention_CrossRecurrent_FC
34
+ in_chn : 3
35
+ ev_chn : 6
36
+ width : 64
37
+ middle_blk_num : 3
38
+ enc_blk_nums : [2,2,2]
39
+ dec_blk_nums : [2,2,2]
40
+ num_heads : [2,4,4]
41
+
42
+
43
+ # path
44
+ path :
45
+ pretrain_network_g : /model/zhijing/Baseline_Biattention/experiments/Baseline_Biattention_CrossRecurrent_FC_REBlur/models/net_g_latest.pth
46
+ strict_load_g : true
47
+ resume_state : ~
48
+ root : /model/zhijing/Baseline_Biattention # set this option ONLY in TEST!!!
49
+
50
+ # validation settings
51
+ val :
52
+ save_img : true
53
+ save_img_path : /output
54
+ grids : ~
55
+ crop_size : ~
56
+ max_minibatch : 8
57
+ rgb2bgr : false # to my h5 data, its false
58
+ metrics : {
59
+ PSNR : {
60
+ type : calculate_psnr,
61
+ crop_border : 0
62
+ }
63
+ }
64
+
65
+ # dist training settings
66
+ dist_params :
67
+ backend : nccl
68
+ port : 29500
Original file line number Diff line number Diff line change
1
+ # general settings
2
+ name : MAENet_GoPro # debug
3
+ model_type : ImageEventRestorationModel
4
+ scale : 1
5
+ num_gpu : 1 # 4
6
+ manual_seed : 10
7
+
8
+ datasets :
9
+ train :
10
+ name : gopro-h5-train
11
+ type : H5ImageDataset
12
+
13
+ # dataroot: F:/GOPRO_rawevents/av_train_small6
14
+ dataroot : /data/zhijing/GOPRO_rawevent/asynav_train
15
+
16
+ # keep true if use events
17
+ norm_voxel : true
18
+ return_voxel : true
19
+
20
+ return_mask : false
21
+ use_mask : false
22
+
23
+ filename_tmpl : ' {}'
24
+ io_backend :
25
+ type : h5
26
+
27
+ crop_size : 256
28
+ use_flip : true
29
+ use_rot : true
30
+
31
+ # data loader settings
32
+ use_shuffle : true
33
+ num_worker_per_gpu : 8
34
+ batch_size_per_gpu : 2 # 4 for 2080, 8 for titan
35
+ dataset_enlarge_ratio : 1 # accelarate, equals to the num_gpu
36
+ prefetch_mode : cuda
37
+ pin_memory : true
38
+
39
+ val :
40
+ name : gopro-h5-test
41
+ type : H5ImageDataset
42
+
43
+ # dataroot: F:/GOPRO_rawevents/av_test_small6
44
+ dataroot : /data/zhijing/GOPRO_rawevent/asynav_test # for debug
45
+
46
+ norm_voxel : true
47
+ return_voxel : true
48
+ return_mask : false
49
+ use_mask : false
50
+
51
+ io_backend :
52
+ type : h5
53
+
54
+ crop_size : ~
55
+ use_flip : false
56
+ use_rot : false
57
+
58
+ dataset_name : GoPro
59
+
60
+ # network structures
61
+ network_g :
62
+ type : Baseline_Biattention_CrossRecurrent_FC
63
+ in_chn : 3
64
+ ev_chn : 6
65
+ width : 64
66
+ middle_blk_num : 3
67
+ enc_blk_nums : [2,2,2]
68
+ dec_blk_nums : [2,2,2]
69
+ num_heads : [2,4,4]
70
+
71
+ # path
72
+ path :
73
+ pretrain_network_g : ~
74
+ strict_load_g : true
75
+ resume_state : ~
76
+ training_states : ~ # save current trainig model states, for resume
77
+ root : /output
78
+
79
+ # training settings
80
+ train :
81
+ optim_g :
82
+ type : AdamW
83
+ lr : !!float 1e-4
84
+ weight_decay : !!float 1e-5
85
+ betas : [0.9, 0.99]
86
+
87
+ scheduler :
88
+ type : TrueCosineAnnealingLR
89
+ T_max : 400000
90
+ eta_min : !!float 1e-7
91
+
92
+ total_iter : 400000
93
+ warmup_iter : -1 # no warm up
94
+
95
+ # losses
96
+ pixel_opt :
97
+ type : PSNRLoss
98
+ loss_weight : 0.5
99
+ reduction : mean
100
+
101
+ # validation settings
102
+ val :
103
+ val_freq : !!float 4e4 # 2e4
104
+ save_img : false
105
+ grids : ~
106
+ crop_size : ~
107
+ max_minibatch : 8
108
+
109
+ metrics :
110
+ psnr :
111
+ type : calculate_psnr
112
+ crop_border : 0
113
+ test_y_channel : false
114
+
115
+ ssim :
116
+ type : calculate_ssim
117
+ crop_border : 0
118
+ test_y_channel : false
119
+
120
+ # logging settings
121
+ logger :
122
+ print_freq : 1000
123
+ save_checkpoint_freq : !!float 2e4
124
+ use_tb_logger : true
125
+ wandb : ~
126
+
127
+ # dist training settings
128
+ dist_params :
129
+ backend : nccl
130
+ port : 29500
You can’t perform that action at this time.
0 commit comments