PyTorch Hub and autoShape update (#1415)
This commit is contained in:
1 parent
2aaaec3cca
commit
311de00855
1 file changed
+2
-1
+2
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user