(self)
| 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__()) |
no test coverage detected