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

您好,遇到两个问题 #23

Open
Awenkid opened this issue Sep 19, 2023 · 0 comments
Open

您好,遇到两个问题 #23

Awenkid opened this issue Sep 19, 2023 · 0 comments

Comments

@Awenkid
Copy link

Awenkid commented Sep 19, 2023

第一个问题:使用(1)python hubconf.py(2)python detect.py --weights yolov5s.pdparams --source'图片地址'之后,出现报错如下:
Traceback (most recent call last):
File "detect.py", line 255, in
main(opt)
File "detect.py", line 250, in main
run(**vars(opt))
File "D:\Program Files\anaconda\envs\paddle\lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "D:\Program Files\anaconda\envs\paddle\lib\site-packages\paddle\fluid\dygraph\base.py", line 347, in _decorate_function
return func(*args, **kwargs)
File "detect.py", line 149, in run
det[:, :4] = scale_boxes(im.shape[2:], det[:, :4], im0.shape).round()
File "D:\Program Files\anaconda\envs\paddle\lib\site-packages\paddle\fluid\dygraph\tensor_patch_methods.py", line 747, in getitem
return self._getitem_index_not_tensor(item)
ValueError: (InvalidArgument) Too many indices (2) for tensor of dimension 1.
[Hint: Expected valid_indexs <= rank == true, but received valid_indexs <= rank:0 != true:1.] (at ..\paddle/fluid/pybind/slice_utils.h:309)
第二个问题:
是否可以把yolov5的预训练模型(yolov5s.pdparams)换成自己训练好的?又应该如何修改?
(是做单目标检测,也就是图片里只有一个目标物体)
希望大佬可以回答我的问题,非常感谢

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

1 participant