-
-
Notifications
You must be signed in to change notification settings - Fork 17.2k
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
❔Question
Code:
import torch
import cv2
from PIL import Image
from time import sleep, time
import numpy as np
# Model
model = torch.hub.load('ultralytics/yolov5', 'custom', path_or_model='last.pt')
# Images
img = Image.open('test.png')
# convert image to numpy array
img = np.asarray(img)
# Inference
stime = time()
results = model(img, size=608)
print(time() - stime) #0.8 sec
speed: 1frame - 0.78sec (cpu)
detect.py
speed: 0.04sec (With CUDA)
is much faster
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested