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

Method __init__

tensorpack/dataflow/imgaug/imgproc.py:104–112  ·  view source on GitHub ↗

Args: factor_range (list or tuple): an interval to randomly sample the `contrast_factor`. rgb (bool or None): if None, use the mean per-channel. clip (bool): clip to [0, 255] even when data type is not uint8.

(self, factor_range, rgb=None, clip=True)

Source from the content-addressed store, hash-verified

102 """
103
104 def __init__(self, factor_range, rgb=None, clip=True):
105 """
106 Args:
107 factor_range (list or tuple): an interval to randomly sample the `contrast_factor`.
108 rgb (bool or None): if None, use the mean per-channel.
109 clip (bool): clip to [0, 255] even when data type is not uint8.
110 """
111 super(Contrast, self).__init__()
112 self._init(locals())
113
114 def _get_augment_params(self, _):
115 return self._rand_range(*self.factor_range)

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
_initMethod · 0.45

Tested by

no test coverage detected