yaml文件配置

问题定位

错误信息:ERROR wrong model type None

原因hb_mapper makertbin 命令缺少 --model-type 参数。

你的 YAML 配置没问题,但命令不完整。

解决方案

修正命令

hb_mapper makertbin --model-type onnx --config /workspace/yolo11n_seg_config.yaml

关键:加上 --model-type onnx

完整执行流程

# 1. 确认 YAML 配置(你当前的配置没问题)
cat /workspace/yolo11n_seg_config.yaml

# 2. 执行转换(加上 --model-type onnx)
hb_mapper makertbin --model-type onnx --config /workspace/yolo11n_seg_config.yaml

# 3. 验证转换结果
hb_perf /workspace/yolo11n_seg.bin

命令参数说明

参数 说明
--model-type onnx 指定输入模型类型为 ONNX
--config xxx.yaml 指定配置文件路径

预期成功输出

转换成功后会看到类似输出:

INFO Model Convert finished successfully
INFO Output model: /workspace/yolo11n_seg.bin

然后用 hb_perf 验证模型结构,YOLO11-seg 应该有 6 个输出头


小提示:你的校准数据用 uint8 格式(.bin 文件)是可以的,说明你已经做过预处理了。直接加上 --model-type onnx 应该就能跑通。

参考教程:从头开始 YOLOV11 自训练模型的板端部署和量化 - 命令格式参考第 3 节。