class_docstr: Dataset for dsdl detection.
  
  Args:
      with_bbox(bool): Load bbox or not, defaults to be True.
      with_polygon(bool): Load polygon or not, defaults to be False.
      with_mask(bool): Load seg map mask or not, defaults to be False.
      with_imagelevel_label(bool): Load image level label or not,
          defaults to be False.
      with_hierarchy(bool): Load hierarchy information or not,
          defaults to be False.
      specific_key_path(dict): Path of specific key which can not
          be loaded by it's field name.
      pre_transform(dict): pre-transform functions before loading.
code: def __init__(
      self,
      with_bbox: bool = True,
      with_polygon: bool = False,
      with_mask: bool = False,
      with_imagelevel_label: bool = False,
      with_hierarchy: bool = False,
      specific_key_path: dict = {},
      pre_transform: dict = {},
      **kwargs,
  ) -> None:
      if DSDLDataset is None:
          raise RuntimeError(
              'Package dsdl is not installed. Please run "pip install dsdl".'
          )
  
      self.with_hierarchy = with_hierarchy
      self.specific_key_path = specific_key_path
  
      loc_config = dict(type="LocalFileReader", working_dir="")
      if kwargs.get("data_root"):
          kwargs["ann_file"] = os.path.join(
              kwargs["data_root"], kwargs["ann_file"]
          )
      self.required_fields = [
          "Image",
          "ImageShape",
          "Label",
          "ignore_flag",
      ]
      if with_bbox:
          self.required_fields.append("Bbox")
      if with_polygon:
          self.required_fields.append("Polygon")
      if with_mask:
          self.required_fields.append("LabelMap")
      if with_imagelevel_label:
          self.required_fields.append("image_level_labels")
          assert (
              "image_level_labels" in specific_key_path.keys()
          ), "`image_level_labels` not specified in `specific_key_path` !"
  
      self.extra_keys = [
          key
          for key in self.specific_key_path.keys()
          if key not in self.required_fields
      ]
  
      self.dsdldataset = DSDLDataset(
          dsdl_yaml=kwargs["ann_file"],
          location_config=loc_config,
          required_fields=self.required_fields,
          specific_key_path=specific_key_path,
          transform=pre_transform,
      )
  
      BaseDetDataset.__init__(self, **kwargs)
  
file_path: mmdetection/mmdet/datasets/dsdl.py
imports: import os
  from typing import List
  from mmdet.registry import DATASETS
  from .base_det_dataset import BaseDetDataset
label_desc: Use image node_id 1 to create a new DSDLDetDataset object from inherited base classes: BaseDetDataset with example: obj = DSDLDetDataset(with_bbox, with_polygon, with_mask, with_imagelevel_label, with_hierarchy, specific_key_path, pre_transform)