class_docstr: Load the dataset for tracking, and data Augmentation for search image
  and template image. Meanwhile get anchor target
  
  Parameters
  ----------
  
  data_path : str
      Path to the folder stored the per dataset.
  dataset_names : list
      name to the folder stored the per dataset.
  detaset_root : list
      Path to the subfolder stored the per dataset.
  detaset_anno : list
      Path to the subanno stored the per dataset.
  dataset_frame_range : list
      dataset frame range that get positive pair.
  dataset_num_use : list
      if dataset_num_use = -1 show all dataset,show fisrt dataset_num_use dataset
  train_search_size : int
      train search size
  train_exemplar_size : int
      train exemplar size
  anchor_stride : int
      anchor stride
  anchor_ratios : int
      anchor ratios
  train_base_size : int
      train base size
  train_output_size : int
      train output size
  template_shift : int
      length of template augmentation shift
  template_scale : float
      template augmentation scale ratio
  template_blur : float
      template augmentation blur ratio
  template_flip : float
      template augmentation flip ratio
  template_color : float
      template augmentation color ratio
  search_shift : int
      length  of search augmentation shift ratio
  search_scale : float
      search augmentation shift ratio
  search_blur : float
      search augmentation blur ratio
  search_flip : float
      search augmentation filp ratio
  search_color : float
      search augmentation color ratio
  videos_per_epoch : int
      videos number per epoch
  train_epoch : int
      train epoch
  gray : float
      if gray=1, image graying
  neg : float
      negative ratio
class_docstr_tok: ["Load","the","dataset","for","tracking",",","and","data","Augmentation","for","search","image","and","template","image",".","Meanwhile","get","anchor","target","Parameters","--","--","--","--","--","data_path",":","str","Path","to","the","folder","stored","the","per","dataset",".","dataset_names",":","list","name","to","the","folder","stored","the","per","dataset",".","detaset_root",":","list","Path","to","the","subfolder","stored","the","per","dataset",".","detaset_anno",":","list","Path","to","the","subanno","stored","the","per","dataset",".","dataset_frame_range",":","list","dataset","frame","range","that","get","positive","pair",".","dataset_num_use",":","list","if","dataset_num_use","=","-1","show","all","dataset",",","show","fisrt","dataset_num_use","dataset","train_search_size",":","int","train","search","size","train_exemplar_size",":","int","train","exemplar","size","anchor_stride",":","int","anchor","stride","anchor_ratios",":","int","anchor","ratios","train_base_size",":","int","train","base","size","train_output_size",":","int","train","output","size","template_shift",":","int","length","of","template","augmentation","shift","template_scale",":","float","template","augmentation","scale","ratio","template_blur",":","float","template","augmentation","blur","ratio","template_flip",":","float","template","augmentation","flip","ratio","template_color",":","float","template","augmentation","color","ratio","search_shift",":","int","length","of","search","augmentation","shift","ratio","search_scale",":","float","search","augmentation","shift","ratio","search_blur",":","float","search","augmentation","blur","ratio","search_flip",":","float","search","augmentation","filp","ratio","search_color",":","float","search","augmentation","color","ratio","videos_per_epoch",":","int","videos","number","per","epoch","train_epoch",":","int","train","epoch","gray",":","float","if","gray=1",",","image","graying","neg",":","float","negative","ratio"]
code: def __init__(
      self,
      data_path=os.path.expanduser("~/.mxnet/datasets/tracking"),
      dataset_names=("vid", "Youtube_bb", "coco", "det"),
      detaset_root=(
          "vid/crop511",
          "Youtube_bb/crop511",
          "coco/crop511",
          "det/crop511",
      ),
      detaset_anno=(
          "vid/train.json",
          "Youtube_bb/train.json",
          "coco/train2017.json",
          "det/train.json",
      ),
      dataset_frame_range=(100, 3, 1, 1),
      dataset_num_use=(100000, -1, -1, -1),
      train_search_size=255,
      train_exemplar_size=127,
      anchor_stride=8,
      anchor_ratios=(0.33, 0.5, 1, 2, 3),
      train_base_size=0,
      train_output_size=17,
      template_shift=4,
      template_scale=0.05,
      template_blur=0,
      template_flip=0,
      template_color=1.0,
      search_shift=64,
      search_scale=0.18,
      search_blur=0,
      search_flip=0,
      search_color=1.0,
      videos_per_epoch=600000,
      train_epoch=50,
      train_thr_high=0.6,
      train_thr_low=0.3,
      train_pos_num=16,
      train_neg_num=16,
      train_total_num=64,
      gray=0.0,
      neg=0.05,
  ):
      super(TrkDataset, self).__init__()
      self.train_search_size = train_search_size
      self.train_exemplar_size = train_exemplar_size
      self.anchor_stride = anchor_stride
      self.anchor_ratios = list(anchor_ratios)
      self.train_base_size = train_base_size
      self.train_output_size = train_output_size
      self.data_path = data_path
      self.dataset_names = list(dataset_names)
      self.detaset_root = list(detaset_root)
      self.detaset_anno = list(detaset_anno)
      self.dataset_frame_range = list(dataset_frame_range)
      self.dataset_num_use = list(dataset_num_use)
      self.template_shift = template_shift
      self.template_scale = template_scale
      self.template_blur = template_blur
      self.template_flip = template_flip
      self.template_color = template_color
      self.search_shift = search_shift
      self.search_scale = search_scale
      self.search_blur = search_blur
      self.search_flip = search_flip
      self.search_color = search_color
      self.videos_per_epoch = videos_per_epoch
      self.train_epoch = train_epoch
      self.train_thr_high = train_thr_high
      self.train_thr_low = train_thr_low
      self.train_pos_num = train_pos_num
      self.train_neg_num = train_neg_num
      self.train_total_num = train_total_num
      self.gray = gray
      self.neg = neg
      self.cv2 = try_import_cv2()
      self.logger = logging.getLogger()
      desired_size = (
          (self.train_search_size - self.train_exemplar_size)
          / self.anchor_stride
          + 1
          + self.train_base_size
      )
      if desired_size != self.train_output_size:
          raise Exception("size not match!")
  
      # create anchor target
      self.anchor_target = AnchorTarget(
          anchor_stride=self.anchor_stride,
          anchor_ratios=self.anchor_ratios,
          train_search_size=self.train_search_size,
          train_output_size=self.train_output_size,
          train_thr_high=self.train_thr_high,
          train_thr_low=self.train_thr_low,
          train_pos_num=self.train_pos_num,
          train_neg_num=self.train_neg_num,
          train_total_num=self.train_total_num,
      )
      # create sub dataset
      self.all_dataset = []
      start = 0
      self.num = 0
  
      for idx in range(len(self.dataset_names)):
          sub_dataset = SubDataset(
              self.dataset_names[idx],
              os.path.join(self.data_path, self.detaset_root[idx]),
              os.path.join(self.data_path, self.detaset_anno[idx]),
              self.dataset_frame_range[idx],
              self.dataset_num_use[idx],
              start,
          )
          start += sub_dataset.num
          self.num += sub_dataset.num_use
  
          sub_dataset.log()
          self.all_dataset.append(sub_dataset)
  
      # data augmentation
      self.template_aug = SiamRPNaugmentation(
          self.template_shift,
          self.template_scale,
          self.template_blur,
          self.template_flip,
          self.template_color,
      )
      self.search_aug = SiamRPNaugmentation(
          self.search_shift,
          self.search_scale,
          self.search_blur,
          self.search_flip,
          self.search_color,
      )
      videos_per_epoch = self.videos_per_epoch
      self.num = videos_per_epoch if videos_per_epoch > 0 else self.num
      self.num *= self.train_epoch
      self.pick = self.shuffle()
  
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 1 to create a new TrkDataset object from inherited base classes: dataset with example: obj = TrkDataset(data_path, dataset_names, detaset_root, detaset_anno, dataset_frame_range, dataset_num_use, train_search_size, train_exemplar_size, anchor_stride, anchor_ratios, train_base_size, train_output_size, template_shift, template_scale, template_blur, template_flip, template_color, search_shift, search_scale, search_blur, search_flip, search_color, videos_per_epoch, train_epoch, train_thr_high, train_thr_low, train_pos_num, train_neg_num, train_total_num, gray, neg)