Unverified Commit f221374a authored by yukang's avatar yukang Committed by GitHub
Browse files

Update nuscenes_dataset.py (#1139)

It will the keyerror 'gt_boxes' bug when evaluate on the test split, if we do not include this condition.
parent 8f765b66
...@@ -140,7 +140,7 @@ class NuScenesDataset(DatasetTemplate): ...@@ -140,7 +140,7 @@ 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): if self.dataset_cfg.get('SET_NAN_VELOCITY_TO_ZEROS', False) and 'gt_boxes' in info:
gt_boxes = data_dict['gt_boxes'] gt_boxes = data_dict['gt_boxes']
gt_boxes[np.isnan(gt_boxes)] = 0 gt_boxes[np.isnan(gt_boxes)] = 0
data_dict['gt_boxes'] = gt_boxes data_dict['gt_boxes'] = gt_boxes
......
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