glenn-jocher
commited on
Commit
•
1c132a1
1
Parent(s):
e8fc97a
Update Detections() times=None (#2570)
Browse filesFix for results.tolist() method breaking after YOLOv5 Hub profiling PRshttps://github.com/ultralytics/yolov5/pull/2460 https://github.com/ultralytics/yolov5/pull/2459 and
- models/common.py +1 -1
models/common.py
CHANGED
@@ -235,7 +235,7 @@ class autoShape(nn.Module):
|
|
235 |
|
236 |
class Detections:
|
237 |
# detections class for YOLOv5 inference results
|
238 |
-
def __init__(self, imgs, pred, files, times, names=None, shape=None):
|
239 |
super(Detections, self).__init__()
|
240 |
d = pred[0].device # device
|
241 |
gn = [torch.tensor([*[im.shape[i] for i in [1, 0, 1, 0]], 1., 1.], device=d) for im in imgs] # normalizations
|
|
|
235 |
|
236 |
class Detections:
|
237 |
# detections class for YOLOv5 inference results
|
238 |
+
def __init__(self, imgs, pred, files, times=None, names=None, shape=None):
|
239 |
super(Detections, self).__init__()
|
240 |
d = pred[0].device # device
|
241 |
gn = [torch.tensor([*[im.shape[i] for i in [1, 0, 1, 0]], 1., 1.], device=d) for im in imgs] # normalizations
|