Skip to content

Commit

Permalink
Update Detections() times=None
Browse files Browse the repository at this point in the history
Fix for results.tolist() method breaking after YOLOv5 Hub profiling PRshttps://github.com//pull/2460 #2459 and
  • Loading branch information
glenn-jocher authored Mar 23, 2021
1 parent e8fc97a commit 746d54b
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 746d54b

Please sign in to comment.