yolov8_postproc =============== .. py:module:: yolov8_postproc Attributes ---------- .. autoapisummary:: yolov8_postproc.plugin_name Classes ------- .. autoapisummary:: yolov8_postproc.MyPlugin Module Contents --------------- .. py:data:: plugin_name :value: 'yolov8_postproc_overlay' .. py:class:: MyPlugin 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 .. py:attribute:: out_size :value: 0 .. py:attribute:: classes :value: 87 .. py:attribute:: color_palette .. py:attribute:: confidence_thres :value: 0.5 .. py:attribute:: iou_thres :value: 0.3 .. py:attribute:: boxes :value: [] .. py:attribute:: scores :value: [] .. py:attribute:: class_ids :value: [] .. py:attribute:: src_caps_set :value: False .. py:attribute:: MODEL_WIDTH :value: 640 .. py:attribute:: MODEL_HEIGHT :value: 480 .. py:attribute:: FRAME_WIDTH :value: 1280 .. py:attribute:: FRAME_HEIGHT :value: 720 .. py:attribute:: model_outs :value: [(60, 80, 4), (30, 40, 4), (15, 20, 4), (60, 80, 87), (30, 40, 87), (15, 20, 87)] .. py:method:: draw_detections(img, box, score, class_id) .. py:method:: get_model_outputs(input_buffer) .. py:method:: compute_iou(box, boxes) .. py:method:: nms(boxes, scores, iou_threshold) .. py:method:: rescale_boxes(boxes, input_width, input_height, target_width, target_height) .. py:method:: xywh2xyxy(x) .. py:method:: extract_boxes(boxes) .. py:method:: run(input_buffers: List[python_plugin_template.SimaaiPythonBuffer], output_buffer: bytes) -> None 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