| 130 | |
| 131 | |
| 132 | def get_data(cfg, split, base_size, crop_size, batch_size=1, gpu_num=1): |
| 133 | if cfg.DATASET.DATASET_NAME.lower() in ['cityscapes', 'pascal_context']: |
| 134 | dataset_name = cfg.DATASET.DATASET_NAME.lower() |
| 135 | data_loader = globals()[dataset_name + '_' + split] |
| 136 | return data_loader(root=cfg.DATASET.DATA_ROOT, |
| 137 | base_size=base_size, |
| 138 | crop_size=crop_size, |
| 139 | scale=True, |
| 140 | xmap=True, |
| 141 | batch_size=batch_size, |
| 142 | gpu_num=gpu_num) |
| 143 | else: |
| 144 | raise ValueError('Dataset is not supported, please check!') |
| 145 | |
| 146 | |
| 147 | def copy_model(path, new_path): |