yolov8_postproc
Attributes
Classes
A Python based gstreamer plugin template. Enables the user to: |
Module Contents
- yolov8_postproc.plugin_name = 'yolov8_postproc_overlay'
- class yolov8_postproc.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
- out_size = 0
- classes = 87
- color_palette
- confidence_thres = 0.5
- iou_thres = 0.3
- boxes = []
- scores = []
- class_ids = []
- src_caps_set = False
- MODEL_WIDTH = 640
- MODEL_HEIGHT = 480
- FRAME_WIDTH = 1280
- FRAME_HEIGHT = 720
- model_outs = [(60, 80, 4), (30, 40, 4), (15, 20, 4), (60, 80, 87), (30, 40, 87), (15, 20, 87)]
- draw_detections(img, box, score, class_id)
- get_model_outputs(input_buffer)
- compute_iou(box, boxes)
- nms(boxes, scores, iou_threshold)
- rescale_boxes(boxes, input_width, input_height, target_width, target_height)
- xywh2xyxy(x)
- extract_boxes(boxes)
- 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