def forward(self,
                inputs: Union[dict, tuple],
                rebase_keypoint_height: bool = False):
        """Perform forward pass through the model and process the results.

        Args:
            inputs (Union[dict, tuple]): The inputs for the model.
            rebase_keypoint_height (bool, optional): Flag to rebase the
                height of the keypoints (z-axis). Defaults to False.

        Returns:
            list: A list of data samples, each containing the model's output
                results.
        """

        pose_lift_results = self.model.test_step(inputs)

        # Post-processing of pose estimation results
        pose_est_results_converted = self._buffer['pose_est_results_list'][-1]
        for idx, pose_lift_res in enumerate(pose_lift_results):
            # Update track_id from the pose estimation results
            pose_lift_res.track_id = pose_est_results_converted[idx].get(
                'track_id', 1e4)

            # Invert x and z values of the keypoints
            keypoints = pose_lift_res.pred_instances.keypoints
            keypoints = keypoints[..., [0, 2, 1]]
            keypoints[..., 0] = -keypoints[..., 0]
            keypoints[..., 2] = -keypoints[..., 2]

            # If rebase_keypoint_height is True, adjust z-axis values
            if rebase_keypoint_height:
                keypoints[..., 2] -= np.min(
                    keypoints[..., 2], axis=-1, keepdims=True)

            pose_lift_results[idx].pred_instances.keypoints = keypoints

        pose_lift_results = sorted(
            pose_lift_results, key=lambda x: x.get('track_id', 1e4))

        data_samples = [merge_data_samples(pose_lift_results)]
        return data_samples
Perform forward pass through the model and process the results.

        Args:
            inputs (Union[dict, tuple]): The inputs for the model.
            rebase_keypoint_height (bool, optional): Flag to rebase the
                height of the keypoints (z-axis). Defaults to False.

        Returns:
            list: A list of data samples, each containing the model's output
                results.
        
mmpose/mmpose/apis/inferencers/pose3d_inferencer.py