yolov7_postproc_overlay ======================= .. py:module:: yolov7_postproc_overlay Attributes ---------- .. autoapisummary:: yolov7_postproc_overlay.plugin_name yolov7_postproc_overlay.CLASSNAMES yolov7_postproc_overlay.COLORS Classes ------- .. autoapisummary:: yolov7_postproc_overlay.PostProcOpt yolov7_postproc_overlay.MyPlugin Module Contents --------------- .. py:data:: plugin_name :value: 'python_plugin' .. py:data:: CLASSNAMES :value: ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic... .. py:data:: COLORS .. py:class:: PostProcOpt(plugin, confidence_thres, iou_thres) .. py:attribute:: plugin .. py:attribute:: confidence_thres .. py:attribute:: iou_thres .. py:attribute:: grid_cells .. py:attribute:: final_buffer .. py:method:: post_process_optimized(model_output) .. 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:: MODEL_WIDTH :value: 640 .. py:attribute:: MODEL_HEIGHT :value: 640 .. py:attribute:: FRAME_WIDTH :value: 1280 .. py:attribute:: FRAME_HEIGHT :value: 720 .. py:attribute:: classes :value: 80 .. py:attribute:: color_palette .. py:attribute:: confidence_thres :value: 0.25 .. py:attribute:: iou_thres :value: 0.65 .. py:attribute:: boxes :value: [] .. py:attribute:: scores :value: [] .. py:attribute:: class_ids :value: [] .. py:attribute:: out_size :value: 0 .. py:attribute:: frame_id :value: 0 .. py:attribute:: model_outs :value: [(1, 80, 80, 6), (1, 80, 80, 6), (1, 80, 80, 243), (1, 40, 40, 6), (1, 40, 40, 6), (1, 40, 40,... .. py:attribute:: post_proc_opt .. 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:: get_model_outputs(input_buffer) .. py:method:: run(input_buffers: List[python_plugin_template.SimaaiPythonBuffer], output_buffer: bytes) -> None Input: input_buffers: List[Gst.Buffer] List of input buffers, source from each pad. output_buffer: Gst.Buffer Output buffer that needs to be overwritten. Implement your logic within this function. Process the input buffers, and modify the output buffer.