nghianguyenandClaude Opus 5 3798e3513b fix(YOLO12OD): decode an end-to-end head instead of reading it as a grid
This engine took the feature count from outputShape[1] unconditionally.
For a yolo26 export with end2end on — [1, 300, 6], rows of
(x1 y1 x2 y2 score class) with the suppression already inside the graph
— that means 296 classes, coordinates read as class scores, and boxes
covering the frame. No error, just nonsense, which is exactly what the
Labelling Tool produced from the same model before its decoder was
fixed.

Its sibling ANSONNXYOLO has recognised that head from the tensor shape
for a while; this one had not, and the backend marker cannot tell them
apart because it names the runtime rather than the head.

The branch fires only where the tensor cannot be a grid: the 6 must be
the last axis with a detection count before it, hundreds rather than the
thousands of anchors a two-class [1, 6, 8400] export carries.

The decoder reuses this engine's own scaleCoords rather than repeating
the letterbox arithmetic, so both heads undo the padding the same way
and agree about where a box is, and the rounding into the integral box
type is spelled out instead of left to a narrowing conversion.

NOT COMPILED. The engine layer needs CUDA and the ANSLibs tree, neither
of which exists on this machine, so this is verified by reading: the
shape rule matches the one the other three products now share, every
symbol it uses is declared in this translation unit, and the arithmetic
is delegated to the function the grid path already trusts.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 06:55:45 +10:00
2026-05-14 17:48:09 +10:00
2026-06-18 05:55:31 +10:00
2026-06-12 14:13:26 +10:00
2026-03-29 14:10:05 +11:00
2026-06-18 05:55:31 +10:00
2026-05-01 11:16:47 +10:00
2026-03-29 14:10:05 +11:00
2026-03-28 16:54:11 +11:00
2026-03-29 14:10:05 +11:00
2026-03-29 14:10:05 +11:00
2026-03-29 14:10:05 +11:00
2026-03-28 13:13:41 +11:00
S
Description
No description provided
13 MiB
Languages
C 55.3%
C++ 43.4%
Python 0.5%
CMake 0.3%
Objective-C++ 0.2%
Other 0.2%