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

Method __call__

utils/augmentations.py:455–462  ·  view source on GitHub ↗
(self, image, masks, boxes, labels)

Source from the content-addressed store, hash-verified

453
454class RandomFlip(object):
455 def __call__(self, image, masks, boxes, labels):
456 height , _ , _ = image.shape
457 if random.randint(2):
458 image = image[::-1, :]
459 masks = masks[:, ::-1, :]
460 boxes = boxes.copy()
461 boxes[:, 1::2] = height - boxes[:, 3::-2]
462 return image, masks, boxes, labels
463
464
465class RandomRot90(object):

Callers

nothing calls this directly

Calls 1

copyMethod · 0.80

Tested by

no test coverage detected