class_docstr: Coco dataset for Panoptic segmentation.
  
  The annotation format is shown as follows. The `ann` field is optional
  for testing.
  
  .. code-block:: none
  
      [
          {
              'filename': f'{image_id:012}.png',
              'image_id':9
              'segments_info':
              [
                  {
                      'id': 8345037, (segment_id in panoptic png,
                                      convert from rgb)
                      'category_id': 51,
                      'iscrowd': 0,
                      'bbox': (x1, y1, w, h),
                      'area': 24315
                  },
                  ...
              ]
          },
          ...
      ]
  
  Args:
      ann_file (str): Annotation file path. Defaults to ''.
      metainfo (dict, optional): Meta information for dataset, such as class
          information. Defaults to None.
      data_root (str, optional): The root directory for ``data_prefix`` and
          ``ann_file``. Defaults to None.
      data_prefix (dict, optional): Prefix for training data. Defaults to
          ``dict(img=None, ann=None, seg=None)``. The prefix ``seg`` which is
          for panoptic segmentation map must be not None.
      filter_cfg (dict, optional): Config for filter data. Defaults to None.
      indices (int or Sequence[int], optional): Support using first few
          data in annotation file to facilitate training/testing on a smaller
          dataset. Defaults to None which means using all ``data_infos``.
      serialize_data (bool, optional): Whether to hold memory using
          serialized objects, when enabled, data loader workers can use
          shared RAM from master process instead of making a copy. Defaults
          to True.
      pipeline (list, optional): Processing pipeline. Defaults to [].
      test_mode (bool, optional): ``test_mode=True`` means in test phase.
          Defaults to False.
      lazy_init (bool, optional): Whether to load annotation during
          instantiation. In some cases, such as visualization, only the meta
          information of the dataset is needed, which is not necessary to
          load annotation file. ``Basedataset`` can skip load annotations to
          save time by set ``lazy_init=False``. Defaults to False.
      max_refetch (int, optional): If ``Basedataset.prepare_data`` get a
          None img. The maximum extra number of cycles to get a valid
          image. Defaults to 1000.
code: def __init__(
      self,
      ann_file: str = "",
      metainfo: Optional[dict] = None,
      data_root: Optional[str] = None,
      data_prefix: dict = dict(img=None, ann=None, seg=None),
      filter_cfg: Optional[dict] = None,
      indices: Optional[Union[int, Sequence[int]]] = None,
      serialize_data: bool = True,
      pipeline: List[Union[dict, Callable]] = [],
      test_mode: bool = False,
      lazy_init: bool = False,
      max_refetch: int = 1000,
      backend_args: dict = None,
      **kwargs,
  ) -> None:
      super().__init__(
          ann_file=ann_file,
          metainfo=metainfo,
          data_root=data_root,
          data_prefix=data_prefix,
          filter_cfg=filter_cfg,
          indices=indices,
          serialize_data=serialize_data,
          pipeline=pipeline,
          test_mode=test_mode,
          lazy_init=lazy_init,
          max_refetch=max_refetch,
          backend_args=backend_args,
          **kwargs,
      )
  
file_path: mmdetection/mmdet/datasets/coco_panoptic.py
imports: import os.path
  from typing import Callable, List, Optional, Sequence, Union
  from mmdet.registry import DATASETS
  from .api_wrappers import COCOPanoptic
  from .coco import CocoDataset
label_desc: Use image node_id 1 to create a new CocoPanopticDataset object from inherited base classes: CocoDataset with example: obj = CocoPanopticDataset(ann_file, metainfo, data_root, data_prefix, filter_cfg, indices, serialize_data, pipeline, test_mode, lazy_init, max_refetch, backend_args)