class_docstr: Set gt boxes and gt labels for train.
  
  Args:
      attrbox(Callable): Method for get detection attributes for images.
      category_to_id_map(dict): Mapping relations of category and id for images.
      img(dict): Input for detection model.
  
  Returns:
      img(dict): Set specific value on the attributes of 'gt boxes' and 'gt labels' for input.
class_docstr_tok: ["Set","gt","boxes","and","gt","labels","for","train",".","Args",":","attrbox","(","Callable",")",":","Method","for","get","detection","attributes","for","images",".","category_to_id_map","(","dict",")",":","Mapping","relations","of","category","and","id","for","images",".","img","(","dict",")",":","Input","for","detection","model",".","Returns",":","img","(","dict",")",":","Set","specific","value","on","the","attributes","of","'gt","boxes","'","and","'gt","labels","'","for","input","."]
code: def __call__(self, img: dict):
      img_height = img["height"]
      img_width = img["width"]
      anno = self.attrbox.loadAnns(
          self.attrbox.getAnnIds(imgIds=img["id"], iscrowd=None)
      )
      gt_index = 0
  
      for target in anno:
          if target["area"] < -1:
              continue
          if "ignore" in target and target["ignore"]:
              continue
          box = self.box_to_center_relative(
              target["bbox"], img_height, img_width
          )
  
          if box[2] <= 0 and box[3] <= 0:
              continue
          img["gt_boxes"][gt_index] = box
          img["gt_labels"][gt_index] = self.category_to_id_map[
              target["category_id"]
          ]
          gt_index += 1
          if gt_index >= 50:
              break
      return img
  
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 3 for calling the GTAnotations obj's underlying member method code with example usage: obj.__call__(img) and returns: img