def reset_current(self, pose_client):
        data_list = pose_client.requiredEstimationData
        self.optimization_mode="estimate_past"        
        self.projection_client.reset(data_list)
        if pose_client.USE_LIFT_TERM:
            self.lift_client.reset(pose_client.lift_pose_tensor, pose_client.poses_3d_gt)

        self.pytorch_objective = pytorch_optimizer.pose3d_online_parallel(pose_client, self.projection_client, self.lift_client, optimization_mode=self.optimization_mode)
    def reset_hessian(self, pose_client, potential_trajectory, use_hessian_mode):
        data_list = pose_client.requiredEstimationData
        hessian_lift_pose_tensor =  pose_client.lift_pose_tensor
        if use_hessian_mode == "whole":
            self.optimization_mode="estimate_whole"
        elif use_hessian_mode == "partial":
            self.optimization_mode = "estimate_partial_hessian"

        self.projection_client.reset_future(data_list, potential_trajectory, use_hessian_mode)
        future_poses = torch.from_numpy(pose_client.future_poses.copy()).float()
        
        if pose_client.USE_LIFT_TERM:
            if pose_client.LIFT_METHOD == "complex":
                potential_pose3d_lift_directions = calculate_bone_directions(future_poses, np.array(return_lift_bone_connections(self.bone_connections)), batch=True) 
            if pose_client.LIFT_METHOD == "simple":
                potential_pose3d_lift_directions = calculate_bone_directions_simple(future_poses, pose_client.boneLengths, pose_client.BONE_LEN_METHOD, np.array(self.bone_connections), self.hip_index, batch=True)
            self.lift_client.reset_future(hessian_lift_pose_tensor, potential_pose3d_lift_directions, use_hessian_mode)
            
        self.pytorch_objective = pytorch_optimizer.pose3d_online_parallel(pose_client, self.projection_client, self.lift_client, optimization_mode=self.optimization_mode)
 def reset_future(self, pose_client):
     self.optimization_mode="estimate_future"
     self.pytorch_objective = pytorch_optimizer.pose3d_online_parallel(pose_client, None, None, optimization_mode=self.optimization_mode)