ultralytics 8.2.52 fix CenterCrop transforms for PIL Image inputs (#14308)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Lucas Buligon Antunes <lukasbuligonantunes@gmail.com>
This commit is contained in:
Glenn Jocher 2024-07-10 03:00:14 +02:00 committed by GitHub
parent 755dcd6ca0
commit 997f2c92cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 38 additions and 30 deletions

View file

@ -195,7 +195,7 @@ class RF100Benchmark:
(shutil.rmtree("rf-100"), os.mkdir("rf-100")) if os.path.exists("rf-100") else os.mkdir("rf-100")
os.chdir("rf-100")
os.mkdir("ultralytics-benchmarks")
safe_download("https://ultralytics.com/assets/datasets_links.txt")
safe_download("https://github.com/ultralytics/yolov5/releases/download/v1.0/datasets_links.txt")
with open(ds_link_txt, "r") as file:
for line in file:

View file

@ -315,7 +315,7 @@ def check_font(font="Arial.ttf"):
return matches[0]
# Download to USER_CONFIG_DIR if missing
url = f"https://ultralytics.com/assets/{name}"
url = f"https://github.com/ultralytics/yolov5/releases/download/v1.0/{name}"
if downloads.is_url(url, check=True):
downloads.safe_download(url=url, file=file)
return file

View file

@ -194,12 +194,14 @@ def unzip_file(file, path=None, exclude=(".DS_Store", "__MACOSX"), exist_ok=Fals
return path # return unzip dir
def check_disk_space(url="https://ultralytics.com/assets/coco128.zip", path=Path.cwd(), sf=1.5, hard=True):
def check_disk_space(
url="https://github.com/ultralytics/yolov5/releases/download/v1.0/coco8.zip", path=Path.cwd(), sf=1.5, hard=True
):
"""
Check if there is sufficient disk space to download and store a file.
Args:
url (str, optional): The URL to the file. Defaults to 'https://ultralytics.com/assets/coco128.zip'.
url (str, optional): The URL to the file. Defaults to 'https://ultralytics.com/assets/coco8.zip'.
path (str | Path, optional): The path or drive to check the available free space on.
sf (float, optional): Safety factor, the multiplier for the required free space. Defaults to 2.0.
hard (bool, optional): Whether to throw an error or not on insufficient disk space. Defaults to True.