瀏覽代碼

Improve availability of YOLOv5 in Russia (#7545)

* Add redundant weights download mirrors

This PR seeks to improve access worldwide to YOLOv5 weights. Universal access to AI for all is our core value, and we are against any censorship or restriction efforts.

I've uploaded the official YOLOv5 v6.1 weights to a primary backup bucket on GCP and to secondary backup on Google Drive at https://drive.google.com/drive/folders/1EFQTEUeXWSFww0luse2jB9M1QNZQGwNl. Autodownload with try the first two locations (GitHuB release assets and GCP bucket), and point users to the Google Drive folder if the first two fail.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
modifyDataloader
Glenn Jocher GitHub 2 年之前
父節點
當前提交
3a89377c04
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. +3
    -2
      utils/downloads.py

+ 3
- 2
utils/downloads.py 查看文件

@@ -72,12 +72,13 @@ def attempt_download(file, repo='ultralytics/yolov5'): # from utils.downloads i
tag = 'v6.1' # current release

if name in assets:
url3 = 'https://drive.google.com/drive/folders/1EFQTEUeXWSFww0luse2jB9M1QNZQGwNl' # backup gdrive mirror
safe_download(
file,
url=f'https://github.com/{repo}/releases/download/{tag}/{name}',
# url2=f'https://storage.googleapis.com/{repo}/ckpt/{name}', # backup url (optional)
url2=f'https://storage.googleapis.com/{repo}/{tag}/{name}', # backup url (optional)
min_bytes=1E5,
error_msg=f'{file} missing, try downloading from https://github.com/{repo}/releases/')
error_msg=f'{file} missing, try downloading from https://github.com/{repo}/releases/{tag} or {url3}')

return str(file)


Loading…
取消
儲存