class_docstr: apply data augment to images and coords
  to achieve the flip, scale, rotate and half body transform effect for training image
  Args:
      trainsize (list):[w, h], Image target size
      upper_body_ids (list): The upper body joint ids
      flip_pairs (list): The left-right joints exchange order list
      pixel_std (int): The pixel std of the scale
      scale (float): The scale factor to transform the image
      rot (int): The rotate factor to transform the image
      num_joints_half_body (int): The joints threshold of the half body transform
      prob_half_body (float): The threshold of the half body transform
      flip (bool): Whether to flip the image
  Returns:
      records(dict): contain the image and coords after tranformed
class_docstr_tok: ["apply","data","augment","to","images","and","coords","to","achieve","the","flip",",","scale",",","rotate","and","half","body","transform","effect","for","training","image","Args",":","trainsize","(","list",")",":","[","w",",","h","]",",","Image","target","size","upper_body_ids","(","list",")",":","The","upper","body","joint","ids","flip_pairs","(","list",")",":","The","left-right","joints","exchange","order","list","pixel_std","(","int",")",":","The","pixel","std","of","the","scale","scale","(","float",")",":","The","scale","factor","to","transform","the","image","rot","(","int",")",":","The","rotate","factor","to","transform","the","image","num_joints_half_body","(","int",")",":","The","joints","threshold","of","the","half","body","transform","prob_half_body","(","float",")",":","The","threshold","of","the","half","body","transform","flip","(","bool",")",":","Whether","to","flip","the","image","Returns",":","records","(","dict",")",":","contain","the","image","and","coords","after","tranformed"]
code: def __call__(self, records):
      images = records[
          "image"
      ]  # kps3d, kps3d_vis, images. images.shape(num_frames, width, height, 3)
  
      joints = records["kps3d"]
      joints_vis = records["kps3d_vis"]
  
      kps2d = None
      if "kps2d" in records.keys():
          kps2d = records["kps2d"]
  
      if self.flip and np.random.random() <= 0.5:
          images = images[:, :, ::-1, :]  # 图像水平翻转 (6, 1080, 810, 3)
          joints, joints_vis, kps2d = self.flip_joints(
              joints,
              joints_vis,
              images.shape[2],
              self.flip_pairs,
              kps2d,
          )  # 关键点左右对称翻转
      occlusion = False
      if self.do_occlusion and random.random() <= 0.5:  # 随机遮挡
          height = images[0].shape[0]
          width = images[0].shape[1]
          occlusion = True
          while True:
              area_min = 0.0
              area_max = 0.2
              synth_area = (
                  (random.random() * (area_max - area_min) + area_min)
                  * width
                  * height
              )
  
              ratio_min = 0.3
              ratio_max = 1 / 0.3
              synth_ratio = (
                  random.random() * (ratio_max - ratio_min) + ratio_min
              )
  
              synth_h = math.sqrt(synth_area * synth_ratio)
              synth_w = math.sqrt(synth_area / synth_ratio)
              synth_xmin = random.random() * (width - synth_w - 1)
              synth_ymin = random.random() * (height - synth_h - 1)
  
              if (
                  synth_xmin >= 0
                  and synth_ymin >= 0
                  and synth_xmin + synth_w < width
                  and synth_ymin + synth_h < height
              ):
                  xmin = int(synth_xmin)
                  ymin = int(synth_ymin)
                  w = int(synth_w)
                  h = int(synth_h)
  
                  mask = np.random.rand(h, w, 3) * 255
                  images[:, ymin : ymin + h, xmin : xmin + w, :] = mask[
                      None, :, :, :
                  ]
                  break
  
      records["image"] = images
      records["kps3d"] = joints
      records["kps3d_vis"] = joints_vis
      if kps2d is not None:
          records["kps2d"] = kps2d
  
      return records
  
imports: from __future__ import absolute_import
  import cv2
  import numpy
  import math
  import copy
  import random
  import uuid
  from numbers import Number, Integral
  from ...modeling.keypoint_utils import get_affine_mat_kernel, warp_affine_joints, get_affine_transform, affine_transform, get_warp_matrix
  from ppdet.core.workspace import serializable
  from ppdet.utils.logger import setup_logger
  import matplotlib.pyplot
  from PIL import Image, ImageDraw
  from mpl_toolkits.mplot3d import Axes3D
label_desc: Use image node_id 4 for calling the RandomFlipHalfBody3DTransformImages obj's underlying member method code with example usage: obj.__call__(records) and returns: records