yolov8_postproc

Attributes

plugin_name

Classes

MyPlugin

A Python based gstreamer plugin template. Enables the user to:

Module Contents

yolov8_postproc.plugin_name = 'yolov8_postproc_overlay'[source]
class yolov8_postproc.MyPlugin[source]

A Python based gstreamer plugin template. Enables the user to: - Accept incoming buffers from dynamic pads - Define any custom plugin runtime logic User has to only override the run() function

out_size = 0[source]
classes = 87[source]
color_palette[source]
confidence_thres = 0.5[source]
iou_thres = 0.3[source]
boxes = [][source]
scores = [][source]
class_ids = [][source]
src_caps_set = False[source]
MODEL_WIDTH = 640[source]
MODEL_HEIGHT = 480[source]
FRAME_WIDTH = 1280[source]
FRAME_HEIGHT = 720[source]
model_outs = [(60, 80, 4), (30, 40, 4), (15, 20, 4), (60, 80, 87), (30, 40, 87), (15, 20, 87)][source]
draw_detections(img, box, score, class_id)[source]
get_model_outputs(input_buffer)[source]
compute_iou(box, boxes)[source]
nms(boxes, scores, iou_threshold)[source]
rescale_boxes(boxes, input_width, input_height, target_width, target_height)[source]
xywh2xyxy(x)[source]
extract_boxes(boxes)[source]
run(input_buffers: List[python_plugin_template.SimaaiPythonBuffer], output_buffer: bytes) None[source]

Define your plugin logic HERE Inputs: input_buffers List[SimaaiPythonBuffer]: List of input buffers Object of class SimaaiPythonBuffer has three fields: 1. metadata MetaStruct Refer to the structure above 2. data bytes - raw bytes of the incoming buffer 3. size int - size of incoming buffer in bytes