MCPcopy Create free account
hub / github.com/DragonisCV/RAM / _augment

Function _augment

ram/data/utils/transforms.py:155–162  ·  view source on GitHub ↗
(img)

Source from the content-addressed store, hash-verified

153 rot90 = rotation and random.random() < 0.5
154
155 def _augment(img):
156 if hflip: # horizontal
157 cv2.flip(img, 1, img)
158 if vflip: # vertical
159 cv2.flip(img, 0, img)
160 if rot90:
161 img = img.transpose(1, 0, 2)
162 return img
163
164 def _augment_flow(flow):
165 if hflip: # horizontal

Callers 1

augmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected