Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yolov7tiny转换到trt后无法正常运行 #34

Closed
587687525 opened this issue Aug 13, 2022 · 6 comments
Closed

yolov7tiny转换到trt后无法正常运行 #34

587687525 opened this issue Aug 13, 2022 · 6 comments

Comments

@587687525
Copy link

No description provided.

@587687525
Copy link
Author

587687525 commented Aug 13, 2022

报错日志:
G:\Anaconda3\python.exe \tensorrt-python\trt.py
G:\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:43: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
result = getattr(asarray(obj), method)(*args, **kwds)
Traceback (most recent call last):
File "\tensorrt-python\trt.py", line 22, in
origin_img = pred.inference(img_path, conf=0.3)
File "\tensorrt-python\utils\utils.py", line 99, in inference
predictions = np.reshape(data, (1, -1, int(5+self.n_classes)))[0]
File "<array_function internals>", line 180, in reshape
File "G:\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 298, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "G:\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 54, in _wrapfunc
return _wrapit(obj, method, *args, **kwds)
File "G:\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 43, in _wrapit
result = getattr(asarray(obj), method)(*args, **kwds)
ValueError: cannot reshape array of size 4 into shape (1,newaxis,7)

进程已结束,退出代码1

@587687525 587687525 changed the title yolop yolov7tiny转换到trt后无法正常运行 Aug 13, 2022
@587687525
Copy link
Author

我看见了这一行提示。我记得我在运行时将两个end2end的default值都设置为了false,或许是我记错了

@Linaom1214
Copy link
Owner

Linaom1214 commented Aug 13, 2022

我看见了这一行提示。我记得我在运行时将两个end2end的default值都设置为了false,或许是我记错了

是最新的代码吗? 还有问题吗?

是否修改类别数了呢?

@587687525
Copy link
Author

已经拉取了最新的代码,num_cls是2,都检查过了,现在没有问题啦,非常非常感谢(〃'▽'〃)

@Linaom1214
Copy link
Owner

已经拉取了最新的代码,num_cls是2,都检查过了,现在没有问题啦,非常非常感谢(〃'▽'〃)

好的,没有问题就好, 在线求start

@587687525
Copy link
Author

ok,星星+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants