1
+ '''BASE_CFG for RCIL'''
2
+ # SEGMENTOR_CFG
3
+ SEGMENTOR_CFG = {
4
+ 'type' : 'RCILSegmentor' ,
5
+ 'num_known_classes_list' : None ,
6
+ 'selected_indices' : (3 ,),
7
+ 'align_corners' : False ,
8
+ 'encoder_cfg' : {
9
+ 'type' : 'ResNetRCIL' ,
10
+ 'depth' : 101 ,
11
+ 'outstride' : 16 ,
12
+ 'out_indices' : (0 , 1 , 2 , 3 ),
13
+ 'norm_cfg' : {'type' : 'InPlaceABNSync' , 'activation' : 'leaky_relu' , 'activation_param' : 1.0 },
14
+ 'act_cfg' : {'type' : 'LeakyReLU' , 'negative_slope' : 0.01 , 'inplace' : True },
15
+ 'pretrained' : True ,
16
+ },
17
+ 'decoder_cfg' : {
18
+ 'type' : 'RCILASPPHead' ,
19
+ 'in_channels' : 2048 ,
20
+ 'out_channels' : 256 ,
21
+ 'dilations' : (1 , 6 , 12 , 18 ),
22
+ 'pooling_size' : 32 ,
23
+ 'norm_cfg' : {'type' : 'InPlaceABNSync' , 'activation' : 'leaky_relu' , 'activation_param' : 1.0 },
24
+ 'act_cfg' : {'type' : 'LeakyReLU' , 'negative_slope' : 0.01 , 'inplace' : True },
25
+ },
26
+ 'losses_cfgs' : {
27
+ 'segmentation_init' : {
28
+ 'loss_seg' : {'CrossEntropyLoss' : {'scale_factor' : 1.0 , 'reduction' : 'mean' , 'ignore_index' : 255 }}
29
+ },
30
+ 'segmentation_cl' : {
31
+ 'loss_seg' : {'MIBUnbiasedCrossEntropyLoss' : {'scale_factor' : 1.0 , 'reduction' : 'mean' , 'ignore_index' : 255 }}
32
+ },
33
+ 'distillation' : {'scale_factor' : 1.0 , 'spp_scales' : [4 , 8 , 12 , 16 , 20 , 24 ]},
34
+ }
35
+ }
36
+ # RUNNER_CFG
37
+ RUNNER_CFG = {
38
+ 'type' : 'RCILRunner' ,
39
+ 'algorithm' : 'RCIL' ,
40
+ 'task_name' : '' ,
41
+ 'task_id' : - 1 ,
42
+ 'num_tasks' : - 1 ,
43
+ 'work_dir' : '' ,
44
+ 'save_interval_epochs' : 10 ,
45
+ 'eval_interval_epochs' : 10 ,
46
+ 'log_interval_iterations' : 10 ,
47
+ 'choose_best_segmentor_by_metric' : 'mean_iou' ,
48
+ 'logfilepath' : '' ,
49
+ 'num_total_classes' : - 1 ,
50
+ 'pseudolabeling_minimal_threshold' : 0.001 ,
51
+ 'random_seed' : 42 ,
52
+ 'segmentor_cfg' : SEGMENTOR_CFG ,
53
+ }
0 commit comments