Skip to content

Commit

Permalink
Update autodownload fallbacks to v6.0 assets (ultralytics#5177)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Oct 14, 2021
1 parent 4ed96ec commit c70113b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ def attempt_download(file, repo='ultralytics/yolov5'): # from utils.downloads i
assets = [x['name'] for x in response['assets']] # release assets, i.e. ['yolov5s.pt', 'yolov5m.pt', ...]
tag = response['tag_name'] # i.e. 'v1.0'
except: # fallback plan
assets = ['yolov5s.pt', 'yolov5m.pt', 'yolov5l.pt', 'yolov5x.pt',
'yolov5s6.pt', 'yolov5m6.pt', 'yolov5l6.pt', 'yolov5x6.pt']
assets = ['yolov5n.pt', 'yolov5s.pt', 'yolov5m.pt', 'yolov5l.pt', 'yolov5x.pt',
'yolov5n6.pt', 'yolov5s6.pt', 'yolov5m6.pt', 'yolov5l6.pt', 'yolov5x6.pt']
try:
tag = subprocess.check_output('git tag', shell=True, stderr=subprocess.STDOUT).decode().split()[-1]
except:
tag = 'v5.0' # current release
tag = 'v6.0' # current release

if name in assets:
safe_download(file,
Expand Down

0 comments on commit c70113b

Please sign in to comment.