NvDsFrameMeta

Inheritance diagram of NvDsFrameMeta

NvDsFrameMeta inheritance diagram

class savant.deepstream.meta.frame.NvDsFrameMeta(frame_meta, video_frame, telemetry_span)

Wrapper of deepstream frame meta information.

Parameters:
  • frame_meta (pyds.NvDsFrameMeta) – Deepstream python bindings frame meta.

  • video_frame (VideoFrame) – Video frame meta.

  • telemetry_span (TelemetrySpan) – The telemetry span associated with the frame.

property source_id: str

Source id for the frame in the batch.

property frame_num: int

Current frame number of the source.

property batch_id: int

Location of the frame in the batch.

property objects: Iterator[ObjectMeta]

Returns an iterator over object metas in current frame.

Returns:

Iterator over object metas.

property roi: BBox
property objects_number: int

Returns number of objects in frame meta.

Returns:

Objects number.

get_tag(name)

Get tag of frame. These tags are part of the meta information about the frame that comes with the frames in the module.

Returns:

Tag value

Return type:

Optional[Union[bool, int, float, str]]

set_tag(name, value)

Set tag to frame. These tags are part of the meta information about the frame that comes with the frames in the module.

Parameters:
property pts: int

Get the presentation time stamp (PTS) of the current frame.

Returns:

The PTS of the current frame, if available; None otherwise.

property duration: Optional[int]

Get the duration of the current frame.

Returns:

The duration of the current frame, if available; None otherwise.

property framerate: str

Get the framerate of the current frame.

returns: The framerate of the current frame as a string.

add_obj_meta(object_meta)

Add an object meta to frame meta.

Parameters:

object_meta (ObjectMeta) – Object meta to add.

remove_obj_meta(object_meta)

Remove an object meta from frame meta.

Parameters:

object_meta (ObjectMeta) – Object meta to remove.

property video_frame: VideoFrame

Get the video frame associated with the frame meta.

property logger

Logger.

property telemetry_span: TelemetrySpan

Get the telemetry span associated with the frame.

Example:

with frame_meta.telemetry_span.nested_span("process-frame"):
    # do something