class_docstr: ADE20K Semantic Segmentation Dataset.
  
  Parameters
  ----------
  root : string
      Path to VOCdevkit folder. Default is '$(HOME)/mxnet/datasplits/ade'
  split: string
      'train', 'val' or 'test'
  transform : callable, optional
      A function that transforms the image
  
  Examples
  --------
  >>> from mxnet.gluon.data.vision import transforms
  >>> # Transforms for Normalization
  >>> input_transform = transforms.Compose([
  >>>     transforms.ToTensor(),
  >>>     transforms.Normalize([.485, .456, .406], [.229, .224, .225]),
  >>> ])
  >>> # Create Dataset
  >>> trainset = gluoncv.data.ADE20KSegmentation(split='train', transform=input_transform)
  >>> # Create Training Loader
  >>> train_data = gluon.data.DataLoader(
  >>>     trainset, 4, shuffle=True, last_batch='rollover',
  >>>     num_workers=4)
code: def __init__(
      self,
      root=os.path.expanduser("~/.mxnet/datasets/ade"),
      split="train",
      mode=None,
      transform=None,
      **kwargs,
  ):
      super(ADE20KSegmentation, self).__init__(
          root, split, mode, transform, **kwargs
      )
      root = os.path.join(root, self.BASE_DIR)
      assert os.path.exists(root), (
          "Please setup the dataset using"
          + "scripts/datasets/ade20k.py"
      )
      self.images, self.masks = _get_ade20k_pairs(root, split)
      assert len(self.images) == len(self.masks)
      if len(self.images) == 0:
          raise (
              RuntimeError(
                  "Found 0 images in subfolders of: \
                  "
                  + root
                  + "\n"
              )
          )
  
file_path: gluon-cv/gluoncv/data/ade20k/segmentation.py
imports: import os
  from PIL import Image
  import numpy
  import mxnet
  from ..segbase import SegmentationDataset
label_desc: Use image node_id 1 to create a new ADE20KSegmentation object from inherited base classes: SegmentationDataset with example: obj = ADE20KSegmentation(root, split, mode, transform)