专栏算法工具链yolov8在板端运行时,报错slice operator axes' size must be the same ........

yolov8在板端运行时,报错slice operator axes' size must be the same ........

已解决
andeluleidisi2023-03-28
120
8

我复现论坛yolov8那篇文章,模型转换过程很顺利没有报错

但是使用文章里面的部署文件时发生报错

报错信息如下

[HBRT] set log level as 0. version = 3.14.5

[DNN] Runtime version = 1.9.7_(3.14.5 HBRT)

tensor type: NV12_SEPARATE

data type: uint8

layout: NCHW

shape: (1, 3, 416, 416)

[E][DNN][slice.cpp:90](1679747511866) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747511867) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747511996) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747511997) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512120) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512120) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512233) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512233) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512347) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512347) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512464) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512464) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512578) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512578) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512694) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512694) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512812) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512813) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512929) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747512929) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747514520) slice operator axes' size must be the same with input tensor dim size when missing steps

[E][DNN][slice.cpp:90](1679747514520) slice operator axes' size must be the same with input tensor dim size when missing steps

Traceback (most recent call last):

File "inference.py", line 214, in <module>

results = nms(*results)

File "inference.py", line 157, in nms

indices = cv2.dnn.NMSBoxes(boxes, confidences, score_thres, iou_thres).flatten()

AttributeError: 'tuple' object has no attribute 'flatten'

【INFO】: Offload model "ppyolo_tiny_416x416_nv12" Successfully.

算法工具链
评论4
0/1000
  • 颜值即正义
    Lv.2

    你好,根据报错提示,将.flatten()去掉后可以成功运行哈,如下图所示:

    2023-03-29
    0
    4
    • andeluleidisi回复颜值即正义:

      ok,感谢

      2023-03-29
      0
    • andeluleidisi回复andeluleidisi:

      运行是能运行了,但是

      [E][DNN][slice.cpp:90](1679747514520) slice operator axes' size must be the same with input tensor dim size when missing steps

      这个是什么问题,他老提示

      是不是我的模型不是NWHC,我好像转换失败了

      2023-03-29
      0
    • 颜值即正义回复andeluleidisi:

      我这边根据那篇文章验证过,没有问题哈

      2023-03-29
      0
    • HunterZhou回复andeluleidisi:

      我也有这个提示,请问你解决了吗?

      2023-04-22
      0
  • andeluleidisi
    Lv.1
    ppyolo_tiny_416x416_nv12这个不是ppyolo模型,是yolov8,我上次模型转换了没改名字
    2023-03-28
    0
    0
  • wunuo
    Lv.1

    您好,建议您这边先检查一下代码问题哈,或者可以在参考文章下留言询问一下作者

    2023-03-29
    0
    0
  • 颜值即正义
    Lv.2
    2023-04-24
    0
    0