raillabel_providerkit package¶
Subpackages¶
- raillabel_providerkit.convert package
- raillabel_providerkit.format package
- Subpackages
- raillabel_providerkit.format.understand_ai package
- Submodules
- raillabel_providerkit.format.understand_ai.bounding_box_2d module
- raillabel_providerkit.format.understand_ai.bounding_box_3d module
- raillabel_providerkit.format.understand_ai.coordinate_system module
- raillabel_providerkit.format.understand_ai.frame module
- raillabel_providerkit.format.understand_ai.metadata module
- raillabel_providerkit.format.understand_ai.point_3d module
- raillabel_providerkit.format.understand_ai.polygon_2d module
- raillabel_providerkit.format.understand_ai.polyline_2d module
- raillabel_providerkit.format.understand_ai.quaternion module
- raillabel_providerkit.format.understand_ai.scene module
- raillabel_providerkit.format.understand_ai.segmentation_3d module
- raillabel_providerkit.format.understand_ai.sensor_reference module
- raillabel_providerkit.format.understand_ai.size_3d module
- Module contents
- raillabel_providerkit.format.understand_ai package
- Module contents
- Subpackages
- raillabel_providerkit.validation package
- Subpackages
- Submodules
- raillabel_providerkit.validation.issue module
- raillabel_providerkit.validation.validate module
- Module contents
Submodules¶
raillabel_providerkit.exceptions module¶
Module contents¶
A library for annotation providers of raillabel-formatted data.
- raillabel_providerkit.convert(data: dict, loader_class: type[LoaderABC] | None = None) Scene ¶
Convert annotation data from provider formats into raillabel.
- Parameters:
data (dict) – Raw data in the provider format, that should be converted.
loader_class (child-class of raillabel_providerkit.LoaderABC, optional) – Class used for converting the provider formatted data. If None is provided, then one is chosen based on criteria present in the data. Default is None.
- Returns:
scene – Scene with the loaded data in the raillabel format.
- Return type:
raillabel.Scene
- Raises:
raillabel.UnsupportedFormatError – if the annotation file does not match any loaders.
- raillabel_providerkit.validate(scene_source: dict | Path, validate_for_empty_frames: bool = True, validate_for_rail_side_order: bool = True) list[Issue] ¶
Validate a scene based on the Deutsche Bahn Requirements.
- Args:
scene_source: The scene either as a dictionary or as a Path to the scene source file. validate_for_empty_frames (optional): If True, issues are returned if the scene contains
frames without annotations. Default is True.
- validate_for_rail_side_order: If True, issues are returned if the scene contains track with
a mismatching rail side order. Default is True.
- Returns:
List of all requirement errors in the scene. If an empty list is returned, then there are no errors present and the scene is valid.