v2026.4.1
All Bundles

YoloSession

YOLO inference session for object detection (v8 and above). Supports YOLO11/YOLO12 with fused head, letterbox preprocessing, and automatic FP16/FP32 input handling. Example labels := ["person", "bicycle", "car"]; session := YoloSession->New("yolo11n.onnx"); result := session->Inference(image_bytes, 640, 640, 0.5, labels); each(cls in result->GetClassifications()) { "{cls->GetName()}: {cls->GetConfidence()}"->PrintLine(); }; session->Close();

Operations

Close

Closes the session

method : public : Close() ~ Nil

Inference

Yolo image inference, support for models v8 and above

method : public : Inference(image:Byte[], height:Int, conf_threshold:Float, labels:String[]) ~ API.Onnx.YoloResult

Parameters

NameTypeDescription
imageBytewidth width
heightIntimage height
conf_thresholdFloatconfidence threshold
labelsStringclassification labels

New

Constructor.

New(model:String)

Parameters

NameTypeDescription
modelStringYOLO model path

New

Constructor.

New(model:String, config:Map<String,String>)

Parameters

NameTypeDescription
modelStringYOLO model path
configMap<String,String>session configuration parameters