# yolosegv8tensordec

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-launch-1.0 v4l2src device=/dev/video4 ! videorate max-rate=3
! videoconvertscale ! video/x-raw, pixel-aspect-ratio=1/1
! onnxinference
model-file=/home/dmorin/repos/onnx-models/models/yolov8s-seg.onnx
! yolosegv8tensordec class-confidence-threshold=0.8 iou-threshold=0.3
max-detections=100
label-file=/home/dmorin/repos/onnx-models/labels/COCO_classes.txt
! segmentationoverlay
! glimagesink sink="gtkglsink processing-deadline=300000000

The original repository of the Yolo is located at https://github.com/ultralytics/ultralytics. For easy experimentation, a object segmentation model based on Yolo architecture in Onnx format can be found at https://col.la/gstonnxmodelseg. This model already has the required tensor-ids embedded in the model 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 this repository: https://col.la/gstonnxmodels"

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBaseTransform
                        ╰──GstYoloTensorDecoder
                            ╰──yolosegv8tensordec

## Factory details

Authors: – Daniel Morin <daniel.morin>, Santosh Mahto <santosh.mahto></santosh.mahto></daniel.morin>

Classification: – `Tensordecoder/Video`

Rank – secondary

Plugin – tensordecoders

Package – GStreamer Bad Plug-ins

## Pad Templates

### `sink`

    video/x-raw:
            tensors: "tensorgroups\,\ yolo-v8-segmentation-out\=\(/uniquelist\)\{\ \(caps\)\"tensor/strided\\\,\\\ tensor-id\\\=\\\(string\\\)yolo-v8-segmentation-out-detections\\\,\\\ dims\\\=\\\(int\\\)\\\<\\\ 1\\\,\\\ \\\[\\\ 1\\\,\\\ 2147483647\\\ \\\]\\\,\\\ \\\[\\\ 1\\\,\\\ 2147483647\\\ \\\]\\\ \\\>\\\,\\\ dims-order\\\=\\\(string\\\)col-major\\\,\\\ type\\\=\\\(string\\\)float32\"\,\ \(caps\)\"tensor/strided\\\,\\\ tensor-id\\\=\\\(string\\\)yolo-v8-segmentation-out-protos\\\,\\\ dims\\\=\\\(int\\\)\\\<\\\ 1\\\,\\\ \\\[\\\ 1\\\,\\\ 2147483647\\\ \\\]\\\,\\\ \\\[\\\ 1\\\,\\\ 2147483647\\\ \\\]\\\,\\\ \\\[\\\ 1\\\,\\\ 2147483647\\\ \\\]\\\ \\\>\\\,\\\ dims-order\\\=\\\(string\\\)col-major\\\,\\\ type\\\=\\\(string\\\)float32\"\ \}\;"

Presence – always

Direction – sink

Object type – GstPad

### `src`

    video/x-raw:

Presence – always

Direction – src

Object type – GstPad

The results of the search are