Commit db4baf83 authored by Shaoshuai Shi's avatar Shaoshuai Shi
Browse files

support DISABLE_AUG_LIST config for using --set disable augs

parent 5904f8e3
...@@ -11,7 +11,13 @@ class DataAugmentor(object): ...@@ -11,7 +11,13 @@ class DataAugmentor(object):
self.logger = logger self.logger = logger
self.data_augmentor_queue = [] self.data_augmentor_queue = []
for cur_cfg in augmentor_configs: aug_config_list = augmentor_configs if isinstance(augmentor_configs, list) \
else augmentor_configs.AUG_CONFIG_LIST
for cur_cfg in aug_config_list:
if not isinstance(augmentor_configs, list):
if cur_cfg.NAME in augmentor_configs.DISABLE_AUG_LIST:
continue
cur_augmentor = getattr(self, cur_cfg.NAME)(config=cur_cfg) cur_augmentor = getattr(self, cur_cfg.NAME)(config=cur_cfg)
self.data_augmentor_queue.append(cur_augmentor) self.data_augmentor_queue.append(cur_augmentor)
......
...@@ -17,6 +17,8 @@ FOV_POINTS_ONLY: True ...@@ -17,6 +17,8 @@ FOV_POINTS_ONLY: True
DATA_AUGMENTOR: DATA_AUGMENTOR:
DISABLE_AUG_LIST: ['placeholder']
AUG_CONFIG_LIST:
- NAME: gt_sampling - NAME: gt_sampling
USE_ROAD_PLANE: True USE_ROAD_PLANE: True
DB_INFO_PATH: DB_INFO_PATH:
......
...@@ -21,6 +21,8 @@ DATA_CONFIG: ...@@ -21,6 +21,8 @@ DATA_CONFIG:
'test': 40000 'test': 40000
} }
DATA_AUGMENTOR: DATA_AUGMENTOR:
DISABLE_AUG_LIST: ['placeholder']
AUG_CONFIG_LIST:
- NAME: gt_sampling - NAME: gt_sampling
USE_ROAD_PLANE: True USE_ROAD_PLANE: True
DB_INFO_PATH: DB_INFO_PATH:
......
...@@ -3,6 +3,8 @@ CLASS_NAMES: ['Car', 'Pedestrian', 'Cyclist'] ...@@ -3,6 +3,8 @@ CLASS_NAMES: ['Car', 'Pedestrian', 'Cyclist']
DATA_CONFIG: DATA_CONFIG:
_BASE_CONFIG_: cfgs/dataset_configs/kitti_dataset.yaml _BASE_CONFIG_: cfgs/dataset_configs/kitti_dataset.yaml
DATA_AUGMENTOR: DATA_AUGMENTOR:
DISABLE_AUG_LIST: ['placeholder']
AUG_CONFIG_LIST:
- NAME: gt_sampling - NAME: gt_sampling
USE_ROAD_PLANE: True USE_ROAD_PLANE: True
DB_INFO_PATH: DB_INFO_PATH:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment