Skip to content

python 如何用opencv部署? #25

Open
@xiaodingding

Description

@xiaodingding

1.修改,因为提示参数不多,返回的只有三个参数
#bs, _, ny, nx = outs[i].shape # x(bs,255,20,20) to x(bs,3,20,20,85)
bs, ny, nx = outs[i].shape # x(bs,255,20,20) to x(bs,3,20,20,85)
修改参数之后,包这个错误:
ValueError: cannot reshape array of size 151200 into shape (1,3,6,25200,6)

[INFO]blob shape: (1, 3, 640, 640)
0 (1, 25200, 6)
Traceback (most recent call last):
File "main_yolov5.py", line 124, in
dets = yolonet.detect(srcimg)
File "main_yolov5.py", line 99, in detect
outs[i] = outs[i].reshape(bs, self.na, self.no, ny, nx).transpose(0, 1, 3, 4, 2)
ValueError: cannot reshape array of size 151200 into shape (1,3,6,25200,6)
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions