Skip to content

msight_core.data.detection_result

msight_core.data.detection_result

Data containers for detection results and road-user lists.

This module defines SensorData subclasses used to carry object detection outputs and associated metadata across the MSight messaging infrastructure. It uses types from the msight_base package for structured detection objects and attach a :class:FieldCodec to a field to customize serialization/deserialization.

Provided classes
  • DetectionResultsData: Holds a detection result object and optional raw sensor payload linkage.
  • RoadUserListData: Carries a list of RoadUserPoint objects with a codec that serializes each object via its to_dict / from_dict helpers.

DetectionResultsData dataclass

Bases: SensorData

Container for detection outputs linked to a sensor frame.

This dataclass carries the detection result produced for an image/frame along with optional references to the originating sensor payload.

Attributes:

Name Type Description
image_frame_id Optional[int]

Identifier of the image/frame the detection was produced for.

detection_result Optional[DetectionResultBase]

Structured detection result object coming from msight_base. The object may include bounding boxes, classes, scores and additional metadata.

raw_sensor_data Optional[SensorData]

Optional pointer to the raw sensor message (e.g. compressed image) that produced this detection. When present this allows consumers to fetch the original payload alongside detections.

RoadUserListData dataclass

Bases: SensorData

Holds a list of road-user points with custom serialization.

The road_user_list field contains a list of RoadUserPoint objects from msight_base. A :class:FieldCodec is attached to perform element-wise conversion to/from dicts during serialization so the list can be embedded in standard JSON/MessagePack payloads.

Attributes:

Name Type Description
road_user_list list[RoadUserPoint]

List of road user points.

Notes

The module-level road_user_list_codec implements the codec used for road_user_list and is registered on the class via __field_codecs__.