def __call__(self, results):
        """Perform data augmentation with random image flip."""
        if np.random.rand() <= self.flip_prob:
            return results

        img = results['image']
        joints_3d = results['gt_joints']
        joints_3d_visible = results['joints_vis']
        center = results['center']

        # A flag indicating whether the image is flipped,
        # which can be used by child class.
        if not isinstance(img, list):
            img = img[:, ::-1, :]
        else:
            img = [i[:, ::-1, :] for i in img]
        if not isinstance(img, list):
            joints_3d, joints_3d_visible = self.flip_joints(
                joints_3d, joints_3d_visible, img.shape[1],
                self.flip_perm)
            center[0] = img.shape[1] - center[0] - 1
        else:
            joints_3d, joints_3d_visible = self.flip_joints(
                joints_3d, joints_3d_visible, img[0].shape[1],
                self.flip_perm)
            center[0] = img[0].shape[1] - center[0] - 1

        results['image'] = img
        results['gt_joints'] = joints_3d
        results['joints_vis'] = joints_3d_visible
        results['center'] = center

        return results
Perform data augmentation with random image flip.
ppdet/data/transform/keypoint_operators.py