v2026.6.4
All Bundles
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.

OpenPoseSession

OpenPose inference session for human pose estimation (17-keypoint COCO skeleton). Uses letterbox preprocessing with inverse keypoint mapping for accurate coordinates. Supports 18/19/25/26/57-channel output configurations.

Example

labels := ["nose", "left_eye", "right_eye", "left_ear", "right_ear",
  "left_shoulder", "right_shoulder", "left_elbow", "right_elbow",
  "left_wrist", "right_wrist", "left_hip", "right_hip",
  "left_knee", "right_knee", "left_ankle", "right_ankle"];
session := OpenPoseSession->New("openpose.onnx");
result := session->Inference(image_bytes, labels);
each(kp in result->GetClassifications()) {
  if(kp->GetConfidence() > 0) {
    "{kp->GetName()}: [{kp->GetNormalizedX()}, {kp->GetNormalizedY()}]"->PrintLine();
  };
};
session->Close();

Operations

Close #

Closes the session

method : public : Close() ~ Nil

Inference #

OpenPose image inference

method : public : Inference(image:Byte[], ) ~ API.Onnx.OpenPoseResult

Parameters

NameTypeDescription
imageBytewidth width

Example

labels := ["nose", "left_eye", "right_eye", "left_ear", "right_ear",
  "left_shoulder", "right_shoulder", "left_elbow", "right_elbow",
  "left_wrist", "right_wrist", "left_hip", "right_hip",
  "left_knee", "right_knee", "left_ankle", "right_ankle"];
session := OpenPoseSession->New("openpose.onnx");
image := FileReader->ReadBinaryFile("person.jpg");
result := session->Inference(image, labels);
each(kp in result->GetClassifications()) {
  if(kp->GetConfidence() > 0) {
    "{$kp->GetName()}: ({$kp->GetNormalizedX()},{$kp->GetNormalizedY()})"->PrintLine();
  };
};
session->Close();

New # constructor

Constructor.

New(model:String)

Parameters

NameTypeDescription
modelStringOpenPose model path

New # constructor

Constructor.

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

Parameters

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