瀏覽代碼

Update README.md

modifyDataloader
Glenn Jocher GitHub 3 年之前
父節點
當前提交
e5d71223b8
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 4 行新增5 行删除
  1. +4
    -5
      README.md

+ 4
- 5
README.md 查看文件

@@ -121,19 +121,18 @@ Done. (0.103s)

### PyTorch Hub

To run **batched inference** with YOLOv5 and [PyTorch Hub](https://github.com/ultralytics/yolov5/issues/36):
Inference with YOLOv5 and [PyTorch Hub](https://github.com/ultralytics/yolov5/issues/36):
```python
import torch

# Model
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')] # batch of images
# Image
img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'

# Inference
results = model(imgs)
results = model(img)
results.print() # or .show(), .save()
```


Loading…
取消
儲存