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.
ResNetResult
ResNet classification results containing per-class confidences and top-1 prediction
Operations
GetConfidence #
Get classification confidence
method : public : GetConfidence() ~ FloatReturn
| Type | Description |
|---|---|
| Float | classification confidence |
Example
"Confidence: {$result->GetConfidence()}"->PrintLine();GetConfidences #
Gets the confidences results
method : public : GetConfidences() ~ Float[]Return
| Type | Description |
|---|---|
| Float | confidences results |
GetId #
Get classification ID
method : public : GetId() ~ IntReturn
| Type | Description |
|---|---|
| Int | classification ID |
GetName #
Get classification name
method : public : GetName() ~ StringReturn
| Type | Description |
|---|---|
| String | classification name |
Example
"Predicted: {$result->GetName()}"->PrintLine();ToJson #
JSON representation
method : public : ToJson() ~ JsonElementReturn
| Type | Description |
|---|---|
| JsonElement | JSON representation |