From fd0d53961364d735611fd1fd2c5ed15e09db17c7 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 26 Mar 2021 21:18:35 +0100 Subject: [PATCH] Update Detections() self.n comment ```python self.n = len(self.pred) # number of images (batch size) ``` --- models/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/common.py b/models/common.py index c6b9cda32e29..21a2ed5a2ca7 100644 --- a/models/common.py +++ b/models/common.py @@ -247,7 +247,7 @@ def __init__(self, imgs, pred, files, times=None, names=None, shape=None): self.xywh = [xyxy2xywh(x) for x in pred] # xywh pixels self.xyxyn = [x / g for x, g in zip(self.xyxy, gn)] # xyxy normalized self.xywhn = [x / g for x, g in zip(self.xywh, gn)] # xywh normalized - self.n = len(self.pred) + self.n = len(self.pred) # number of images (batch size) self.t = tuple((times[i + 1] - times[i]) * 1000 / self.n for i in range(3)) # timestamps (ms) self.s = shape # inference BCHW shape