Add autoShape() speed profiling (#2459)
* Add autoShape() speed profiling * Update common.py * Create README.md * Update hubconf.py * cleanuip
This commit is contained in:
1 parent
747c2653ee
commit
569757ecc0
3 files changed
+17
-9
No files matched your search
@@ -108,11 +108,11 @@ To run **batched inference** with YOLOv5 and [PyTorch Hub](https://github.com/ul
|
||||
import torch
|
||||
|
||||
# Model
|
||||
model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True)
|
||||
model = torch.hub.load('ultralytics/yolov5', 'yolov5s')
|
||||
|
||||
# Images
|
||||
dir = 'https://github.com/ultralytics/yolov5/raw/master/data/images/'
|
||||
imgs = [dir + f for f in ('zidane.jpg', 'bus.jpg')] # batched list of images
|
||||
imgs = [dir + f for f in ('zidane.jpg', 'bus.jpg')] # batch of images
|
||||
|
||||
# Inference
|
||||
results = model(imgs)
|
||||
|
||||
Reference in new issue
Block a user