Shortcuts

mmcls.datasets.pipelines.Posterize

class mmcls.datasets.pipelines.Posterize(bits, prob=0.5)[source]

Posterize images (reduce the number of bits for each color channel).

Parameters
  • bits (int | float) – Number of bits for each pixel in the output img, which should be less or equal to 8.

  • prob (float) – The probability for posterizing therefore should be in range [0, 1]. Defaults to 0.5.