Unverified Commit b79844c9 authored by Shaoshuai Shi's avatar Shaoshuai Shi Committed by GitHub
Browse files

support DISABLE_AUG_LIST config for using --set disable augs (#122)

parent 5904f8e3
...@@ -11,10 +11,16 @@ class DataAugmentor(object): ...@@ -11,10 +11,16 @@ 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)
def gt_sampling(self, config=None): def gt_sampling(self, config=None):
db_sampler = database_sampler.DataBaseSampler( db_sampler = database_sampler.DataBaseSampler(
root_path=self.root_path, root_path=self.root_path,
......
...@@ -17,29 +17,31 @@ FOV_POINTS_ONLY: True ...@@ -17,29 +17,31 @@ FOV_POINTS_ONLY: True
DATA_AUGMENTOR: DATA_AUGMENTOR:
- NAME: gt_sampling DISABLE_AUG_LIST: ['placeholder']
USE_ROAD_PLANE: True AUG_CONFIG_LIST:
DB_INFO_PATH: - NAME: gt_sampling
- kitti_dbinfos_train.pkl USE_ROAD_PLANE: True
PREPARE: { DB_INFO_PATH:
filter_by_min_points: ['Car:5', 'Pedestrian:5', 'Cyclist:5'], - kitti_dbinfos_train.pkl
filter_by_difficulty: [-1], PREPARE: {
} filter_by_min_points: ['Car:5', 'Pedestrian:5', 'Cyclist:5'],
filter_by_difficulty: [-1],
SAMPLE_GROUPS: ['Car:20','Pedestrian:15', 'Cyclist:15'] }
NUM_POINT_FEATURES: 4
DATABASE_WITH_FAKELIDAR: False SAMPLE_GROUPS: ['Car:20','Pedestrian:15', 'Cyclist:15']
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0] NUM_POINT_FEATURES: 4
LIMIT_WHOLE_SCENE: True DATABASE_WITH_FAKELIDAR: False
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0]
- NAME: random_world_flip LIMIT_WHOLE_SCENE: True
ALONG_AXIS_LIST: ['x']
- NAME: random_world_flip
- NAME: random_world_rotation ALONG_AXIS_LIST: ['x']
WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]
- NAME: random_world_rotation
- NAME: random_world_scaling WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]
WORLD_SCALE_RANGE: [0.95, 1.05]
- NAME: random_world_scaling
WORLD_SCALE_RANGE: [0.95, 1.05]
POINT_FEATURE_ENCODING: { POINT_FEATURE_ENCODING: {
......
...@@ -21,29 +21,31 @@ DATA_CONFIG: ...@@ -21,29 +21,31 @@ DATA_CONFIG:
'test': 40000 'test': 40000
} }
DATA_AUGMENTOR: DATA_AUGMENTOR:
- NAME: gt_sampling DISABLE_AUG_LIST: ['placeholder']
USE_ROAD_PLANE: True AUG_CONFIG_LIST:
DB_INFO_PATH: - NAME: gt_sampling
- kitti_dbinfos_train.pkl USE_ROAD_PLANE: True
PREPARE: { DB_INFO_PATH:
filter_by_min_points: ['Car:5', 'Pedestrian:5', 'Cyclist:5'], - kitti_dbinfos_train.pkl
filter_by_difficulty: [-1], PREPARE: {
} filter_by_min_points: ['Car:5', 'Pedestrian:5', 'Cyclist:5'],
filter_by_difficulty: [-1],
SAMPLE_GROUPS: ['Car:15','Pedestrian:15', 'Cyclist:15'] }
NUM_POINT_FEATURES: 4
DATABASE_WITH_FAKELIDAR: False SAMPLE_GROUPS: ['Car:15','Pedestrian:15', 'Cyclist:15']
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0] NUM_POINT_FEATURES: 4
LIMIT_WHOLE_SCENE: False DATABASE_WITH_FAKELIDAR: False
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0]
- NAME: random_world_flip LIMIT_WHOLE_SCENE: False
ALONG_AXIS_LIST: ['x']
- NAME: random_world_flip
- NAME: random_world_rotation ALONG_AXIS_LIST: ['x']
WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]
- NAME: random_world_rotation
- NAME: random_world_scaling WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]
WORLD_SCALE_RANGE: [0.95, 1.05]
- NAME: random_world_scaling
WORLD_SCALE_RANGE: [0.95, 1.05]
MODEL: MODEL:
NAME: PointPillar NAME: PointPillar
......
...@@ -3,29 +3,31 @@ CLASS_NAMES: ['Car', 'Pedestrian', 'Cyclist'] ...@@ -3,29 +3,31 @@ 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:
- NAME: gt_sampling DISABLE_AUG_LIST: ['placeholder']
USE_ROAD_PLANE: True AUG_CONFIG_LIST:
DB_INFO_PATH: - NAME: gt_sampling
- kitti_dbinfos_train.pkl USE_ROAD_PLANE: True
PREPARE: { DB_INFO_PATH:
filter_by_min_points: ['Car:5', 'Pedestrian:5', 'Cyclist:5'], - kitti_dbinfos_train.pkl
filter_by_difficulty: [-1], PREPARE: {
} filter_by_min_points: ['Car:5', 'Pedestrian:5', 'Cyclist:5'],
filter_by_difficulty: [-1],
SAMPLE_GROUPS: ['Car:15','Pedestrian:10', 'Cyclist:10'] }
NUM_POINT_FEATURES: 4
DATABASE_WITH_FAKELIDAR: False SAMPLE_GROUPS: ['Car:15','Pedestrian:10', 'Cyclist:10']
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0] NUM_POINT_FEATURES: 4
LIMIT_WHOLE_SCENE: False DATABASE_WITH_FAKELIDAR: False
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0]
- NAME: random_world_flip LIMIT_WHOLE_SCENE: False
ALONG_AXIS_LIST: ['x']
- NAME: random_world_flip
- NAME: random_world_rotation ALONG_AXIS_LIST: ['x']
WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]
- NAME: random_world_rotation
- NAME: random_world_scaling WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]
WORLD_SCALE_RANGE: [0.95, 1.05]
- NAME: random_world_scaling
WORLD_SCALE_RANGE: [0.95, 1.05]
MODEL: MODEL:
NAME: PVRCNN NAME: PVRCNN
......
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