List all the instance annotations in the scene. Args: scene (str): Scene name. Returns: list[dict] or None: List of all the instance annotations. If there is no instances, we will return None.
(self, scene)
| 183 | return None |
| 184 | |
| 185 | def list_instances(self, scene): |
| 186 | """List all the instance annotations in the scene. |
| 187 | |
| 188 | Args: |
| 189 | scene (str): Scene name. |
| 190 | |
| 191 | Returns: |
| 192 | list[dict] or None: List of all the instance annotations. If there |
| 193 | is no instances, we will return None. |
| 194 | """ |
| 195 | for sample in self.data: |
| 196 | if sample['sample_idx'] == scene: |
| 197 | res = [] |
| 198 | for instance in sample['instances']: |
| 199 | label = self.classes[self.id_to_index[ |
| 200 | instance['bbox_label_3d']]] |
| 201 | res.append({ |
| 202 | '9dof_bbox': instance['bbox_3d'], |
| 203 | 'label': label |
| 204 | }) |
| 205 | return res |
| 206 | |
| 207 | print('No such scene') |
| 208 | return None |
| 209 | |
| 210 | def scene_info(self, scene_name): |
| 211 | """Show the info of the given scene. |
nothing calls this directly
no outgoing calls
no test coverage detected