Add retry option to get_github_assets() function (#4148)

This commit is contained in:
Glenn Jocher 2023-08-03 19:13:50 +02:00 committed by GitHub
parent 11d0488bf1
commit 09a0378e81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 33 deletions

View file

@ -208,8 +208,10 @@ class Results(SimpleClass):
model = YOLO('yolov8n.pt')
results = model('bus.jpg') # results list
for r in results:
im = r.plot() # BGR numpy array
Image.fromarray(im[..., ::-1]).show() # show RGB image
im_array = r.plot() # plot a BGR numpy array of predictions
im = Image.fromarray(im[..., ::-1]) # RGB PIL image
im.show() # show image
im.save('results.jpg') # save image
```
"""
if img is None and isinstance(self.orig_img, torch.Tensor):