'''mcibi_deeplabv3_resnet101os8_cocostuff10k''' import os import copy from .base_cfg import SEGMENTOR_CFG from .._base_ import DATASET_CFG_COCOStuff10k_512x512, DATALOADER_CFG_BS16 # deepcopy SEGMENTOR_CFG = copy.deepcopy(SEGMENTOR_CFG) # modify dataset config SEGMENTOR_CFG['dataset'] = DATASET_CFG_COCOStuff10k_512x512.copy() # modify dataloader config SEGMENTOR_CFG['dataloader'] = DATALOADER_CFG_BS16.copy() # modify scheduler config SEGMENTOR_CFG['scheduler']['max_epochs'] = 110 SEGMENTOR_CFG['scheduler']['optimizer'] = { 'type': 'SGD', 'lr': 0.001, 'momentum': 0.9, 'weight_decay': 1e-4, 'params_rules': {}, } # modify other segmentor configs SEGMENTOR_CFG['num_classes'] = 182 SEGMENTOR_CFG['head']['use_loss'] = False SEGMENTOR_CFG['head']['update_cfg']['momentum_cfg']['base_lr'] = 0.001 * 0.9 SEGMENTOR_CFG['work_dir'] = os.path.split(__file__)[-1].split('.')[0] SEGMENTOR_CFG['evaluate_results_filename'] = f"{os.path.split(__file__)[-1].split('.')[0]}.pkl" SEGMENTOR_CFG['logger_handle_cfg']['logfilepath'] = os.path.join(SEGMENTOR_CFG['work_dir'], f"{os.path.split(__file__)[-1].split('.')[0]}.log") # modify inference config # --single-scale SEGMENTOR_CFG['inference'] = SEGMENTOR_CFG['inference'].copy() # --multi-scale with flipping ''' SEGMENTOR_CFG['inference'] = { 'mode': 'whole', 'opts': {}, 'tricks': { 'multiscale': [0.5, 0.75, 1.0, 1.25, 1.5, 1.75], 'flip': True, 'use_probs_before_resize': True } } '''