Ultralytics Asset URL Update (#14345)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
470b120a1b
commit
2d332a1cb1
35 changed files with 55 additions and 53 deletions
|
|
@ -33,4 +33,4 @@ names:
|
|||
15: container crane
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/DOTAv1.5.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/DOTAv1.5.zip
|
||||
|
|
|
|||
|
|
@ -32,4 +32,4 @@ names:
|
|||
14: swimming pool
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/DOTAv1.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/DOTAv1.zip
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ download: |
|
|||
# Download
|
||||
dir = Path(yaml['path']) # dataset root dir
|
||||
urls = ['https://zenodo.org/record/4298502/files/global-wheat-codalab-official.zip',
|
||||
'https://github.com/ultralytics/yolov5/releases/download/v1.0/GlobalWheat2020_labels.zip']
|
||||
'https://github.com/ultralytics/assets/releases/download/v0.0.0/GlobalWheat2020_labels.zip']
|
||||
download(urls, dir=dir)
|
||||
|
||||
# Make Directories
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ download: |
|
|||
|
||||
# Download
|
||||
dir = Path(yaml['path']) # dataset root dir
|
||||
url = 'https://github.com/ultralytics/yolov5/releases/download/v1.0/'
|
||||
url = 'https://github.com/ultralytics/assets/releases/download/v0.0.0/'
|
||||
urls = [f'{url}VOCtrainval_06-Nov-2007.zip', # 446MB, 5012 images
|
||||
f'{url}VOCtest_06-Nov-2007.zip', # 438MB, 4953 images
|
||||
f'{url}VOCtrainval_11-May-2012.zip'] # 1.95GB, 17126 images
|
||||
|
|
|
|||
|
|
@ -61,10 +61,10 @@ download: |
|
|||
|
||||
# Download
|
||||
dir = Path(yaml['path']) # dataset root dir
|
||||
urls = ['https://github.com/ultralytics/yolov5/releases/download/v1.0/VisDrone2019-DET-train.zip',
|
||||
'https://github.com/ultralytics/yolov5/releases/download/v1.0/VisDrone2019-DET-val.zip',
|
||||
'https://github.com/ultralytics/yolov5/releases/download/v1.0/VisDrone2019-DET-test-dev.zip',
|
||||
'https://github.com/ultralytics/yolov5/releases/download/v1.0/VisDrone2019-DET-test-challenge.zip']
|
||||
urls = ['https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-train.zip',
|
||||
'https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-val.zip',
|
||||
'https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-test-dev.zip',
|
||||
'https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-test-challenge.zip']
|
||||
download(urls, dir=dir, curl=True, threads=4)
|
||||
|
||||
# Convert
|
||||
|
|
|
|||
|
|
@ -21,4 +21,4 @@ names:
|
|||
3: zebra
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/african-wildlife.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/african-wildlife.zip
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ names:
|
|||
1: positive
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/brain-tumor.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/brain-tumor.zip
|
||||
|
|
|
|||
|
|
@ -40,4 +40,4 @@ names:
|
|||
22: wheel
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/carparts-seg.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/carparts-seg.zip
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ download: |
|
|||
|
||||
# Download labels
|
||||
dir = Path(yaml['path']) # dataset root dir
|
||||
url = 'https://github.com/ultralytics/yolov5/releases/download/v1.0/'
|
||||
url = 'https://github.com/ultralytics/assets/releases/download/v0.0.0/'
|
||||
urls = [url + 'coco2017labels-pose.zip'] # labels
|
||||
download(urls, dir=dir.parent)
|
||||
# Download data
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ download: |
|
|||
# Download labels
|
||||
segments = True # segment or box labels
|
||||
dir = Path(yaml['path']) # dataset root dir
|
||||
url = 'https://github.com/ultralytics/yolov5/releases/download/v1.0/'
|
||||
url = 'https://github.com/ultralytics/assets/releases/download/v0.0.0/'
|
||||
urls = [url + ('coco2017labels-segments.zip' if segments else 'coco2017labels.zip')] # labels
|
||||
download(urls, dir=dir.parent)
|
||||
# Download data
|
||||
|
|
|
|||
|
|
@ -97,4 +97,4 @@ names:
|
|||
79: toothbrush
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128-seg.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco128-seg.zip
|
||||
|
|
|
|||
|
|
@ -97,4 +97,4 @@ names:
|
|||
79: toothbrush
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco128.zip
|
||||
|
|
|
|||
|
|
@ -22,4 +22,4 @@ names:
|
|||
0: person
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/coco8-pose.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco8-pose.zip
|
||||
|
|
|
|||
|
|
@ -97,4 +97,4 @@ names:
|
|||
79: toothbrush
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/coco8-seg.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco8-seg.zip
|
||||
|
|
|
|||
|
|
@ -97,4 +97,4 @@ names:
|
|||
79: toothbrush
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/coco8.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco8.zip
|
||||
|
|
|
|||
|
|
@ -18,4 +18,4 @@ names:
|
|||
0: crack
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/crack-seg.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/crack-seg.zip
|
||||
|
|
|
|||
|
|
@ -31,4 +31,4 @@ names:
|
|||
14: swimming pool
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/dota8.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/dota8.zip
|
||||
|
|
|
|||
|
|
@ -1225,7 +1225,7 @@ download: |
|
|||
|
||||
# Download labels
|
||||
dir = Path(yaml['path']) # dataset root dir
|
||||
url = 'https://github.com/ultralytics/yolov5/releases/download/v1.0/'
|
||||
url = 'https://github.com/ultralytics/assets/releases/download/v0.0.0/'
|
||||
urls = [url + 'lvis-labels-segments.zip'] # labels
|
||||
download(urls, dir=dir.parent)
|
||||
# Download data
|
||||
|
|
|
|||
|
|
@ -18,4 +18,4 @@ names:
|
|||
0: package
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/package-seg.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/package-seg.zip
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@ names:
|
|||
0: signature
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/signature.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/signature.zip
|
||||
|
|
|
|||
|
|
@ -21,4 +21,4 @@ names:
|
|||
0: tiger
|
||||
|
||||
# Download script/URL (optional)
|
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/tiger-pose.zip
|
||||
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/tiger-pose.zip
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
|
||||
# Download/unzip labels
|
||||
d='../datasets' # unzip directory
|
||||
url=https://github.com/ultralytics/yolov5/releases/download/v1.0/
|
||||
url=https://github.com/ultralytics/assets/releases/download/v0.0.0/
|
||||
if [ "$segments" == "true" ]; then
|
||||
f='coco2017labels-segments.zip' # 169 MB
|
||||
elif [ "$sama" == "true" ]; then
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
# Download/unzip images and labels
|
||||
d='../datasets' # unzip directory
|
||||
url=https://github.com/ultralytics/yolov5/releases/download/v1.0/
|
||||
url=https://github.com/ultralytics/assets/releases/download/v0.0.0/
|
||||
f='coco128.zip' # or 'coco128-segments.zip', 68 MB
|
||||
echo 'Downloading' $url$f ' ...'
|
||||
curl -L $url$f -o $f -# && unzip -q $f -d $d && rm $f &
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ def check_cls_dataset(dataset, split=""):
|
|||
if str(dataset) == "imagenet":
|
||||
subprocess.run(f"bash {ROOT / 'data/scripts/get_imagenet.sh'}", shell=True, check=True)
|
||||
else:
|
||||
url = f"https://github.com/ultralytics/yolov5/releases/download/v1.0/{dataset}.zip"
|
||||
url = f"https://github.com/ultralytics/assets/releases/download/v0.0.0/{dataset}.zip"
|
||||
download(url, dir=data_dir.parent)
|
||||
s = f"Dataset download success ✅ ({time.time() - t:.1f}s), saved to {colorstr('bold', data_dir)}\n"
|
||||
LOGGER.info(s)
|
||||
|
|
|
|||
|
|
@ -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://github.com/ultralytics/yolov5/releases/download/v1.0/datasets_links.txt")
|
||||
safe_download("https://github.com/ultralytics/assets/releases/download/v0.0.0/datasets_links.txt")
|
||||
|
||||
with open(ds_link_txt, "r") as file:
|
||||
for line in file:
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ def check_font(font="Arial.ttf"):
|
|||
return matches[0]
|
||||
|
||||
# Download to USER_CONFIG_DIR if missing
|
||||
url = f"https://github.com/ultralytics/yolov5/releases/download/v1.0/{name}"
|
||||
url = f"https://github.com/ultralytics/assets/releases/download/v0.0.0/{name}"
|
||||
if downloads.is_url(url, check=True):
|
||||
downloads.safe_download(url=url, file=file)
|
||||
return file
|
||||
|
|
|
|||
|
|
@ -194,14 +194,12 @@ def unzip_file(file, path=None, exclude=(".DS_Store", "__MACOSX"), exist_ok=Fals
|
|||
return path # return unzip dir
|
||||
|
||||
|
||||
def check_disk_space(
|
||||
url="https://github.com/ultralytics/yolov5/releases/download/v1.0/coco8.zip", path=Path.cwd(), sf=1.5, hard=True
|
||||
):
|
||||
def check_disk_space(url="https://ultralytics.com/assets/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/coco8.zip'.
|
||||
url (str, optional): The URL to the file. Defaults to 'https://github.com/ultralytics/assets/releases/download/v0.0.0/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.
|
||||
|
|
@ -322,7 +320,11 @@ def safe_download(
|
|||
if "://" not in str(url) and Path(url).is_file(): # URL exists ('://' check required in Windows Python<3.10)
|
||||
f = Path(url) # filename
|
||||
elif not f.is_file(): # URL and file do not exist
|
||||
desc = f"Downloading {url if gdrive else clean_url(url)} to '{f}'"
|
||||
uri = (url if gdrive else clean_url(url)).replace( # cleaned and aliased url
|
||||
"https://github.com/ultralytics/assets/releases/download/v0.0.0/",
|
||||
"https://ultralytics.com/assets/", # assets alias
|
||||
)
|
||||
desc = f"Downloading {uri} to '{f}'"
|
||||
LOGGER.info(f"{desc}...")
|
||||
f.parent.mkdir(parents=True, exist_ok=True) # make directory if missing
|
||||
check_disk_space(url, path=f.parent)
|
||||
|
|
@ -356,10 +358,10 @@ def safe_download(
|
|||
f.unlink() # remove partial downloads
|
||||
except Exception as e:
|
||||
if i == 0 and not is_online():
|
||||
raise ConnectionError(emojis(f"❌ Download failure for {url}. Environment is not online.")) from e
|
||||
raise ConnectionError(emojis(f"❌ Download failure for {uri}. Environment is not online.")) from e
|
||||
elif i >= retry:
|
||||
raise ConnectionError(emojis(f"❌ Download failure for {url}. Retry limit reached.")) from e
|
||||
LOGGER.warning(f"⚠️ Download failure, retrying {i + 1}/{retry} {url}...")
|
||||
raise ConnectionError(emojis(f"❌ Download failure for {uri}. Retry limit reached.")) from e
|
||||
LOGGER.warning(f"⚠️ Download failure, retrying {i + 1}/{retry} {uri}...")
|
||||
|
||||
if unzip and f.exists() and f.suffix in {"", ".zip", ".tar", ".gz"}:
|
||||
from zipfile import is_zipfile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue