class_docstr: ## Carvana Dataset
docstr: :param image_path: is the path to the images
  :param mask_path: is the path to the masks
docstr_tok: [":","param","image_path",":","is","the","path","to","the","images",":","param","mask_path",":","is","the","path","to","the","masks"]
code: def __init__(self, image_path: Path, mask_path: Path):
      """
      :param image_path: is the path to the images
      :param mask_path: is the path to the masks
      """
      # Get a dictionary of images by id
      self.images = {p.stem: p for p in image_path.iterdir()}
      # Get a dictionary of masks by id
      self.masks = {p.stem[:-5]: p for p in mask_path.iterdir()}
  
      # Image ids list
      self.ids = list(self.images.keys())
  
      # Transformations
      self.transforms = torchvision.transforms.Compose(
          [
              torchvision.transforms.Resize(572),
              torchvision.transforms.ToTensor(),
          ]
      )
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/unet/carvana.py
imports: from torch import nn
  from pathlib import Path
  import torch.utils.data
  import torchvision.transforms.functional
  from PIL import Image
  from labml import lab
label_desc: Use image node_id 1 to create a new CarvanaDataset object from inherited base classes: torch.utils.data with example: obj = CarvanaDataset(image_path, mask_path)