class_docstr: Base Dataset class for Image Segmentation datasets. Sub-classes must define `ignore_label`
  and `background_idx` variable.
  
  Args:
      opts: Command-line arguments
class_docstr_tok: ["Base","Dataset","class","for","Image","Segmentation","datasets",".","Sub-classes","must","define","`","ignore_label","`","and","`","background_idx","`","variable",".","Args",":","opts",":","Command-line","arguments"]
code: def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None:
      super().__init__(opts=opts, *args, **kwargs)
      self.masks = None
      self.images = None
  
      # ignore label and background indices are dataset specific. So, child classes
      # need to implement these
      self.ignore_label = None
      self.background_idx = None
  
imports: import argparse
  import os
  from typing import List, Mapping, Optional, Tuple, Union
  import numpy
  import torch
  from PIL import Image
  from torch import Tensor
  from data.datasets.dataset_base import BaseImageDataset
  from data.transforms import image_pil
  from data.transforms.common import Compose
  from utils import logger
  from utils.color_map import Colormap
label_desc: Use image node_id 1 to create a new BaseImageSegmentationDataset object from inherited base classes: BaseImageDataset with example: obj = BaseImageSegmentationDataset(opts)