yolov5模型用的是github上YOLOv5官方的,
在autodl服務(wù)器上訓(xùn)練時(shí),Arial.ttf字體會(huì)自動(dòng)下載,但是無(wú)法下載。(當(dāng)然在自己電腦上pycharm跑不會(huì)報(bào)這個(gè)錯(cuò),可以下載)
解決方法:
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行注釋掉,
改為:文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-515820.html
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'):
重新訓(xùn)練即可正常訓(xùn)練。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-515820.html
到了這里,關(guān)于Downloading https://ultralytics.com/assets/Arial.ttf to ...... yolov5報(bào)錯(cuò)解決的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!