Li Zeng
commited on
Commit
•
fa05f8c
1
Parent(s):
1075488
`Detections().tolist()` explicit argument fix (#5907)
Browse files- models/common.py +1 -1
models/common.py
CHANGED
@@ -608,7 +608,7 @@ class Detections:
|
|
608 |
|
609 |
def tolist(self):
|
610 |
# return a list of Detections objects, i.e. 'for result in results.tolist():'
|
611 |
-
x = [Detections([self.imgs[i]], [self.pred[i]], self.names, self.s) for i in range(self.n)]
|
612 |
for d in x:
|
613 |
for k in ['imgs', 'pred', 'xyxy', 'xyxyn', 'xywh', 'xywhn']:
|
614 |
setattr(d, k, getattr(d, k)[0]) # pop out of list
|
|
|
608 |
|
609 |
def tolist(self):
|
610 |
# return a list of Detections objects, i.e. 'for result in results.tolist():'
|
611 |
+
x = [Detections([self.imgs[i]], [self.pred[i]], names=self.names, shape=self.s) for i in range(self.n)]
|
612 |
for d in x:
|
613 |
for k in ['imgs', 'pred', 'xyxy', 'xyxyn', 'xywh', 'xywhn']:
|
614 |
setattr(d, k, getattr(d, k)[0]) # pop out of list
|