class_docstr: Randomly distorts the image or video as used in `SSD: Single Shot
  MultiBox Detector <https://arxiv.org/abs/1512.02325>`_.
  
  This transform relies on :class:`~torchvision.transforms.v2.ColorJitter`
  under the hood to adjust the contrast, saturation, hue, brightness, and also
  randomly permutes channels.
  
  Args:
      brightness (tuple of float (min, max), optional): How much to jitter brightness.
          brightness_factor is chosen uniformly from [min, max]. Should be non negative numbers.
      contrast (tuple of float (min, max), optional): How much to jitter contrast.
          contrast_factor is chosen uniformly from [min, max]. Should be non-negative numbers.
      saturation (tuple of float (min, max), optional): How much to jitter saturation.
          saturation_factor is chosen uniformly from [min, max]. Should be non negative numbers.
      hue (tuple of float (min, max), optional): How much to jitter hue.
          hue_factor is chosen uniformly from [min, max].  Should have -0.5 <= min <= max <= 0.5.
          To jitter hue, the pixel values of the input image has to be non-negative for conversion to HSV space;
          thus it does not work if you normalize your image to an interval with negative values,
          or use an interpolation that generates negative values before using this function.
      p (float, optional) probability each distortion operation (contrast, saturation, ...) to be applied.
          Default is 0.5.
class_docstr_tok: ["Randomly","distorts","the","image","or","video","as","used","in","`","SSD",":","Single","Shot","MultiBox","Detector","<","https",":","\/\/arxiv.org\/abs\/1512.02325",">","`","_",".","This","transform","relies","on",":","class",":","`","~torchvision.transforms.v2.ColorJitter","`","under","the","hood","to","adjust","the","contrast",",","saturation",",","hue",",","brightness",",","and","also","randomly","permutes","channels",".","Args",":","brightness","(","tuple","of","float","(","min",",","max",")",",","optional",")",":","How","much","to","jitter","brightness",".","brightness_factor","is","chosen","uniformly","from","[","min",",","max","]",".","Should","be","non","negative","numbers",".","contrast","(","tuple","of","float","(","min",",","max",")",",","optional",")",":","How","much","to","jitter","contrast",".","contrast_factor","is","chosen","uniformly","from","[","min",",","max","]",".","Should","be","non-negative","numbers",".","saturation","(","tuple","of","float","(","min",",","max",")",",","optional",")",":","How","much","to","jitter","saturation",".","saturation_factor","is","chosen","uniformly","from","[","min",",","max","]",".","Should","be","non","negative","numbers",".","hue","(","tuple","of","float","(","min",",","max",")",",","optional",")",":","How","much","to","jitter","hue",".","hue_factor","is","chosen","uniformly","from","[","min",",","max","]",".","Should","have","-0.5","<","=","min","<","=","max","<","=","0.5",".","To","jitter","hue",",","the","pixel","values","of","the","input","image","has","to","be","non-negative","for","conversion","to","HSV","space",";","thus","it","does","not","work","if","you","normalize","your","image","to","an","interval","with","negative","values",",","or","use","an","interpolation","that","generates","negative","values","before","using","this","function",".","p","(","float",",","optional",")","probability","each","distortion","operation","(","contrast",",","saturation",",","...",")","to","be","applied",".","Default","is","0.5","."]
code: def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
      if params["brightness_factor"] is not None:
          inpt = self._call_kernel(
              F.adjust_brightness,
              inpt,
              brightness_factor=params["brightness_factor"],
          )
      if (
          params["contrast_factor"] is not None
          and params["contrast_before"]
      ):
          inpt = self._call_kernel(
              F.adjust_contrast,
              inpt,
              contrast_factor=params["contrast_factor"],
          )
      if params["saturation_factor"] is not None:
          inpt = self._call_kernel(
              F.adjust_saturation,
              inpt,
              saturation_factor=params["saturation_factor"],
          )
      if params["hue_factor"] is not None:
          inpt = self._call_kernel(
              F.adjust_hue, inpt, hue_factor=params["hue_factor"]
          )
      if (
          params["contrast_factor"] is not None
          and not params["contrast_before"]
      ):
          inpt = self._call_kernel(
              F.adjust_contrast,
              inpt,
              contrast_factor=params["contrast_factor"],
          )
      if params["channel_permutation"] is not None:
          inpt = self._call_kernel(
              F.permute_channels,
              inpt,
              permutation=params["channel_permutation"],
          )
      return inpt
  
imports: import collections.abc
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import torch
  from torchvision import transforms
  from torchvision.transforms.v2 import functional, Transform
  from ._transform import _RandomApplyTransform
  from ._utils import query_chw
label_desc: Use image node_id 3 for calling the RandomPhotometricDistort obj's underlying member method code with example usage: obj._transform(inpt, params) and returns: inpt