trw.transforms.cutout_function

Module Contents

Functions

cutout_value_fn_constant(image, value)

Replace all image as a constant value

cutout(image, cutout_size, cutout_value_fn)

Remove a part of the image randomly

trw.transforms.cutout_function.cutout_value_fn_constant(image, value)

Replace all image as a constant value

trw.transforms.cutout_function.cutout(image, cutout_size, cutout_value_fn)

Remove a part of the image randomly

Parameters
  • array – a numpy.ndarray or torch.Tensor n-dimensional array. Samples are stored on axis 0

  • cutout_size – the cutout_size of the regions to be occluded

  • cutout_value_fn – the function value used for occlusion. Must take as argument image and modify directly the image

Returns

None