We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
check_fonts()
CONFIG_DIR
1 parent f7722c4 commit 2c78e29Copy full SHA for 2c78e29
utils/general.py
@@ -427,10 +427,11 @@ def check_file(file, suffix=''):
427
def check_font(font=FONT, progress=False):
428
# Download font to CONFIG_DIR if necessary
429
font = Path(font)
430
- if not font.exists() and not (CONFIG_DIR / font.name).exists():
+ file = CONFIG_DIR / font.name
431
+ if not font.exists() and not file.exists():
432
url = "https://ultralytics.com/assets/" + font.name
- LOGGER.info(f'Downloading {url} to {CONFIG_DIR / font.name}...')
433
- torch.hub.download_url_to_file(url, str(font), progress=progress)
+ LOGGER.info(f'Downloading {url} to {file}...')
434
+ torch.hub.download_url_to_file(url, str(file), progress=progress)
435
436
437
def check_dataset(data, autodownload=True):
0 commit comments