MCPcopy
hub / github.com/open-mmlab/OpenPCDet / __getitem__

Method __getitem__

pcdet/datasets/lyft/lyft_dataset.py:86–107  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

84 return len(self.infos)
85
86 def __getitem__(self, index):
87 if self._merge_all_iters_to_one_epoch:
88 index = index % len(self.infos)
89
90 info = copy.deepcopy(self.infos[index])
91 points = self.get_lidar_with_sweeps(index, max_sweeps=self.dataset_cfg.MAX_SWEEPS)
92
93 input_dict = {
94 'points': points,
95 'frame_id': Path(info['lidar_path']).stem,
96 'metadata': {'token': info['token']}
97 }
98
99 if 'gt_boxes' in info:
100 input_dict.update({
101 'gt_boxes': info['gt_boxes'],
102 'gt_names': info['gt_names']
103 })
104
105 data_dict = self.prepare_data(data_dict=input_dict)
106
107 return data_dict
108
109 def generate_prediction_dicts(self, batch_dict, pred_dicts, class_names, output_path=None):
110 """

Callers

nothing calls this directly

Calls 3

get_lidar_with_sweepsMethod · 0.95
updateMethod · 0.80
prepare_dataMethod · 0.80

Tested by

no test coverage detected