class_docstr: Load label name, id and map from detection dataset.
  
  Args:
      attrbox(Callable): Method to get detection attributes of images.
      data_dir(str): Image dataset path.
  
  Returns:
      label_names(List(str)): The dataset label names.
      label_ids(List(int)): The dataset label ids.
      category_to_id_map(dict): Mapping relations of category and id for images.
class_docstr_tok: ["Load","label","name",",","id","and","map","from","detection","dataset",".","Args",":","attrbox","(","Callable",")",":","Method","to","get","detection","attributes","of","images",".","data_dir","(","str",")",":","Image","dataset","path",".","Returns",":","label_names","(","List","(","str",")",")",":","The","dataset","label","names",".","label_ids","(","List","(","int",")",")",":","The","dataset","label","ids",".","category_to_id_map","(","dict",")",":","Mapping","relations","of","category","and","id","for","images","."]
code: def __init__(self, attrbox: Callable, data_dir: str):
      self.attrbox = attrbox
      self.img_dir = data_dir
  
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 DetectCatagory object  with example: obj = DetectCatagory(attrbox, data_dir)