Commit 9157ee44 authored by Shaoshuai Shi's avatar Shaoshuai Shi
Browse files

add config SET_NAN_VELOCITY_TO_ZEROS=True for NuScenes

parent 67b43a3b
...@@ -132,6 +132,11 @@ class NuScenesDataset(DatasetTemplate): ...@@ -132,6 +132,11 @@ class NuScenesDataset(DatasetTemplate):
data_dict = self.prepare_data(data_dict=input_dict) data_dict = self.prepare_data(data_dict=input_dict)
if self.dataset_cfg.get('SET_NAN_VELOCITY_TO_ZEROS', False):
gt_boxes = data_dict['gt_boxes']
gt_boxes[np.isnan(gt_boxes)] = 0
data_dict['gt_boxes'] = gt_boxes
if not self.dataset_cfg.PRED_VELOCITY and 'gt_boxes' in data_dict: if not self.dataset_cfg.PRED_VELOCITY and 'gt_boxes' in data_dict:
data_dict['gt_boxes'] = data_dict['gt_boxes'][:, [0, 1, 2, 3, 4, 5, 6, -1]] data_dict['gt_boxes'] = data_dict['gt_boxes'][:, [0, 1, 2, 3, 4, 5, 6, -1]]
......
...@@ -4,6 +4,7 @@ DATA_PATH: '../data/nuscenes' ...@@ -4,6 +4,7 @@ DATA_PATH: '../data/nuscenes'
VERSION: 'v1.0-trainval' VERSION: 'v1.0-trainval'
MAX_SWEEPS: 10 MAX_SWEEPS: 10
PRED_VELOCITY: True PRED_VELOCITY: True
SET_NAN_VELOCITY_TO_ZEROS: True
FILTER_MIN_POINTS_IN_GT: 1 FILTER_MIN_POINTS_IN_GT: 1
DATA_SPLIT: { DATA_SPLIT: {
......
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