MCPcopy Create free account
hub / github.com/ChunmingHe/WS-SAM / cv_random_flip_noEdge

Function cv_random_flip_noEdge

utils/data_val.py:25–31  ·  view source on GitHub ↗
(img, label)

Source from the content-addressed store, hash-verified

23
24# several data augumentation strategies
25def cv_random_flip_noEdge(img, label):
26 # left right flip
27 flip_flag = random.randint(0, 1)
28 if flip_flag == 1:
29 img = img.transpose(Image.FLIP_LEFT_RIGHT)
30 label = label.transpose(Image.FLIP_LEFT_RIGHT)
31 return img, label
32
33def randomCrop(image, label, edge):
34 border = 30

Callers 3

__getitem__Method · 0.85
__getitem__Method · 0.85
__getitem__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected