TPC: Test-time Procrustes Calibration for Diffusion-based Human Image Animation

Sunjae Yoon, Gwanhyeong Koo, Younghwan Lee, Chang D. Yoo

Abstract

Diffusion-based human image animation models often suffer from compositional misalignment between reference images and target poses, leading to visual artifacts and identity loss. We present Test-time Procrustes Calibration (TPC), a training-free, model-agnostic plug-in that aligns reference features to target poses at inference time. By employing Procrustes Analysis for shape-preserving warping and iterative propagation for temporal consistency, TPC significantly improves fidelity and robustness across various state-of-the-art pipelines.

Introduction

Current state-of-the-art (SOTA) human image animation systems, such as MagicAnimate or AnimateAnyone, demonstrate impressive precision in transferring identity onto motion sequences. However, these models are surprisingly fragile when faced with compositional misalignment.

If the subject in the reference photo is at a different scale or orientation than the target motion (e.g., a distant subject in the reference vs. a close-up target pose), the generated video often exhibits "glitchy" clothing, distorted facial features, or identity bleeding. This occurs because these models rely on cross-attention to find correspondences between the reference image and the target pose. When shapes do not overlap spatially in the latent space, the attention mechanism fails to map features accurately, often looking at the background or incorrect body parts to fill in the pixels.

Compositional misalignment occurs when the scale or orientation of the reference subject differs significantly from the target pose.

Methods

TPC introduces a two-stage calibration process that operates entirely at test time, requiring no additional training.

  1. Procrustes Warping (PW): The system extracts 2D keypoints from both the reference image and the target pose. It then utilizes Procrustes Analysis—a statistical method for shape comparison—to determine the optimal similarity transform (scaling, rotation, and translation) to align the reference human to the target. Crucially, this transform is shape-preserving, ensuring the subject's identity remains undistorted.
  2. Iterative Propagation (IP): To prevent temporal flickering caused by independent frame warping, TPC groups sequential features during the denoising process. It randomly selects a calibrated feature from a group and propagates it to others, enforcing temporal smoothness while maintaining corrected alignment.

Key Insights

  • The Cross-Attention Bottleneck: The "intelligence" of diffusion models is spatially constrained. If a body part in the reference image is not roughly where the model expects it in the target pose, attention maps become blurry and inaccurate.
  • Calibration vs. Distortion: While simple affine transforms can cause identity-distorting shearing, Procrustes Analysis is superior because it maintains the relative proportions of the human body.
  • Model-Agnostic Utility: TPC modifies the input conditioning rather than model weights, allowing it to be integrated into almost any existing diffusion-based animation pipeline (e.g., MagicAnimate, DisCo, AnimateAnyone) to immediately enhance results.

Key Results

TPC provides substantial improvements in scenarios where baseline models typically struggle. On a curated Compositional Misalignment Test Split of the TikTok dataset, TPC improved MagicAnimate's PSNR from 27.82 to 29.21 and significantly reduced the Fréchet Video Distance (FVD) from 362 to 164, indicating superior video quality and consistency.

Qualitative comparison showing TPC's ability to maintain consistency and fidelity in bending and walking motions compared to baseline methods like DisCo.

Qualitatively, TPC effectively prevents "identity leaks," such as a reference subject's clothing colors appearing on incorrect body parts due to spatial overlap in the uncalibrated latent space. While baseline models see a sharp performance drop when scale differences fall below an IoU of 0.6, TPC maintains optimal performance even at an IoU of 0.4.

Limitations and Future Work

TPC's performance is dependent on the accuracy of initial pose estimation (e.g., OpenPose). Failures in pose detection due to occlusion or lighting can negatively impact calibration. Furthermore, while TPC handles geometric alignment, it does not address semantic shape mismatches, such as animating a thin subject with a motion sequence from a significantly heavier person. Future work may involve integrating 3D pose estimation and multi-modal conditions to further enhance robustness in complex real-world environments.

Summary updated

BibTeX
@inproceedings{yoon2024tpc,
  author = {Sunjae Yoon and Gwanhyeong Koo and Younghwan Lee and Chang D. Yoo},
  title = {{TPC: Test-time Procrustes Calibration for Diffusion-based Human Image Animation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=h6nSE8AWCT},
}
Figure