docstr: Parameters
  ----------
  anno_file
      The path to COCO format json annotation file.
code: def __init__(self, anno_file: str):
      """
      Parameters
      ----------
      anno_file
          The path to COCO format json annotation file.
      """
      self.anno_file = anno_file
  
      with open(anno_file, "r") as f:
          d = json.load(f)
      image_list = d["images"]
      img_filename_list = []
      img_id_list = []
      for img in image_list:
          img_filename_list.append(get_image_filename(img["file_name"]))
          img_id_list.append(int(img["id"]))
      self.image_filename_to_id = dict(
          zip(img_filename_list, img_id_list)
      )
  
      self.category_ids = [cat["id"] for cat in d["categories"]]
  
imports: import json
  import logging
  import os
  import warnings
  from pathlib import Path
  from typing import Dict, Iterable, List, Optional, Union
  import defusedxml.ElementTree
  import numpy
  import pandas
  import PIL
  from torchmetrics.detection.mean_ap import MeanAveragePrecision
  from ..constants import BBOX, LABEL, MAP, MAP_50, MAP_75, MAP_LARGE, MAP_MEDIUM, MAP_SMALL, MAR_1, MAR_10, MAR_100, MAR_LARGE, MAR_MEDIUM, MAR_SMALL, MEAN_AVERAGE_PRECISION
  from .download import download, is_url
label_desc: Use image node_id 1 to create a new COCODataset object  with example: obj = COCODataset(anno_file)