code: def __init__(
      self,
      mean: float = 0.5,
      std: float = 0.5,
      resize_size: Optional[Tuple[int, ...]] = None,
      max_disparity: Optional[float] = None,
      interpolation_type: str = "bilinear",
      use_grayscale: bool = False,
  ) -> None:
      super().__init__()
  
      transforms = [
          T.ToTensor(),
          T.ConvertImageDtype(torch.float32),
      ]
  
      if use_grayscale:
          transforms.append(T.ConvertToGrayscale())
  
      if resize_size is not None:
          transforms.append(
              T.Resize(
                  resize_size, interpolation_type=interpolation_type
              )
          )
  
      transforms.extend(
          [
              T.Normalize(mean=mean, std=std),
              T.MakeValidDisparityMask(max_disparity=max_disparity),
              T.ValidateModelInput(),
          ]
      )
  
      self.transforms = T.Compose(transforms)
  
file_path: vision/references/depth/stereo/presets.py
imports: from typing import Optional, Tuple, Union
  import torch
  import transforms
label_desc: Use image node_id 1 to create a new StereoMatchingEvalPreset object from inherited base classes: torch.nn with example: obj = StereoMatchingEvalPreset(mean, std, resize_size, max_disparity, interpolation_type, use_grayscale)