你好!我首先尝试了方案一:得到的hb_mapper日志如下:
root@46a86a8809fe:/data# hb_mapper makertbin --model-type onnx --config yolov8.yaml
2026-04-19 13:31:31,013 INFO log will be stored in /data/hb_mapper_makertbin.log
2026-04-19 13:31:31,015 INFO Start hb_mapper…
2026-04-19 13:31:31,016 INFO hbdk version 3.49.15
2026-04-19 13:31:31,016 INFO horizon_nn version 1.1.0
2026-04-19 13:31:31,017 INFO hb_mapper version 1.24.3
2026-04-19 13:31:31,018 INFO Start Model Convert…
2026-04-19 13:31:31,024 INFO Using onnx model file: /data/best.onnx
2026-04-19 13:31:31,088 INFO Model has 1 inputs according to model file
2026-04-19 13:31:31,092 INFO Model input shape not given in yaml_file, using shape from model file: [[1, 3, 640, 640]]
2026-04-19 13:31:31,093 INFO nv12 input type rt received.
2026-04-19 13:31:31,096 WARNING The calibration dir name suffix is not the same as the value float32 of the parameter cal_data_type, the parameter setting will prevail
2026-04-19 13:31:31,097 INFO custom_op does not exist, skipped
2026-04-19 13:31:31,099 WARNING Input node images’s input_source not set, it will be set to pyramid by default
2026-04-19 13:31:31,109 INFO *******************************************
2026-04-19 13:31:31,110 INFO First calibration picture name: 000d64dae0250e8b.bin
2026-04-19 13:31:31,111 INFO First calibration picture md5:
056d797381f1224d368ed8c3fc8c71db /data/cal_bin/000d64dae0250e8b.bin
2026-04-19 13:31:31,183 INFO *******************************************
2026-04-19 13:31:40,645 INFO Start to Horizon NN Model Convert.
2026-04-19 13:31:40,775 INFO Loading horizon_nn debug methods:{‘dump_all_layers_output’, ‘dump_all_models’, ‘check_model_output_consistency’}
2026-04-19 13:31:40,777 INFO The activation calibration parameters:
calibration_type: [‘max’, ‘kl’]
max_percentile: [0.99995, 1.0]
per_channel: [True, False]
asymmetric: [True, False]
The modelwise search parameters:
similarity: 0.995
metric: cosine-similarity
2026-04-19 13:31:40,778 INFO input images is from pyramid. Its layout is set to NHWC
2026-04-19 13:31:40,780 INFO The specified model compilation architecture: bayes-e.
2026-04-19 13:31:40,781 INFO The specified model compilation optimization parameters: .
2026-04-19 13:31:40,784 INFO Start to prepare the onnx model.
2026-04-19 13:31:40,797 INFO Input ONNX Model Information:
ONNX IR version: 6
Opset version: [‘ai.onnx v11’, ‘horizon v1’]
Producer: pytorch v2.10.0
Domain: None
Version: None
Graph input:
images: shape=[1, 3, 640, 640], dtype=FLOAT32
Graph output:
output0: shape=[1, 80, 80, 5], dtype=FLOAT32
326: shape=[1, 80, 80, 64], dtype=INT32
346: shape=[1, 40, 40, 5], dtype=FLOAT32
345: shape=[1, 40, 40, 64], dtype=INT32
365: shape=[1, 20, 20, 5], dtype=FLOAT32
364: shape=[1, 20, 20, 64], dtype=INT32
2026-04-19 13:31:41,013 INFO End to prepare the onnx model.
2026-04-19 13:31:41,129 INFO Saving model to: yolov8_cow_original_float_model.onnx.
2026-04-19 13:31:41,131 INFO Start to optimize the onnx model.
2026-04-19 13:31:41,482 INFO End to optimize the onnx model.
2026-04-19 13:31:41,634 INFO Saving model to: yolov8_cow_optimized_float_model.onnx.
2026-04-19 13:31:41,636 INFO Start to calibrate the model.
2026-04-19 13:31:41,720 INFO There are 117 samples in the data set.
2026-04-19 13:31:41,721 INFO Run calibration model with modelwise search method.
2026-04-19 13:31:41,877 INFO Calibration using batch 8
calibration in progress: 100%|██████████████████████████████████████████████████████████| 15/15 [00:57<00:00, 3.84s/it]
2026-04-19 13:32:41,849 INFO Calibration using batch 8
calibration in progress: 100%|██████████████████████████████████████████████████████████| 15/15 [00:11<00:00, 1.33it/s]
2026-04-19 13:32:53,509 INFO Calibration using batch 8
calibration in progress: 100%|██████████████████████████████████████████████████████████| 15/15 [00:57<00:00, 3.84s/it]
2026-04-19 13:33:59,201 INFO Select max method.
2026-04-19 13:33:59,657 INFO End to calibrate the model.
2026-04-19 13:33:59,786 INFO Saving model to: yolov8_cow_calibrated_model.onnx.
2026-04-19 13:33:59,786 INFO Start to quantize the model.
2026-04-19 13:34:00,793 INFO End to quantize the model.
2026-04-19 13:34:00,859 INFO Saving model to: yolov8_cow_quantized_model.onnx.
2026-04-19 13:34:00,861 INFO Start to compile the model with march bayes-e.
2026-04-19 13:34:01,080 INFO Compile submodel: main_graph_subgraph_0
2026-04-19 13:34:01,096 INFO hbdk-cc parameters:[‘–O3’, ‘–debug’, ‘–core-num’, ‘1’, ‘–fast’, ‘–input-layout’, ‘NHWC’, ‘–output-layout’, ‘NHWC’, ‘–input-source’, ‘pyramid’]
[==================================================] 100%
2026-04-19 13:34:46,377 INFO consumed time 45.2478
2026-04-19 13:34:46,408 INFO hbir_model has been saved as : main_graph_subgraph_0.hbir
2026-04-19 13:34:46,494 INFO FPS=182.58, latency = 5477.2 us, DDR = 30787392 bytes (see main_graph_subgraph_0.html)
2026-04-19 13:34:46,499 INFO Compile submodel: main_graph_subgraph_1
2026-04-19 13:34:46,503 INFO hbdk-cc parameters:[‘–O3’, ‘–debug’, ‘–core-num’, ‘1’, ‘–fast’, ‘–input-layout’, ‘NHWC’, ‘–output-layout’, ‘NHWC’, ‘–input-source’, ‘ddr’]
2026-04-19 13:34:46,503 WARNING Can not find the scale for node /model.22/Cast
2026-04-19 13:34:46,553 INFO consumed time 0.034238
2026-04-19 13:34:46,558 INFO hbir_model has been saved as : main_graph_subgraph_1.hbir
2026-04-19 13:34:46,597 INFO FPS=3008.21, latency = 332.4 us, DDR = 3276800 bytes (see main_graph_subgraph_1.html)
2026-04-19 13:34:46,597 INFO Compile submodel: main_graph_subgraph_2
2026-04-19 13:34:46,601 INFO hbdk-cc parameters:[‘–O3’, ‘–debug’, ‘–core-num’, ‘1’, ‘–fast’, ‘–input-layout’, ‘NHWC’, ‘–output-layout’, ‘NHWC’, ‘–input-source’, ‘ddr’]
2026-04-19 13:34:46,601 WARNING Can not find the scale for node /model.22/Cast_1
2026-04-19 13:34:46,631 INFO consumed time 0.0146649
2026-04-19 13:34:46,634 INFO hbir_model has been saved as : main_graph_subgraph_2.hbir
2026-04-19 13:34:46,672 INFO FPS=8540.29, latency = 117.1 us, DDR = 819200 bytes (see main_graph_subgraph_2.html)
2026-04-19 13:34:46,673 INFO Compile submodel: main_graph_subgraph_3
2026-04-19 13:34:46,677 INFO hbdk-cc parameters:[‘–O3’, ‘–debug’, ‘–core-num’, ‘1’, ‘–fast’, ‘–input-layout’, ‘NHWC’, ‘–output-layout’, ‘NHWC’, ‘–input-source’, ‘ddr’]
2026-04-19 13:34:46,677 WARNING Can not find the scale for node /model.22/Cast_2
2026-04-19 13:34:46,707 INFO consumed time 0.0135146
2026-04-19 13:34:46,711 INFO hbir_model has been saved as : main_graph_subgraph_3.hbir
2026-04-19 13:34:46,750 INFO FPS=19759.72, latency = 50.6 us, DDR = 266240 bytes (see main_graph_subgraph_3.html)
2026-04-19 13:34:47,657 INFO core[0] open!
2026-04-19 13:34:49,564 INFO The consistency check between the quantized model and the hybrid model is passed.
2026-04-19 13:34:49,576 INFO End to compile the model with march bayes-e.
2026-04-19 13:34:49,607 INFO Saving model to: yolov8_cow_hybrid_model.onnx.
2026-04-19 13:34:50,795 INFO The main quantized node information:
Node ON Subgraph Type Cosine Similarity Threshold DataType
HZ_PREPROCESS_FOR_images BPU id(0) HzSQuantizedPreprocess 1.000001 127.0 int8
/model.0/conv/Conv BPU id(0) HzSQuantizedConv 0.999674 1.46338 int8
/model.0/act/Mul BPU id(0) HzLut 0.997263 74.0371 int8
/model.1/conv/Conv BPU id(0) HzSQuantizedConv 0.995303 74.0371 int8
/model.1/act/Mul BPU id(0) HzLut 0.994129 184.717 int8
/model.2/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.991629 179.701 int8
/model.2/cv1/act/Mul BPU id(0) HzLut 0.983321 124.001 int8
/model.2/Split BPU id(0) Split 0.983015 42.7774 int8
/model.2/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.973426 42.7774 int8
/model.2/m.0/cv1/act/Mul BPU id(0) HzLut 0.970482 46.3572 int8
/model.2/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.957869 37.6097 int8
/model.2/m.0/cv2/act/Mul BPU id(0) HzLut 0.970077 48.973 int8
/model.2/m.0/Add BPU id(0) HzSElementwiseAdd 0.979875 42.7774 int8
/model.2/Concat BPU id(0) Concat 0.980861 42.7774 int8
/model.2/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.981447 42.7774 int8
/model.2/cv2/act/Mul BPU id(0) HzLut 0.976776 32.0627 int8
/model.3/conv/Conv BPU id(0) HzSQuantizedConv 0.979115 18.1482 int8
/model.3/act/Mul BPU id(0) HzLut 0.986760 12.0651 int8
/model.4/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.974193 9.33272 int8
/model.4/cv1/act/Mul BPU id(0) HzLut 0.974797 17.2818 int8
/model.4/Split BPU id(0) Split 0.960659 11.9049 int8
/model.4/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.980702 11.9049 int8
/model.4/m.0/cv1/act/Mul BPU id(0) HzLut 0.973264 8.53135 int8
/model.4/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.977899 6.29573 int8
/model.4/m.0/cv2/act/Mul BPU id(0) HzLut 0.979001 9.98503 int8
/model.4/m.0/Add BPU id(0) HzSElementwiseAdd 0.987550 11.9049 int8
/model.4/m.1/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.986461 7.68458 int8
/model.4/m.1/cv1/act/Mul BPU id(0) HzLut 0.972137 8.23987 int8
/model.4/m.1/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.979726 5.26921 int8
/model.4/m.1/cv2/act/Mul BPU id(0) HzLut 0.981552 15.0583 int8
/model.4/m.1/Add BPU id(0) HzSElementwiseAdd 0.989101 7.68458 int8
/model.4/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.4/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.4/m.0/Add_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.4/Concat BPU id(0) Concat 0.985911 11.9049 int8
/model.4/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.975511 12.7545 int8
/model.4/cv2/act/Mul BPU id(0) HzLut 0.971084 10.8896 int8
/model.5/conv/Conv BPU id(0) HzSQuantizedConv 0.984018 10.8894 int8
/model.5/act/Mul BPU id(0) HzLut 0.977714 9.20448 int8
/model.6/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.973792 7.33795 int8
/model.6/cv1/act/Mul BPU id(0) HzLut 0.965576 21.3122 int8
/model.6/Split BPU id(0) Split 0.956651 10.2489 int8
/model.6/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.989715 10.2489 int8
/model.6/m.0/cv1/act/Mul BPU id(0) HzLut 0.971021 10.462 int8
/model.6/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.986468 10.054 int8
/model.6/m.0/cv2/act/Mul BPU id(0) HzLut 0.976406 12.2858 int8
/model.6/m.0/Add BPU id(0) HzSElementwiseAdd 0.982137 10.2489 int8
/model.6/m.1/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.991775 9.07757 int8
/model.6/m.1/cv1/act/Mul BPU id(0) HzLut 0.979372 9.71347 int8
/model.6/m.1/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.983244 7.16838 int8
/model.6/m.1/cv2/act/Mul BPU id(0) HzLut 0.982953 15.2013 int8
/model.6/m.1/Add BPU id(0) HzSElementwiseAdd 0.985318 9.07757 int8
/model.6/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.6/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.6/m.0/Add_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.6/Concat BPU id(0) Concat 0.979011 10.2489 int8
/model.6/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.983604 14.8859 int8
/model.6/cv2/act/Mul BPU id(0) HzLut 0.966340 10.1515 int8
/model.7/conv/Conv BPU id(0) HzSQuantizedConv 0.984126 9.31075 int8
/model.7/act/Mul BPU id(0) HzLut 0.958860 13.8852 int8
/model.8/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.976055 8.58802 int8
/model.8/cv1/act/Mul BPU id(0) HzLut 0.953157 13.0038 int8
/model.8/Split BPU id(0) Split 0.948901 13.0038 int8
/model.8/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.983855 13.0038 int8
/model.8/m.0/cv1/act/Mul BPU id(0) HzLut 0.965304 11.9996 int8
/model.8/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.972421 10.0163 int8
/model.8/m.0/cv2/act/Mul BPU id(0) HzLut 0.963525 15.9143 int8
/model.8/m.0/Add BPU id(0) HzSElementwiseAdd 0.961504 13.0038 int8
/model.8/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.8/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.8/Concat BPU id(0) Concat 0.958261 13.0038 int8
/model.8/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.976409 15.9715 int8
/model.8/cv2/act/Mul BPU id(0) HzLut 0.952258 12.8862 int8
/model.9/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.987272 10.0171 int8
/model.9/m/MaxPool BPU id(0) HzQuantizedMaxPool 0.995478 9.50632 int8
/model.9/m_1/MaxPool BPU id(0) HzQuantizedMaxPool 0.996476 9.50632 int8
/model.9/m_2/MaxPool BPU id(0) HzQuantizedMaxPool 0.996879 9.50632 int8
/model.9/Concat BPU id(0) Concat 0.995637 9.50632 int8
/model.9/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.988740 9.50632 int8
/model.9/cv2/act/Mul BPU id(0) HzLut 0.960292 10.4385 int8
/model.10/Resize BPU id(0) HzQuantizedResizeUpsample 0.960340 12.6904 int8
/model.10/Resize_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.11/Concat BPU id(0) Concat 0.962788 12.6904 int8
/model.12/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.975019 9.31075 int8
/model.12/cv1/act/Mul BPU id(0) HzLut 0.965725 12.0623 int8
/model.12/Split BPU id(0) Split 0.952558 9.03751 int8
/model.12/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.982063 9.03751 int8
/model.12/m.0/cv1/act/Mul BPU id(0) HzLut 0.952635 10.5034 int8
/model.12/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.968507 6.65441 int8
/model.12/m.0/cv2/act/Mul BPU id(0) HzLut 0.961679 11.0998 int8
/model.12/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.12/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.12/Concat BPU id(0) Concat 0.964241 9.03751 int8
/model.12/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.973580 9.11435 int8
/model.12/cv2/act/Mul BPU id(0) HzLut 0.957963 12.5943 int8
/model.13/Resize BPU id(0) HzQuantizedResizeUpsample 0.957974 12.3839 int8
/model.13/Resize_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.14/Concat BPU id(0) Concat 0.963679 12.3839 int8
/model.15/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.983005 10.8894 int8
/model.15/cv1/act/Mul BPU id(0) HzLut 0.984530 11.2197 int8
/model.15/Split BPU id(0) Split 0.972859 6.38241 int8
/model.15/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.981540 6.38241 int8
/model.15/m.0/cv1/act/Mul BPU id(0) HzLut 0.975701 7.1668 int8
/model.15/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.974813 4.85655 int8
/model.15/m.0/cv2/act/Mul BPU id(0) HzLut 0.983766 9.08705 int8
/model.15/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.15/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.15/Concat BPU id(0) Concat 0.983901 6.38241 int8
/model.15/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.981353 8.46767 int8
/model.15/cv2/act/Mul BPU id(0) HzLut 0.981282 10.6199 int8
/model.16/conv/Conv BPU id(0) HzSQuantizedConv 0.972600 7.91471 int8
/model.22/cv2.0/cv2.0.0/conv/Conv BPU id(0) HzSQuantizedConv 0.972582 7.91471 int8
/model.22/cv3.0/cv3.0.0/conv/Conv BPU id(0) HzSQuantizedConv 0.953848 7.91471 int8
/model.16/act/Mul BPU id(0) HzLut 0.956925 12.384 int8
/model.22/cv2.0/cv2.0.0/act/Mul BPU id(0) HzLut 0.961294 22.516 int8
/model.22/cv3.0/cv3.0.0/act/Mul BPU id(0) HzLut 0.948441 13.076 int8
/model.17/Concat BPU id(0) Concat 0.957471 12.3839 int8
/model.22/cv2.0/cv2.0.1/conv/Conv BPU id(0) HzSQuantizedConv 0.965566 9.34952 int8
/model.22/cv3.0/cv3.0.1/conv/Conv BPU id(0) HzSQuantizedConv 0.963664 12.5227 int8
/model.18/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.966772 12.3839 int8
/model.22/cv2.0/cv2.0.1/act/Mul BPU id(0) HzLut 0.967149 33.1776 int8
/model.22/cv3.0/cv3.0.1/act/Mul BPU id(0) HzLut 0.965585 19.361 int8
/model.18/cv1/act/Mul BPU id(0) HzLut 0.953098 14.2131 int8
/model.22/cv2.0/cv2.0.2/Conv BPU id(0) HzSQuantizedConv 0.977380 33.1776 int8
/model.22/cv3.0/cv3.0.2/Conv BPU id(0) HzSQuantizedConv 0.998729 19.361 int8
/model.18/Split BPU id(0) Split 0.926620 14.2131 int8
/model.22/Transpose_1 CPU – Transpose 0.998729 – float
/model.18/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.977141 14.2131 int8
/model.22/Cast CPU – Cast 0.977370 – float
/model.22/Transpose BPU id(1) Transpose 0.977369 – int32
/model.18/m.0/cv1/act/Mul BPU id(0) HzLut 0.966430 11.0031 int8
/model.18/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.954741 7.55766 int8
/model.18/m.0/cv2/act/Mul BPU id(0) HzLut 0.949566 19.8326 int8
/model.18/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.18/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.18/Concat BPU id(0) Concat 0.949993 14.2131 int8
/model.18/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.972021 18.5159 int8
/model.18/cv2/act/Mul BPU id(0) HzLut 0.963390 20.3507 int8
/model.19/conv/Conv BPU id(0) HzSQuantizedConv 0.973306 10.2102 int8
/model.22/cv2.1/cv2.1.0/conv/Conv BPU id(0) HzSQuantizedConv 0.967496 10.2102 int8
/model.22/cv3.1/cv3.1.0/conv/Conv BPU id(0) HzSQuantizedConv 0.951763 10.2102 int8
/model.19/act/Mul BPU id(0) HzLut 0.949350 15.5469 int8
/model.22/cv2.1/cv2.1.0/act/Mul BPU id(0) HzLut 0.959183 26.6397 int8
/model.22/cv3.1/cv3.1.0/act/Mul BPU id(0) HzLut 0.947452 16.2756 int8
/model.20/Concat BPU id(0) Concat 0.955208 12.6904 int8
/model.22/cv2.1/cv2.1.1/conv/Conv BPU id(0) HzSQuantizedConv 0.973773 12.8461 int8
/model.22/cv3.1/cv3.1.1/conv/Conv BPU id(0) HzSQuantizedConv 0.959533 16.2756 int8
/model.21/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.965582 12.6904 int8
/model.22/cv2.1/cv2.1.1/act/Mul BPU id(0) HzLut 0.972686 38.8051 int8
/model.22/cv3.1/cv3.1.1/act/Mul BPU id(0) HzLut 0.962370 27.0625 int8
/model.21/cv1/act/Mul BPU id(0) HzLut 0.930670 26.9658 int8
/model.22/cv2.1/cv2.1.2/Conv BPU id(0) HzSQuantizedConv 0.982384 38.8051 int8
/model.22/cv3.1/cv3.1.2/Conv BPU id(0) HzSQuantizedConv 0.997221 27.0625 int8
/model.21/Split BPU id(0) Split 0.907731 26.9658 int8
/model.22/Transpose_3 CPU – Transpose 0.997221 – float
/model.21/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.973496 26.9658 int8
/model.22/Cast_1 CPU – Cast 0.982382 – float
/model.22/Transpose_2 BPU id(2) Transpose 0.982381 – int32
/model.21/m.0/cv1/act/Mul BPU id(0) HzLut 0.936226 13.217 int8
/model.21/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.948926 13.0474 int8
/model.21/m.0/cv2/act/Mul BPU id(0) HzLut 0.930035 20.8819 int8
/model.21/Concat BPU id(0) Concat 0.929138 26.9658 int8
/model.21/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.968910 26.9658 int8
/model.21/cv2/act/Mul BPU id(0) HzLut 0.931118 28.0987 int8
/model.22/cv2.2/cv2.2.0/conv/Conv BPU id(0) HzSQuantizedConv 0.967374 12.5103 int8
/model.22/cv3.2/cv3.2.0/conv/Conv BPU id(0) HzSQuantizedConv 0.945861 12.5103 int8
/model.22/cv2.2/cv2.2.0/act/Mul BPU id(0) HzLut 0.962097 18.0222 int8
/model.22/cv3.2/cv3.2.0/act/Mul BPU id(0) HzLut 0.940411 18.0898 int8
/model.22/cv2.2/cv2.2.1/conv/Conv BPU id(0) HzSQuantizedConv 0.974884 13.5108 int8
/model.22/cv3.2/cv3.2.1/conv/Conv BPU id(0) HzSQuantizedConv 0.957014 18.0898 int8
/model.22/cv2.2/cv2.2.1/act/Mul BPU id(0) HzLut 0.977126 30.2404 int8
/model.22/cv3.2/cv3.2.1/act/Mul BPU id(0) HzLut 0.961369 24.3543 int8
/model.22/cv2.2/cv2.2.2/Conv BPU id(0) HzSQuantizedConv 0.986811 30.2404 int8
/model.22/cv3.2/cv3.2.2/Conv BPU id(0) HzSQuantizedConv 0.995059 24.3543 int8
/model.22/Transpose_5 CPU – Transpose 0.995059 – float
/model.22/Cast_2 CPU – Cast 0.986809 – float
/model.22/Transpose_4 BPU id(3) Transpose 0.986809 – int32
2026-04-19 13:34:50,798 INFO The quantized model output:
Output Cosine Similarity L1 Distance L2 Distance Chebyshev Distance
output0 0.998729 0.781872 0.005624 5.950317
326 0.977369 160.165664 0.350774 2116.000000
346 0.997221 0.998858 0.015075 8.503302
345 0.982381 156.367900 0.676232 1649.000000
365 0.995059 1.343915 0.040454 10.774521
364 0.986809 130.537617 1.141655 1228.000000
/model.12/cv1/conv/Conv_output_0_calibrated 0.975019 0.252503 0.000738 2.511135
/model.3/conv/Conv_output_0_calibrated 0.979115 0.233275 0.000486 2.461063
/model.16/conv/Conv_output_0_calibrated 0.972600 0.219721 0.000912 2.277494
/model.18/m.0/cv1/conv/Conv_output_0_calibrated 0.977141 0.219281 0.000912 1.893165
/model.21/cv2/conv/Conv_output_0_calibrated 0.968910 0.322370 0.001351 4.363921
…22/cv3.0/cv3.0.0/conv/Conv_output_0_calibrated 0.953848 0.277793 0.000563 2.621777
/model.6/cv2/conv/Conv_output_0_calibrated 0.983604 0.183870 0.000540 1.867956
/model.0/conv/Conv_output_0_calibrated 0.999674 0.164282 0.000155 1.125388
…22/cv3.2/cv3.2.0/conv/Conv_output_0_calibrated 0.945861 0.260684 0.002165 2.495770
/model.15/cv2/conv/Conv_output_0_calibrated 0.981353 0.167139 0.000370 2.664440
/model.6/m.1/cv2/conv/Conv_output_0_calibrated 0.983244 0.227658 0.000942 2.233948
/model.18/m.0/cv2/conv/Conv_output_0_calibrated 0.954741 0.329295 0.001383 4.252327
/model.12/m.0/cv2/conv/Conv_output_0_calibrated 0.968507 0.230943 0.000948 1.852372
/model.8/cv1/conv/Conv_output_0_calibrated 0.976055 0.255815 0.001100 3.405624
/model.15/m.0/cv2/conv/Conv_output_0_calibrated 0.974813 0.203983 0.000598 2.039910
/model.2/m.0/cv1/conv/Conv_output_0_calibrated 0.973426 0.664074 0.001345 5.966794
…22/cv2.2/cv2.2.0/conv/Conv_output_0_calibrated 0.967374 0.325191 0.002753 3.046483
/model.4/m.1/cv1/conv/Conv_output_0_calibrated 0.986461 0.182170 0.000530 1.639877
…22/cv2.1/cv2.1.1/conv/Conv_output_0_calibrated 0.973773 0.467690 0.002146 6.515526
/model.22/Mul_1_output_0 0.982384 156.425684 0.676498 1649.626587
/model.22/cv3.1/cv3.1.2/Conv_output_0 0.997221 0.998858 0.015075 8.503302
/model.12/cv2/conv/Conv_output_0_calibrated 0.973580 0.215075 0.000637 2.237457
/model.6/m.1/cv1/conv/Conv_output_0_calibrated 0.991775 0.166789 0.000687 1.351537
/model.9/cv2/conv/Conv_output_0_calibrated 0.988740 0.211105 0.000867 1.577188
/model.4/cv2/conv/Conv_output_0_calibrated 0.975511 0.198774 0.000419 2.247733
/model.21/m.0/cv2/conv/Conv_output_0_calibrated 0.948926 0.386217 0.002248 3.233368
/model.21/m.0/cv1/conv/Conv_output_0_calibrated 0.973496 0.410502 0.002364 2.825220
/model.4/cv1/conv/Conv_output_0_calibrated 0.974193 0.215698 0.000478 3.420748
/model.19/conv/Conv_output_0_calibrated 0.973306 0.208123 0.001257 2.670021
…22/cv3.0/cv3.0.1/conv/Conv_output_0_calibrated 0.963664 0.308197 0.000629 3.914468
/model.4/m.1/cv2/conv/Conv_output_0_calibrated 0.979726 0.261250 0.000763 2.605573
/model.4/m.0/cv1/conv/Conv_output_0_calibrated 0.980702 0.185108 0.000537 1.551460
/model.22/Mul_output_0 0.977380 160.228369 0.350925 2117.533936
/model.8/cv2/conv/Conv_output_0_calibrated 0.976409 0.273912 0.001128 2.709285
…22/cv2.0/cv2.0.0/conv/Conv_output_0_calibrated 0.972582 0.227280 0.000483 4.520002
/model.22/cv3.0/cv3.0.2/Conv_output_0 0.998729 0.781872 0.005624 5.950317
/model.15/m.0/cv1/conv/Conv_output_0_calibrated 0.981540 0.177114 0.000509 1.367150
/model.21/cv1/conv/Conv_output_0_calibrated 0.965582 0.287014 0.001178 2.701343
/model.18/cv2/conv/Conv_output_0_calibrated 0.972021 0.213626 0.000663 4.999544
/model.4/m.0/cv2/conv/Conv_output_0_calibrated 0.977899 0.194169 0.000576 2.161550
…22/cv2.0/cv2.0.1/conv/Conv_output_0_calibrated 0.965566 0.554000 0.001261 8.312881
/model.9/cv1/conv/Conv_output_0_calibrated 0.987272 0.209271 0.001232 2.115997
/model.6/m.0/cv2/conv/Conv_output_0_calibrated 0.986468 0.151182 0.000632 1.526753
/model.18/cv1/conv/Conv_output_0_calibrated 0.966772 0.245995 0.000717 2.227518
/model.15/cv1/conv/Conv_output_0_calibrated 0.983005 0.163386 0.000350 1.985267
…22/cv3.1/cv3.1.0/conv/Conv_output_0_calibrated 0.951763 0.264476 0.001095 2.639090
/model.2/cv1/conv/Conv_output_0_calibrated 0.991629 0.389134 0.000570 4.123837
…22/cv2.1/cv2.1.0/conv/Conv_output_0_calibrated 0.967496 0.315836 0.001382 4.240218
/model.22/Mul_2_output_0 0.986811 130.580586 1.142069 1228.014526
/model.7/conv/Conv_output_0_calibrated 0.984126 0.212133 0.000873 2.156533
/model.6/cv1/conv/Conv_output_0_calibrated 0.973792 0.220871 0.000718 3.916424
…22/cv3.2/cv3.2.1/conv/Conv_output_0_calibrated 0.957014 0.311338 0.002642 3.931762
/model.6/m.0/cv1/conv/Conv_output_0_calibrated 0.989715 0.194494 0.000794 1.617946
/model.8/m.0/cv1/conv/Conv_output_0_calibrated 0.983855 0.256478 0.001497 1.990933
/model.5/conv/Conv_output_0_calibrated 0.984018 0.178123 0.000526 2.231535
/model.2/cv2/conv/Conv_output_0_calibrated 0.981447 0.313820 0.000464 3.433216
/model.1/conv/Conv_output_0_calibrated 0.995303 0.593907 0.000832 5.066320
…22/cv3.1/cv3.1.1/conv/Conv_output_0_calibrated 0.959533 0.284276 0.001212 4.069573
/model.2/m.0/cv2/conv/Conv_output_0_calibrated 0.957869 0.747426 0.001605 9.093879
/model.12/m.0/cv1/conv/Conv_output_0_calibrated 0.982063 0.223523 0.000906 1.597455
/model.22/cv3.2/cv3.2.2/Conv_output_0 0.995059 1.343915 0.040454 10.774521
…22/cv2.2/cv2.2.1/conv/Conv_output_0_calibrated 0.974884 0.433157 0.003879 5.338984
/model.8/m.0/cv2/conv/Conv_output_0_calibrated 0.972421 0.361278 0.002092 3.020632
2026-04-19 13:34:50,810 INFO End to Horizon NN Model Convert.
2026-04-19 13:34:50,828 INFO start convert to *.bin file…
2026-04-19 13:34:50,845 INFO ONNX model output num : 69
2026-04-19 13:34:50,851 INFO ############# model deps info #############
2026-04-19 13:34:50,852 INFO hb_mapper version : 1.24.3
2026-04-19 13:34:50,853 INFO hbdk version : 3.49.15
2026-04-19 13:34:50,853 INFO hbdk runtime version: 3.15.55.0
2026-04-19 13:34:50,854 INFO horizon_nn version : 1.1.0
2026-04-19 13:34:50,854 INFO ############# model_parameters info #############
2026-04-19 13:34:50,855 INFO onnx_model : /data/best.onnx
2026-04-19 13:34:50,856 INFO BPU march : bayes-e
2026-04-19 13:34:50,856 INFO layer_out_dump : True
2026-04-19 13:34:50,857 INFO log_level : DEBUG
2026-04-19 13:34:50,857 INFO working dir : /data/model_output
2026-04-19 13:34:50,858 INFO output_model_file_prefix: yolov8_cow
2026-04-19 13:34:50,859 INFO ############# input_parameters info #############
2026-04-19 13:34:50,859 INFO ------------------------------------------
2026-04-19 13:34:50,860 INFO ---------input info : images ---------
2026-04-19 13:34:50,861 INFO input_name : images
2026-04-19 13:34:50,862 INFO input_type_rt : nv12
2026-04-19 13:34:50,863 INFO input_space&range : regular
2026-04-19 13:34:50,864 INFO input_layout_rt : None
2026-04-19 13:34:50,865 INFO input_type_train : rgb
2026-04-19 13:34:50,865 INFO input_layout_train : NCHW
2026-04-19 13:34:50,866 INFO norm_type : data_scale
2026-04-19 13:34:50,867 INFO input_shape : 1x3x640x640
2026-04-19 13:34:50,868 INFO scale_value : 0.003921568627451,
2026-04-19 13:34:50,869 INFO cal_data_dir : /data/cal_bin
2026-04-19 13:34:50,869 INFO cal_data_type : float32
2026-04-19 13:34:50,870 INFO ---------input info : images end -------
2026-04-19 13:34:50,870 INFO ------------------------------------------
2026-04-19 13:34:50,871 INFO ############# calibration_parameters info #############
2026-04-19 13:34:50,871 INFO preprocess_on : False
2026-04-19 13:34:50,872 INFO calibration_type: : default
2026-04-19 13:34:50,872 INFO per_channel : False
2026-04-19 13:34:50,873 INFO ############# compiler_parameters info #############
2026-04-19 13:34:50,873 INFO debug : True
2026-04-19 13:34:50,874 INFO compile_mode : latency
2026-04-19 13:34:50,874 INFO hbdk_pass_through_params: --O3 --debug --core-num 1 --fast
2026-04-19 13:34:50,875 INFO input-source : {‘images’: ‘pyramid’, ‘_default_value’: ‘ddr’}
2026-04-19 13:34:50,905 INFO Convert to runtime bin file successfully!
2026-04-19 13:34:50,906 INFO End Model Convert
hrt_model_exec的日志如下:
root@ubuntu:/home/sunrise/yolov8# hrt_model_exec model_info --model_file=./cow6.bin hrt_model_exec model_info --model_file=./cow6.bin
I0000 00:00:00.000000 76065 vlog_is_on.cc:197] RAW: Set VLOG level for “*” to 3
[BPU_PLAT]BPU Platform Version(1.3.6)! soc info(x5)
[HBRT] set log level as 0. version = 3.15.55.0
[DNN] Runtime version = 1.24.5_(3.15.55 HBRT)
[A][DNN][packed_model.cpp:247]Model [HorizonRT] The model builder version = 1.24.3
Load model to DDR cost 184.429ms.
This model file has 1 model:
[yolov8_cow]
input[0]:
name: images
input source: HB_DNN_INPUT_FROM_PYRAMID
valid shape: (1,3,640,640,)
aligned shape: (1,3,640,640,)
aligned byte size: 614400
tensor type: HB_DNN_IMG_TYPE_NV12
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (0,0,0,0,)
output[0]:
name: output0
valid shape: (1,80,80,5,)
aligned shape: (1,80,80,5,)
aligned byte size: 128000
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NHWC
quanti type: NONE
stride: (128000,1600,20,4,)
output[1]:
name: 326
valid shape: (1,80,80,64,)
aligned shape: (1,80,80,64,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_S32
tensor layout: HB_DNN_LAYOUT_NONE
quanti type: NONE
stride: (1638400,20480,256,4,)
output[2]:
name: 346
valid shape: (1,40,40,5,)
aligned shape: (1,40,40,5,)
aligned byte size: 32000
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NHWC
quanti type: NONE
stride: (32000,800,20,4,)
output[3]:
name: 345
valid shape: (1,40,40,64,)
aligned shape: (1,40,40,64,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_S32
tensor layout: HB_DNN_LAYOUT_NONE
quanti type: NONE
stride: (409600,10240,256,4,)
output[4]:
name: 365
valid shape: (1,20,20,5,)
aligned shape: (1,20,20,5,)
aligned byte size: 8000
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NHWC
quanti type: NONE
stride: (8000,400,20,4,)
output[5]:
name: 364
valid shape: (1,20,20,64,)
aligned shape: (1,20,20,64,)
aligned byte size: 102400
tensor type: HB_DNN_TENSOR_TYPE_S32
tensor layout: HB_DNN_LAYOUT_NONE
quanti type: NONE
stride: (102400,5120,256,4,)
output[6]:
name: /model.12/cv1/conv/Conv_output_0_calibrated
valid shape: (1,128,40,40,)
aligned shape: (1,128,40,40,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,6400,160,4,)
output[7]:
name: /model.3/conv/Conv_output_0_calibrated
valid shape: (1,64,80,80,)
aligned shape: (1,64,80,80,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,25600,320,4,)
output[8]:
name: /model.16/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[9]:
name: /model.18/m.0/cv1/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[10]:
name: /model.21/cv2/conv/Conv_output_0_calibrated
valid shape: (1,256,20,20,)
aligned shape: (1,256,20,20,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,1600,80,4,)
output[11]:
name: /model.22/cv3.0/cv3.0.0/conv/Conv_output_0_calibrated
valid shape: (1,64,80,80,)
aligned shape: (1,64,80,80,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,25600,320,4,)
output[12]:
name: /model.6/cv2/conv/Conv_output_0_calibrated
valid shape: (1,128,40,40,)
aligned shape: (1,128,40,40,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,6400,160,4,)
output[13]:
name: /model.0/conv/Conv_output_0_calibrated
valid shape: (1,16,320,320,)
aligned shape: (1,16,320,320,)
aligned byte size: 6553600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (6553600,409600,1280,4,)
output[14]:
name: /model.22/cv3.2/cv3.2.0/conv/Conv_output_0_calibrated
valid shape: (1,64,20,20,)
aligned shape: (1,64,20,20,)
aligned byte size: 102400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (102400,1600,80,4,)
output[15]:
name: /model.15/cv2/conv/Conv_output_0_calibrated
valid shape: (1,64,80,80,)
aligned shape: (1,64,80,80,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,25600,320,4,)
output[16]:
name: /model.6/m.1/cv2/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[17]:
name: /model.18/m.0/cv2/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[18]:
name: /model.12/m.0/cv2/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[19]:
name: /model.8/cv1/conv/Conv_output_0_calibrated
valid shape: (1,256,20,20,)
aligned shape: (1,256,20,20,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,1600,80,4,)
output[20]:
name: /model.15/m.0/cv2/conv/Conv_output_0_calibrated
valid shape: (1,32,80,80,)
aligned shape: (1,32,80,80,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,25600,320,4,)
output[21]:
name: /model.2/m.0/cv1/conv/Conv_output_0_calibrated
valid shape: (1,16,160,160,)
aligned shape: (1,16,160,160,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,102400,640,4,)
output[22]:
name: /model.22/cv2.2/cv2.2.0/conv/Conv_output_0_calibrated
valid shape: (1,64,20,20,)
aligned shape: (1,64,20,20,)
aligned byte size: 102400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (102400,1600,80,4,)
output[23]:
name: /model.4/m.1/cv1/conv/Conv_output_0_calibrated
valid shape: (1,32,80,80,)
aligned shape: (1,32,80,80,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,25600,320,4,)
output[24]:
name: /model.22/cv2.1/cv2.1.1/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[25]:
name: /model.22/Mul_1_output_0
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[26]:
name: /model.22/cv3.1/cv3.1.2/Conv_output_0
valid shape: (1,5,40,40,)
aligned shape: (1,5,40,40,)
aligned byte size: 32000
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (32000,6400,160,4,)
output[27]:
name: /model.12/cv2/conv/Conv_output_0_calibrated
valid shape: (1,128,40,40,)
aligned shape: (1,128,40,40,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,6400,160,4,)
output[28]:
name: /model.6/m.1/cv1/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[29]:
name: /model.9/cv2/conv/Conv_output_0_calibrated
valid shape: (1,256,20,20,)
aligned shape: (1,256,20,20,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,1600,80,4,)
output[30]:
name: /model.4/cv2/conv/Conv_output_0_calibrated
valid shape: (1,64,80,80,)
aligned shape: (1,64,80,80,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,25600,320,4,)
output[31]:
name: /model.21/m.0/cv2/conv/Conv_output_0_calibrated
valid shape: (1,128,20,20,)
aligned shape: (1,128,20,20,)
aligned byte size: 204800
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (204800,1600,80,4,)
output[32]:
name: /model.21/m.0/cv1/conv/Conv_output_0_calibrated
valid shape: (1,128,20,20,)
aligned shape: (1,128,20,20,)
aligned byte size: 204800
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (204800,1600,80,4,)
output[33]:
name: /model.4/cv1/conv/Conv_output_0_calibrated
valid shape: (1,64,80,80,)
aligned shape: (1,64,80,80,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,25600,320,4,)
output[34]:
name: /model.19/conv/Conv_output_0_calibrated
valid shape: (1,128,20,20,)
aligned shape: (1,128,20,20,)
aligned byte size: 204800
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (204800,1600,80,4,)
output[35]:
name: /model.22/cv3.0/cv3.0.1/conv/Conv_output_0_calibrated
valid shape: (1,64,80,80,)
aligned shape: (1,64,80,80,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,25600,320,4,)
output[36]:
name: /model.4/m.1/cv2/conv/Conv_output_0_calibrated
valid shape: (1,32,80,80,)
aligned shape: (1,32,80,80,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,25600,320,4,)
output[37]:
name: /model.4/m.0/cv1/conv/Conv_output_0_calibrated
valid shape: (1,32,80,80,)
aligned shape: (1,32,80,80,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,25600,320,4,)
output[38]:
name: /model.22/Mul_output_0
valid shape: (1,64,80,80,)
aligned shape: (1,64,80,80,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,25600,320,4,)
output[39]:
name: /model.8/cv2/conv/Conv_output_0_calibrated
valid shape: (1,256,20,20,)
aligned shape: (1,256,20,20,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,1600,80,4,)
output[40]:
name: /model.22/cv2.0/cv2.0.0/conv/Conv_output_0_calibrated
valid shape: (1,64,80,80,)
aligned shape: (1,64,80,80,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,25600,320,4,)
output[41]:
name: /model.22/cv3.0/cv3.0.2/Conv_output_0
valid shape: (1,5,80,80,)
aligned shape: (1,5,80,80,)
aligned byte size: 128000
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (128000,25600,320,4,)
output[42]:
name: /model.15/m.0/cv1/conv/Conv_output_0_calibrated
valid shape: (1,32,80,80,)
aligned shape: (1,32,80,80,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,25600,320,4,)
output[43]:
name: /model.21/cv1/conv/Conv_output_0_calibrated
valid shape: (1,256,20,20,)
aligned shape: (1,256,20,20,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,1600,80,4,)
output[44]:
name: /model.18/cv2/conv/Conv_output_0_calibrated
valid shape: (1,128,40,40,)
aligned shape: (1,128,40,40,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,6400,160,4,)
output[45]:
name: /model.4/m.0/cv2/conv/Conv_output_0_calibrated
valid shape: (1,32,80,80,)
aligned shape: (1,32,80,80,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,25600,320,4,)
output[46]:
name: /model.22/cv2.0/cv2.0.1/conv/Conv_output_0_calibrated
valid shape: (1,64,80,80,)
aligned shape: (1,64,80,80,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,25600,320,4,)
output[47]:
name: /model.9/cv1/conv/Conv_output_0_calibrated
valid shape: (1,128,20,20,)
aligned shape: (1,128,20,20,)
aligned byte size: 204800
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (204800,1600,80,4,)
output[48]:
name: /model.6/m.0/cv2/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[49]:
name: /model.18/cv1/conv/Conv_output_0_calibrated
valid shape: (1,128,40,40,)
aligned shape: (1,128,40,40,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,6400,160,4,)
output[50]:
name: /model.15/cv1/conv/Conv_output_0_calibrated
valid shape: (1,64,80,80,)
aligned shape: (1,64,80,80,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,25600,320,4,)
output[51]:
name: /model.22/cv3.1/cv3.1.0/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[52]:
name: /model.2/cv1/conv/Conv_output_0_calibrated
valid shape: (1,32,160,160,)
aligned shape: (1,32,160,160,)
aligned byte size: 3276800
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (3276800,102400,640,4,)
output[53]:
name: /model.22/cv2.1/cv2.1.0/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[54]:
name: /model.22/Mul_2_output_0
valid shape: (1,64,20,20,)
aligned shape: (1,64,20,20,)
aligned byte size: 102400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (102400,1600,80,4,)
output[55]:
name: /model.7/conv/Conv_output_0_calibrated
valid shape: (1,256,20,20,)
aligned shape: (1,256,20,20,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,1600,80,4,)
output[56]:
name: /model.6/cv1/conv/Conv_output_0_calibrated
valid shape: (1,128,40,40,)
aligned shape: (1,128,40,40,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,6400,160,4,)
output[57]:
name: /model.22/cv3.2/cv3.2.1/conv/Conv_output_0_calibrated
valid shape: (1,64,20,20,)
aligned shape: (1,64,20,20,)
aligned byte size: 102400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (102400,1600,80,4,)
output[58]:
name: /model.6/m.0/cv1/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[59]:
name: /model.8/m.0/cv1/conv/Conv_output_0_calibrated
valid shape: (1,128,20,20,)
aligned shape: (1,128,20,20,)
aligned byte size: 204800
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (204800,1600,80,4,)
output[60]:
name: /model.5/conv/Conv_output_0_calibrated
valid shape: (1,128,40,40,)
aligned shape: (1,128,40,40,)
aligned byte size: 819200
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (819200,6400,160,4,)
output[61]:
name: /model.2/cv2/conv/Conv_output_0_calibrated
valid shape: (1,32,160,160,)
aligned shape: (1,32,160,160,)
aligned byte size: 3276800
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (3276800,102400,640,4,)
output[62]:
name: /model.1/conv/Conv_output_0_calibrated
valid shape: (1,32,160,160,)
aligned shape: (1,32,160,160,)
aligned byte size: 3276800
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (3276800,102400,640,4,)
output[63]:
name: /model.22/cv3.1/cv3.1.1/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[64]:
name: /model.2/m.0/cv2/conv/Conv_output_0_calibrated
valid shape: (1,16,160,160,)
aligned shape: (1,16,160,160,)
aligned byte size: 1638400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (1638400,102400,640,4,)
output[65]:
name: /model.12/m.0/cv1/conv/Conv_output_0_calibrated
valid shape: (1,64,40,40,)
aligned shape: (1,64,40,40,)
aligned byte size: 409600
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (409600,6400,160,4,)
output[66]:
name: /model.22/cv3.2/cv3.2.2/Conv_output_0
valid shape: (1,5,20,20,)
aligned shape: (1,5,20,20,)
aligned byte size: 8000
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (8000,1600,80,4,)
output[67]:
name: /model.22/cv2.2/cv2.2.1/conv/Conv_output_0_calibrated
valid shape: (1,64,20,20,)
aligned shape: (1,64,20,20,)
aligned byte size: 102400
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (102400,1600,80,4,)
output[68]:
name: /model.8/m.0/cv2/conv/Conv_output_0_calibrated
valid shape: (1,128,20,20,)
aligned shape: (1,128,20,20,)
aligned byte size: 204800
tensor type: HB_DNN_TENSOR_TYPE_F32
tensor layout: HB_DNN_LAYOUT_NCHW
quanti type: NONE
stride: (204800,1600,80,4,)
运行tros如下
root@ubuntu:/home/sunrise/yolov8# ros2 launch dnn_node_example dnn_node_example_feedback.launch.py dnn_example_config_file:=my_config/yolov8workconfig.json dnn_example_image:=my_config/target.jpg
[INFO] [launch]: All log files can be found below /root/.ros/log/2026-04-19-13-42-26-517237-ubuntu-76735
[INFO] [launch]: Default logging verbosity is set to INFO
dnn_node_example_path is /opt/tros/humble/lib/dnn_node_example
cp_cmd is cp -r /opt/tros/humble/lib/dnn_node_example/config .
[INFO] [example-1]: process started with pid [76752]
[example-1] [WARN] [1776577347.119003195] [dnn_example_node]: Parameter:
[example-1] feed_type(0:local, 1:sub): 0
[example-1] image: my_config/target.jpg
[example-1] image_type: 0
[example-1] dump_render_img: 1
[example-1] is_shared_mem_sub: 0
[example-1] config_file: my_config/yolov8workconfig.json
[example-1] msg_pub_topic_name: hobot_dnn_detection
[example-1] info_msg_pub_topic_name: hobot_dnn_detection_info
[example-1] ros_img_topic_name: /image
[example-1] sharedmem_img_topic_name: /hbmem_img
[example-1] [WARN] [1776577347.119595279] [dnn_example_node]: Load [5] class types from file [my_config/cow.list]
[example-1] [WARN] [1776577347.119719280] [dnn_example_node]: Parameter:
[example-1] model_file_name: /home/sunrise/yolov8/cow6.bin
[example-1] model_name:
[example-1] [INFO] [1776577347.119801821] [dnn]: Node init.
[example-1] [INFO] [1776577347.119825946] [dnn_example_node]: Set node para.
[example-1] [WARN] [1776577347.119865113] [dnn_example_node]: model_file_name_: /home/sunrise/yolov8/cow6.bin, task_num: 4
[example-1] [INFO] [1776577347.119911863] [dnn]: Model init.
[example-1] [BPU_PLAT]BPU Platform Version(1.3.6)! soc info(x5)
[example-1] [HBRT] set log level as 0. version = 3.15.55.0
[example-1] [DNN] Runtime version = 1.24.5_(3.15.55 HBRT)
[example-1] [A][DNN][packed_model.cpp:247]Model [HorizonRT] The model builder version = 1.24.3
[example-1] [INFO] [1776577347.305772601] [dnn]: The model input 0 width is 640 and height is 640
[example-1] [INFO] [1776577347.306448727] [dnn]:
[example-1] Model Info:
[example-1] name: yolov8_cow.
[example-1] [input]
[example-1] - (0) Layout: NCHW, Shape: [1, 3, 640, 640], Type: HB_DNN_IMG_TYPE_NV12.
[example-1] [output]
[example-1] - (0) Layout: NHWC, Shape: [1, 80, 80, 5], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (1) Layout: NONE, Shape: [1, 80, 80, 64], Type: HB_DNN_TENSOR_TYPE_S32.
[example-1] - (2) Layout: NHWC, Shape: [1, 40, 40, 5], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (3) Layout: NONE, Shape: [1, 40, 40, 64], Type: HB_DNN_TENSOR_TYPE_S32.
[example-1] - (4) Layout: NHWC, Shape: [1, 20, 20, 5], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (5) Layout: NONE, Shape: [1, 20, 20, 64], Type: HB_DNN_TENSOR_TYPE_S32.
[example-1] - (6) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (7) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (8) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (9) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (10) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (11) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (12) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (13) Layout: NCHW, Shape: [1, 16, 320, 320], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (14) Layout: NCHW, Shape: [1, 64, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (15) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (16) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (17) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (18) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (19) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (20) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (21) Layout: NCHW, Shape: [1, 16, 160, 160], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (22) Layout: NCHW, Shape: [1, 64, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (23) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (24) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (25) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (26) Layout: NCHW, Shape: [1, 5, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (27) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (28) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (29) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (30) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (31) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (32) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (33) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (34) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (35) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (36) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (37) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (38) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (39) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (40) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (41) Layout: NCHW, Shape: [1, 5, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (42) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (43) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (44) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (45) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (46) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (47) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (48) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (49) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (50) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (51) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (52) Layout: NCHW, Shape: [1, 32, 160, 160], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (53) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (54) Layout: NCHW, Shape: [1, 64, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (55) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (56) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (57) Layout: NCHW, Shape: [1, 64, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (58) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (59) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (60) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (61) Layout: NCHW, Shape: [1, 32, 160, 160], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (62) Layout: NCHW, Shape: [1, 32, 160, 160], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (63) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (64) Layout: NCHW, Shape: [1, 16, 160, 160], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (65) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (66) Layout: NCHW, Shape: [1, 5, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (67) Layout: NCHW, Shape: [1, 64, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (68) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1]
[example-1] [INFO] [1776577347.307014061] [dnn]: Task init.
[example-1] [INFO] [1776577347.308873730] [dnn]: Set task_num [4]
[example-1] [WARN] [1776577347.309022147] [dnn_example_node]: Get model name: yolov8_cow from load model.
[example-1] [INFO] [1776577347.309144647] [dnn_example_node]: The model input width is 640 and height is 640
[example-1] [WARN] [1776577347.309201564] [dnn_example_node]: Create ai msg publisher with topic_name: hobot_dnn_detection
[example-1] [INFO] [1776577347.322635165] [dnn_example_node]: Dnn node feed with local image: my_config/target.jpg
[example-1] [INFO] [1776577347.432357722] [dnn_example_node]: Output from frame_id: feedback, stamp: 0.0
[example-1] [ERROR] [1776577347.432572014] [dnn_example_node]: Inlvaid parser: 0
其中我的yolov8workconfig.json如下:
{
“model_file”: “/home/sunrise/yolov8/cow6.bin”,
“task_num”: 4,
“dnn_parser”: “yolov8”,
“model_output_count”: 6,
“reg_max”: 16,
“class_num”: 5,
“cls_names_list”: “my_config/cow.list”,
“strides”: [8, 16, 32],
“score_threshold”: 0.25,
“nms_threshold”: 0.7,
“nms_top_k”: 300,
“output_order”: [0, 1, 2, 3, 4, 5]
}
方案二我已经检查过了,附上我的py文件
Copyright (c) 2025 D-Robotics Corporation
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
“”"YOLO26 Detection ONNX Export Script.
This script exports a YOLO26 detection model to a BPU-optimized ONNX format.
It modifies the `Detect` head to output raw feature maps in NHWC layout.
Usage:
python3 export_yolo26_detect_bpu.py --weights yolo26n.pt --output yolo26n_det_bpu.onnx
“”"
import os
import shutil
import argparse
import torch
from ultralytics import YOLO
from ultralytics.nn.modules import Detect
def main():
“”“Main entry point for detection model export.”“”
parser = argparse.ArgumentParser(description=“YOLO26 Detect Export Script”)
parser.add_argument(‘–weights’, type=str, required=True, help=‘Path to YOLO26 .pt model’)
parser.add_argument(‘–output’, type=str, default=‘yolo26_det_bpu.onnx’, help=‘Output ONNX path’)
parser.add_argument(‘–imgsz’, type=int, default=640, help=‘Input image size’)
args = parser.parse_args()
export_bpu_onnx(args.weights, args.output, args.imgsz)
def bpu_detect_forward(self, x):
result = []
for i in range(self.nl):
# bbox 分支:保持 float32,不要转 int32!
bbox = self.cv2[i](x[i]) # (B, 4*reg_max, H, W)
# cls 分支:保持 float32
cls = self.cv3\[i\](x\[i\]) # (B, nc, H, W)
# 关键:先 permute 再调整顺序
# 1. NCHW -> NHWC
bbox = bbox.permute(0, 2, 3, 1).contiguous() # (B, H, W, 4\*reg_max)
cls = cls.permute(0, 2, 3, 1).contiguous() # (B, H, W, nc)
# 2. 输出顺序:先 cls 后 bbox(匹配官方)
result.append(cls)
result.append(bbox)
return result
def export_bpu_onnx(model_path: str, output_name: str = “yolo26_bpu.onnx”, imgsz: int = 640):
“”“Export YOLO26 model to BPU-friendly ONNX.”“”
print(f"Loading model: {model_path}…“)
try:
model = YOLO(model_path)
except Exception as e:
print(f"Error loading model: {e}”)
return
print("Applying BPU Monkey Patch (Output Layout: NHWC)...")
Detect.forward = bpu_detect_forward
print(f"Starting export (imgsz={imgsz})...")
try:
exported_path = model.export(
format="onnx",
imgsz=imgsz,
dynamic=False,
opset=11,
simplify=True
)
except Exception as e:
print(f"Export exception: {e}")
return
if exported_path:
if output_name and exported_path != output_name:
out_dir = os.path.dirname(output_name)
if out_dir:
os.makedirs(out_dir, exist_ok=True)
shutil.move(exported_path, output_name)
print(f"Renamed output to: {output_name}")
return output_name
return exported_path
else:
print("❌ Export failed.")
return None
if _name_ == “_main_”:
main()
关于方案三,我使用export_monkey_patch.py,加上imgsz导出640大小的onnx,使用hb_mapper导出bin的时候通过日志发现模型是NHWC格式,并且bbox是F32而不是S32
附上日志:
root@46a86a8809fe:/data# hb_mapper makertbin --model-type onnx --config yolov8.yaml
2026-04-19 13:45:31,533 INFO log will be stored in /data/hb_mapper_makertbin.log
2026-04-19 13:45:31,534 INFO Start hb_mapper…
2026-04-19 13:45:31,535 INFO hbdk version 3.49.15
2026-04-19 13:45:31,536 INFO horizon_nn version 1.1.0
2026-04-19 13:45:31,537 INFO hb_mapper version 1.24.3
2026-04-19 13:45:31,537 INFO Start Model Convert…
2026-04-19 13:45:31,543 INFO Using onnx model file: /data/best.onnx
2026-04-19 13:45:31,620 INFO Model has 1 inputs according to model file
2026-04-19 13:45:31,623 INFO Model input shape not given in yaml_file, using shape from model file: [[1, 3, 640, 640]]
2026-04-19 13:45:31,623 INFO nv12 input type rt received.
2026-04-19 13:45:31,626 WARNING The calibration dir name suffix is not the same as the value float32 of the parameter cal_data_type, the parameter setting will prevail
2026-04-19 13:45:31,628 INFO custom_op does not exist, skipped
2026-04-19 13:45:31,631 WARNING Input node images’s input_source not set, it will be set to pyramid by default
2026-04-19 13:45:31,640 INFO *******************************************
2026-04-19 13:45:31,641 INFO First calibration picture name: 000d64dae0250e8b.bin
2026-04-19 13:45:31,641 INFO First calibration picture md5:
056d797381f1224d368ed8c3fc8c71db /data/cal_bin/000d64dae0250e8b.bin
2026-04-19 13:45:31,687 INFO *******************************************
2026-04-19 13:45:40,032 INFO Start to Horizon NN Model Convert.
2026-04-19 13:45:40,110 INFO Loading horizon_nn debug methods:{‘dump_all_layers_output’, ‘dump_all_models’, ‘check_model_output_consistency’}
2026-04-19 13:45:40,112 INFO The activation calibration parameters:
calibration_type: [‘max’, ‘kl’]
max_percentile: [0.99995, 1.0]
per_channel: [True, False]
asymmetric: [True, False]
The modelwise search parameters:
similarity: 0.995
metric: cosine-similarity
2026-04-19 13:45:40,113 INFO input images is from pyramid. Its layout is set to NHWC
2026-04-19 13:45:40,114 INFO The specified model compilation architecture: bayes-e.
2026-04-19 13:45:40,115 INFO The specified model compilation optimization parameters: .
2026-04-19 13:45:40,118 INFO Start to prepare the onnx model.
2026-04-19 13:45:40,127 INFO Input ONNX Model Information:
ONNX IR version: 6
Opset version: [‘ai.onnx v11’, ‘horizon v1’]
Producer: pytorch v2.10.0
Domain: None
Version: None
Graph input:
images: shape=[1, 3, 640, 640], dtype=FLOAT32
Graph output:
output0: shape=[1, 80, 80, 5], dtype=FLOAT32
324: shape=[1, 80, 80, 64], dtype=FLOAT32
332: shape=[1, 40, 40, 5], dtype=FLOAT32
340: shape=[1, 40, 40, 64], dtype=FLOAT32
348: shape=[1, 20, 20, 5], dtype=FLOAT32
356: shape=[1, 20, 20, 64], dtype=FLOAT32
2026-04-19 13:45:40,318 INFO End to prepare the onnx model.
2026-04-19 13:45:40,473 INFO Saving model to: yolov8_cow_original_float_model.onnx.
2026-04-19 13:45:40,474 INFO Start to optimize the onnx model.
2026-04-19 13:45:40,817 INFO End to optimize the onnx model.
2026-04-19 13:45:40,973 INFO Saving model to: yolov8_cow_optimized_float_model.onnx.
2026-04-19 13:45:40,974 INFO Start to calibrate the model.
2026-04-19 13:45:41,061 INFO There are 117 samples in the data set.
2026-04-19 13:45:41,062 INFO Run calibration model with modelwise search method.
2026-04-19 13:45:41,218 INFO Calibration using batch 8
calibration in progress: 100%|██████████████████████████████████████████████████████████| 15/15 [00:57<00:00, 3.82s/it]
2026-04-19 13:46:42,953 INFO Select max-percentile:percentile=0.99995 method.
2026-04-19 13:46:43,474 INFO End to calibrate the model.
2026-04-19 13:46:43,643 INFO Saving model to: yolov8_cow_calibrated_model.onnx.
2026-04-19 13:46:43,645 INFO Start to quantize the model.
2026-04-19 13:46:44,561 INFO End to quantize the model.
2026-04-19 13:46:44,636 INFO Saving model to: yolov8_cow_quantized_model.onnx.
2026-04-19 13:46:44,637 INFO Start to compile the model with march bayes-e.
2026-04-19 13:46:44,945 INFO Compile submodel: main_graph_subgraph_0
2026-04-19 13:46:44,963 INFO hbdk-cc parameters:[‘–O3’, ‘–debug’, ‘–core-num’, ‘1’, ‘–fast’, ‘–input-layout’, ‘NHWC’, ‘–output-layout’, ‘NHWC’, ‘–input-source’, ‘pyramid’]
[==================================================] 100%
2026-04-19 13:47:33,801 INFO consumed time 48.8013
2026-04-19 13:47:33,846 INFO hbir_model has been saved as : main_graph_subgraph_0.hbir
2026-04-19 13:47:33,934 INFO FPS=185.22, latency = 5399.0 us, DDR = 30052672 bytes (see main_graph_subgraph_0.html)
2026-04-19 13:47:34,858 INFO core[0] open!
2026-04-19 13:47:36,786 INFO The consistency check between the quantized model and the hybrid model is passed.
2026-04-19 13:47:36,800 INFO End to compile the model with march bayes-e.
2026-04-19 13:47:36,835 INFO Saving model to: yolov8_cow_hybrid_model.onnx.
2026-04-19 13:47:38,134 INFO The main quantized node information:
Node ON Subgraph Type Cosine Similarity Threshold DataType
HZ_PREPROCESS_FOR_images BPU id(0) HzSQuantizedPreprocess 1.000009 127.0 int8
/model.0/conv/Conv BPU id(0) HzSQuantizedConv 0.999306 1.07178 int8
/model.0/act/Mul BPU id(0) HzLut 0.998523 44.9276 int8
/model.1/conv/Conv BPU id(0) HzSQuantizedConv 0.997315 43.7112 int8
/model.1/act/Mul BPU id(0) HzLut 0.996509 97.4329 int8
/model.2/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.995724 85.8268 int8
/model.2/cv1/act/Mul BPU id(0) HzLut 0.992907 58.9216 int8
/model.2/Split BPU id(0) Split 0.992610 19.3494 int8
/model.2/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.988938 19.3494 int8
/model.2/m.0/cv1/act/Mul BPU id(0) HzLut 0.987071 28.4779 int8
/model.2/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.981921 19.8498 int8
/model.2/m.0/cv2/act/Mul BPU id(0) HzLut 0.987032 23.9524 int8
/model.2/m.0/Add BPU id(0) HzSElementwiseAdd 0.991373 19.3494 int8
/model.2/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.2/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.2/Concat BPU id(0) Concat 0.991893 19.3494 int8
/model.2/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.992038 19.9787 int8
/model.2/cv2/act/Mul BPU id(0) HzLut 0.990273 20.7856 int8
/model.3/conv/Conv BPU id(0) HzSQuantizedConv 0.991211 9.2066 int8
/model.3/act/Mul BPU id(0) HzLut 0.994285 7.15196 int8
/model.4/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.989004 5.72144 int8
/model.4/cv1/act/Mul BPU id(0) HzLut 0.989424 7.98329 int8
/model.4/Split BPU id(0) Split 0.983615 5.44963 int8
/model.4/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.991908 5.44963 int8
/model.4/m.0/cv1/act/Mul BPU id(0) HzLut 0.988910 5.61583 int8
/model.4/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.991004 3.6266 int8
/model.4/m.0/cv2/act/Mul BPU id(0) HzLut 0.991566 6.06252 int8
/model.4/m.0/Add BPU id(0) HzSElementwiseAdd 0.994907 5.44963 int8
/model.4/m.1/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.994576 4.99989 int8
/model.4/m.1/cv1/act/Mul BPU id(0) HzLut 0.988334 5.698 int8
/model.4/m.1/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.991644 2.78232 int8
/model.4/m.1/cv2/act/Mul BPU id(0) HzLut 0.992371 8.10138 int8
/model.4/m.1/Add BPU id(0) HzSElementwiseAdd 0.995535 4.99989 int8
/model.4/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.4/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.4/m.0/Add_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.4/Concat BPU id(0) Concat 0.994123 5.44963 int8
/model.4/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.989767 7.68554 int8
/model.4/cv2/act/Mul BPU id(0) HzLut 0.987519 6.59122 int8
/model.5/conv/Conv BPU id(0) HzSQuantizedConv 0.992515 4.70123 int8
/model.5/act/Mul BPU id(0) HzLut 0.989719 6.38966 int8
/model.6/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.986798 4.37084 int8
/model.6/cv1/act/Mul BPU id(0) HzLut 0.984164 12.3768 int8
/model.6/Split BPU id(0) Split 0.979898 5.71071 int8
/model.6/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.995449 5.71071 int8
/model.6/m.0/cv1/act/Mul BPU id(0) HzLut 0.987673 7.174 int8
/model.6/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.993948 5.07718 int8
/model.6/m.0/cv2/act/Mul BPU id(0) HzLut 0.989842 7.42397 int8
/model.6/m.0/Add BPU id(0) HzSElementwiseAdd 0.992242 5.71071 int8
/model.6/m.1/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.996390 4.64337 int8
/model.6/m.1/cv1/act/Mul BPU id(0) HzLut 0.990427 7.07218 int8
/model.6/m.1/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.992205 3.9258 int8
/model.6/m.1/cv2/act/Mul BPU id(0) HzLut 0.991793 9.65781 int8
/model.6/m.1/Add BPU id(0) HzSElementwiseAdd 0.993147 4.64337 int8
/model.6/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.6/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.6/m.0/Add_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.6/Concat BPU id(0) Concat 0.990551 5.71071 int8
/model.6/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.992268 6.77558 int8
/model.6/cv2/act/Mul BPU id(0) HzLut 0.985072 6.14342 int8
/model.7/conv/Conv BPU id(0) HzSQuantizedConv 0.993254 4.11528 int8
/model.7/act/Mul BPU id(0) HzLut 0.982350 7.50737 int8
/model.8/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.989722 4.49329 int8
/model.8/cv1/act/Mul BPU id(0) HzLut 0.980262 8.54441 int8
/model.8/Split BPU id(0) Split 0.978164 6.70584 int8
/model.8/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.994151 6.70584 int8
/model.8/m.0/cv1/act/Mul BPU id(0) HzLut 0.986955 8.01158 int8
/model.8/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.990498 5.38623 int8
/model.8/m.0/cv2/act/Mul BPU id(0) HzLut 0.987479 11.455 int8
/model.8/m.0/Add BPU id(0) HzSElementwiseAdd 0.986635 6.70584 int8
/model.8/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.8/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.8/Concat BPU id(0) Concat 0.984197 6.70584 int8
/model.8/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.991644 8.30792 int8
/model.8/cv2/act/Mul BPU id(0) HzLut 0.982905 8.37771 int8
/model.9/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.995496 5.30499 int8
/model.9/m/MaxPool BPU id(0) HzQuantizedMaxPool 0.998324 9.13078 int8
/model.9/m_1/MaxPool BPU id(0) HzQuantizedMaxPool 0.998622 9.13078 int8
/model.9/m_2/MaxPool BPU id(0) HzQuantizedMaxPool 0.998724 9.13078 int8
/model.9/Concat BPU id(0) Concat 0.998318 9.13078 int8
/model.9/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.996129 9.13078 int8
/model.9/cv2/act/Mul BPU id(0) HzLut 0.986994 7.95677 int8
/model.10/Resize BPU id(0) HzQuantizedResizeUpsample 0.987031 4.43933 int8
/model.10/Resize_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
…el.6/cv2/act/Mul_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.11/Concat BPU id(0) Concat 0.985606 4.43933 int8
/model.12/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.990595 3.56978 int8
/model.12/cv1/act/Mul BPU id(0) HzLut 0.986324 7.13419 int8
/model.12/Split BPU id(0) Split 0.980583 4.1769 int8
/model.12/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.993081 4.1769 int8
/model.12/m.0/cv1/act/Mul BPU id(0) HzLut 0.980567 7.40809 int8
/model.12/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.986908 3.37112 int8
/model.12/m.0/cv2/act/Mul BPU id(0) HzLut 0.983853 7.25208 int8
/model.12/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.12/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.12/Concat BPU id(0) Concat 0.985386 4.1769 int8
/model.12/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.988707 4.41829 int8
/model.12/cv2/act/Mul BPU id(0) HzLut 0.983041 6.88971 int8
/model.13/Resize BPU id(0) HzQuantizedResizeUpsample 0.983083 4.81467 int8
/model.13/Resize_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
…el.4/cv2/act/Mul_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.14/Concat BPU id(0) Concat 0.984969 4.81467 int8
/model.15/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.992850 4.14975 int8
/model.15/cv1/act/Mul BPU id(0) HzLut 0.993870 6.30765 int8
/model.15/Split BPU id(0) Split 0.988977 2.93748 int8
/model.15/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.992879 2.93748 int8
/model.15/m.0/cv1/act/Mul BPU id(0) HzLut 0.990125 5.021 int8
/model.15/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.989580 2.31791 int8
/model.15/m.0/cv2/act/Mul BPU id(0) HzLut 0.993056 5.5557 int8
/model.15/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.15/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.15/Concat BPU id(0) Concat 0.993438 2.93748 int8
/model.15/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.992210 4.46321 int8
/model.15/cv2/act/Mul BPU id(0) HzLut 0.992267 6.09916 int8
/model.16/conv/Conv BPU id(0) HzSQuantizedConv 0.988701 3.92067 int8
/model.16/act/Mul BPU id(0) HzLut 0.982522 6.16259 int8
/model.17/Concat BPU id(0) Concat 0.982861 4.81467 int8
/model.18/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.986413 4.81467 int8
/model.18/cv1/act/Mul BPU id(0) HzLut 0.981293 6.49756 int8
/model.18/Split BPU id(0) Split 0.970992 4.96917 int8
/model.18/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.990424 4.96917 int8
/model.18/m.0/cv1/act/Mul BPU id(0) HzLut 0.985177 6.37805 int8
/model.18/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.979504 3.42796 int8
/model.18/m.0/cv2/act/Mul BPU id(0) HzLut 0.975203 10.3212 int8
/model.18/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.18/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.18/Concat BPU id(0) Concat 0.977591 4.96917 int8
/model.18/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.987361 7.21077 int8
/model.18/cv2/act/Mul BPU id(0) HzLut 0.983778 9.31555 int8
/model.19/conv/Conv BPU id(0) HzSQuantizedConv 0.987526 4.26326 int8
/model.19/act/Mul BPU id(0) HzLut 0.971063 7.97608 int8
/model.20/Concat BPU id(0) Concat 0.979784 4.43933 int8
/model.21/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.986442 4.43933 int8
/model.21/cv1/act/Mul BPU id(0) HzLut 0.976965 9.6443 int8
/model.21/Split BPU id(0) Split 0.971172 5.49813 int8
/model.21/m.0/cv1/conv/Conv BPU id(0) HzSQuantizedConv 0.990244 5.49813 int8
/model.21/m.0/cv1/act/Mul BPU id(0) HzLut 0.975875 8.72303 int8
/model.21/m.0/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.982620 5.67331 int8
/model.21/m.0/cv2/act/Mul BPU id(0) HzLut 0.975880 12.0848 int8
/model.21/Split_output_0_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.21/Split_output_1_calibrated_Requantize BPU id(0) HzRequantize – – int8
/model.21/Concat BPU id(0) Concat 0.976020 5.49813 int8
/model.21/cv2/conv/Conv BPU id(0) HzSQuantizedConv 0.989450 8.53894 int8
/model.21/cv2/act/Mul BPU id(0) HzLut 0.976016 14.9993 int8
/model.22/cv3.0/cv3.0.0/conv/Conv BPU id(0) HzSQuantizedConv 0.981332 3.92067 int8
/model.22/cv3.0/cv3.0.0/act/Mul BPU id(0) HzLut 0.978545 6.39436 int8
/model.22/cv3.0/cv3.0.1/conv/Conv BPU id(0) HzSQuantizedConv 0.984597 5.5214 int8
/model.22/cv3.0/cv3.0.1/act/Mul BPU id(0) HzLut 0.985793 8.44081 int8
/model.22/cv3.0/cv3.0.2/Conv BPU id(0) HzSQuantizedConv 0.999448 8.37818 int8
/model.22/Transpose CPU – Transpose 0.999448 – float
/model.22/cv2.0/cv2.0.0/conv/Conv BPU id(0) HzSQuantizedConv 0.988758 3.92067 int8
/model.22/cv2.0/cv2.0.0/act/Mul BPU id(0) HzLut 0.984308 8.49597 int8
/model.22/cv2.0/cv2.0.1/conv/Conv BPU id(0) HzSQuantizedConv 0.986237 5.26952 int8
/model.22/cv2.0/cv2.0.1/act/Mul BPU id(0) HzLut 0.986819 20.0159 int8
/model.22/cv2.0/cv2.0.2/Conv BPU id(0) HzSQuantizedConv 0.990909 19.4194 int8
/model.22/Transpose_1 CPU – Transpose 0.990909 – float
/model.22/cv3.1/cv3.1.0/conv/Conv BPU id(0) HzSQuantizedConv 0.976600 4.26326 int8
/model.22/cv3.1/cv3.1.0/act/Mul BPU id(0) HzLut 0.976541 8.45732 int8
/model.22/cv3.1/cv3.1.1/conv/Conv BPU id(0) HzSQuantizedConv 0.983007 7.62087 int8
/model.22/cv3.1/cv3.1.1/act/Mul BPU id(0) HzLut 0.983587 14.3788 int8
/model.22/cv3.1/cv3.1.2/Conv BPU id(0) HzSQuantizedConv 0.999004 14.0453 int8
/model.22/Transpose_2 CPU – Transpose 0.999004 – float
/model.22/cv2.1/cv2.1.0/conv/Conv BPU id(0) HzSQuantizedConv 0.983575 4.26326 int8
/model.22/cv2.1/cv2.1.0/act/Mul BPU id(0) HzLut 0.983002 14.1845 int8
/model.22/cv2.1/cv2.1.1/conv/Conv BPU id(0) HzSQuantizedConv 0.988803 7.72667 int8
/model.22/cv2.1/cv2.1.1/act/Mul BPU id(0) HzLut 0.988968 22.3114 int8
/model.22/cv2.1/cv2.1.2/Conv BPU id(0) HzSQuantizedConv 0.992698 22.1627 int8
/model.22/Transpose_3 CPU – Transpose 0.992697 – float
/model.22/cv3.2/cv3.2.0/conv/Conv BPU id(0) HzSQuantizedConv 0.982606 5.28644 int8
/model.22/cv3.2/cv3.2.0/act/Mul BPU id(0) HzLut 0.979600 10.3133 int8
/model.22/cv3.2/cv3.2.1/conv/Conv BPU id(0) HzSQuantizedConv 0.983940 9.61694 int8
/model.22/cv3.2/cv3.2.1/act/Mul BPU id(0) HzLut 0.985166 17.8943 int8
/model.22/cv3.2/cv3.2.2/Conv BPU id(0) HzSQuantizedConv 0.997589 17.6595 int8
/model.22/Transpose_4 CPU – Transpose 0.997589 – float
/model.22/cv2.2/cv2.2.0/conv/Conv BPU id(0) HzSQuantizedConv 0.989705 5.28644 int8
/model.22/cv2.2/cv2.2.0/act/Mul BPU id(0) HzLut 0.986526 11.5501 int8
/model.22/cv2.2/cv2.2.1/conv/Conv BPU id(0) HzSQuantizedConv 0.990666 9.45998 int8
/model.22/cv2.2/cv2.2.1/act/Mul BPU id(0) HzLut 0.991346 20.9386 int8
/model.22/cv2.2/cv2.2.2/Conv BPU id(0) HzSQuantizedConv 0.995579 20.7491 int8
/model.22/Transpose_5 CPU – Transpose 0.995579 – float
2026-04-19 13:47:38,137 INFO The quantized model output:
Output Cosine Similarity L1 Distance L2 Distance Chebyshev Distance
output0 0.999448 0.492888 0.003710 5.550701
324 0.990909 0.389095 0.000876 5.726426
332 0.999004 0.564130 0.009112 7.719759
340 0.992697 0.374265 0.001711 4.801188
348 0.997589 0.781466 0.028093 10.940637
356 0.995579 0.284901 0.002612 3.704115
/model.22/cv2.1/cv2.1.2/Conv_output_0 0.992698 0.374265 0.001711 4.801188
/model.9/cv1/conv/Conv_output_0_calibrated 0.995496 0.124000 0.000741 1.093799
/model.16/conv/Conv_output_0_calibrated 0.988701 0.138482 0.000586 2.033508
/model.22/cv2.2/cv2.2.2/Conv_output_0 0.995579 0.284901 0.002612 3.704115
/model.1/conv/Conv_output_0_calibrated 0.997315 0.422460 0.000632 17.888557
/model.4/m.0/cv2/conv/Conv_output_0_calibrated 0.991004 0.122926 0.000369 2.342625
/model.18/cv1/conv/Conv_output_0_calibrated 0.986413 0.153137 0.000460 2.346108
/model.4/m.1/cv2/conv/Conv_output_0_calibrated 0.991644 0.168169 0.000495 2.314514
/model.4/m.1/cv1/conv/Conv_output_0_calibrated 0.994576 0.115666 0.000336 1.452027
/model.5/conv/Conv_output_0_calibrated 0.992515 0.119547 0.000360 1.714721
…22/cv3.1/cv3.1.1/conv/Conv_output_0_calibrated 0.983007 0.170171 0.000772 4.700251
/model.22/cv2.0/cv2.0.2/Conv_output_0 0.990909 0.389095 0.000876 5.726426
/model.4/cv2/conv/Conv_output_0_calibrated 0.989767 0.127648 0.000272 1.948580
/model.21/m.0/cv1/conv/Conv_output_0_calibrated 0.990244 0.164896 0.001032 2.578416
/model.12/cv1/conv/Conv_output_0_calibrated 0.990595 0.151944 0.000453 1.880934
/model.2/cv1/conv/Conv_output_0_calibrated 0.995724 0.259917 0.000409 15.297455
/model.0/conv/Conv_output_0_calibrated 0.999306 0.112691 0.000118 4.035484
/model.2/m.0/cv1/conv/Conv_output_0_calibrated 0.988938 0.428464 0.000873 6.779032
/model.6/m.0/cv1/conv/Conv_output_0_calibrated 0.995449 0.128251 0.000529 1.468667
/model.18/m.0/cv1/conv/Conv_output_0_calibrated 0.990424 0.131262 0.000562 1.769343
…22/cv3.1/cv3.1.0/conv/Conv_output_0_calibrated 0.976600 0.160925 0.000734 4.337944
/model.21/m.0/cv2/conv/Conv_output_0_calibrated 0.982620 0.209325 0.001323 3.078192
…22/cv2.1/cv2.1.0/conv/Conv_output_0_calibrated 0.983575 0.190600 0.000922 6.573485
/model.6/cv1/conv/Conv_output_0_calibrated 0.986798 0.147393 0.000512 4.453465
/model.22/cv3.1/cv3.1.2/Conv_output_0 0.999004 0.564130 0.009112 7.719759
/model.12/m.0/cv2/conv/Conv_output_0_calibrated 0.986908 0.144497 0.000613 2.159184
/model.9/cv2/conv/Conv_output_0_calibrated 0.996129 0.124609 0.000515 1.061943
…22/cv2.2/cv2.2.1/conv/Conv_output_0_calibrated 0.990666 0.250467 0.002387 3.593115
/model.18/m.0/cv2/conv/Conv_output_0_calibrated 0.979504 0.208189 0.000933 9.430080
/model.6/m.1/cv1/conv/Conv_output_0_calibrated 0.996390 0.109324 0.000453 1.054392
/model.15/cv2/conv/Conv_output_0_calibrated 0.992210 0.105636 0.000240 2.264639
…22/cv2.0/cv2.0.0/conv/Conv_output_0_calibrated 0.988758 0.142338 0.000310 2.524422
/model.21/cv2/conv/Conv_output_0_calibrated 0.989450 0.159946 0.000728 3.083925
/model.6/m.0/cv2/conv/Conv_output_0_calibrated 0.993948 0.098657 0.000419 1.644034
/model.2/cv2/conv/Conv_output_0_calibrated 0.992038 0.202271 0.000305 4.776224
/model.2/m.0/cv2/conv/Conv_output_0_calibrated 0.981921 0.482070 0.001050 8.163872
/model.15/cv1/conv/Conv_output_0_calibrated 0.992850 0.103285 0.000227 1.617227
/model.12/m.0/cv1/conv/Conv_output_0_calibrated 0.993081 0.135487 0.000561 1.500420
/model.6/m.1/cv2/conv/Conv_output_0_calibrated 0.992205 0.150869 0.000641 1.880284
/model.6/cv2/conv/Conv_output_0_calibrated 0.992268 0.122963 0.000371 1.901886
/model.18/cv2/conv/Conv_output_0_calibrated 0.987361 0.131353 0.000438 4.079590
/model.12/cv2/conv/Conv_output_0_calibrated 0.988707 0.134350 0.000406 4.422950
…22/cv3.2/cv3.2.1/conv/Conv_output_0_calibrated 0.983940 0.174141 0.001610 4.139734
…22/cv3.0/cv3.0.1/conv/Conv_output_0_calibrated 0.984597 0.194169 0.000409 2.694091
/model.4/m.0/cv1/conv/Conv_output_0_calibrated 0.991908 0.119743 0.000352 1.274290
/model.8/cv1/conv/Conv_output_0_calibrated 0.989722 0.164648 0.000726 2.283880
/model.19/conv/Conv_output_0_calibrated 0.987526 0.129650 0.000843 2.476458
…22/cv2.1/cv2.1.1/conv/Conv_output_0_calibrated 0.988803 0.288123 0.001399 7.793471
/model.4/cv1/conv/Conv_output_0_calibrated 0.989004 0.138659 0.000313 4.213844
/model.15/m.0/cv2/conv/Conv_output_0_calibrated 0.989580 0.128059 0.000385 2.978722
…22/cv3.2/cv3.2.0/conv/Conv_output_0_calibrated 0.982606 0.139985 0.001240 2.911432
/model.7/conv/Conv_output_0_calibrated 0.993254 0.134444 0.000565 1.425202
…22/cv3.0/cv3.0.0/conv/Conv_output_0_calibrated 0.981332 0.174401 0.000360 2.126180
/model.22/cv3.0/cv3.0.2/Conv_output_0 0.999448 0.492888 0.003710 5.550701
/model.3/conv/Conv_output_0_calibrated 0.991211 0.149960 0.000316 2.181579
…22/cv2.2/cv2.2.0/conv/Conv_output_0_calibrated 0.989705 0.173552 0.001552 2.350510
…22/cv2.0/cv2.0.1/conv/Conv_output_0_calibrated 0.986237 0.350213 0.000808 6.315136
/model.8/m.0/cv2/conv/Conv_output_0_calibrated 0.990498 0.208450 0.001230 1.857572
/model.22/cv3.2/cv3.2.2/Conv_output_0 0.997589 0.781466 0.028093 10.940637
/model.15/m.0/cv1/conv/Conv_output_0_calibrated 0.992879 0.108859 0.000317 1.131733
/model.8/m.0/cv1/conv/Conv_output_0_calibrated 0.994151 0.152295 0.000904 1.609603
/model.8/cv2/conv/Conv_output_0_calibrated 0.991644 0.160085 0.000675 1.577124
/model.21/cv1/conv/Conv_output_0_calibrated 0.986442 0.166829 0.000756 3.717987
2026-04-19 13:47:38,154 INFO End to Horizon NN Model Convert.
2026-04-19 13:47:38,195 INFO start convert to *.bin file…
2026-04-19 13:47:38,215 INFO ONNX model output num : 69
2026-04-19 13:47:38,222 INFO ############# model deps info #############
2026-04-19 13:47:38,223 INFO hb_mapper version : 1.24.3
2026-04-19 13:47:38,224 INFO hbdk version : 3.49.15
2026-04-19 13:47:38,225 INFO hbdk runtime version: 3.15.55.0
2026-04-19 13:47:38,227 INFO horizon_nn version : 1.1.0
2026-04-19 13:47:38,228 INFO ############# model_parameters info #############
2026-04-19 13:47:38,230 INFO onnx_model : /data/best.onnx
2026-04-19 13:47:38,231 INFO BPU march : bayes-e
2026-04-19 13:47:38,232 INFO layer_out_dump : True
2026-04-19 13:47:38,233 INFO log_level : DEBUG
2026-04-19 13:47:38,234 INFO working dir : /data/model_output
2026-04-19 13:47:38,236 INFO output_model_file_prefix: yolov8_cow
2026-04-19 13:47:38,237 INFO ############# input_parameters info #############
2026-04-19 13:47:38,238 INFO ------------------------------------------
2026-04-19 13:47:38,239 INFO ---------input info : images ---------
2026-04-19 13:47:38,241 INFO input_name : images
2026-04-19 13:47:38,242 INFO input_type_rt : nv12
2026-04-19 13:47:38,243 INFO input_space&range : regular
2026-04-19 13:47:38,245 INFO input_layout_rt : None
2026-04-19 13:47:38,246 INFO input_type_train : rgb
2026-04-19 13:47:38,248 INFO input_layout_train : NCHW
2026-04-19 13:47:38,249 INFO norm_type : data_scale
2026-04-19 13:47:38,250 INFO input_shape : 1x3x640x640
2026-04-19 13:47:38,251 INFO scale_value : 0.003921568627451,
2026-04-19 13:47:38,253 INFO cal_data_dir : /data/cal_bin
2026-04-19 13:47:38,254 INFO cal_data_type : float32
2026-04-19 13:47:38,256 INFO ---------input info : images end -------
2026-04-19 13:47:38,257 INFO ------------------------------------------
2026-04-19 13:47:38,258 INFO ############# calibration_parameters info #############
2026-04-19 13:47:38,259 INFO preprocess_on : False
2026-04-19 13:47:38,261 INFO calibration_type: : default
2026-04-19 13:47:38,262 INFO per_channel : False
2026-04-19 13:47:38,263 INFO ############# compiler_parameters info #############
2026-04-19 13:47:38,264 INFO debug : True
2026-04-19 13:47:38,266 INFO compile_mode : latency
2026-04-19 13:47:38,267 INFO hbdk_pass_through_params: --O3 --debug --core-num 1 --fast
2026-04-19 13:47:38,269 INFO input-source : {‘images’: ‘pyramid’, ‘_default_value’: ‘ddr’}
2026-04-19 13:47:38,320 INFO Convert to runtime bin file successfully!
2026-04-19 13:47:38,322 INFO End Model Convert,
然后在板子上运行tros发现还是具有很多层数,日志如下:
root@ubuntu:/home/sunrise/yolov8# ros2 launch dnn_node_example dnn_node_example_feedback.launch.py dnn_example_config_file:=my_config/yolov8workconfig.json dnn_example_image:=my_config/target.jpg
[INFO] [launch]: All log files can be found below /root/.ros/log/2026-04-19-13-50-11-605652-ubuntu-80979
[INFO] [launch]: Default logging verbosity is set to INFO
dnn_node_example_path is /opt/tros/humble/lib/dnn_node_example
cp_cmd is cp -r /opt/tros/humble/lib/dnn_node_example/config .
[INFO] [example-1]: process started with pid [80989]
[example-1] [WARN] [1776577812.207180231] [dnn_example_node]: Parameter:
[example-1] feed_type(0:local, 1:sub): 0
[example-1] image: my_config/target.jpg
[example-1] image_type: 0
[example-1] dump_render_img: 1
[example-1] is_shared_mem_sub: 0
[example-1] config_file: my_config/yolov8workconfig.json
[example-1] msg_pub_topic_name: hobot_dnn_detection
[example-1] info_msg_pub_topic_name: hobot_dnn_detection_info
[example-1] ros_img_topic_name: /image
[example-1] sharedmem_img_topic_name: /hbmem_img
[example-1] [WARN] [1776577812.207804440] [dnn_example_node]: Load [5] class types from file [my_config/cow.list]
[example-1] [WARN] [1776577812.207928815] [dnn_example_node]: Parameter:
[example-1] model_file_name: /home/sunrise/yolov8/cow7.bin
[example-1] model_name:
[example-1] [INFO] [1776577812.208012232] [dnn]: Node init.
[example-1] [INFO] [1776577812.208036065] [dnn_example_node]: Set node para.
[example-1] [WARN] [1776577812.208075274] [dnn_example_node]: model_file_name_: /home/sunrise/yolov8/cow7.bin, task_num: 4
[example-1] [INFO] [1776577812.208121816] [dnn]: Model init.
[example-1] [BPU_PLAT]BPU Platform Version(1.3.6)! soc info(x5)
[example-1] [HBRT] set log level as 0. version = 3.15.55.0
[example-1] [DNN] Runtime version = 1.24.5_(3.15.55 HBRT)
[example-1] [A][DNN][packed_model.cpp:247]Model [HorizonRT] The model builder version = 1.24.3
[example-1] [INFO] [1776577812.423811805] [dnn]: The model input 0 width is 640 and height is 640
[example-1] [INFO] [1776577812.424540306] [dnn]:
[example-1] Model Info:
[example-1] name: yolov8_cow.
[example-1] [input]
[example-1] - (0) Layout: NCHW, Shape: [1, 3, 640, 640], Type: HB_DNN_IMG_TYPE_NV12.
[example-1] [output]
[example-1] - (0) Layout: NHWC, Shape: [1, 80, 80, 5], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (1) Layout: NHWC, Shape: [1, 80, 80, 64], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (2) Layout: NHWC, Shape: [1, 40, 40, 5], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (3) Layout: NHWC, Shape: [1, 40, 40, 64], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (4) Layout: NHWC, Shape: [1, 20, 20, 5], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (5) Layout: NHWC, Shape: [1, 20, 20, 64], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (6) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (7) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (8) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (9) Layout: NCHW, Shape: [1, 64, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (10) Layout: NCHW, Shape: [1, 32, 160, 160], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (11) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (12) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (13) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (14) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (15) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (16) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (17) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (18) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (19) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (20) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (21) Layout: NCHW, Shape: [1, 32, 160, 160], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (22) Layout: NCHW, Shape: [1, 16, 320, 320], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (23) Layout: NCHW, Shape: [1, 16, 160, 160], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (24) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (25) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (26) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (27) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (28) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (29) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (30) Layout: NCHW, Shape: [1, 5, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (31) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (32) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (33) Layout: NCHW, Shape: [1, 64, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (34) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (35) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (36) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (37) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (38) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (39) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (40) Layout: NCHW, Shape: [1, 32, 160, 160], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (41) Layout: NCHW, Shape: [1, 16, 160, 160], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (42) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (43) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (44) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (45) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (46) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (47) Layout: NCHW, Shape: [1, 128, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (48) Layout: NCHW, Shape: [1, 64, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (49) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (50) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (51) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (52) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (53) Layout: NCHW, Shape: [1, 64, 40, 40], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (54) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (55) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (56) Layout: NCHW, Shape: [1, 64, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (57) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (58) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (59) Layout: NCHW, Shape: [1, 5, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (60) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (61) Layout: NCHW, Shape: [1, 64, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (62) Layout: NCHW, Shape: [1, 64, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (63) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (64) Layout: NCHW, Shape: [1, 5, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (65) Layout: NCHW, Shape: [1, 32, 80, 80], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (66) Layout: NCHW, Shape: [1, 128, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (67) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1] - (68) Layout: NCHW, Shape: [1, 256, 20, 20], Type: HB_DNN_TENSOR_TYPE_F32.
[example-1]
[example-1] [INFO] [1776577812.425009557] [dnn]: Task init.
[example-1] [INFO] [1776577812.426805101] [dnn]: Set task_num [4]
[example-1] [WARN] [1776577812.426895643] [dnn_example_node]: Get model name: yolov8_cow from load model.
[example-1] [INFO] [1776577812.427025143] [dnn_example_node]: The model input width is 640 and height is 640
[example-1] [WARN] [1776577812.427141769] [dnn_example_node]: Create ai msg publisher with topic_name: hobot_dnn_detection
[example-1] [INFO] [1776577812.440029080] [dnn_example_node]: Dnn node feed with local image: my_config/target.jpg
[example-1] [INFO] [1776577812.551415163] [dnn_example_node]: Output from frame_id: feedback, stamp: 0.0
[example-1] [ERROR] [1776577812.551661205] [dnn_example_node]: Inlvaid parser: 0
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[example-1] [INFO] [1776577825.965794570] [rclcpp]: signal_handler(signum=2)
[INFO] [example-1]: process has finished cleanly [pid 80989]
我怀疑是yaml文件编写有问题,附上我按照方案一的yaml文件
model_parameters:
onnx_model: ‘./best.onnx’
march: “bayes-e”
layer_out_dump: True
working_dir: ‘model_output’
output_model_file_prefix: ‘yolov8_cow’
input_parameters:
input_name: “images”
input_type_rt: ‘nv12’
input_type_train: ‘rgb’
input_layout_train: ‘NCHW’
norm_type: ‘data_scale’
scale_value: 0.003921568627451
calibration_parameters:
cal_data_dir: ‘./cal_bin’
cal_data_type: ‘float32’
calibration_type: ‘default’
compiler_parameters:
compile_mode: ‘latency’
debug: True
optimize_level: ‘O3’