Fix for Arial.ttf redownloads with hub inference (#4627)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-08-31 15:01:41 +02:00
1 parent 50a9828679
commit ba0f80874f
1 file changed
+3
+3
View File
@@ -1,3 +1,4 @@
import sys
from pathlib import Path
import torch
@@ -5,6 +6,8 @@ from PIL import ImageFont
FILE = Path(__file__).absolute()
ROOT = FILE.parents[1] # yolov5/ dir
if str(ROOT) not in sys.path:
sys.path.append(str(ROOT)) # add ROOT to PATH
# Check YOLOv5 Annotator font
font = 'Arial.ttf'