Downloads · 30 days
26
22% of all-time downloads
larryliu0820/yolo26x-ExecuTorch-XNNPACK
yolo26x-ExecuTorch-XNNPACK is a object detection model from larryliu0820. Use it when you need objects located in an image. It is set up for executorsch. The card lists the license as agpl-3.0.
YOLO26X exported to ExecuTorch .pte format with XNNPACK backend for accelerated CPU inference.
Downloads · 30 days
26
22% of all-time downloads
All-time downloads
118
Public
Repo size
472 MB
Likes
0
Public
Click a slice to open those files.
.pte472 MB · 100%
From the Hugging Face model README
YOLO26X exported to ExecuTorch .pte format with XNNPACK backend for accelerated CPU inference.
This model supports dynamic input shapes within the following constraints:
| Dimension | Min | Max | Constraint |
|---|---|---|---|
| Height | 320 | 8192 | Multiple of 32 |
| Width | 320 | 8192 | Multiple of 32 |
| Batch | 1 | 1 | Static |
Supported resolutions: 320×320, 640×640, 1280×1280, 2560×1440, 7680×4320 (8K), and any size that's a multiple of 32.
import torch
from executorch.runtime import Runtime
# Load the model
with open("yolo26x_dynamic_xnnpack.pte", "rb") as f:
pte_buffer = f.read()
runtime = Runtime.get()
program = runtime.load_program(pte_buffer)
method = program.load_method("forward")
# Run inference with different input sizes
for h, w in [(640, 640), (1280, 1280), (2560, 1440)]:
input_tensor = torch.randn(1, 3, h, w)
output = method.execute([input_tensor])
print(f"Input shape: {(h, w)}, Output shape: {output[0].shape}")
YOLO26 is an end-to-end NMS-free object detector optimized for edge devices:
Based on Ultralytics YOLO26 benchmarks:
| Metric | Value |
|---|---|
| Parameters | 98.9M |
| Input Size | 640×640 (training) |
| Inference | Supports 320-8192 px (multiples of 32) |
This model performs object detection, outputting bounding boxes and class probabilities for 80 COCO classes.
Output shape: (1, 300, 6) where 300 is max detections and 6 is [x, y, w, h, confidence, class_id].
If your outputs look wrong (for object-detection models this can show up as all confidences capped around ~0.20 / 20% and no detections), ensure the input tensor passed to ExecuTorch is contiguous.
Example:
import torch
# img_hwc: float32 HWC image (e.g. RGB) in [0, 1]
x = torch.from_numpy(img_hwc).permute(2, 0, 1).unsqueeze(0) # NCHW (often non-contiguous)
x = x.contiguous() # IMPORTANT
outputs = method.execute([x])
Detection symptom example (before fix):
Confidence range: [0.0004, 0.2012]
Detections: 0
After fix (.contiguous()):
Confidence range: [0.0001, 0.9589]
Detections: 12
This model is released under AGPL-3.0 license. See Ultralytics YOLO26 for more details.