MCPcopy
hub / github.com/ultralytics/yolov5 / tolist

Method tolist

models/common.py:812–819  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

810 return new
811
812 def tolist(self):
813 # return a list of Detections objects, i.e. 'for result in results.tolist():'
814 r = range(self.n) # iterable
815 x = [Detections([self.ims[i]], [self.pred[i]], [self.files[i]], self.times, self.names, self.s) for i in r]
816 # for d in x:
817 # for k in ['ims', 'pred', 'xyxy', 'xyxyn', 'xywh', 'xywhn']:
818 # setattr(d, k, getattr(d, k)[0]) # pop out of list
819 return x
820
821 def print(self):
822 LOGGER.info(self.__str__())

Callers 15

save_one_txtFunction · 0.80
save_one_jsonFunction · 0.80
runFunction · 0.80
runFunction · 0.80
get_jsonMethod · 0.80
plot_imagesFunction · 0.80
plot_images_and_masksFunction · 0.80
create_dataset_tableMethod · 0.80
log_training_progressMethod · 0.80
val_one_imageMethod · 0.80
log_predictionsMethod · 0.80
runFunction · 0.80

Calls 1

DetectionsClass · 0.85

Tested by

no test coverage detected