Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
support DISABLE_AUG_LIST config for using --set disable augs
  • Loading branch information
sshaoshuai committed Jul 3, 2020
commit db4baf83fa9c09f0216b2ba1b19b2129dab24830
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