class_docstr: Salt and pepper noise.
  Randomly set some elements in image to 0 or 255, regardless of its channels.
class_docstr_tok: ["Salt","and","pepper","noise",".","Randomly","set","some","elements","in","image","to","0","or","255",",","regardless","of","its","channels","."]
docstr: Args:
      white_prob (float), black_prob (float): probabilities setting an element to 255 or 0.
docstr_tok: ["Args",":","white_prob","(","float",")",",","black_prob","(","float",")",":","probabilities","setting","an","element","to","255","or","0","."]
code: def __init__(self, white_prob=0.05, black_prob=0.05):
      """
      Args:
          white_prob (float), black_prob (float): probabilities setting an element to 255 or 0.
      """
      assert (
          white_prob + black_prob <= 1
      ), "Sum of probabilities cannot be greater than 1"
      super(SaltPepperNoise, self).__init__()
      self._init(locals())
  
file_path: tensorpack/tensorpack/dataflow/imgaug/noise.py
imports: import numpy
  import cv2
  from .base import PhotometricAugmentor
label_desc: Use image node_id 1 to create a new SaltPepperNoise object from inherited base classes: PhotometricAugmentor with example: obj = SaltPepperNoise(white_prob, black_prob)