class_docstr: ADE20K dataset.
  
  In segmentation map annotation for ADE20K, 0 stands for background, which
  is not included in 150 categories. The ``img_suffix`` is fixed to '.jpg',
  and ``seg_map_suffix`` is fixed to '.png'.
class_docstr_tok: ["ADE20K","dataset",".","In","segmentation","map","annotation","for","ADE20K",",","0","stands","for","background",",","which","is","not","included","in","150","categories",".","The","``","img_suffix","``","is","fixed","to","'.jpg","'",",","and","``","seg_map_suffix","``","is","fixed","to","'.png","'","."]
docstr: Load annotation from directory or annotation file.
  
  Returns:
      List[dict]: All data info of dataset.
docstr_tok: ["Load","annotation","from","directory","or","annotation","file",".","Returns",":","List","[","dict","]",":","All","data","info","of","dataset","."]
code: def load_data_list(self) -> List[dict]:
      """Load annotation from directory or annotation file.
  
      Returns:
          List[dict]: All data info of dataset.
      """
      data_list = []
      img_dir = self.data_prefix.get("img_path", None)
      ann_dir = self.data_prefix.get("seg_map_path", None)
      for img in fileio.list_dir_or_file(
          dir_path=img_dir,
          list_dir=False,
          suffix=self.img_suffix,
          recursive=True,
          backend_args=self.backend_args,
      ):
          data_info = dict(img_path=osp.join(img_dir, img))
          if ann_dir is not None:
              seg_map = img.replace(
                  self.img_suffix, self.seg_map_suffix
              )
              data_info["seg_map_path"] = osp.join(ann_dir, seg_map)
          data_info["label_map"] = self.label_map
          if self.return_classes:
              data_info["text"] = list(self._metainfo["classes"])
          data_list.append(data_info)
      return data_list
  
file_path: mmdetection/mmdet/datasets/ade20k.py
imports: import os.path
  from typing import List
  from mmengine import fileio
  from mmdet.registry import DATASETS
  from .base_semseg_dataset import BaseSegDataset
  from .coco import CocoDataset
  from .coco_panoptic import CocoPanopticDataset
label_desc: Use image node_id 2 for calling the ADE20KSegDataset obj's underlying member method code with example usage: obj.load_data_list() and returns: data_list