Unverified 提交 1c132a1f authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Update Detections() times=None (#2570)

Fix for results.tolist() method breaking after YOLOv5 Hub profiling PRshttps://github.com/ultralytics/yolov5/pull/2460 https://github.com/ultralytics/yolov5/pull/2459 and
上级 e8fc97aa
...@@ -235,7 +235,7 @@ class autoShape(nn.Module): ...@@ -235,7 +235,7 @@ class autoShape(nn.Module):
class Detections: class Detections:
# detections class for YOLOv5 inference results # detections class for YOLOv5 inference results
def __init__(self, imgs, pred, files, times, names=None, shape=None): def __init__(self, imgs, pred, files, times=None, names=None, shape=None):
super(Detections, self).__init__() super(Detections, self).__init__()
d = pred[0].device # device d = pred[0].device # device
gn = [torch.tensor([*[im.shape[i] for i in [1, 0, 1, 0]], 1., 1.], device=d) for im in imgs] # normalizations gn = [torch.tensor([*[im.shape[i] for i in [1, 0, 1, 0]], 1., 1.], device=d) for im in imgs] # normalizations
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论