yolov7_postproc_no_overlay

Attributes

plugin_name

CLASSNAMES

DEFAULT_NUM_MASK

TOPK_VALUE_OUT

INT_SIZE

BBOX_OUTSIZE

maskWidth

maskHeight

origImageWidth

origImageHeight

preImgWidth

preImgHeight

Classes

BboxT

Structure base class

PostProcOpt

MyPlugin

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

Module Contents

yolov7_postproc_no_overlay.plugin_name = 'python_plugin'
yolov7_postproc_no_overlay.CLASSNAMES = ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic...
yolov7_postproc_no_overlay.DEFAULT_NUM_MASK = 32
yolov7_postproc_no_overlay.TOPK_VALUE_OUT = 200
yolov7_postproc_no_overlay.INT_SIZE = 4
class yolov7_postproc_no_overlay.BboxT

Structure base class

yolov7_postproc_no_overlay.BBOX_OUTSIZE
yolov7_postproc_no_overlay.maskWidth = 160
yolov7_postproc_no_overlay.maskHeight = 160
yolov7_postproc_no_overlay.origImageWidth = 1280
yolov7_postproc_no_overlay.origImageHeight = 720
yolov7_postproc_no_overlay.preImgWidth = 640
yolov7_postproc_no_overlay.preImgHeight = 640
class yolov7_postproc_no_overlay.PostProcOpt(plugin, confidence_thres, iou_thres)
plugin
confidence_thres
iou_thres
grid_cells
final_buffer
post_process_optimized(model_output)
class yolov7_postproc_no_overlay.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

MODEL_WIDTH = 640
MODEL_HEIGHT = 640
FRAME_WIDTH = 1280
FRAME_HEIGHT = 720
classes = 80
color_palette
confidence_thres = 0.25
iou_thres = 0.65
boxes = []
scores = []
class_ids = []
out_size
frame_id = 0
model_outs = [(1, 80, 80, 6), (1, 80, 80, 6), (1, 80, 80, 243), (1, 40, 40, 6), (1, 40, 40, 6), (1, 40, 40,...
post_proc_opt
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)
get_model_outputs(input_buffer)
pack_boxes(bboxes, scores, classes)
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.