YOLOV5报错解决办法

本文介绍了在使用YOLOV5过程中遇到的各种错误,如pip安装requirements.txt失败、ImageNotFound错误、ZeroDivisionError、pycocotools安装问题、缺少tensorboard模块以及RuntimeError,并提供了相应的解决方法,包括使用conda环境、清理缓存、修改代码以及使用特定命令安装依赖库。
摘要由CSDN通过智能技术生成

🌈🌈😄😄

欢迎来到茶色岛独家岛屿,本期将为大家揭晓YOLOV5报错解决办法,做好准备了么,那么开始吧。

🌲🌲🐴🐴

1.在pycharm终端使用pip install requirements.txt报错时:

2.AssertionError: Image Not Found D:\PycharmProjects\yolov5-hat\VOCdevkit\images\train\000000.jpg问题

3. File "F:\All_fail\Procedure\Pytorch-Volo5\utils\datasets.py", line 312, in updatetime.sleep(2 / self.fps) # wait timeZeroDivisionError: float division by zero

4.安装requirements.txt时出现错误subprocess.CalledProcessError: Command 'pip install 'pycocotools>=2.0'' returned non-zero exit status 1.,这要怎么解决 

5.ModuleNotFoundError: No module named 'tensorboard'

6.RuntimeError: result type Float can't be cast to the desired output type __int64报错

 1.在pycharm终端使用pip install requirements.txt报错时:

给大家避个坑,我搞了2天才发现

安装requirement后运行train或者detect的时候仍出现import报错比如yaml的

去anaconda里面 conda activate pytorch

然后 pip install -r (路径requirements.txt) -i https://pypi.tuna.tsinghua.edu.cn/simple

其中requirement.txt建议单独放到桌面,可以把括号替换成Desktop\requirement.txt

 2.AssertionError: Image Not Found D:\PycharmProjects\yolov5-hat\VOCdevkit\images\train\000000.jpg问题

删除缓存的方法:删除yolov5-hat\VOCdevkit\labels里tran和val cache

3. File "F:\All_fail\Procedure\Pytorch-Volo5\utils\datasets.py", line 312, in update
time.sleep(2 / self.fps) # wait time
ZeroDivisionError: float division by zero

铁子们,我报了这个错误,记录一下,有用自取:我把括号里的(2 / self.fps)改成0解决了

4.安装requirements.txt时出现错误subprocess.CalledProcessError: Command 'pip install 'pycocotools>=2.0'' returned non-zero exit status 1.,这要怎么解决 

在pycharm终端pip install pycocotools

5.ModuleNotFoundError: No module named 'tensorboard'

 直接在终端pip install tensorboard

6.RuntimeError: result type Float can't be cast to the desired output type __int64报错

将loss.py中211行改为
indices.append((b, a, gj.clamp_(0, int(gain[3]) - 1), gi.clamp_(0, int(gain[2]) - 1)))

以上是我遇到的一些问题,若有其他问题无法解决,可留言。 

  • 9
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

茶色岛^

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值