code: def __call__(self, target, size, neg=False):
      anchor_num = len(self.anchor_ratios) * len(self.anchor_scales)
  
      # -1 ignore 0 negative 1 positive
      cls = -1 * np.ones((anchor_num, size, size), dtype=np.int64)
      delta = np.zeros((4, anchor_num, size, size), dtype=np.float32)
      delta_weight = np.zeros(
          (anchor_num, size, size), dtype=np.float32
      )
  
      def select(position, keep_num=16):
          num = position[0].shape[0]
          if num <= keep_num:
              return position, num
          slt = np.arange(num)
          np.random.shuffle(slt)
          slt = slt[:keep_num]
          return tuple(p[slt] for p in position), keep_num
  
      tcx, tcy, tw, th = corner2center(target)
  
      if neg:
          cx = size // 2
          cy = size // 2
          cx += int(
              np.ceil(
                  (tcx - self.train_search_size // 2)
                  / self.anchor_stride
                  + 0.5
              )
          )
          cy += int(
              np.ceil(
                  (tcy - self.train_search_size // 2)
                  / self.anchor_stride
                  + 0.5
              )
          )
          l = max(0, cx - 3)
          r = min(size, cx + 4)
          u = max(0, cy - 3)
          d = min(size, cy + 4)
          cls[:, u:d, l:r] = 0
  
          neg, _ = select(np.where(cls == 0), self.train_neg_num)
          cls[:] = -1
          cls[neg] = 0
  
          overlap = np.zeros((anchor_num, size, size), dtype=np.float32)
          return cls, delta, delta_weight, overlap
  
      anchor_box = self.anchors.all_anchors[0]
      anchor_center = self.anchors.all_anchors[1]
  
      x1, y1, x2, y2 = (
          anchor_box[0],
          anchor_box[1],
          anchor_box[2],
          anchor_box[3],
      )
      cx, cy, w, h = (
          anchor_center[0],
          anchor_center[1],
          anchor_center[2],
          anchor_center[3],
      )
  
      delta[0] = (tcx - cx) / w
      delta[1] = (tcy - cy) / h
      delta[2] = np.log(tw / w)
      delta[3] = np.log(th / h)
  
      target = np.array(
          [target[0], target[1], target[2], target[3]]
      ).reshape(1, -1)
      bbox = np.array([x1, y1, x2, y2]).reshape(4, -1).T
      overlap = bbox_iou(bbox, target)
      overlap = overlap.reshape(
          -1, self.train_output_size, self.train_output_size
      )
      pos = np.where(overlap > self.train_thr_high)
      neg = np.where(overlap < self.train_thr_low)
      pos, pos_num = select(pos, self.train_pos_num)
      neg, _ = select(neg, self.train_total_num - self.train_pos_num)
  
      cls[pos] = 1
      delta_weight[pos] = 1.0 / (pos_num + 1e-6)
  
      cls[neg] = 0
      return cls, delta, delta_weight, overlap
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import json
  import logging
  import os
  import numpy
  from mxnet.gluon.data import dataset
  from gluoncv.utils.filesystem import try_import_cv2
  from gluoncv.model_zoo.siamrpn.siamrpn_tracker import corner2center, center2corner
  from gluoncv.model_zoo.siamrpn.siamrpn_tracker import Center, Anchors
  from gluoncv.data.transforms.track import SiamRPNaugmentation
  from gluoncv.utils.bbox import bbox_iou
label_desc: Use image node_id 2 for calling the AnchorTarget obj's underlying member method code with example usage: obj.__call__(target, size, neg) and returns: cls,  delta,  delta_weight,  overlap, tuple,  keep_num, cls,  delta,  delta_weight,  overlap, position,  num