Skip to content

feat: YoloPosePostprocess plugin (graphsurgeon insertion)#321

Open
triple-mu wants to merge 4 commits into
mainfrom
feat/pose-plugin
Open

feat: YoloPosePostprocess plugin (graphsurgeon insertion)#321
triple-mu wants to merge 4 commits into
mainfrom
feat/pose-plugin

Conversation

@triple-mu

@triple-mu triple-mu commented Jun 10, 2026

Copy link
Copy Markdown
Owner

YoloPosePostprocess 插件(graphsurgeon 插桩,并行 NMS,自包含)

pose 走 ultralytics raw 导出(无 in-graph 解码模块),故 export-pose.pyonnx_graphsurgeon 把插件节点接到已解码的 raw 输出:转置后的 [1,A,C] 喂给 YoloPosePostprocess,在引擎内做并行 NMS + top-k 并 gather 17 个关键点。pose.cpp 按 binding 名自动识别。建立了 obb 复用的 graphsurgeon 范式。

验证:bus.jpg 同 4 目标、kps_sum 差 <0.02%;TRT 8.6/10.16/11.0 编译。

栈在 #320 之上。

🤖 Generated with Claude Code

triple-mu and others added 4 commits June 10, 2026 17:09
Raw uint8 image -> NCHW float input via a CUDA kernel (letterbox + RGB + /255),
staged through a pinned host buffer for a fast async H2D. Opt-in, default-off;
the CPU path is unchanged. CMake enables CUDA only when nvcc is found.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Opt-in custom plugin (libyolov8_plugins.so, BUILD_PLUGINS=ON) fusing YOLOv8
detection decode + NMS + top-k as an alternative to EfficientNMS_TRT; consumes
the decoded boxes+scores and emits num_dets/bboxes/scores/labels. Plugin .so
loaded via --plugin-lib / $YOLOV8_PLUGIN_LIB (Python ctypes + C++ dlopen);
detect.cpp auto-detects raw vs End2End/plugin engines. export-det.py --plugin.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds the seg plugin (decode+NMS, gathers 32 mask coeffs; proto matmul stays on
host) and extracts shared helpers into nms_common.cuh. NMS is parallel
(EfficientNMS-style: one thread per candidate marks suppression vs higher-scoring
overlaps; single-thread compaction gathers top-k) — det refactored onto the shared
parallel suppression too. PostSeg.plugin + export-seg.py --plugin; engine.py finds
the NMS node by attribute name anywhere in the graph; segment.cpp auto-detects.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pose plugin attached to the raw ultralytics export via onnx_graphsurgeon
(export-pose.py): the transposed head [1,A,C] is fed to YoloPosePostprocess,
which does parallel NMS + top-k and gathers 17 keypoints in-engine. pose.cpp
auto-detects plugin outputs by binding name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant