YOLO26 ↔ YOLOv8-pipeline bridge: shape adapters, decoder, letterbox, and ORT wrappers.
Project description
yolo26-kit
Drop YOLO26 into your existing YOLOv8 pipeline. Bridge library for the NMS-free, end-to-end era.
Why
YOLO26 default ONNX export is end2end=True, producing (N, 300, 6) already-decoded detections. That's great — but it breaks every Triton / DeepStream / OpenCV DNN config that expects YOLOv8-style (1, 4+nc, N). It also leaves you to write letterbox-coord undo math by hand. And some targets (RKNN, certain TFLite quant paths) can't fuse the e2e head, so they ship raw (1, 4+nc, N) you have to decode yourself.
yolo26-kit is a small, pure-functional library that bridges that gap — and nothing else.
Install
# Python (planned for PyPI)
pip install yolo26-kit # core
pip install "yolo26-kit[ort]" # + ORT wrapper
# TypeScript / JavaScript (planned for npm)
npm i yolo26-kit # core
npm i yolo26-kit onnxruntime-web # + ORT wrapper
Pre-release: install via Git clone for now. PyPI / npm coming with v0.1.0 release.
Use
Python — e2e default (most users)
import onnxruntime as ort
import yolo26_kit
sess = ort.InferenceSession("yolo26n.onnx")
out = sess.run(None, {"images": pre})[0] # (1, 300, 6)
out = yolo26_kit.normalize_output(out)
dets = yolo26_kit.filter_e2e(out, conf=0.25)
# [{'box': [...], 'score': ..., 'class': ..., 'label': '...'}]
Python — drop into existing YOLOv8 pipeline
out_v8 = yolo26_kit.e2e_to_v8_shape(out) # (1, 84, 300)
# Feed out_v8 to your existing v8 Triton / DeepStream / OpenCV DNN parser.
Python — convenience wrapper (image in, dets in original coords out)
from yolo26_kit import from_ort
decoder = from_ort("yolo26n.onnx")
dets = decoder.predict("bus.jpg", conf=0.25)
TypeScript
import { filterE2E, fromOrt } from "yolo26-kit/ort";
import * as ort from "onnxruntime-web";
const session = await ort.InferenceSession.create("yolo26n.onnx");
const decoder = fromOrt(session);
const dets = await decoder.predict(canvas, { conf: 0.25 });
TypeScript — non-e2e raw export
import { decodeDetect, normalizeOutput } from "yolo26-kit";
const out = normalizeOutput(rawTensor);
const dets = decodeDetect(out, [1, 84, 8400], { conf: 0.25, numClasses: 80 });
What's in the box (v0.1.0)
| Function | Purpose |
|---|---|
filter_e2e / filterE2E |
Filter the default (N, 300, 6) e2e output by confidence + classes + min-area |
decode_detect / decodeDetect |
Decode raw (1, 4+nc, N) non-e2e exports (NPU / quantized targets) |
e2e_to_v8_shape / e2eToV8Shape |
Adapter to drop YOLO26 into legacy YOLOv8 pipelines |
v8_shape_to_e2e / v8ShapeToE2E |
Reverse adapter |
letterbox_unmap / letterboxUnmap |
Undo letterbox padding back to original image coords |
normalize_output / normalizeOutput |
Dtype workaround for upstream YOLO26 fp16 export issue (#23645) |
Decoder.predict() |
Image in → detections in original-image coords out (auto e2e/non-e2e routing) |
Compatibility
yolo26-kit |
ultralytics (verified) |
onnxruntime |
|---|---|---|
| 0.1.0 | 8.4.x (yolo26n.pt) | 1.17+ |
A nightly live-diff workflow installs the latest ultralytics and re-validates fixtures. Drift opens an auto-tagged drift issue.
Status
v1 (this release): Detect task only. e2e + non-e2e paths. Both Python and TypeScript, cross-language equivalent (verified via golden fixtures).
Roadmap: Seg, pose, cls, OBB tasks. Reproduction kit (Docker + COCO train/eval). ONNX schema standardizer. NPU ports (RKNN, Hailo, RDK, Qualcomm SNPE/QNN).
Development
# Python
cd python
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/ -v
mypy src/yolo26_kit
ruff check src tests
# TypeScript
cd js
npm install
npm test
npm run typecheck
npm run lint
License
Apache-2.0 for the code in this repository. Model weights are not redistributed; users fetch them from the official Ultralytics distribution under its own terms (AGPL-3.0).
See fixtures/LICENSES.md for fixture asset attribution.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yolo26_kit-0.1.0.tar.gz.
File metadata
- Download URL: yolo26_kit-0.1.0.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3754d9e555cbad13ea5d5db1936a782b0eb23dd375bcf94e2d9419575c585dc1
|
|
| MD5 |
985c911fa6d94505f7362c7532732e97
|
|
| BLAKE2b-256 |
421e4248cf5911c978505be71b5eba042eaa75de5ac06267a701a6d4ca822e90
|
File details
Details for the file yolo26_kit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: yolo26_kit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c08d44b4c550349c3830e4d3be9e8267a8d4357ebae7291c4903089c5ae741c2
|
|
| MD5 |
1194287dd595357e1f126c55b0b8d9f4
|
|
| BLAKE2b-256 |
f46fb002b9684e8b7085058124944274eddc957d21f5003ff3189d86d35b509f
|