MCPcopy Create free account
hub / github.com/SLDGroup/EMCAD / __call__

Method __call__

utils/joint_transforms.py:53–59  ·  view source on GitHub ↗
(self, img, mask)

Source from the content-addressed store, hash-verified

51 self.size = size
52
53 def __call__(self, img, mask):
54 assert img.size == mask.size
55 w, h = img.size
56 th, tw = self.size
57 x1 = int(round((w - tw) / 2.))
58 y1 = int(round((h - th) / 2.))
59 return img.crop((x1, y1, x1 + tw, y1 + th)), mask.crop((x1, y1, x1 + tw, y1 + th))
60
61
62class RandomHorizontallyFlip(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected