docstr: Load annotation from lvis style annotation file.
  
  Args:
      ann_file (str): Path of annotation file.
  
  Returns:
      list[dict]: Annotation info from LVIS api.
docstr_tok: ["Load","annotation","from","lvis","style","annotation","file",".","Args",":","ann_file","(","str",")",":","Path","of","annotation","file",".","Returns",":","list","[","dict","]",":","Annotation","info","from","LVIS","api","."]
code: def load_annotations(self, ann_file):
      """Load annotation from lvis style annotation file.
  
      Args:
          ann_file (str): Path of annotation file.
  
      Returns:
          list[dict]: Annotation info from LVIS api.
      """
  
      try:
          import lvis
  
          assert lvis.__version__ >= "10.5.3"
          from lvis import LVIS
      except AssertionError:
          raise AssertionError(
              "Incompatible version of lvis is installed. "
              "Run pip uninstall lvis first. Then run pip "
              "install mmlvis to install open-mmlab forked "
              "lvis. "
          )
      except ImportError:
          raise ImportError(
              "Package lvis is not installed. Please run pip "
              "install mmlvis to install open-mmlab forked "
              "lvis."
          )
      self.coco = LVIS(ann_file)
      assert (
          not self.custom_classes
      ), "LVIS custom classes is not supported"
      self.cat_ids = self.coco.get_cat_ids()
      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]
          if info["file_name"].startswith("COCO"):
              # Convert form the COCO 2014 file naming convention of
              # COCO_[train/val/test]2014_000000000000.jpg to the 2017
              # naming convention of 000000000000.jpg
              # (LVIS v1 will fix this naming issue)
              info["filename"] = info["file_name"][-16:]
          else:
              info["filename"] = info["file_name"]
          data_infos.append(info)
      return data_infos
  
file_path: insightface/detection/scrfd/mmdet/datasets/lvis.py
imports: import itertools
  import logging
  import os.path
  import tempfile
  from collections import OrderedDict
  import numpy
  from mmcv.utils import print_log
  from terminaltables import AsciiTable
  from .builder import DATASETS
  from .coco import CocoDataset
label_desc: Use image node_id 1 for calling the LVISV05Dataset obj's underlying member method code with example usage: obj.load_annotations(ann_file) and returns: data_infos