From 311de0085569cbd7a17eff28bd91767bf84027de Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 16 Nov 2020 23:20:17 +0100 Subject: [PATCH] PyTorch Hub and autoShape update (#1415) --- hubconf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hubconf.py b/hubconf.py index f8e7cd7..96d6b12 100644 --- a/hubconf.py +++ b/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()