Skip to content

Commit

Permalink
Hubconf.py bug fix (ultralytics#3007)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored May 1, 2021
1 parent a6a91b2 commit 46fa3d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hubconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbos

def custom(path='path/to/model.pt', autoshape=True, verbose=True):
# YOLOv5 custom or local model
return create(path, autoshape, verbose)
return create(path, autoshape=autoshape, verbose=verbose)


def yolov5s(pretrained=True, channels=3, classes=80, autoshape=True, verbose=True):
Expand Down
1 change: 1 addition & 0 deletions utils/google_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def attempt_download(file, repo='ultralytics/yolov5'):
file = Path(str(file).strip().replace("'", ''))

if not file.exists():
file.parent.mkdir(parents=True, exist_ok=True) # make parent dir (if required)
try:
response = requests.get(f'https://api.github.com/repos/{repo}/releases/latest').json() # github api
assets = [x['name'] for x in response['assets']] # release assets, i.e. ['yolov5s.pt', 'yolov5m.pt', ...]
Expand Down

0 comments on commit 46fa3d4

Please sign in to comment.