MCPcopy Create free account
hub / github.com/ZhengPeng7/BiRefNet / cv_random_flip

Function cv_random_flip

preproc.py:21–25  ·  view source on GitHub ↗
(img, label)

Source from the content-addressed store, hash-verified

19
20
21def cv_random_flip(img, label):
22 if random.random() > 0.5:
23 img = img.transpose(Image.FLIP_LEFT_RIGHT)
24 label = label.transpose(Image.FLIP_LEFT_RIGHT)
25 return img, label
26
27
28def random_crop(image, label):

Callers 1

preprocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected