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

Function _augment_flow

ram/data/utils/transforms.py:164–174  ·  view source on GitHub ↗
(flow)

Source from the content-addressed store, hash-verified

162 return img
163
164 def _augment_flow(flow):
165 if hflip: # horizontal
166 cv2.flip(flow, 1, flow)
167 flow[:, :, 0] *= -1
168 if vflip: # vertical
169 cv2.flip(flow, 0, flow)
170 flow[:, :, 1] *= -1
171 if rot90:
172 flow = flow.transpose(1, 0, 2)
173 flow = flow[:, :, [1, 0]]
174 return flow
175
176 if not isinstance(imgs, list):
177 imgs = [imgs]

Callers 1

augmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected