yolotensordec

This element can parse per-buffer inference tensors meta data generated by an upstream inference element

Example launch command:

Test image file, model file and labels file can be found here : https://gitlab.collabora.com/gstreamer/onnx-models

GST_DEBUG=yolotensordec:6
gst-launch-1.0 multifilesrc location=bus.jpg ! decodebin
! videoconvertscale add-borders=1 qos=false ! 'video/x-raw,pixel-aspect-ratio=1/1' !
onnxinference execution-provider=cpu model-file=./yolov8s.onnx input-image-format=chw
input-tensor-offset=0 input-tensor-scale=255.0 qos=false !
yolotensordec class-confidence-threshold=0.1 max-detections=10 qos=false
label-file=COCO_classes.txt !
objectdetectionoverlay object-detection-outline-color=0xFF0000FF draw-labels=true !
videoconvert ! xvimagesink

The original repository of the Yolo is located at https://github.com/ultralytics/ultralytics. For easy experimentation, the models based on Yolo architecture in Onnx format can be found at https://col.la/gstonnxmodels . This model already has tensors name embedded matching default values of tensors-detections-name and tensors-logits-name properties. It's also possible to embed tensor-ids into any model based on Yolo architecture to allow this tensor-decoder to decode tensors.This process is described in the Readme of repository: https://col.la/gstonnxmodels"

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseTransform
                    ╰──yolotensordec

Factory details

Authors: – Daniel Morin , Santosh Mahto

Classification:Tensordecoder/Video

Rank – primary

Plugin – tensordecoders

Package – GStreamer Bad Plug-ins

Pad Templates

sink

video/x-raw:

Presencealways

Directionsink

Object typeGstPad


src

video/x-raw:

Presencealways

Directionsrc

Object typeGstPad


Properties

box-confidence-threshold

“box-confidence-threshold” gfloat

Boxes with a location confidence level inferior to this threshold will be excluded

Flags : Read / Write

Default value : 0.4


class-confidence-threshold

“class-confidence-threshold” gfloat

Classes with a confidence level inferior to this threshold will be excluded

Flags : Read / Write

Default value : 0.4


iou-threshold

“iou-threshold” gfloat

Maximum intersection-over-union between bounding boxes to consider them distinct.

Flags : Read / Write

Default value : 0.7


label-file

“label-file” gchararray

Label file

Flags : Read / Write

Default value : NULL


max-detections

“max-detections” guint

Maximum object/masks detections.

Flags : Read / Write

Default value : 100


The results of the search are