You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
第一个问题:使用(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)换成自己训练好的?又应该如何修改?
(是做单目标检测,也就是图片里只有一个目标物体)
希望大佬可以回答我的问题,非常感谢
The text was updated successfully, but these errors were encountered:
第一个问题:使用(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)换成自己训练好的?又应该如何修改?
(是做单目标检测,也就是图片里只有一个目标物体)
希望大佬可以回答我的问题,非常感谢
The text was updated successfully, but these errors were encountered: