NOTE: The Jupyter Notebook below is included in the Chimera SDK and can be run interactively by running the following CLI command:
$ quadric sdk notebook
From the Jupyter Notebook window in your browser, select the notebook named /quadric/sdk-cli/examples/models/yolo/yolov8_pose/yolov8_pose.ipynb.
YOLOv8 Pose Estimation
YOLOv8 Pose Estimation has been released from Ultralytics. Details can be found here.
Environment Setup
!pip3 install -r ../../../requirements.txt -q
[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv[0m[33m
[0m
import gc
import onnx
import onnxsim
from pathlib import Path
from examples.models.zoo.zoo_utils import onnx_check_and_simplify
Model Selection
YOLOv8 supports pretrained models with various sizes. The following table is excerpted from YOLOv8 page
| Model | size (pixels) | mAPpose 50-95 | mAPpose 50 | Speed CPU ONNX (ms) | params (M) | FLOPs (B) |
|---|---|---|---|---|---|---|
| YOLOv8n-pose | 640 | 50.4 | 80.1 | 131.8 | 3.3 | 9.2 |
| YOLOv8s-pose | 640 | 60.0 | 86.2 | 233.2 | 11.6 | 30.2 |
| YOLOv8m-pose | 640 | 65.0 | 88.8 | 456.3 | 26.4 | 81.0 |
| YOLOv8l-pose | 640 | 67.6 | 90.0 | 784.5 | 44.4 | 168.6 |
| YOLOv8x-pose | 640 | 69.2 | 90.2 | 1607.1 | 69.4 | 263.2 |
| YOLOv8x-pose-p6 | 1280 | 71.6 | 91.2 | 4088.7 | 99.1 | 1066.4 |
Here, we are going to use yolov8n-pose to demonstrate the Chimera capability on YOLOv8 Pose Estimation. In this notebook, yolov8s-pose can be experimented. Please contact the Quadric sales team for larger models.
MODEL_NAME = "yolov8n-pose"
Model Generation and ONNX Export
from ultralytics import YOLO
from tvm.contrib.epu.chimera_job.constants import DEFAULT_ONNX_OPSET
## Load a model
model = YOLO(f"{MODEL_NAME}.pt") # load an official model
## Export the model
model.export(format="onnx", opset=DEFAULT_ONNX_OPSET)
Downloading https://github.com/ultralytics/assets/releases/download/v8.3.0/yolov8n-pose.pt to 'yolov8n-pose.pt'...
100%|█████████████████████████████████████| 6.52M/6.52M [00:00<00:00, 65.3MB/s]
Ultralytics 8.3.166 🚀 Python-3.10.12 torch-2.6.0+cpu CPU (AMD Ryzen 9 9950X 16-Core Processor)
YOLOv8n-pose summary (fused): 81 layers, 3,289,964 parameters, 0 gradients, 9.2 GFLOPs
[34m[1mPyTorch:[0m starting from 'yolov8n-pose.pt' with input shape (1, 3, 640, 640) BCHW and output shape(s) (1, 56, 8400) (6.5 MB)
[31m[1mrequirements:[0m Ultralytics requirement ['onnxslim>=0.1.59'] not found, attempting AutoUpdate...
WARNING ⚠️ Retry 1/2 failed: Command 'pip install --no-cache-dir "onnxslim>=0.1.59" ' returned non-zero exit status 127.
WARNING ⚠️ Retry 2/2 failed: Command 'pip install --no-cache-dir "onnxslim>=0.1.59" ' returned non-zero exit status 127.
WARNING ⚠️ [31m[1mrequirements:[0m ❌ Command 'pip install --no-cache-dir "onnxslim>=0.1.59" ' returned non-zero exit status 127.
[34m[1mONNX:[0m starting export with onnx 1.16.2 opset 16...
WARNING ⚠️ [34m[1mONNX:[0m simplifier failure: No module named 'onnxslim'
[34m[1mONNX:[0m export success ✅ 2.3s, saved as 'yolov8n-pose.onnx' (12.9 MB)
Export complete (2.4s)
Results saved to [1m/quadric/sdk-cli/examples/models/yolo/yolov8_pose[0m
Predict: yolo predict task=pose model=yolov8n-pose.onnx imgsz=640
Validate: yolo val task=pose model=yolov8n-pose.onnx imgsz=640 data=/usr/src/app/ultralytics/datasets/coco-pose.yaml
Visualize: https://netron.app
'yolov8n-pose.onnx'
Split ONNX
When the above cell is successfully executed, yolov8n-pose.onnx is generated in the current directory.
This command cell uses this onnx file to split to a backbone and a head.
from tvm.contrib.epu.onnx_util import cut_onnx
onnx_file = f"{MODEL_NAME}.onnx"
input_edges = ["images"]
output_edges = ["output0"]
split_edges = [
"/model.22/cv2.0/cv2.0.1/act/Mul_output_0",
"/model.22/cv3.0/cv3.0.1/act/Mul_output_0",
"/model.22/cv2.1/cv2.1.1/act/Mul_output_0",
"/model.22/cv3.1/cv3.1.1/act/Mul_output_0",
"/model.22/cv2.2/cv2.2.1/act/Mul_output_0",
"/model.22/cv3.2/cv3.2.1/act/Mul_output_0",
"/model.22/cv4.0/cv4.0.1/act/Mul_output_0",
"/model.22/cv4.1/cv4.1.1/act/Mul_output_0",
"/model.22/cv4.2/cv4.2.1/act/Mul_output_0",
]
model = onnx.load(onnx_file)
backbone_onnx_file = f"{MODEL_NAME}-backbone.onnx"
head_onnx_file = f"{MODEL_NAME}-head.onnx"
## Extract the backbone.
sub_graph = cut_onnx(model, input_edges, split_edges)
sub_graph = onnx_check_and_simplify(sub_graph)
onnx.save(sub_graph, backbone_onnx_file)
print(f"Backbone onnx is saved as {backbone_onnx_file}")
## Extract the head.
sub_graph = cut_onnx(model, split_edges, output_edges)
sub_graph = onnx_check_and_simplify(sub_graph)
onnx.save(sub_graph, head_onnx_file)
print(f"Head onnx is saved as {head_onnx_file}")
Backbone onnx is saved as yolov8n-pose-backbone.onnx
Head onnx is saved as yolov8n-pose-head.onnx
Quantization
from torch.utils.data import Subset
from torchvision.transforms import Compose, Normalize, ToTensor
from sdk_cli.utils.transforms import ResizePad
from sdk_cli.lib.quantize import (
QuantizedONNXModel,
quantize_onnx_model,
)
from sdk_cli.utils.datasets import QuadricCalibration
dataset_input_size = (640, 640)
dataset_mean, dataset_std = (0, 0, 0), (1, 1, 1)
transforms = Compose(
[
ResizePad(dataset_input_size),
ToTensor(),
Normalize(dataset_mean, dataset_std),
]
)
## Path to directory containing data to use for for numerical range calibration during quantization
## Data is used also used to compare accuracy of fp32 and int8 models
dataset = QuadricCalibration.Dataset(transform=transforms)
## NOTE: `coco-like` is the 0th index target for `QuadricCalibration.Dataset`
coco_like_data_indices = [index for index, target in enumerate(dataset.targets) if target == 0]
coco_like_subset_of_dataset = Subset(dataset, coco_like_data_indices)
quantized_onnx_model: QuantizedONNXModel = quantize_onnx_model(
backbone_onnx_file,
dataset,
asymmetric_activation=True,
)
print(
f"quantized onnx: {quantized_onnx_model.model_path}, tranges file: {quantized_onnx_model.tensor_ranges_path}"
)
gc.collect();
2026-07-18 12:09 - INFO - sdk - quantize - ONNX model shapes inferred.
2026-07-18 12:09 - DEBUG - sdk - quantize - Forcing node types: []
2026-07-18 12:09 - DEBUG - sdk - quantize - ONNX Node types excluded from quantization: ['Softmax', 'Sigmoid', 'QuadricCustomOp']
2026-07-18 12:09 - DEBUG - sdk - quantize - ONNX Node names excluded from quantization: ['/model.22/cv4.1/cv4.1.0/act/Mul', '/model.4/m.0/cv2/act/Mul', '/model.22/cv2.2/cv2.2.0/act/Sigmoid', '/model.4/cv2/act/Mul', '/model.19/act/Sigmoid', '/model.9/cv1/act/Sigmoid', '/model.12/m.0/cv1/act/Sigmoid', '/model.8/cv1/act/Sigmoid', '/model.7/act/Sigmoid', '/model.18/m.0/cv2/act/Mul', '/model.21/cv2/act/Sigmoid', '/model.12/m.0/cv2/act/Sigmoid', '/model.15/cv1/act/Mul', '/model.21/cv2/act/Mul', '/model.5/act/Sigmoid', '/model.18/cv2/act/Mul', '/model.6/m.0/cv2/act/Sigmoid', '/model.12/cv1/act/Mul', '/model.8/cv2/act/Sigmoid', '/model.6/m.1/cv2/act/Sigmoid', '/model.22/cv3.1/cv3.1.0/act/Sigmoid', '/model.4/m.1/cv2/act/Mul', '/model.8/m.0/cv2/act/Mul', '/model.15/m.0/cv1/act/Mul', '/model.15/m.0/cv2/act/Sigmoid', '/model.6/cv2/act/Mul', '/model.1/act/Sigmoid', '/model.19/act/Mul', '/model.22/cv4.1/cv4.1.1/act/Mul', '/model.8/m.0/cv2/act/Sigmoid', '/model.7/act/Mul', '/model.6/m.1/cv2/act/Mul', '/model.4/m.1/cv1/act/Mul', '/model.15/m.0/cv1/act/Sigmoid', '/model.8/cv1/act/Mul', '/model.22/cv3.0/cv3.0.0/act/Sigmoid', '/model.4/m.0/cv1/act/Sigmoid', '/model.15/m.0/cv2/act/Mul', '/model.6/m.0/cv1/act/Sigmoid', '/model.22/cv2.2/cv2.2.0/act/Mul', '/model.3/act/Sigmoid', '/model.8/cv2/act/Mul', '/model.21/cv1/act/Sigmoid', '/model.12/m.0/cv2/act/Mul', '/model.1/act/Mul', '/model.9/cv2/act/Mul', '/model.4/cv1/act/Mul', '/model.12/cv2/act/Mul', '/model.12/m.0/cv1/act/Mul', '/model.4/m.0/cv1/act/Mul', '/model.4/cv2/act/Sigmoid', '/model.4/cv1/act/Sigmoid', '/model.22/cv4.0/cv4.0.0/act/Sigmoid', '/model.18/cv2/act/Sigmoid', '/model.22/cv2.1/cv2.1.1/act/Mul', '/model.0/act/Mul', '/model.21/m.0/cv1/act/Mul', '/model.22/cv4.1/cv4.1.0/act/Sigmoid', '/model.22/cv4.2/cv4.2.1/act/Sigmoid', '/model.22/cv2.0/cv2.0.1/act/Sigmoid', '/model.4/m.1/cv1/act/Sigmoid', '/model.22/cv2.1/cv2.1.0/act/Sigmoid', '/model.22/cv4.2/cv4.2.0/act/Mul', '/model.22/cv4.0/cv4.0.1/act/Sigmoid', '/model.16/act/Sigmoid', '/model.22/cv2.0/cv2.0.1/act/Mul', '/model.15/cv2/act/Mul', '/model.22/cv3.2/cv3.2.0/act/Mul', '/model.0/act/Sigmoid', '/model.22/cv4.1/cv4.1.1/act/Sigmoid', '/model.2/m.0/cv2/act/Mul', '/model.9/cv1/act/Mul', '/model.8/m.0/cv1/act/Sigmoid', '/model.15/cv2/act/Sigmoid', '/model.22/cv3.2/cv3.2.0/act/Sigmoid', '/model.6/m.1/cv1/act/Mul', '/model.8/m.0/cv1/act/Mul', '/model.6/cv1/act/Sigmoid', '/model.2/cv1/act/Sigmoid', '/model.2/m.0/cv1/act/Sigmoid', '/model.16/act/Mul', '/model.18/cv1/act/Mul', '/model.22/cv4.0/cv4.0.0/act/Mul', '/model.22/cv3.1/cv3.1.1/act/Mul', '/model.12/cv1/act/Sigmoid', '/model.3/act/Mul', '/model.2/m.0/cv1/act/Mul', '/model.21/m.0/cv1/act/Sigmoid', '/model.22/cv4.2/cv4.2.0/act/Sigmoid', '/model.22/cv2.2/cv2.2.1/act/Mul', '/model.2/cv2/act/Mul', '/model.21/cv1/act/Mul', '/model.22/cv4.0/cv4.0.1/act/Mul', '/model.22/cv4.2/cv4.2.1/act/Mul', '/model.5/act/Mul', '/model.18/cv1/act/Sigmoid', '/model.2/cv2/act/Sigmoid', '/model.21/m.0/cv2/act/Sigmoid', '/model.22/cv2.0/cv2.0.0/act/Mul', '/model.15/cv1/act/Sigmoid', '/model.22/cv2.1/cv2.1.1/act/Sigmoid', '/model.6/m.0/cv2/act/Mul', '/model.6/m.1/cv1/act/Sigmoid', '/model.22/cv3.0/cv3.0.1/act/Mul', '/model.22/cv3.0/cv3.0.0/act/Mul', '/model.18/m.0/cv1/act/Sigmoid', '/model.22/cv3.1/cv3.1.0/act/Mul', '/model.9/cv2/act/Sigmoid', '/model.6/cv2/act/Sigmoid', '/model.18/m.0/cv1/act/Mul', '/model.22/cv2.0/cv2.0.0/act/Sigmoid', '/model.4/m.0/cv2/act/Sigmoid', '/model.22/cv3.2/cv3.2.1/act/Mul', '/model.12/cv2/act/Sigmoid', '/model.18/m.0/cv2/act/Sigmoid', '/model.2/cv1/act/Mul', '/model.22/cv3.2/cv3.2.1/act/Sigmoid', '/model.6/cv1/act/Mul', '/model.22/cv2.2/cv2.2.1/act/Sigmoid', '/model.22/cv3.0/cv3.0.1/act/Sigmoid', '/model.6/m.0/cv1/act/Mul', '/model.21/m.0/cv2/act/Mul', '/model.2/m.0/cv2/act/Sigmoid', '/model.22/cv3.1/cv3.1.1/act/Sigmoid', '/model.4/m.1/cv2/act/Sigmoid', '/model.22/cv2.1/cv2.1.0/act/Mul']
2026-07-18 12:09 - INFO - sdk - quantize - Starting quantization...
WARNING:root:Please use QuantFormat.QDQ for activation type QInt8 and weight type QInt8. Or it will lead to bad performance on x64.
2026-07-18 12:09 - INFO - sdk - quantize - Quantization completed! Quantized model saved to /quadric/sdk-cli/examples/models/yolo/yolov8_pose/yolov8n-pose-backbone_OpSet16_optimized_asym_int8_q.onnx
2026-07-18 12:09 - INFO - sdk - quantize - ONNX full precision model size: 12.53MB
2026-07-18 12:09 - INFO - sdk - quantize - ONNX quantized model size: 3.26MB
2026-07-18 12:09 - INFO - sdk - quantize - ONNX model shapes inferred.
2026-07-18 12:09 - INFO - sdk - quantize - ONNX Model with well-defined shapes has been saved at `/quadric/sdk-cli/examples/models/yolo/yolov8_pose/yolov8n-pose-backbone_OpSet16_optimized_asym_int8_q_shaped.onnx`.
2026-07-18 12:09 - DEBUG - sdk - quantize - Checking for FLOAT/FLOAT16 types...
2026-07-18 12:09 - INFO - sdk - quantize - Checking for remaining FLOAT/FLOAT16 types.
2026-07-18 12:09 - INFO - sdk - quantize - Model still has FLOAT/FLOAT16 types after quantization. Creating ranges for floating point tensors using calibration data...
2026-07-18 12:10 - INFO - sdk - quantize - Saved computed tensor ranges to /quadric/sdk-cli/examples/models/yolo/yolov8_pose/yolov8n-pose-backbone_OpSet16_optimized_asym_int8_q_shaped.tranges.
2026-07-18 12:10 - INFO - sdk - quantize -
╒═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╤══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╕
│ Quantized ONNX Model │ Tensor Ranges File │
╞═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╪══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡
│ /quadric/sdk-cli/examples/models/yolo/yolov8_pose/yolov8n-pose-backbone_OpSet16_optimized_asym_int8_q_shaped.onnx │ /quadric/sdk-cli/examples/models/yolo/yolov8_pose/yolov8n-pose-backbone_OpSet16_optimized_asym_int8_q_shaped.tranges │
╘═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╧══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╛
quantized onnx: /quadric/sdk-cli/examples/models/yolo/yolov8_pose/yolov8n-pose-backbone_OpSet16_optimized_asym_int8_q_shaped.onnx, tranges file: /quadric/sdk-cli/examples/models/yolo/yolov8_pose/yolov8n-pose-backbone_OpSet16_optimized_asym_int8_q_shaped.tranges
Compilation
from tvm.contrib.epu.chimera_job.chimera_job import ChimeraJob
cgc_job = ChimeraJob(
model_p=str(quantized_onnx_model.model_path),
)
cgc_job.compile(quiet=True)
print(cgc_job)
╒═════════════════════╤═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╕
│ Module Name │ yolov8n_pose_backbone_OpSet16_optimized_asym_int8_q_shaped_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1 │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ONNX File │ /quadric/sdk-cli/examples/models/yolo/yolov8_pose/yolov8n-pose-backbone_OpSet16_optimized_asym_int8_q_shaped.onnx │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Product Target │ QC-U │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Number of Cores │ 1 │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ISS Clock Frequency │ 1.700 │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ L2M Size │ 16MB │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ LRM Size │ 4kB │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ External Read BW │ 128GBps │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ External Write BW │ 128GBps │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ MACS per PE │ 16 │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Max L2M │ 5.892MB │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Max LRM │ 1.750kB │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Max Temp Ext Bytes │ 0.000MB │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Network GMACs │ 4.532 │
╘═════════════════════╧═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╛
╒════╤════════╤══════════════════════════════════════════╤══════════════════╤══════════════════════════╤═══════╕
│ │ Type │ Name │ shape │ type │ mse │
╞════╪════════╪══════════════════════════════════════════╪══════════════════╪══════════════════════════╪═══════╡
│ 0 │ Input │ images │ [1, 3, 640, 640] │ tensor[FixedPoint32<27>] │ n/a │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 1 │ Output │ /model.22/cv2.0/cv2.0.1/act/Mul_output_0 │ [1, 64, 80, 80] │ tensor[FixedPoint32<25>] │ n/a │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 2 │ Output │ /model.22/cv3.0/cv3.0.1/act/Mul_output_0 │ [1, 64, 80, 80] │ tensor[FixedPoint32<25>] │ n/a │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 3 │ Output │ /model.22/cv2.1/cv2.1.1/act/Mul_output_0 │ [1, 64, 40, 40] │ tensor[FixedPoint32<25>] │ n/a │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 4 │ Output │ /model.22/cv3.1/cv3.1.1/act/Mul_output_0 │ [1, 64, 40, 40] │ tensor[FixedPoint32<25>] │ n/a │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 5 │ Output │ /model.22/cv2.2/cv2.2.1/act/Mul_output_0 │ [1, 64, 20, 20] │ tensor[FixedPoint32<25>] │ n/a │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 6 │ Output │ /model.22/cv3.2/cv3.2.1/act/Mul_output_0 │ [1, 64, 20, 20] │ tensor[FixedPoint32<25>] │ n/a │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 7 │ Output │ /model.22/cv4.0/cv4.0.1/act/Mul_output_0 │ [1, 51, 80, 80] │ tensor[FixedPoint32<26>] │ n/a │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 8 │ Output │ /model.22/cv4.1/cv4.1.1/act/Mul_output_0 │ [1, 51, 40, 40] │ tensor[FixedPoint32<27>] │ n/a │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 9 │ Output │ /model.22/cv4.2/cv4.2.1/act/Mul_output_0 │ [1, 51, 20, 20] │ tensor[FixedPoint32<27>] │ n/a │
╘════╧════════╧══════════════════════════════════════════╧══════════════════╧══════════════════════════╧═══════╛
Demo
Inference as Batch
ChimeraJob supports batch execution which invokes specified number of threads to execute inference in parallel, which shortens ISS inference.
Inference
import numpy as np
from onnxruntime import InferenceSession
from PIL import Image
from sdk_cli.lib.inference import InferenceEngine, batch_inference
all_image_paths = [
"../../../common/calibration/face/daniel_maverick.png",
"../../../common/calibration/face/sales_squad_jani.jpg",
"../../../common/calibration/coco-like/33823288584_1d21cf0a26_k.jpeg",
]
NUM_IMAGES = len(all_image_paths)
all_images = []
for image_path in all_image_paths:
image = Image.open(image_path)
transformed_image = transforms(image)
all_images.append(np.expand_dims(transformed_image.numpy(), axis=0).astype(np.float32))
engines = {
InferenceEngine.CHIMERA_ORT_INT8: cgc_job,
InferenceEngine.CHIMERA_ISS_INT8: cgc_job,
}
head_onnx_model = onnx.load(head_onnx_file)
head_session = InferenceSession(head_onnx_model.SerializeToString())
outputs_per_inference_engine = {}
THREADS = min(NUM_IMAGES, 6)
for inference_engine, engine in engines.items():
all_outputs = batch_inference(
inference_engine,
engine,
all_images,
head_session=head_session,
threads=THREADS,
)
outputs_per_inference_engine[inference_engine] = all_outputs
2026-07-18 12:15 - WARNING - epu - chimera_job - ORT is not threadsafe -- forcing single threaded batch execution
100%|████████████████████████████████████████████| 3/3 [00:00<00:00, 3.91it/s]
Processing: 100%|████████████████████████████████| 3/3 [00:58<00:00, 19.37s/it]
Run Statistics for PoseResnet Backbone
print(cgc_job)
cgc_job.plot_run_statistics()
╒═════════════════════╤═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╕
│ Module Name │ yolov8n_pose_backbone_OpSet16_optimized_asym_int8_q_shaped_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1 │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ONNX File │ /quadric/sdk-cli/examples/models/yolo/yolov8_pose/yolov8n-pose-backbone_OpSet16_optimized_asym_int8_q_shaped.onnx │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Product Target │ QC-U │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Number of Cores │ 1 │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ISS Clock Frequency │ 1.700 │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ L2M Size │ 16MB │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ LRM Size │ 4kB │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ External Read BW │ 128GBps │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ External Write BW │ 128GBps │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ MACS per PE │ 16 │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Max L2M │ 5.892MB │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Max LRM │ 1.750kB │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Max Temp Ext Bytes │ 0.000MB │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Network GMACs │ 4.532 │
╘═════════════════════╧═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╛
╒════╤════════╤══════════════════════════════════════════╤══════════════════╤══════════════════════════╤═══════╕
│ │ Type │ Name │ shape │ type │ mse │
╞════╪════════╪══════════════════════════════════════════╪══════════════════╪══════════════════════════╪═══════╡
│ 0 │ Input │ images │ [1, 3, 640, 640] │ tensor[FixedPoint32<27>] │ n/a │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 1 │ Output │ /model.22/cv2.0/cv2.0.1/act/Mul_output_0 │ [1, 64, 80, 80] │ tensor[FixedPoint32<25>] │ 0.091 │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 2 │ Output │ /model.22/cv3.0/cv3.0.1/act/Mul_output_0 │ [1, 64, 80, 80] │ tensor[FixedPoint32<25>] │ 0.026 │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 3 │ Output │ /model.22/cv2.1/cv2.1.1/act/Mul_output_0 │ [1, 64, 40, 40] │ tensor[FixedPoint32<25>] │ 0.075 │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 4 │ Output │ /model.22/cv3.1/cv3.1.1/act/Mul_output_0 │ [1, 64, 40, 40] │ tensor[FixedPoint32<25>] │ 0.036 │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 5 │ Output │ /model.22/cv2.2/cv2.2.1/act/Mul_output_0 │ [1, 64, 20, 20] │ tensor[FixedPoint32<25>] │ 0.051 │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 6 │ Output │ /model.22/cv3.2/cv3.2.1/act/Mul_output_0 │ [1, 64, 20, 20] │ tensor[FixedPoint32<25>] │ 0.040 │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 7 │ Output │ /model.22/cv4.0/cv4.0.1/act/Mul_output_0 │ [1, 51, 80, 80] │ tensor[FixedPoint32<26>] │ 0.027 │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 8 │ Output │ /model.22/cv4.1/cv4.1.1/act/Mul_output_0 │ [1, 51, 40, 40] │ tensor[FixedPoint32<27>] │ 0.012 │
├────┼────────┼──────────────────────────────────────────┼──────────────────┼──────────────────────────┼───────┤
│ 9 │ Output │ /model.22/cv4.2/cv4.2.1/act/Mul_output_0 │ [1, 51, 20, 20] │ tensor[FixedPoint32<27>] │ 0.006 │
╘════╧════════╧══════════════════════════════════════════╧══════════════════╧══════════════════════════╧═══════╛
Post-ISS Report 1.7 GHz ***
Fully placed-and-routed gate simulation:
╒══════════════════════════════════╤═════════╕
│ Latency (ms) │ 1.09 │
├──────────────────────────────────┼─────────┤
│ FPS │ 914.92 │
├──────────────────────────────────┼─────────┤
│ Average Power @ 3nm SSGNP (mW) │ 2033.06 │
├──────────────────────────────────┼─────────┤
│ FPS per Watt @ 3nm SSGNP (FPS/W) │ 450.02 │
├──────────────────────────────────┼─────────┤
│ Ext Rd Bytes (MB) │ 7.89 │
├──────────────────────────────────┼─────────┤
│ Ext Wr Bytes (MB) │ 5.74 │
├──────────────────────────────────┼─────────┤
│ Avg Ext Rd BW (GBps) │ 7.05 │
├──────────────────────────────────┼─────────┤
│ Avg Ext Wr BW (GBps) │ 5.12 │
├──────────────────────────────────┼─────────┤
│ MAC Utilization │ 14.89% │
╘══════════════════════════════════╧═════════╛
*** Data generated using 7nm SSGNP gatesim and scaled to 3nm
[SDK-CLI] : TotalCycles: 1,858,080
[SDK-CLI] : Executions/second: 914.92
compute : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 599.352K
data_array : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 215.267K
mac : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 630.826K
data_external: ▇▇▇▇▇▇▇▇▇▇ 138.431K
data_ocm : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 272.166K
for more information check run directory: /quadric/sdk-cli/examples/models/yolo/yolov8_pose/ccl_build/yolov8n_pose_backbone_OpSet16_optimized_asym_int8_q_shaped_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/run/20260718_121525_1ac635
2026-07-18 12:16 - INFO - epu - chimera_job - Combined plots generated and saved to:
/quadric/sdk-cli/examples/models/yolo/yolov8_pose/ccl_build/yolov8n_pose_backbone_OpSet16_optimized_asym_int8_q_shaped_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/run/20260718_121525_1ac635/data/yolov8n_pose_backbone_OpSet16_optimized_asym_int8_q_shaped_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1.combined.png
'/quadric/sdk-cli/examples/models/yolo/yolov8_pose/ccl_build/yolov8n_pose_backbone_OpSet16_optimized_asym_int8_q_shaped_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/run/20260718_121525_1ac635/data'

Postprocessing
At first, post-processing for inference results is done here to retrieve bounding boxes and keypoints.
import numpy as np
from PIL import Image
from sdk_cli.node_builtins.classical.yolo_postprocessing import (
get_postprocess_handle,
boxes_detections,
)
from sdk_cli.utils.models.yolo import YOLOModelVariant
postprocess_handle = get_postprocess_handle(YOLOModelVariant.YOLOv8_Pose_Estimation)
bboxes_per_inference_engine = {}
keypoints_per_inference_engine = {}
keypoints_scores_per_inference_engine = {}
for inference_engine, all_outputs in outputs_per_inference_engine.items():
bboxes_per_inference_engine[inference_engine] = []
keypoints_per_inference_engine[inference_engine] = []
keypoints_scores_per_inference_engine[inference_engine] = []
for outputs, image_path in zip(all_outputs, all_image_paths):
detections, _, keypoints, keypoints_scores = boxes_detections(
postprocess_handle, # Handles for postprocess
np.array(Image.open(image_path)), # numpy image
outputs, # Outputs of the inference engine
dataset_input_size, # Model image size
)
bboxes_per_inference_engine[inference_engine].append(detections)
keypoints_per_inference_engine[inference_engine].append(keypoints)
keypoints_scores_per_inference_engine[inference_engine].append(keypoints_scores)
Display Bounding Boxes and Keypoints
import matplotlib.pyplot as plt
from sdk_cli.node_builtins.outputs.bbox_label_visualizer import draw_bbox
from sdk_cli.node_builtins.outputs.keypoints_visualizer import draw_keypoints
%matplotlib inline
pic_len = len(engines) + 1
for i in range(len(all_images)):
ax, idx = {}, 1
fig = plt.figure(figsize=(6 * pic_len, 6), tight_layout=True)
ax[idx] = fig.add_subplot(int("1%s%s" % (pic_len, idx)))
ax[idx].imshow(Image.open(all_image_paths[i]))
ax[idx].set_title("Original Image")
ax[idx].axis("off")
for (inference_engine, all_bboxes), all_keypoints, all_scores in zip(
bboxes_per_inference_engine.items(),
keypoints_per_inference_engine.values(),
keypoints_scores_per_inference_engine.values(),
):
frame = np.array(Image.open(all_image_paths[i]))
for keypoints, keypoints_scores in zip(all_keypoints[i], all_scores[i]):
frame = draw_keypoints(frame, keypoints, keypoints_scores)
frame = draw_bbox(frame, all_bboxes[i])
idx += 1
ax[idx] = fig.add_subplot(int("1%s%s" % (pic_len, idx)))
ax[idx].imshow(frame)
ax[idx].set_title(f"{MODEL_NAME}: {str(inference_engine)}")
ax[idx].axis("off")
fig.show()



Citation
@software{yolov8_ultralytics,
author = {Glenn Jocher and Ayush Chaurasia and Jing Qiu},
title = {Ultralytics YOLOv8},
version = {8.0.0},
year = {2023},
url = {https://github.com/ultralytics/ultralytics},
orcid = {0000-0001-5950-6979, 0000-0002-7603-6750, 0000-0003-3783-7069},
license = {AGPL-3.0}
}