MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / TransposeTransform

Class TransposeTransform

tensorpack/dataflow/imgaug/transform.py:197–208  ·  view source on GitHub ↗

Transpose the image.

Source from the content-addressed store, hash-verified

195
196
197class TransposeTransform(Transform):
198 """
199 Transpose the image.
200 """
201 def apply_image(self, img):
202 ret = cv2.transpose(img)
203 if img.ndim == 3 and ret.ndim == 2:
204 ret = ret[:, :, np.newaxis]
205 return ret
206
207 def apply_coords(self, coords):
208 return coords[:, ::-1]
209
210
211class NoOpTransform(Transform):

Callers 1

get_transformMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…