Skip to content

Commit

Permalink
PyTorch Hub and autoShape update (ultralytics#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Nov 16, 2020
1 parent a7b3e90 commit e3063a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hubconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from pathlib import Path

import torch
from PIL import Image

from models.yolo import Model
from utils.general import set_logging
Expand Down Expand Up @@ -112,6 +111,8 @@ def yolov5x(pretrained=False, channels=3, classes=80):
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()
Expand Down

0 comments on commit e3063a7

Please sign in to comment.