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
  • Loading branch information
glenn-jocher authored Mar 23, 2021
1 parent 06419b1 commit e4f3ad6
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 e4f3ad6

Please sign in to comment.