class_docstr: Dataset class for the COCO dataset that maps classes to PASCAL VOC classes
  
  Args:
      opts: command-line arguments
class_docstr_tok: ["Dataset","class","for","the","COCO","dataset","that","maps","classes","to","PASCAL","VOC","classes","Args",":","opts",":","command-line","arguments"]
code: def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None:
      super().__init__(opts=opts, *args, **kwargs)
      year = 2017
      split = "train" if self.is_training else "val"
      ann_file = os.path.join(
          self.root,
          "annotations/instances_{}{}.json".format(split, year),
      )
      self.img_dir = os.path.join(
          self.root, "images/{}{}".format(split, year)
      )
      self.split = split
      self.coco = COCO(ann_file)
      self.coco_mask = mask
      self.ids = list(self.coco.imgs.keys())
  
      self.ignore_label = 255
      self.background_idx = 0
  
file_path: ml-cvnets/data/datasets/segmentation/coco_segmentation.py
imports: import argparse
  import os
  from typing import List, Mapping, Optional, Tuple, Union
  import numpy
  from pycocotools import mask
  from pycocotools.coco import COCO
  from torch import Tensor
  from data.datasets import DATASET_REGISTRY
  from data.datasets.segmentation.base_segmentation import BaseImageSegmentationDataset
label_desc: Use image node_id 1 to create a new COCOSegmentationDataset object from inherited base classes: BaseImageSegmentationDataset with example: obj = COCOSegmentationDataset(opts)