Update README.md (#4143)
This commit is contained in:
1 parent
efe60b5681
commit
d17b45eaad
1 file changed
+2
-2
@@ -82,10 +82,10 @@ Inference with YOLOv5 and [PyTorch Hub](https://github.com/ultralytics/yolov5/is
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
# Model
|
# Model
|
||||||
model = torch.hub.load('ultralytics/yolov5', 'yolov5s') # or yolov5m, yolov5x, custom
|
model = torch.hub.load('ultralytics/yolov5', 'yolov5s') # or yolov5m, yolov5l, yolov5x, custom
|
||||||
|
|
||||||
# Images
|
# Images
|
||||||
img = 'https://ultralytics.com/images/zidane.jpg' # or file, PIL, OpenCV, numpy, multiple
|
img = 'https://ultralytics.com/images/zidane.jpg' # or PosixPath, PIL, OpenCV, numpy, list
|
||||||
|
|
||||||
# Inference
|
# Inference
|
||||||
results = model(img)
|
results = model(img)
|
||||||
|
|||||||
Reference in new issue
Block a user