Skip to content

Commit

Permalink
Update Detections() times=None (ultralytics#2570)
Browse files Browse the repository at this point in the history
Fix for results.tolist() method breaking after YOLOv5 Hub profiling PRshttps://github.com/ultralytics/pull/2460 ultralytics#2459 and

(cherry picked from commit 1c132a1)
  • Loading branch information
glenn-jocher authored and Lechtr committed Mar 23, 2021
1 parent bfa2cd6 commit edcfa17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def forward(self, imgs, size=640, augment=False, profile=False):

class Detections:
# 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__()
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
Expand Down

0 comments on commit edcfa17

Please sign in to comment.