class_docstr: Default training transform for simple pose.
  
  Parameters
  ----------
  num_joints : int
      Number of joints defined by dataset
  image_size : tuple of int
      Image size, as (height, width).
  heatmap_size : tuple of int
      Heatmap size, as (height, width).
  sigma : float
      Gaussian sigma for the heatmap generation.
class_docstr_tok: ["Default","training","transform","for","simple","pose",".","Parameters","--","--","--","--","--","num_joints",":","int","Number","of","joints","defined","by","dataset","image_size",":","tuple","of","int","Image","size",",","as","(","height",",","width",")",".","heatmap_size",":","tuple","of","int","Heatmap","size",",","as","(","height",",","width",")",".","sigma",":","float","Gaussian","sigma","for","the","heatmap","generation","."]
code: def __call__(self, src, label, img_path):
      cv2 = try_import_cv2()
      bbox = label["bbox"]
      assert len(bbox) == 4
      joints_3d = label["joints_3d"]
      xmin, ymin, xmax, ymax = bbox
      center, scale = _box_to_center_scale(
          xmin, ymin, xmax - xmin, ymax - ymin, self._aspect_ratio
      )
      # center = label['center']
      # scale = label['scale']
      # score = label.get('score', 1)
  
      # rescale
      sf = self._scale_factor
      scale = scale * np.clip(
          np.random.randn() * sf + 1, 1 - sf, 1 + sf
      )
  
      # rotation
      rf = self._rotation_factor
      r = (
          np.clip(np.random.randn() * rf, -rf * 2, rf * 2)
          if random.random() <= 0.6
          else 0
      )
  
      joints = joints_3d
      if self._random_flip and random.random() > 0.5:
          # src, fliped = random_flip_image(src, px=0.5, py=0)
          # if fliped[0]:
          src = src[:, ::-1, :]
          joints = flip_joints_3d(
              joints_3d, src.shape[1], self._joint_pairs
          )
          center[0] = src.shape[1] - center[0] - 1
  
      h, w = self._image_size
      trans = get_affine_transform(center, scale, r, [w, h])
      img = cv2.warpAffine(
          src.asnumpy(), trans, (int(w), int(h)), flags=cv2.INTER_LINEAR
      )
  
      # deal with joints visibility
      for i in range(self._num_joints):
          if joints[i, 0, 1] > 0.0:
              joints[i, 0:2, 0] = affine_transform(
                  joints[i, 0:2, 0], trans
              )
  
      # generate training targets
      target, target_weight = self._target_generator(joints)
  
      # to tensor
      img = mx.nd.image.to_tensor(mx.nd.array(img))
      img = mx.nd.image.normalize(img, mean=self._mean, std=self._std)
      return img, target, target_weight, img_path
  
file_path: gluon-cv/gluoncv/data/transforms/presets/simple_pose.py
imports: from __future__ import absolute_import
  import random
  import numpy
  import mxnet
  from ..image import random_flip
  from ..pose import flip_joints_3d, get_affine_transform, affine_transform
  from ....utils.filesystem import try_import_cv2
label_desc: Use image node_id 3 for calling the SimplePoseDefaultTrainTransform obj's underlying member method code with example usage: obj.__call__(src, label, img_path) and returns: img,  target,  target_weight,  img_path