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

Method __init__

tensorpack/dataflow/imgaug/imgproc.py:277–290  ·  view source on GitHub ↗

Args: std (float): maximum standard deviation eigval: a vector of (3,). The eigenvalues of 3 channels. eigvec: a 3x3 matrix. Each column is one eigen vector. clip (bool): clip results to [0,255] even when data type is not uint8.

(self, std, eigval, eigvec, clip=True)

Source from the content-addressed store, hash-verified

275 """
276
277 def __init__(self, std, eigval, eigvec, clip=True):
278 """
279 Args:
280 std (float): maximum standard deviation
281 eigval: a vector of (3,). The eigenvalues of 3 channels.
282 eigvec: a 3x3 matrix. Each column is one eigen vector.
283 clip (bool): clip results to [0,255] even when data type is not uint8.
284 """
285 super(Lighting, self).__init__()
286 eigval = np.asarray(eigval, dtype="float32")
287 eigvec = np.asarray(eigvec, dtype="float32")
288 assert eigval.shape == (3,)
289 assert eigvec.shape == (3, 3)
290 self._init(locals())
291
292 def _get_augment_params(self, img):
293 assert img.shape[2] == 3

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
_initMethod · 0.45

Tested by

no test coverage detected