autoShape() default for PyTorch Hub models (#1692)
* Add autoshape parameter * Remove autoshape call in ReadMe * Update hubconf.py * file/URI inputs and autoshape check passthrough Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
1 parent
c0ffcdf998
commit
14b0abe2d0
3 files changed
+41
-33
No files matched your search
@@ -106,7 +106,7 @@ import torch
|
||||
from PIL import Image
|
||||
|
||||
# Model
|
||||
model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True).autoshape() # for PIL/cv2/np inputs and NMS
|
||||
model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True) # for PIL/cv2/np inputs and NMS
|
||||
|
||||
# Images
|
||||
img1 = Image.open('zidane.jpg')
|
||||
|
||||
Reference in new issue
Block a user