Skip to main content

result


class BoundingBox

Inherits from: Datatype

Bounding box associated with an object detection.

Defines the upper left and lower right corners of a detected object in an image frame. Origin (0,0) is the top left corner of the input image. (image_height, image_width) is the bottom right corner. Also the class and confidence threshold associated with the box.

Attributes

attr  y_min  (float) minimum y offset percentage with respect to image size [0.0-1.0]

attr  x_min  (float) minimum x offset percentage with respect to image size [0.0-1.0]

attr  y_max  (float) maximum y offset percentage with respect to image size [0.0-1.0]

attr  x_max  (float) maximum x offset percentage with respect to image size [0.0-1.0]

View Source
@register_data
class BoundingBox(Datatype):
"""Bounding box associated with an object detection.

Defines the upper left and lower right corners of a detected object
in an image frame. Origin (0,0) is the top left corner of the input image.
(image_height, image_width) is the bottom right corner.
Also the class and confidence threshold associated with the box.

Attributes:
y_min (float): minimum y offset percentage with respect to image size [0.0-1.0]
x_min (float): minimum x offset percentage with respect to image size [0.0-1.0]
y_max (float): maximum y offset percentage with respect to image size [0.0-1.0]
x_max (float): maximum x offset percentage with respect to image size [0.0-1.0]
"""
y_min: float
x_min: float
y_max: float
x_max: float


class HSV

Inherits from: Datatype

HSV values generated by a color filter.

Color filter represented by hue, saturation, and value Uses OpenCV ranges defined here.

Attributes

attr  h  (int) hue range is [0,179]

attr  s  (int) saturation range is [0,255]

attr  v  (int) value range is [0,255]

View Source
@register_data
class HSV(Datatype):
"""HSV values generated by a color filter.

Color filter represented by hue, saturation, and value Uses OpenCV ranges defined [here](https://opencv.org/blog/color-spaces-in-opencv/).

Attributes:
h (int): hue range is [0,179]
s (int): saturation range is [0,255]
v (int): value range is [0,255]
"""
h: int
s: int
v: int


class Detection

Inherits from: Datatype

Object detection generated by a model.

Attributes

attr  detection_id  (int) can be multiple objects per frame

attr  class_name  (str) class name of detection

attr  score  (float) confidence score

attr  bbox  (BoundingBox) bounding box

View Source
@register_data
class Detection(Datatype):
"""Object detection generated by a model.

Attributes:
detection_id (int): can be multiple objects per frame
class_name (str): class name of detection
score (float): confidence score
bbox (BoundingBox): bounding box
"""
detection_id: int
class_name: str
score: float
bbox: BoundingBox


class DetectionResult

Inherits from: Datatype

List of object detections.

Attributes

attr  detections  (List[Detection]) list of detections

attr  frame_id  (int) frame corresponding to these detections

View Source
@register_data
class DetectionResult(Datatype):
"""List of object detections.

Attributes:
detections (List[Detection]): list of detections
frame_id (int): frame corresponding to these detections
"""
detections: List[Detection]
frame_id: int


class AvoidanceResult

Inherits from: Datatype

Avoidance result generated by an avoidance model.

Attributes

attr  actuation_vector  (float) actuation vector towards safe area

View Source
@register_data
class AvoidanceResult(Datatype):
"""Avoidance result generated by an avoidance model.

Attributes:
actuation_vector (float): actuation vector towards safe area
"""
actuation_vector: float


class SLAMResult

Inherits from: Datatype

SLAM result generated by a SLAM model.

Attributes

attr  relative_position  (Position) relative position estimate relative to SLAM initialization

attr  global_position  (Location) global position estimate

View Source
@register_data
class SLAMResult(Datatype):
"""SLAM result generated by a SLAM model.

Attributes:
relative_position (common.Position): relative position estimate relative to SLAM initialization
global_position (common.Location): global position estimate
"""
relative_position: common.Position
global_position: common.Location


class ComputeResult

Inherits from: Datatype

Compute result generated by a compute server.

Attributes

attr  timestamp  (google.protobuf.timestamp_pb2.Timestamp) inference timestamp

attr  engine_name  (str) engine that generated the result

attr  detection_result  (DetectionResult) object detection

attr  avoidance_result  (AvoidanceResult) avoidance directive

attr  slam_result  (SLAMResult) SLAM position estimate

attr  generic_result  (str) JSON result

View Source
@register_data
class ComputeResult(Datatype):
"""Compute result generated by a compute server.

Attributes:
timestamp (Timestamp): inference timestamp
engine_name (str): engine that generated the result
detection_result (DetectionResult): object detection
avoidance_result (AvoidanceResult): avoidance directive
slam_result (SLAMResult): SLAM position estimate
generic_result (str): JSON result
"""
timestamp: Timestamp
engine_name: str
detection_result: DetectionResult
avoidance_result: AvoidanceResult
slam_result: SLAMResult
generic_result: str


class FrameResult

Inherits from: Datatype

Compute results generated by datasink modules

Attributes

attr  type  (str) result type(s)

attr  frame_id  (int) for correlation

attr  result  (List[ComputeResult]) list of generated results

View Source
@register_data
class FrameResult(Datatype):
"""Compute results generated by datasink modules

Attributes:
type (str): result type(s)
frame_id (int): for correlation
result (List[ComputeResult]): list of generated results
"""
type: str
frame_id: int
result: List[ComputeResult]