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.
      """
  
      self.coco = COCO(ann_file)
      self.cat_ids = self.coco.get_cat_ids(cat_names=self.CLASSES)
      self.cat2label = {
          cat_id: i for i, cat_id in enumerate(self.cat_ids)
      }
      self.img_ids = self.coco.get_img_ids()
      data_infos = []
      for i in self.img_ids:
          info = self.coco.load_imgs([i])[0]
          info["filename"] = info["file_name"]
          data_infos.append(info)
      return data_infos
  
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 pycocotools.coco import COCO
  from pycocotools.cocoeval import COCOeval
  from terminaltables import AsciiTable
  from mmdet.core import eval_recalls
  from .builder import DATASETS
  from .custom import CustomDataset
label_desc: Use image node_id 1 for calling the CocoDataset obj's underlying member method code with example usage: obj.load_annotations(ann_file) and returns: data_infos