From b4709b20cd4ee51d80bde018795e50f2814376fa Mon Sep 17 00:00:00 2001 From: sladro Date: Fri, 27 Feb 2026 19:49:56 +0800 Subject: [PATCH] Update YOLO node to use cxcywh box format for V8 box processing --- configs/test_cam1_ppe11_yolo_debug.json | 2 +- plugins/ai_yolo/ai_yolo_node.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/test_cam1_ppe11_yolo_debug.json b/configs/test_cam1_ppe11_yolo_debug.json index a9eae75..526a8ca 100644 --- a/configs/test_cam1_ppe11_yolo_debug.json +++ b/configs/test_cam1_ppe11_yolo_debug.json @@ -49,7 +49,7 @@ "model_w": 768, "model_h": 768, "num_classes": 11, - "v8_box_format": "auto", + "v8_box_format": "cxcywh", "v8_cls_activation": "auto", "conf": 0.25, "nms": 0.45, diff --git a/plugins/ai_yolo/ai_yolo_node.cpp b/plugins/ai_yolo/ai_yolo_node.cpp index 0ddddd9..9db481e 100644 --- a/plugins/ai_yolo/ai_yolo_node.cpp +++ b/plugins/ai_yolo/ai_yolo_node.cpp @@ -561,7 +561,7 @@ public: model_input_h_ = config.ValueOr("model_h", 640); num_classes_ = config.ValueOr("num_classes", 80); { - const std::string bf = config.ValueOr("v8_box_format", "auto"); + const std::string bf = config.ValueOr("v8_box_format", "cxcywh"); if (bf == "xyxy") { v8_box_format_ = V8BoxFormat::XyXy; } else if (bf == "xywh") { @@ -1101,7 +1101,7 @@ private: int model_input_w_ = 640; int model_input_h_ = 640; int num_classes_ = 80; - V8BoxFormat v8_box_format_ = V8BoxFormat::Auto; + V8BoxFormat v8_box_format_ = V8BoxFormat::CxCyWh; V8ClsActivation v8_cls_activation_ = V8ClsActivation::Auto; YoloVersion yolo_version_ = YoloVersion::V8; bool auto_detect_version_ = false;