feat/darknet-family
A Darknet/YOLO model exported by hank-ai's darknet_onnx_export (v5.1+) has two outputs: confs [B,N,nc], already objectness x class probability, and boxes [B,N,1,4], corners x1,y1,x2,y2 normalized to the input. It trains and predicts on a stretched square and has no NMS in the graph. ONNXYOLO took the 4-D boxes tensor for segmentation proto masks and letterboxed the input, so such a model decoded as garbage; a sealed package named as YOLOV4 went to YOLOOD, which cannot open an .ansmodel at all. - ONNXYOLO / RTYOLO: recognise the layout once at load (package family "darknet", output names confs/boxes, or their shapes), before the seg check; stretch-resize the input (single, batch, and RTYOLO's NV12 path); new postprocessDarknet: best class per candidate, threshold, stretch map to the original image, clip, class-aware NMS. - dllmain: a sealed package passed as modelType 1 (YOLOV4) is routed as detection (3), i.e. to RTYOLO on NVIDIA and ONNXYOLO elsewhere, in CreateANSODHandle, CreateANSODHandleEx and OptimizeModelStr. - Every other model is unchanged: all new branches are gated on the layout. Verified on macOS only: ANSONNXYOLO.cpp passes a syntax check, and the new decode functions, extracted into a standalone harness running the model through onnxruntime, reproduce Darknet's own detections on dog.jpg. NOT yet built on Windows, and the TensorRT path has not run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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%