Skip to content

Commit

Permalink
support DISABLE_AUG_LIST config for using --set disable augs (open-mm…
Browse files Browse the repository at this point in the history
  • Loading branch information
sshaoshuai authored Jul 3, 2020
1 parent 5904f8e commit b79844c
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 72 deletions.
12 changes: 9 additions & 3 deletions pcdet/datasets/augmentor/data_augmentor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ def __init__(self, root_path, augmentor_configs, class_names, logger=None):
self.logger = logger

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)
self.data_augmentor_queue.append(cur_augmentor)
self.data_augmentor_queue.append(cur_augmentor)

def gt_sampling(self, config=None):
db_sampler = database_sampler.DataBaseSampler(
root_path=self.root_path,
Expand Down
48 changes: 25 additions & 23 deletions tools/cfgs/dataset_configs/kitti_dataset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,31 @@ FOV_POINTS_ONLY: True


DATA_AUGMENTOR:
- NAME: gt_sampling
USE_ROAD_PLANE: True
DB_INFO_PATH:
- kitti_dbinfos_train.pkl
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
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0]
LIMIT_WHOLE_SCENE: True

- NAME: random_world_flip
ALONG_AXIS_LIST: ['x']

- NAME: random_world_rotation
WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]

- NAME: random_world_scaling
WORLD_SCALE_RANGE: [0.95, 1.05]
DISABLE_AUG_LIST: ['placeholder']
AUG_CONFIG_LIST:
- NAME: gt_sampling
USE_ROAD_PLANE: True
DB_INFO_PATH:
- kitti_dbinfos_train.pkl
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
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0]
LIMIT_WHOLE_SCENE: True

- NAME: random_world_flip
ALONG_AXIS_LIST: ['x']

- NAME: random_world_rotation
WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]

- NAME: random_world_scaling
WORLD_SCALE_RANGE: [0.95, 1.05]


POINT_FEATURE_ENCODING: {
Expand Down
48 changes: 25 additions & 23 deletions tools/cfgs/kitti_models/pointpillar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,31 @@ DATA_CONFIG:
'test': 40000
}
DATA_AUGMENTOR:
- NAME: gt_sampling
USE_ROAD_PLANE: True
DB_INFO_PATH:
- kitti_dbinfos_train.pkl
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
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0]
LIMIT_WHOLE_SCENE: False

- NAME: random_world_flip
ALONG_AXIS_LIST: ['x']

- NAME: random_world_rotation
WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]

- NAME: random_world_scaling
WORLD_SCALE_RANGE: [0.95, 1.05]
DISABLE_AUG_LIST: ['placeholder']
AUG_CONFIG_LIST:
- NAME: gt_sampling
USE_ROAD_PLANE: True
DB_INFO_PATH:
- kitti_dbinfos_train.pkl
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
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0]
LIMIT_WHOLE_SCENE: False

- NAME: random_world_flip
ALONG_AXIS_LIST: ['x']

- NAME: random_world_rotation
WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]

- NAME: random_world_scaling
WORLD_SCALE_RANGE: [0.95, 1.05]

MODEL:
NAME: PointPillar
Expand Down
48 changes: 25 additions & 23 deletions tools/cfgs/kitti_models/pv_rcnn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,31 @@ CLASS_NAMES: ['Car', 'Pedestrian', 'Cyclist']
DATA_CONFIG:
_BASE_CONFIG_: cfgs/dataset_configs/kitti_dataset.yaml
DATA_AUGMENTOR:
- NAME: gt_sampling
USE_ROAD_PLANE: True
DB_INFO_PATH:
- kitti_dbinfos_train.pkl
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
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0]
LIMIT_WHOLE_SCENE: False

- NAME: random_world_flip
ALONG_AXIS_LIST: ['x']

- NAME: random_world_rotation
WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]

- NAME: random_world_scaling
WORLD_SCALE_RANGE: [0.95, 1.05]
DISABLE_AUG_LIST: ['placeholder']
AUG_CONFIG_LIST:
- NAME: gt_sampling
USE_ROAD_PLANE: True
DB_INFO_PATH:
- kitti_dbinfos_train.pkl
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
REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0]
LIMIT_WHOLE_SCENE: False

- NAME: random_world_flip
ALONG_AXIS_LIST: ['x']

- NAME: random_world_rotation
WORLD_ROT_ANGLE: [-0.78539816, 0.78539816]

- NAME: random_world_scaling
WORLD_SCALE_RANGE: [0.95, 1.05]

MODEL:
NAME: PVRCNN
Expand Down

0 comments on commit b79844c

Please sign in to comment.