glenn-jocher
commited on
Commit
•
311de00
1
Parent(s):
2aaaec3
PyTorch Hub and autoShape update (#1415)
Browse files- hubconf.py +2 -1
hubconf.py
CHANGED
@@ -8,7 +8,6 @@ Usage:
|
|
8 |
from pathlib import Path
|
9 |
|
10 |
import torch
|
11 |
-
from PIL import Image
|
12 |
|
13 |
from models.yolo import Model
|
14 |
from utils.general import set_logging
|
@@ -112,6 +111,8 @@ if __name__ == '__main__':
|
|
112 |
model = model.fuse().autoshape() # for PIL/cv2/np inputs and NMS
|
113 |
|
114 |
# Verify inference
|
|
|
|
|
115 |
imgs = [Image.open(x) for x in Path('data/images').glob('*.jpg')]
|
116 |
results = model(imgs)
|
117 |
results.show()
|
|
|
8 |
from pathlib import Path
|
9 |
|
10 |
import torch
|
|
|
11 |
|
12 |
from models.yolo import Model
|
13 |
from utils.general import set_logging
|
|
|
111 |
model = model.fuse().autoshape() # for PIL/cv2/np inputs and NMS
|
112 |
|
113 |
# Verify inference
|
114 |
+
from PIL import Image
|
115 |
+
|
116 |
imgs = [Image.open(x) for x in Path('data/images').glob('*.jpg')]
|
117 |
results = model(imgs)
|
118 |
results.show()
|