From fa05f8c97798b228b79a61ae5d8d5251bbe34758 Mon Sep 17 00:00:00 2001 From: Li Zeng Date: Tue, 7 Dec 2021 16:01:41 +0100 Subject: [PATCH] `Detections().tolist()` explicit argument fix (#5907) debugged for missigned Detections attributes --- models/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/common.py b/models/common.py index 6a5303ba8c42..ec5fbfaec4ca 100644 --- a/models/common.py +++ b/models/common.py @@ -608,7 +608,7 @@ def pandas(self): def tolist(self): # return a list of Detections objects, i.e. 'for result in results.tolist():' - x = [Detections([self.imgs[i]], [self.pred[i]], self.names, self.s) for i in range(self.n)] + x = [Detections([self.imgs[i]], [self.pred[i]], names=self.names, shape=self.s) for i in range(self.n)] for d in x: for k in ['imgs', 'pred', 'xyxy', 'xyxyn', 'xywh', 'xywhn']: setattr(d, k, getattr(d, k)[0]) # pop out of list