Improved non-latin Annotator() plotting (#7488)
* Improved non-latin labels Annotator plotting May resolve https://github.com/ultralytics/yolov5/issues/7460 * Update train.py * Update train.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add progress arg Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
d876caab4d
commit
c9042dc2ad
3 files changed
+11
-8
No files matched your search
+2
-2
@@ -424,13 +424,13 @@ def check_file(file, suffix=''):
|
||||
return files[0] # return file
|
||||
|
||||
|
||||
def check_font(font=FONT):
|
||||
def check_font(font=FONT, progress=False):
|
||||
# Download font to CONFIG_DIR if necessary
|
||||
font = Path(font)
|
||||
if not font.exists() and not (CONFIG_DIR / font.name).exists():
|
||||
url = "https://ultralytics.com/assets/" + font.name
|
||||
LOGGER.info(f'Downloading {url} to {CONFIG_DIR / font.name}...')
|
||||
torch.hub.download_url_to_file(url, str(font), progress=False)
|
||||
torch.hub.download_url_to_file(url, str(font), progress=progress)
|
||||
|
||||
|
||||
def check_dataset(data, autodownload=True):
|
||||
|
||||
Reference in new issue
Block a user