yolov5n.yaml文件如下:
model_parameters:
onnx_model: '/data/horizon_j5/data/yolov5n.onnx'
march: "bayes"
layer_out_dump: False
working_dir: '../model_output'
output_model_file_prefix: 'yolov5n-det'
remove_node_type: "Dequantize"
node_info: {"/model.10/m/m.0/attn/Softmax": {'ON': 'BPU','InputType': 'int8','OutputType': 'int8'}}
input_parameters:
input_name: 'images'
input_shape: '1x3x640x640'
input_type_rt: 'nv12'
input_type_train: 'rgb'
input_layout_train: 'NCHW'
mean_value: '0.0 0.0 0.0'
scale_value: '0.00392157 0.00392157 0.00392157'
calibration_parameters:
cal_dir: '/data/horizon_j5/data/calib_data'
compiler_parameters:
compile_mode: 'latency'
core_num: 1
optimize_level: 'O2'
jobs: 8
运行与报错如下:
hb_mapper makertbin --config /data/horizon_j5/data/yolov5n.yaml --model-type onnx
/usr/local/lib/python3.8/dist-packages/paramiko/pkey.py:100: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"cipher": algorithms.TripleDES,
/usr/local/lib/python3.8/dist-packages/paramiko/transport.py:259: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"class": algorithms.TripleDES,
2026-05-15 09:49:15,773 INFO log will be stored in //hb_mapper_makertbin.log
2026-05-15 09:49:15,774 INFO Start hb_mapper....
2026-05-15 09:49:15,774 INFO hbdk version 3.49.13
2026-05-15 09:49:15,774 INFO horizon_nn version 1.0.9
2026-05-15 09:49:15,774 INFO hb_mapper version 1.24.1
2026-05-15 09:49:15,774 INFO Start Model Convert....
2026-05-15 09:49:15,784 INFO Using onnx model file: /data/horizon_j5/data/yolov5n.onnx
2026-05-15 09:49:15,804 INFO Model has 1 inputs according to model file
2026-05-15 09:49:15,805 INFO nv12 input type rt received.
2026-05-15 09:49:15,806 ERROR Parse 'calibration_parameters' failed!
2026-05-15 09:49:15,806 ERROR yaml file parse failed. Please double check your config file inputs
2026-05-15 09:49:15,808 ERROR Wrong cal_dir num given, cal_dir num 0 is not equal to input num 1
