class_docstr: This class is almost the same as official pycocotools package.
  
  It implements some snake case function aliases. So that the COCO class has
  the same interface as LVIS class.
class_docstr_tok: ["This","class","is","almost","the","same","as","official","pycocotools","package",".","It","implements","some","snake","case","function","aliases",".","So","that","the","COCO","class","has","the","same","interface","as","LVIS","class","."]
code: def __init__(self, annotation_file=None):
      if getattr(pycocotools, "__version__", "0") >= "12.0.2":
          warnings.warn(
              'mmpycocotools is deprecated. Please install official pycocotools by "pip install pycocotools"',  # noqa: E501
              UserWarning,
          )
      super().__init__(annotation_file=annotation_file)
      self.img_ann_map = self.imgToAnns
      self.cat_img_map = self.catToImgs
  
file_path: mmdetection/mmdet/datasets/api_wrappers/coco_api.py
imports: import warnings
  from collections import defaultdict
  from typing import List, Optional, Union
  import pycocotools
  from pycocotools.coco import COCO
  from pycocotools.cocoeval import COCOeval
label_desc: Use image node_id 1 to create a new COCO object from inherited base classes: _COCO with example: obj = COCO(annotation_file)