yolov5-6.1训练过程中的问题总结

1. torch安装问题

安装完anaconda并创建完虚拟环境后,执行下面命令安装yolov5需要的依赖

pip install -r requirements.txt

问题是:安装完后,发现torch竟然是CPU版本的,只能手动安装了。
torch下载地址
然后依次安装torch、torchaudio、torchvision

2. ‘FreeTypeFont‘ object has no attribute ‘getsize‘报错解决

将utils 文件下的 plots.py 文件做如下修改

# w, h = self.font.getsize(label)  # text width, height   ##这行注释掉
 
 
x0, y0, x1, y1 = self.font.getbbox(label)  # text width, height    ## 粘贴这两行
w, h = x1-x0, y1-y0

参考链接

3. RuntimeError: result type Float can’t be cast to the desired output type __int64

请参看链接

4. AttributeError: module ‘numpy’ has no attribute ‘int’

将出现np.int的地方修改为np.int_即可。

5. failed: module ‘signal‘ has no attribute ‘SIGALRM‘

参考链接

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值