From a07c862cd9b8d8faef69ec6a049fdef222a893d6 Mon Sep 17 00:00:00 2001 From: guanyuankai Date: Mon, 10 Nov 2025 18:18:07 +0800 Subject: [PATCH] update Readme.md --- Readme.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index a533066..59f2700 100644 --- a/Readme.md +++ b/Readme.md @@ -65,4 +65,25 @@ int perform_detection_on_session( int* out_detections_count, float conf_threshold, float iou_threshold -); \ No newline at end of file +); + +⚠️ 关键参数 (重要!) +模型输入尺寸 (input_width, input_height): + +这是调用 create_detector 时最关键的参数。 + +您必须提供ONNX模型训练和导出时所用的尺寸(例如 640x640 或 1280x1280)。 + +如果此参数错误,将导致检测结果完全错误。 + +图像数据格式 (image_bytes): + +SDK的所有函数(..._on_session 和 draw_and_encode_image)均需要 BGR 格式的图像字节(cv::imread 默认格式)。 + +SDK内部在推理时会自动处理BGR到RGB的转换。 + +类别名称 (class_names): + +SDK本身是类别无关的,它只返回 class_id (整数)。 + +调用者在调用 draw_and_encode_image 时,必须提供一个与模型元数据(如 {"qd", "fl", "zw"})顺序完全一致的 class_names 数组。