class_docstr: Class that generates noisy augmentations of input images.
  
  Args:
      anomaly_source_path (str | None): Path to a folder of images that will be used as source of the anomalous
      noise. If not specified, random noise will be used instead.
      p_anomalous (float): Probability that the anomalous perturbation will be applied to a given image.
      beta (float): Parameter that determines the opacity of the noise mask.
class_docstr_tok: ["Class","that","generates","noisy","augmentations","of","input","images",".","Args",":","anomaly_source_path","(","str","|","None",")",":","Path","to","a","folder","of","images","that","will","be","used","as","source","of","the","anomalous","noise",".","If","not","specified",",","random","noise","will","be","used","instead",".","p_anomalous","(","float",")",":","Probability","that","the","anomalous","perturbation","will","be","applied","to","a","given","image",".","beta","(","float",")",":","Parameter","that","determines","the","opacity","of","the","noise","mask","."]
code: def __init__(
      self,
      anomaly_source_path: str | None = None,
      p_anomalous: float = 0.5,
      beta: float | tuple[float, float] = (0.2, 1.0),
  ):
      self.p_anomalous = p_anomalous
      self.beta = beta
  
      self.anomaly_source_paths = []
      if anomaly_source_path is not None:
          for img_ext in IMG_EXTENSIONS:
              self.anomaly_source_paths.extend(
                  glob.glob(
                      anomaly_source_path + "/**/*" + img_ext,
                      recursive=True,
                  )
              )
  
      self.augmenters = [
          iaa.GammaContrast((0.5, 2.0), per_channel=True),
          iaa.MultiplyAndAddToBrightness(mul=(0.8, 1.2), add=(-30, 30)),
          iaa.pillike.EnhanceSharpness(),
          iaa.AddToHueAndSaturation((-50, 50), per_channel=True),
          iaa.Solarize(0.5, threshold=(32, 128)),
          iaa.Posterize(),
          iaa.Invert(),
          iaa.pillike.Autocontrast(),
          iaa.pillike.Equalize(),
          iaa.Affine(rotate=(-45, 45)),
      ]
      self.rot = iaa.Sequential([iaa.Affine(rotate=(-90, 90))])
  
file_path: anomalib/src/anomalib/data/utils/augmenter.py
imports: from __future__ import annotations
  import glob
  import math
  import random
  import cv2
  import imgaug.augmenters
  import numpy
  import torch
  from torch import Tensor
  from torchvision.datasets.folder import IMG_EXTENSIONS
  from anomalib.data.utils.generators.perlin import random_2d_perlin
label_desc: Use image node_id 1 to create a new Augmenter object  with example: obj = Augmenter(anomaly_source_path, p_anomalous, beta)