ソースを参照

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()

読み込み中…
キャンセル
保存