Skip to content

Commit

Permalink
Update Detections() times=None (#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/yolov5/pull/2460 ultralytics/yolov5#2459 and
  • Loading branch information
SecretStar112 committed Mar 23, 2021
1 parent bde07c0 commit 7b827e5
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 7b827e5

Please sign in to comment.