class_docstr: Prepare images for detection.
  
  Args:
      attrbox(Callable): Method to get detection attributes of images.
      data_dir(str): Image dataset path.
      category_to_id_map(dict): Mapping relations of category and id for images.
  
  Returns:
      imgs(dict): The input for detection model, it is a dict.
class_docstr_tok: ["Prepare","images","for","detection",".","Args",":","attrbox","(","Callable",")",":","Method","to","get","detection","attributes","of","images",".","data_dir","(","str",")",":","Image","dataset","path",".","category_to_id_map","(","dict",")",":","Mapping","relations","of","category","and","id","for","images",".","Returns",":","imgs","(","dict",")",":","The","input","for","detection","model",",","it","is","a","dict","."]
code: def __init__(
      self, attrbox: Callable, data_dir: str, category_to_id_map: dict
  ):
      self.attrbox = attrbox
      self.img_dir = data_dir
      self.category_to_id_map = category_to_id_map
      self.parse_gt_annotations = GTAnotations(
          self.attrbox, self.category_to_id_map
      )
  
imports: import os
  import copy
  from typing import Callable
  import paddle
  import numpy
  from paddlehub.env import DATA_HOME
  from pycocotools.coco import COCO
label_desc: Use image node_id 1 to create a new ParseImages object  with example: obj = ParseImages(attrbox, data_dir, category_to_id_map)