class_docstr: BuilderConfig for Cityscapes.
  
  Args:
    right_images (bool): Enables right images for stereo image tasks.
    segmentation_labels (bool): Enables image segmentation labels.
    disparity_maps (bool): Enables disparity maps.
    train_extra_split (bool): Enables train_extra split. This automatically
      enables coarse grain segmentations, if segmentation labels are used.
class_docstr_tok: ["BuilderConfig","for","Cityscapes",".","Args",":","right_images","(","bool",")",":","Enables","right","images","for","stereo","image","tasks",".","segmentation_labels","(","bool",")",":","Enables","image","segmentation","labels",".","disparity_maps","(","bool",")",":","Enables","disparity","maps",".","train_extra_split","(","bool",")",":","Enables","train_extra","split",".","This","automatically","enables","coarse","grain","segmentations",",","if","segmentation","labels","are","used","."]
code: def __init__(
      self,
      *,
      right_images=False,
      segmentation_labels=True,
      disparity_maps=False,
      train_extra_split=False,
      **kwargs,
  ):
      super(CityscapesConfig, self).__init__(version="1.0.0", **kwargs)
  
      self.right_images = right_images
      self.segmentation_labels = segmentation_labels
      self.disparity_maps = disparity_maps
      self.train_extra_split = train_extra_split
  
      self.ignored_ids = set()
  
      # Setup required zips and their root dir names
      self.zip_root = {}
      self.zip_root["images_left"] = (
          "leftImg8bit_trainvaltest.zip",
          "leftImg8bit",
      )
  
      if self.train_extra_split:
          self.zip_root["images_left/extra"] = (
              "leftImg8bit_trainextra.zip",
              "leftImg8bit",
          )
  
      if self.right_images:
          self.zip_root["images_right"] = (
              "rightImg8bit_trainvaltest.zip",
              "rightImg8bit",
          )
          if self.train_extra_split:
              self.zip_root["images_right/extra"] = (
                  "rightImg8bit_trainextra.zip",
                  "rightImg8bit",
              )
  
      if self.segmentation_labels:
          if not self.train_extra_split:
              self.zip_root["segmentation_labels"] = (
                  "gtFine_trainvaltest.zip",
                  "gtFine",
              )
              self.label_suffix = "gtFine_labelIds"
          else:
              # The 'train extra' split only has coarse labels unlike train and val.
              # Therefore, for consistency across splits, we also enable coarse labels
              # using the train_extra_split flag.
              self.zip_root["segmentation_labels"] = (
                  "gtCoarse.zip",
                  "gtCoarse",
              )
              self.zip_root["segmentation_labels/extra"] = (
                  "gtCoarse.zip",
                  "gtCoarse",
              )
              self.label_suffix = "gtCoarse_labelIds"
  
      if self.disparity_maps:
          self.zip_root["disparity_maps"] = (
              "disparity_trainvaltest.zip",
              "disparity",
          )
          if self.train_extra_split:
              self.zip_root["disparity_maps/extra"] = (
                  "disparity_trainextra.zip",
                  "disparity",
              )
              # No disparity for this file
              self.ignored_ids.add("troisdorf_000000_000073")
  
file_path: datasets/tensorflow_datasets/datasets/cityscapes/cityscapes_dataset_builder.py
imports: import os
  import re
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 1 to create a new CityscapesConfig object from inherited base classes: tfds.core with example: obj = CityscapesConfig()