Detections().tolist() explicit argument fix (#5907)
debugged for missigned Detections attributes
This commit is contained in:
1 parent
1075488d89
commit
fa05f8c977
1 file changed
+1
-1
+1
-1
@@ -608,7 +608,7 @@ class Detections:
|
|||||||
|
|
||||||
def tolist(self):
|
def tolist(self):
|
||||||
# return a list of Detections objects, i.e. 'for result in results.tolist():'
|
# 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 d in x:
|
||||||
for k in ['imgs', 'pred', 'xyxy', 'xyxyn', 'xywh', 'xywhn']:
|
for k in ['imgs', 'pred', 'xyxy', 'xyxyn', 'xywh', 'xywhn']:
|
||||||
setattr(d, k, getattr(d, k)[0]) # pop out of list
|
setattr(d, k, getattr(d, k)[0]) # pop out of list
|
||||||
|
|||||||
Reference in new issue
Block a user