Downloading https://ultralytics.com/assets/Arial.ttf to ...... yolov5报错解决

这篇具有很好参考价值的文章主要介绍了Downloading https://ultralytics.com/assets/Arial.ttf to ...... yolov5报错解决。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

yolov5模型用的是github上YOLOv5官方的,
在autodl服务器上训练时,Arial.ttf字体会自动下载,但是无法下载。(当然在自己电脑上pycharm跑不会报这个错,可以下载)
解决方法:

class Annotator:
	if RANK in (-1, 0):
        check_font()  # download TTF if necessary
    # YOLOv5 Annotator for train/val mosaics and jpgs and detect/hub inference annotations
    def __init__(self, im, line_width=None, font_size=None, font='Arial.ttf', pil=False, example='abc'):

将第3,4行注释掉,
改为:

class Annotator:
	#if RANK in (-1, 0):
        #check_font()  # download TTF if necessary
    # YOLOv5 Annotator for train/val mosaics and jpgs and detect/hub inference annotations
    def __init__(self, im, line_width=None, font_size=None, font='', pil=False, example='abc'):

重新训练即可正常训练。文章来源地址https://www.toymoban.com/news/detail-515820.html

到了这里,关于Downloading https://ultralytics.com/assets/Arial.ttf to ...... yolov5报错解决的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • VisDrone2019上训练YOLOv5(用ultralytics)

    使用的package library: ultralytics 环境:python3.8, torch=1.7.0 把ultralytics代码git clone 到本地 本地新建一个train.py,内容写下面这些。 在本地做测试用coco128这128张图片。跑通了,上云端服务器的饿时候在换成VisDrone.yaml这个我们要训练的数据集 40G显存,最佳batch size是25张, 显示的实时

    2024年02月15日
    浏览(30)
  • unable to access https://github.com/....解决方法

    git config --global url.\\\"https://\\\".insteadOf git:// 可以把 git:// 替换成 https:// 方便使用 https 协议 相反的,如果想要将https 替换成 git,比如我们平时下载不到github的东西,提示 unable to access https://github.com/.......的时候就可以用 git config --global url.\\\"git://\\\".insteadOf https:// 这个方法来解决,意

    2024年02月13日
    浏览(32)
  • Git clone报错:fatal: unable to access ‘https://github.com/.....‘: Failed to connect to github.com port

    使用Git克隆项目是,有时候会报错:Failed to connect to github.com port 443 after 21096 ms: Couldn’t connect to server 原因是本机代理端口和git端口不一致。 我的解决方法: 然后开启手动代理模式: 随便在哪个地方,右键选择Git Bash Here(得安装了Git),然后在弹出的命令行窗口中分别输入一

    2024年04月13日
    浏览(55)
  • fatal: 无法访问 https://github.com/ :Failed to connect to github.com port 443: 拒绝连接的解决办法

    最近在ubuntu20.04安装PCL1.9.1的过程中,在从github 下载pcl时遇到了 fatal: 无法访问 https://github.com/PointCloudLibrary/pcl.git/ :Failed to connect to github.com port 443: 拒绝连接 这个问题。 解决办法:在终端输入 sudo gedit /etc/hosts ,打开/etc/hosts文件,然后注释掉所有只涉及到github.com的行(注意是

    2024年02月12日
    浏览(43)
  • 解决fatal: unable to access ‘https://github.com……‘: Failed to connect to

    问题 : git  clone 项目执行时,报错fatal: unable to access…… 解决方法 : 在cmd下执行 ipconfig/flushdns  清理DNS缓存 重新执行 git clone https://github.com/…/.git/’  即可

    2024年02月11日
    浏览(37)
  • 解决unable to access ‘https://github.com/XXX‘: Failed to connect to github.com port 443 after 21093 ms

    问题: GitHub拉代码时报错 Clone failed unable to access \\\'https://github.com/majiang666/vue-pdf.git/\\\': Failed to connect to github.com port 443 after 21093 ms: Timed out 解决方法有两种,如下 方法一: 登录GitHub账号后再拉取代码 方法二: 在GitHub前面加上 username:passwords@ ,例:https:// username:passwords @github.c

    2024年02月05日
    浏览(41)
  • 【git】Git提交或者报错fatal:unable to access ‘https://github.com/xxx‘: Failed to connect to github.com

    1. 问题原因 报错信息: 原因: 在git push时或者clone时,中间会有git的http和https代理,但是我们本地环境本身就有SSL协议了,所以取消git的https或者http代理即可 2. 解决方案 最好的解决方法还是配置ssh方法访问 链接:Github配置SSH访问 避免使用https访问经常网络连接失败或者需要

    2024年02月05日
    浏览(40)
  • 如何解决error: failed to push some refs to ‘https://gitee.com/

    在使用git连接Gitee远程库进行第一次提交时,很多时候会下面的错误,这是由于远程库的文件和本地仓库的文件不一致  想要解决这个问题很简单,只需要进行以下操作: 1.先在git命令行执行下面的操作 这样做的作用是将远程库的文件同步到本地仓库 2. 再次执行 git push 命令

    2024年02月11日
    浏览(56)
  • 解决error: failed to push some refs to ‘https://github.com...‘问题

    本地修改代码后正准备push到远程仓库,但是遇到了如下问题: 输入 git pull 获得 这是因为在执行 git pull 命令时,Git 会自动尝试合并远程仓库的更改和本地仓库的更改,如果本地存在未提交的更改,可能会导致代码冲突或其他问题。输入 git pull --rebase origin master 无法解决问题

    2024年02月07日
    浏览(34)
  • 已解决error: failed to push some refs to ‘https://gitee.com/

    已解决error: failed to push some refs to ‘https://gitee.com/ error: failed to push some refs to ‘https://gitee.com/ 对于该错误信息\\\"error: failed to push some refs to ‘https://gitee.com/详细解决方法’\\\",通常是由远程仓库已经发生了变化,与本地仓库冲突导致的。 下滑查看解决方法 拉取最新代码:在推送

    2024年02月08日
    浏览(31)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包