关于Demo YOLOv5项目中发现的报错以及对应的解决

问题1:PyCharm代码编辑没有提示的解决方法

(82条消息) Opencv导入后无代码提示,1秒解决!_用猪头过日子.的博客-CSDN博客_opencv没有代码提示

问题2: RuntimeError: result type Float can't be cast to the desired output type long int

(82条消息) 一步真实解决RuntimeError: result type Float can‘t be cast to the desired output type long int_蓝胖胖▸的博客-CSDN博客

问题3: 进入我们的\yolov5-4.0\runs\detect\exp文件夹可以看到虽然有结果图片,但是并没有框出识别结果

(82条消息) Yolov5可以看到虽然有结果图片,但是并没有框出识别结果_Mzgg的博客-CSDN博客_yolov5没有框

但是检测速度会变慢

问题4:RuntimeError: The size of tensor a (60) must match the size of tensor b (56) at non-singLeton dimension 3

(82条消息) Pytorch中报错RuntimeError: The size of tensor a (60) must match the size of tensor b (56)_霆霆的程序员驿站的博客-CSDN博客

出现这个错误是因为到models文件下的common.py添加v6.1的SPPF类并添加import warnings包,这个解决方法会带来以上的报错

根本方法是:

重新下载yolov5s.pt权重文件

下载地址:https://github.com/ultralytics/yolov5/releases/download/v5.0/yolov5s.pt

问题5:AttributeError: Can't get attribute 'SPPF' on <module 'models.common' from 'C:\\Users\\Administrator\\Desktop\\yolov5\\yolov5-5.0\\models\\common.py'>

(82条消息) YOLOv5-5.0学习过程之detect.py运行报错_学习笔记本的博客-CSDN博客_detect.py运行

重新下载yolov5s.pt权重文件

下载地址:https://github.com/ultralytics/yolov5/releases/download/v5.0/yolov5s.pt

问题6:项目yolo v5中,终端执行detect.py文件时出现AttributeError属性报错

(82条消息) 【已解决】AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor’_Colynn Johnson的博客-CSDN博客

物联沃分享整理
物联沃-IOTWORD物联网 » 关于Demo YOLOv5项目中发现的报错以及对应的解决

发表评论