class_docstr: `MS Coco Detection <https://cocodataset.org/>`_ Dataset.
  
  Args:
      root (string): Root directory where images are downloaded to.
      dataset (string): "train" or "val.
      size (tuple): (h, w)
docstr: Get an item from the dataset at the specified index.
  Detection boxes are converted from absolute coordinates to relative coordinates
  between 0 and 1 by dividing xmin, xmax by image width and ymin, ymax by image height.
  
  :return: (annotation, input_image, metadata) where annotation is (index, target_annotation)
           with target_annotation as a dictionary with keys category_id, image_width, image_height
           and bbox, containing the relative bounding box coordinates [xmin, ymin, xmax, ymax]
           (with values between 0 and 1) and metadata a dictionary: {"filename": path_to_image}
code: def __getitem__(self, index):
      """
      Get an item from the dataset at the specified index.
      Detection boxes are converted from absolute coordinates to relative coordinates
      between 0 and 1 by dividing xmin, xmax by image width and ymin, ymax by image height.
  
      :return: (annotation, input_image, metadata) where annotation is (index, target_annotation)
               with target_annotation as a dictionary with keys category_id, image_width, image_height
               and bbox, containing the relative bounding box coordinates [xmin, ymin, xmax, ymax]
               (with values between 0 and 1) and metadata a dictionary: {"filename": path_to_image}
      """
      coco = self.coco
      img_id = self.ids[index]
      ann_ids = coco.getAnnIds(imgIds=img_id)
      coco_target = coco.loadAnns(ann_ids)
  
      image_path = coco.loadImgs(img_id)[0]["file_name"]
      img = cv2.imread(os.path.join(self.img_root, image_path))
  
      origin_h, origin_w, c = img.shape
      image, ratio, pad = letterbox(
          img, auto=False, new_shape=self.size
      )
      target_annotations = self.parse_targets(
          coco_target, origin_w, origin_h, ratio, pad
      )
  
      item_annotation = (index, target_annotations)
      input_image = np.expand_dims(
          image.transpose(2, 0, 1), axis=0
      ).astype(np.float32)
      return (
          item_annotation,
          input_image,
          {
              "filename": str(image_path),
              "origin_shape": img.shape,
              "shape": image.shape,
              "img_id": img_id,
              "ratio_pad": [ratio, pad],
          },
      )
  
imports: import os
  import time
  import json
  import copy
  import cv2
  import numpy
  import torch
  from torchmetrics.detection.mean_ap import MeanAveragePrecision
  import torchvision
  from pycocotools.coco import COCO
  from pycocotools.cocoeval import COCOeval
  from compression.api import DataLoader, Metric
label_desc: Use image node_id 3 for calling the MyDataLoader obj's underlying member method code with example usage: obj.__getitem__(index) and returns: item_annotation,  input_image,  dict