class_docstr: Objects365 v1 dataset for detection.
class_docstr_tok: ["Objects365","v1","dataset","for","detection","."]
docstr: Load annotations from an annotation file named as ``self.ann_file``
  
  Returns:
      List[dict]: A list of annotation.
docstr_tok: ["Load","annotations","from","an","annotation","file","named","as","``","self.ann_file","``","Returns",":","List","[","dict","]",":","A","list","of","annotation","."]
code: def load_data_list(self) -> List[dict]:
      """Load annotations from an annotation file named as ``self.ann_file``
  
      Returns:
          List[dict]: A list of annotation.
      """  # noqa: E501
      with get_local_path(
          self.ann_file, backend_args=self.backend_args
      ) as local_path:
          self.coco = self.COCOAPI(local_path)
  
      # 'categories' list in objects365_train.json and objects365_val.json
      # is inconsistent, need sort list(or dict) before get cat_ids.
      cats = self.coco.cats
      sorted_cats = {i: cats[i] for i in sorted(cats)}
      self.coco.cats = sorted_cats
      categories = self.coco.dataset["categories"]
      sorted_categories = sorted(categories, key=lambda i: i["id"])
      self.coco.dataset["categories"] = sorted_categories
      # The order of returned `cat_ids` will not
      # change with the order of the `classes`
      self.cat_ids = self.coco.get_cat_ids(
          cat_names=self.metainfo["classes"]
      )
      self.cat2label = {
          cat_id: i for i, cat_id in enumerate(self.cat_ids)
      }
      self.cat_img_map = copy.deepcopy(self.coco.cat_img_map)
  
      img_ids = self.coco.get_img_ids()
      data_list = []
      total_ann_ids = []
      for img_id in img_ids:
          raw_img_info = self.coco.load_imgs([img_id])[0]
          raw_img_info["img_id"] = img_id
  
          ann_ids = self.coco.get_ann_ids(img_ids=[img_id])
          raw_ann_info = self.coco.load_anns(ann_ids)
          total_ann_ids.extend(ann_ids)
  
          parsed_data_info = self.parse_data_info(
              {
                  "raw_ann_info": raw_ann_info,
                  "raw_img_info": raw_img_info,
              }
          )
          data_list.append(parsed_data_info)
      if self.ANN_ID_UNIQUE:
          assert len(set(total_ann_ids)) == len(
              total_ann_ids
          ), f"Annotation ids in '{self.ann_file}' are not unique!"
  
      del self.coco
  
      return data_list
  
file_path: mmdetection/mmdet/datasets/objects365.py
imports: import copy
  import os.path
  from typing import List
  from mmengine.fileio import get_local_path
  from mmdet.registry import DATASETS
  from .api_wrappers import COCO
  from .coco import CocoDataset
label_desc: Use image node_id 1 for calling the Objects365V1Dataset obj's underlying member method code with example usage: obj.load_data_list() and returns: data_list