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

Method _augment

tensorpack/dataflow/imgaug/imgproc.py:296–304  ·  view source on GitHub ↗
(self, img, v)

Source from the content-addressed store, hash-verified

294 return (self.rng.randn(3) * self.std).astype("float32")
295
296 def _augment(self, img, v):
297 old_dtype = img.dtype
298 v = v * self.eigval
299 v = v.reshape((3, 1))
300 inc = np.dot(self.eigvec, v).reshape((3,))
301 img = np.add(img, inc)
302 if self.clip or old_dtype == np.uint8:
303 img = np.clip(img, 0, 255)
304 return img.astype(old_dtype)
305
306
307class MinMaxNormalize(PhotometricAugmentor):

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected