class_docstr: Simple VisionDataset type for the classification tasks.
  
  The current class expects that data within the root folder
  will be structured the following way:
  
      - root/
          - class1/
              image1.jpeg
  
  Otherwise, exception will be raised.
  
  Parameters
  ----------
  root : str
      Path to the root directory of the dataset.
  transforms : Callable, optional
      A function/transform that takes in an PIL image and returns a transformed version.
      E.g, transforms.RandomCrop
  transform : Callable, optional
      A function/transforms that takes in an image and a label and returns the
      transformed versions of both.
      E.g, ``transforms.Rotate``
  target_transform : Callable, optional
      A function/transform that takes in the target and transforms it.
  image_extension : str, default 'jpg'
      images format
class_docstr_tok: ["Simple","VisionDataset","type","for","the","classification","tasks",".","The","current","class","expects","that","data","within","the","root","folder","will","be","structured","the","following","way",":","-","root\/","-","class1\/","image1.jpeg","Otherwise",",","exception","will","be","raised",".","Parameters","--","--","--","--","--","root",":","str","Path","to","the","root","directory","of","the","dataset",".","transforms",":","Callable",",","optional","A","function\/transform","that","takes","in","an","PIL","image","and","returns","a","transformed","version",".","E.g",",","transforms.RandomCrop","transform",":","Callable",",","optional","A","function\/transforms","that","takes","in","an","image","and","a","label","and","returns","the","transformed","versions","of","both",".","E.g",",","``","transforms.Rotate","``","target_transform",":","Callable",",","optional","A","function\/transform","that","takes","in","the","target","and","transforms","it",".","image_extension",":","str",",","default","'jpg'","images","format"]
docstr: Get the image and label at the given index.
docstr_tok: ["Get","the","image","and","label","at","the","given","index","."]
code: def __getitem__(self, index: int) -> t.Tuple[np.ndarray, int]:
      """Get the image and label at the given index."""
      image_file = self.images[index]
      image = cv2.imread(str(image_file))
      image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
      target = self.classes_map[image_file.parent.name]
  
      if self.transforms is not None:
          transformed = self.transforms(image=image, target=target)
          image, target = transformed["image"], transformed["target"]
      else:
          if self.transform is not None:
              image = self.transform(image=image)["image"]
          if self.target_transform is not None:
              target = self.target_transform(target)
  
      return image, target
  
file_path: deepchecks/deepchecks/vision/vision_data/simple_classification_data.py
imports: import typing
  from pathlib import Path
  import cv2
  import numpy
  import torch
  from torch.utils.data import DataLoader
  from typing_extensions import Literal
  from deepchecks.vision.vision_data import VisionData
label_desc: Use image node_id 2 for calling the SimpleClassificationDataset obj's underlying member method code with example usage: obj.__getitem__(index) and returns: image,  target