Class YoloDetectorSettings
- Namespace
- VisioForge.Core.Types.X.AI
- Assembly
- VisioForge.Core.dll
Settings for the YOLO object detector block/engine.
public class YoloDetectorSettings : OnnxInferenceSettingsInheritance
Inherited Members
Remarks
Extends VisioForge.Core.Types.X.AI.OnnxInferenceSettings with object-detection decoding parameters (the
VisioForge.Core.Types.X.AI.YoloDetectorSettings.Model family, 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.
The VisioForge.Core.Types.X.AI.YoloDetectorSettings.IoUThreshold is used only by NMS-based families (YOLOv8, YOLOX); RT-DETR is NMS-free.
The inherited InputWidth/InputHeight apply only to models with dynamic input dimensions:
a model that bakes in a fixed input size (e.g. YOLOX-nano at 416x416) reports that fixed size and the
configured values are ignored for it. The inherited NormalizeTo01 flag is honoured only by the
YOLOv8 family; YOLOX (never normalized) and RT-DETR (always normalized) fix their normalization per the
model's training convention and do not read it.
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
modelPathstring-
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
BoxThickness
Gets or sets the stroke thickness, in pixels, used to draw detection boxes. Defaults to 2.
public float BoxThickness { get; set; }Property Value
ConfidenceThreshold
Gets or sets the minimum confidence (0..1) a detection must reach to be reported. Defaults to 0.6.
public float ConfidenceThreshold { get; set; }Property Value
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
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
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
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
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[]
Model
Gets or sets the object-detection model family the supplied ONNX model belongs to. This selects the output decoder and the frame-preprocessing convention (resize mode, normalization, channel order). Defaults to VisioForge.Core.Types.X.AI.ObjectDetectorModel.YOLOv8 for backward compatibility; set it to VisioForge.Core.Types.X.AI.ObjectDetectorModel.YOLOX or VisioForge.Core.Types.X.AI.ObjectDetectorModel.RTDETR when loading a model of the matching family.
public ObjectDetectorModel Model { get; set; }