class_docstr: Base dataset for detection.
  
  Args:
      proposal_file (str, optional): Proposals file path. Defaults to None.
      file_client_args (dict): Arguments to instantiate the
          corresponding backend in mmdet <= 3.0.0rc6. Defaults to None.
      backend_args (dict, optional): Arguments to instantiate the
          corresponding backend. Defaults to None.
      return_classes (bool): Whether to return class information
          for open vocabulary-based algorithms. Defaults to False.
      caption_prompt (dict, optional): Prompt for captioning.
          Defaults to None.
class_docstr_tok: ["Base","dataset","for","detection",".","Args",":","proposal_file","(","str",",","optional",")",":","Proposals","file","path",".","Defaults","to","None",".","file_client_args","(","dict",")",":","Arguments","to","instantiate","the","corresponding","backend","in","mmdet","<","=","3.0.0rc6",".","Defaults","to","None",".","backend_args","(","dict",",","optional",")",":","Arguments","to","instantiate","the","corresponding","backend",".","Defaults","to","None",".","return_classes","(","bool",")",":","Whether","to","return","class","information","for","open","vocabulary-based","algorithms",".","Defaults","to","False",".","caption_prompt","(","dict",",","optional",")",":","Prompt","for","captioning",".","Defaults","to","None","."]
code: def __init__(
      self,
      *args,
      seg_map_suffix: str = ".png",
      proposal_file: Optional[str] = None,
      file_client_args: dict = None,
      backend_args: dict = None,
      return_classes: bool = False,
      caption_prompt: Optional[dict] = None,
      **kwargs,
  ) -> None:
      self.seg_map_suffix = seg_map_suffix
      self.proposal_file = proposal_file
      self.backend_args = backend_args
      self.return_classes = return_classes
      self.caption_prompt = caption_prompt
      if self.caption_prompt is not None:
          assert (
              self.return_classes
          ), "return_classes must be True when using caption_prompt"
      if file_client_args is not None:
          raise RuntimeError(
              "The `file_client_args` is deprecated, "
              "please use `backend_args` instead, please refer to"
              "https://github.com/open-mmlab/mmdetection/blob/main/configs/_base_/datasets/coco_detection.py"  # noqa: E501
          )
      super().__init__(*args, **kwargs)
  
file_path: mmdetection/mmdet/datasets/base_det_dataset.py
imports: import os.path
  from typing import List, Optional
  from mmengine.dataset import BaseDataset
  from mmengine.fileio import load
  from mmengine.utils import is_abs
  from ..registry import DATASETS
label_desc: Use image node_id 1 to create a new BaseDetDataset object from inherited base classes: BaseDataset with example: obj = BaseDetDataset()