Table of Contents

Class YoloDetectorSettings

Namespace
VisioForge.Core.Types.X.AI
Assembly
VisioForge.Core.dll

Settings for the YOLO object detector block/engine.

public class YoloDetectorSettings : OnnxInferenceSettings

Inheritance

Inherited Members

Remarks

Extends VisioForge.Core.Types.X.AI.OnnxInferenceSettings with YOLOv8/v11 decoding parameters (confidence and IoU thresholds, class labels) and the on-frame drawing options. When VisioForge.Core.Types.X.AI.YoloDetectorSettings.Labels is null, the detector applies the default COCO-80 label set.

Constructors

YoloDetectorSettings()

Initializes a new instance of the VisioForge.Core.Types.X.AI.YoloDetectorSettings class.

public YoloDetectorSettings()

YoloDetectorSettings(string)

Initializes a new instance of the VisioForge.Core.Types.X.AI.YoloDetectorSettings class with the specified model path.

public YoloDetectorSettings(string modelPath)

Parameters

modelPath string

The absolute path to the YOLO ONNX model file.

Properties

BoxColor

Gets or sets the color used to draw detection boxes. Defaults to SkiaSharp.SKColors.Lime.

public SKColor BoxColor { get; set; }

Property Value

SKColor

BoxThickness

Gets or sets the stroke thickness, in pixels, used to draw detection boxes. Defaults to 2.

public float BoxThickness { get; set; }

Property Value

float

ConfidenceThreshold

Gets or sets the minimum confidence (0..1) a detection must reach to be reported. Defaults to 0.25.

public float ConfidenceThreshold { get; set; }

Property Value

float

DrawDetections

Gets or sets a value indicating whether detections are drawn onto the video frame. Defaults to true.

public bool DrawDetections { get; set; }

Property Value

bool

DrawLabels

Gets or sets a value indicating whether class labels and confidence values are drawn next to each box. Defaults to true.

public bool DrawLabels { get; set; }

Property Value

bool

IoUThreshold

Gets or sets the Intersection-over-Union threshold (0..1) used by non-maximum suppression. Defaults to 0.45.

public float IoUThreshold { get; set; }

Property Value

float

LabelFontSize

Gets or sets the label text size in pixels. When 0 (the default), the size is auto-scaled to the frame height (roughly 6% of it, with a 20 px floor) so labels stay readable at any resolution instead of being tiny on 720p/1080p/4K. Set a positive value to use a fixed size.

public float LabelFontSize { get; set; }

Property Value

float

Labels

Gets or sets the class label names, indexed by class id. When null, the detector applies the default COCO-80 labels.

public string[] Labels { get; set; }

Property Value

string[]