package documentation

AVEAS OpenLABEL library root

AVEAS OpenLABEL

Welcome to the documentation for the AVEAS OpenLABEL implementation in Python. This library supports you in reading and writing AVEAS OpenLABEL JSON files by providing a nested dataclass structure that reflects the JSON schema.

AVEAS OpenLABEL is a subset of the base ASAM OpenLABEL specification. This means that AVEAS OpenLABEL files are always valid ASAM OpenLABEL files.

The core class of this repository is AveasOpenLabel, which represents the root of the AVEAS OpenLabel JSON.

Reading AVEAS OpenLABEL files

Parsing an existing AVEAS OpenLABEL JSON file can be done with

>>> import json
>>> from aveas_openlabel import AveasOpenLabel
>>> with open("path/to/input.json", "r") as f:
...     content = json.load(f)
>>> aveas_openlabel_example = AveasOpenLabel.from_dict(content)

Writing AVEAS OpenLABEL files

Writing a populated OpenLABEL dataclass structure to a JSON file is similarly simple

>>> import json
>>> from aveas_openlabel import AveasOpenLabel
>>> aveas_openlabel_example = AveasOpenLabel.minimum_example()
>>> content = aveas_openlabel_example.to_dict()
>>> with open("path/to/file.json", "w") as f:
...     json.dump(content, f)

Obtaining a JSON schema file

A JSON schema file can be extracted from the root AveasOpenLabel class.

>>> import json
>>> from apischema.json_schema import serialization_schema
>>> from aveas_openlabel import AveasOpenLabel
>>> schema = serialization_schema(AveasOpenLabel)
>>> with open("path/to/file.json", "w") as f:
...     json.dump(schema, f)

Classifications and attributes

AVEAS OpenLABEL has mandatory and optional attributes defined for each classification. The following tables indicate optional ("O") and mandatory ("M") attributes for each classification. A "" means that the attribute is not defined for the classification.

Static Attributes

Static attributes per classification
Static attributes Object entries in AveasOpenLabel.objects
. Animal Bicycle Bus Car HumanPedestrian MobilityDevice Motorcycle OtherObject PushablePullable RailVehicle Trailer Truck Van
IsRecorder M M M M M M M M M M
AttachedTo O O O O
Impact__Point O O O O O O O O O O O O O
Impact__Point__UStdDev O O O O O O O O O O O O O
Impact__Velocity O O O O O O O O O O O O O
Impact__Velocity__UStdDev O O O O O O O O O O O O O
Impact__Frame O O O O O O O O O O O O O
Classification__Uncertainties O O O O O O O O O O O O O
Dimensions__Size M M M M M M M M M M M M M
Dimensions__Size__UStdDev O O O O O O O O O O O O O
Dimensions__CenterOfGravity O O O O O O O O O O O O O
Dimensions__CenterOfGravity__UStdDev O O O O O O O O O O O O O
Summary__Speed__Max M M M M M M M M M M M M M
Summary__Speed__Max__UStdDev O O O O O O O O O O O O O
Summary__Speed__Min M M M M M M M M M M M M M
Summary__Speed__Min__UStdDev O O O O O O O O O O O O O
Summary__Accel__Max M M M M M M M M M M M M M
Summary__Accel__Max__UStdDev O O O O O O O O O O O O O
Summary__Accel__Min M M M M M M M M M M M M M
Summary__Accel__Min__UStdDev O O O O O O O O O O O O O
Summary__SteeringWheelAngle__Max O O O O O O O O
Summary__SteeringWheelAngle__Max__UStdDev O O O O O O O O
Summary__SteeringWheelAngle__Min O O O O O O O O
Summary__SteeringWheelAngle__Min__UStdDev O O O O O O O O
Summary__SteeringAngle__Max M M M M M M M M
Summary__SteeringAngle__Max__UStdDev O O O O O O O O
Summary__SteeringAngle__Min M M M M M M M M
Summary__SteeringAngle__Min__UStdDev O O O O O O O O
Summary__Coordinates__ScenarioStart O O O O O O O O O O O O O
Summary__Coordinates__ScenarioStart__UStdDev O O O O O O O O O O O O O
Summary__Coordinates__ScenarioEnd O O O O O O O O O O O O O
Summary__Coordinates__ScenarioEnd__UStdDev O O O O O O O O O O O O O
Operator__Age O O O O O O O O O O
Operator__Gender O O O O O O O O O O
Operator__Personality O O O O O O O O O O
Operator__BodyHeight O O O O O O O O O O

Dynamic Attributes

Dynamic attributes per classification
Dynamic attributes Object entries in Frame.objects inside AveasOpenLabel.frames
. AnimalInFrame BicycleInFrame BusInFrame CarInFrame HumanPedestrianInFrame MobilityDeviceInFrame MotorcycleInFrame OtherObjectInFrame PushablePullableInFrame RailVehicleInFrame TrailerInFrame TruckInFrame VanInFrame
BestDetectedSide O O O O O O O O O O O O O
BestDetectedPoint O O O O O O O O O O O O O
BoundingBox M M M M M M M M M M M M M
BoundingBox__UStdDev O O O O O O O O O O O O O
Velocity M M M M M M M M M M M M M
Velocity__UStdDev O O O O O O O O O O O O O
Acceleration M M M M M M M M M M M M M
Acceleration__UStdDev O O O O O O O O O O O O O
Impact__gTTC__ObjectIds O O O O O O O O O O O O O
Impact__gTTC__Values O O O O O O O O O O O O O
Impact__PrET__ObjectIds O O O O O O O O O O O O O
Impact__PrET__Values O O O O O O O O O O O O O
Impact__THW__ObjectIds O O O O O O O O O O O O O
Impact__THW__Values O O O O O O O O O O O O O
Interior__HasRider M M M M
Interior__SteeringAngle O O O O O O O O
Interior__SteeringAngle__UStdDev O O O O O O O O
Interior__AutomatedControl__Longitudinal O O O O O O O O O
Interior__AutomatedControl__Lateral O O O O O O O O
Interior__Wiper O O O O O O O O O
Interior__Gear O O O O O O O O O
Interior__AcceleratorPedal O O O O O O O O O
Interior__BrakePedal O O O O O O O O O
Lights__Brake O O O O O O O O O O
Lights__Indicator__Left O O O O O O O O O O
Lights__Indicator__Right O O O O O O O O O O
Lights__Front O O O O O O O O O O
Lights__Daytime O O O O O O O O O O
Lights__HighBeam O O O O O O O O O O
OpenDrive__RoadId O O O O O O O O O O O O O
OpenDrive__LaneId O O O O O O O O O O O O O
OpenDrive__LanePosition O O O O O O O O O O O O O
OpenDrive__LocalRoadCoordinates M M M M M M M M M M M M M
OpenDrive__LocalRoadCoordinates__UStdDev O O O O O O O O O O O O O
Traffic__Density O O O O O O O O O
Traffic__Density__UStdDev O O O O O O O O O
Traffic__Volume O O O O O O O O O
Traffic__Volume__UStdDev O O O O O O O O O
Road__SpeedLimit O O O O O O O O O
Road__Classification M M M M M M M M M M
Road__NumberLanes__Left__Legal M M M M M M M M M M
Road__NumberLanes__Left__Physical M M M M M M M M M M
Road__NumberLanes__Right__Legal M M M M M M M M M M
Road__NumberLanes__Right__Physical M M M M M M M M M M
Operator__HeadRotation O O O O O O O O O O
Operator__HeadRotation__UStdDev O O O O O O O O O O
Operator__FocussedPoint O O O O O O O O O O
Operator__FocussedPoint__UStdDev O O O O O O O O O O
Operator__ViewingAngle O O O O O O O O O O
Operator__FocussedObject O O O O O O O O O O
Operator__FocussedObject__Uncertainties O O O O O O O O O O
Operator__FocussedObject__Id O O O O O O O O O O
Operator__Pupil O O O O O O O O O O
Operator__Pupil__UStdDev O O O O O O O O O O
Operator__HandInteractionArea O O O O O O O O O O
Operator__SixDoFRotationAndAcceleration O O O O O O O O O O
HmiFeedback__Visual O O O O O O O O O
HmiFeedback__Acoustic O O O O O O O O O
HmiFeedback__Other O O O O O O O O O
Module attribute_enforcer A subclass of Attributes that allows for specifying optional and required attributes
Package attributes Attributes defined for AVEAS OpenLABEL
Package classifications Object classifications defined for AVEAS OpenLABEL
Package contexts The Context objects defined in the AVEAS OpenLABEL format
Module event The Event class and its attributes
Module frame The Frame class and its attributes
Module metadata Contains the Metadata class
Package object_data Object data of objects in the AveasOpenLabel.objects field.
Package object_in_frame_data Object data of objects in the AveasOpenLabel.frames field.
Module utils Undocumented

From __init__.py:

Class AveasOpenLabel The AVEAS OpenLABEL class.