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

Method get_transform

tensorpack/dataflow/imgaug/misc.py:32–38  ·  view source on GitHub ↗
(self, img)

Source from the content-addressed store, hash-verified

30 self._init(locals())
31
32 def get_transform(self, img):
33 h, w = img.shape[:2]
34 do = self._rand_range() < self.prob
35 if not do:
36 return NoOpTransform()
37 else:
38 return FlipTransform(h, w, self.horiz)
39
40
41class Resize(ImageAugmentor):

Callers 5

_aug_mapperMethod · 0.45
_aug_mapperMethod · 0.45
test_augmentorsMethod · 0.45
apply_imageMethod · 0.45

Calls 3

NoOpTransformClass · 0.85
FlipTransformClass · 0.85
_rand_rangeMethod · 0.80

Tested by 2

test_augmentorsMethod · 0.36