|
|
@ -19,9 +19,9 @@ import requests
|
|
|
|
import torch
|
|
|
|
import torch
|
|
|
|
from matplotlib import font_manager
|
|
|
|
from matplotlib import font_manager
|
|
|
|
|
|
|
|
|
|
|
|
from ultralytics.yolo.utils import (AUTOINSTALL, LOGGER, ONLINE, RANK, ROOT, USER_CONFIG_DIR, TryExcept, clean_url,
|
|
|
|
from ultralytics.yolo.utils import (AUTOINSTALL, LOGGER, ONLINE, ROOT, USER_CONFIG_DIR, TryExcept, clean_url, colorstr,
|
|
|
|
colorstr, downloads, emojis, is_colab, is_docker, is_kaggle, is_online,
|
|
|
|
downloads, emojis, is_colab, is_docker, is_kaggle, is_online, is_pip_package,
|
|
|
|
is_pip_package, url2file)
|
|
|
|
url2file)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def is_ascii(s) -> bool:
|
|
|
|
def is_ascii(s) -> bool:
|
|
|
@ -164,9 +164,6 @@ def check_font(font='Arial.ttf'):
|
|
|
|
Returns:
|
|
|
|
Returns:
|
|
|
|
file (Path): Resolved font file path.
|
|
|
|
file (Path): Resolved font file path.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
from ultralytics.yolo.utils.torch_utils import torch_distributed_zero_first
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with torch_distributed_zero_first(RANK):
|
|
|
|
|
|
|
|
name = Path(font).name
|
|
|
|
name = Path(font).name
|
|
|
|
|
|
|
|
|
|
|
|
# Check USER_CONFIG_DIR
|
|
|
|
# Check USER_CONFIG_DIR
|
|
|
|