(self, index)
| 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 | """ |
nothing calls this directly
no test coverage detected