code: def __init__(
      self,
      *args,
      data_root: Optional[str] = "",
      data_prefix: dict = dict(img_path=""),
      **kwargs,
  ) -> None:
      if D3 is None:
          raise ImportError(
              "Please install d3 by `pip install ddd-dataset`."
          )
      pkl_anno_path = osp.join(data_root, data_prefix["anno"])
      self.img_root = osp.join(data_root, data_prefix["img"])
      self.d3 = D3(self.img_root, pkl_anno_path)
  
      sent_infos = self.d3.load_sents()
      classes = tuple(
          [sent_info["raw_sent"] for sent_info in sent_infos]
      )
      super().__init__(
          *args,
          data_root=data_root,
          data_prefix=data_prefix,
          metainfo={"classes": classes},
          **kwargs,
      )
  
file_path: mmdetection/mmdet/datasets/dod.py
imports: import os.path
  from typing import List, Optional
  import numpy
  from mmdet.registry import DATASETS
  from .base_det_dataset import BaseDetDataset
  from .api_wrappers import COCO
label_desc: Use image node_id 1 to create a new DODDataset object from inherited base classes: BaseDetDataset with example: obj = DODDataset()