(self, img, mask)
| 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 | |
| 62 | class RandomHorizontallyFlip(object): |
nothing calls this directly
no outgoing calls
no test coverage detected