MCPcopy Create free account
hub / github.com/tensorpack/tensorpack / __init__

Method __init__

tensorpack/dataflow/imgaug/imgproc.py:78–85  ·  view source on GitHub ↗

Args: range (tuple): Randomly scale the image by a factor in (range[0], range[1]) clip (bool): clip results to [0,255] even when data type is not uint8.

(self, range, clip=True)

Source from the content-addressed store, hash-verified

76 Adjust brightness by scaling by a random factor.
77 """
78 def __init__(self, range, clip=True):
79 """
80 Args:
81 range (tuple): Randomly scale the image by a factor in (range[0], range[1])
82 clip (bool): clip results to [0,255] even when data type is not uint8.
83 """
84 super(BrightnessScale, self).__init__()
85 self._init(locals())
86
87 def _get_augment_params(self, _):
88 return self._rand_range(*self.range)

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
_initMethod · 0.45

Tested by

no test coverage detected