Update README.md (#7686)
parent
d4ea61e043
commit
c4cb7c684a
|
@ -81,15 +81,14 @@ pip install -r requirements.txt # install
|
||||||
<details open>
|
<details open>
|
||||||
<summary>Inference</summary>
|
<summary>Inference</summary>
|
||||||
|
|
||||||
Inference with YOLOv5 and [PyTorch Hub](https://github.com/ultralytics/yolov5/issues/36)
|
YOLOv5 [PyTorch Hub](https://github.com/ultralytics/yolov5/issues/36) inference. [Models](https://github.com/ultralytics/yolov5/tree/master/models) download automatically from the latest
|
||||||
. [Models](https://github.com/ultralytics/yolov5/tree/master/models) download automatically from the latest
|
|
||||||
YOLOv5 [release](https://github.com/ultralytics/yolov5/releases).
|
YOLOv5 [release](https://github.com/ultralytics/yolov5/releases).
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
# Model
|
# Model
|
||||||
model = torch.hub.load('ultralytics/yolov5', 'yolov5s') # or yolov5m, yolov5l, yolov5x, custom
|
model = torch.hub.load('ultralytics/yolov5', 'yolov5s') # or yolov5n - yolov5x6, custom
|
||||||
|
|
||||||
# Images
|
# Images
|
||||||
img = 'https://ultralytics.com/images/zidane.jpg' # or file, Path, PIL, OpenCV, numpy, list
|
img = 'https://ultralytics.com/images/zidane.jpg' # or file, Path, PIL, OpenCV, numpy, list
|
||||||
|
|
Loading…
Reference in New Issue