MCPcopy
hub / github.com/dbolya/yolact / __repr__

Method __repr__

data/coco.py:209–217  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

207 return self.coco.loadAnns(ann_ids)
208
209 def __repr__(self):
210 fmt_str = 'Dataset ' + self.__class__.__name__ + '\n'
211 fmt_str += ' Number of datapoints: {}\n'.format(self.__len__())
212 fmt_str += ' Root Location: {}\n'.format(self.root)
213 tmp = ' Transforms (if any): '
214 fmt_str += '{0}{1}\n'.format(tmp, self.transform.__repr__().replace('\n', '\n' + ' ' * len(tmp)))
215 tmp = ' Target Transforms (if any): '
216 fmt_str += '{0}{1}'.format(tmp, self.target_transform.__repr__().replace('\n', '\n' + ' ' * len(tmp)))
217 return fmt_str
218
219def enforce_size(img, targets, masks, num_crowds, new_w, new_h):
220 """ Ensures that the image is the given size without distorting aspect ratio. """

Callers

nothing calls this directly

Calls 2

__len__Method · 0.95
replaceMethod · 0.80

Tested by

no test coverage detected