def integrate(self, batch_vis: Tensor,
                  pose_preds: Union[Tuple, Predictions]) -> InstanceList:
        """Add keypoints visibility prediction to pose prediction.

        Overwrite the original keypoint_scores.
        """
        if isinstance(pose_preds, tuple):
            pose_pred_instances, pose_pred_fields = pose_preds
        else:
            pose_pred_instances = pose_preds
            pose_pred_fields = None

        batch_vis_np = to_numpy(batch_vis, unzip=True)

        assert len(pose_pred_instances) == len(batch_vis_np)
        for index, _ in enumerate(pose_pred_instances):
            pose_pred_instances[index].keypoint_scores = batch_vis_np[index]

        return pose_pred_instances, pose_pred_fields
Add keypoints visibility prediction to pose prediction.

        Overwrite the original keypoint_scores.
        
mmpose/mmpose/models/heads/hybrid_heads/vis_head.py