Bundle ONNX Runtime inference library for running pre-trained models. Supports object detection (YOLO), image classification (ResNet), segmentation (DeepLab), pose estimation (OpenPose), face recognition, and Phi-3 text generation. Compile with -lib onnx.
YoloResult
YOLO inference result containing raw output, shape, dimensions and classifications
Operations
GetClassifications #
Gets an array of classifications
method : public : GetClassifications() ~ YoloClassification[]Return
| Type | Description |
|---|---|
| YoloClassification | array of classifications |
Example
each(cls in result->GetClassifications()) {
"{$cls->GetName()} ({$cls->GetConfidence()})"->PrintLine();
};GetDimensions #
Gets the image dimensions
method : public : GetDimensions() ~ Int[]Return
| Type | Description |
|---|---|
| Int | image dimensions |
GetImages #
Gets image byte
method : public : GetImages() ~ Byte[]Return
| Type | Description |
|---|---|
| Byte | image bytes |
GetOutput #
Gets the confidences results
method : public : GetOutput() ~ Float[]Return
| Type | Description |
|---|---|
| Float | confidences results |
GetShape #
Gets the confidences shape
method : public : GetShape() ~ Int[]Return
| Type | Description |
|---|---|
| Int | confidences shape |
ToJson #
JSON representation
method : public : ToJson() ~ JsonElementReturn
| Type | Description |
|---|---|
| JsonElement | JSON representation |