docstr: Load annotation from COCO style annotation file.
  
  Args:
      ann_file (str): Path of annotation file.
  
  Returns:
      list[dict]: Annotation info from COCO api.
docstr_tok: ["Load","annotation","from","COCO","style","annotation","file",".","Args",":","ann_file","(","str",")",":","Path","of","annotation","file",".","Returns",":","list","[","dict","]",":","Annotation","info","from","COCO","api","."]
code: def load_annotations(self, ann_file):
      """Load annotation from COCO style annotation file.
  
      Args:
          ann_file (str): Path of annotation file.
  
      Returns:
          list[dict]: Annotation info from COCO api.
      """
      name = None
      bbox_map = {}
      for line in open(ann_file, "r"):
          line = line.strip()
          if line.startswith("#"):
              value = line[1:].strip().split()
              name = value[0]
              width = int(value[1])
              height = int(value[2])
  
              bbox_map[name] = dict(width=width, height=height, objs=[])
              continue
          assert name is not None
          assert name in bbox_map
          bbox_map[name]["objs"].append(line)
      print("origin image size", len(bbox_map))
      data_infos = []
      for name in bbox_map:
          item = bbox_map[name]
          width = item["width"]
          height = item["height"]
          vals = item["objs"]
          objs = []
          for line in vals:
              data = self._parse_ann_line(line)
              if data is None:
                  continue
              objs.append(data)  # data is (bbox, kps, cat)
          if len(objs) == 0 and not self.test_mode:
              continue
          data_infos.append(
              dict(filename=name, width=width, height=height, objs=objs)
          )
      return data_infos
  
file_path: insightface/detection/scrfd/mmdet/datasets/retinaface.py
imports: import itertools
  import logging
  import os.path
  import tempfile
  from collections import OrderedDict
  import mmcv
  import numpy
  from mmcv.utils import print_log
  from terminaltables import AsciiTable
  from mmdet.core import eval_recalls
  from .builder import DATASETS
  from .custom import CustomDataset
label_desc: Use image node_id 3 for calling the RetinaFaceDataset obj's underlying member method code with example usage: obj.load_annotations(ann_file) and returns: data_infos