Explorar el Código

PyTorch Hub and autoShape update (#1415)

5.0
Glenn Jocher hace 3 años
padre
commit
311de00855
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. +2
    -1
      hubconf.py

+ 2
- 1
hubconf.py Ver fichero

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

Cargando…
Cancelar
Guardar