瀏覽代碼

PyTorch Hub and autoShape update (#1415)

5.0
Glenn Jocher 3 年之前
父節點
當前提交
311de00855
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      hubconf.py

+ 2
- 1
hubconf.py 查看文件

@@ -8,7 +8,6 @@ Usage:
from pathlib import Path

import torch
from PIL import Image

from models.yolo import Model
from utils.general import set_logging
@@ -112,6 +111,8 @@ if __name__ == '__main__':
model = model.fuse().autoshape() # for PIL/cv2/np inputs and NMS

# Verify inference
from PIL import Image

imgs = [Image.open(x) for x in Path('data/images').glob('*.jpg')]
results = model(imgs)
results.show()

Loading…
取消
儲存