Generalizable Object Keypoint Localization from Generative Priors

Dongkai Wang, Jiang Duan, Liangjian Wen, Shiyu Xuan, Hao Chen, Shiliang ZhangCVPR 2025

Introduction

Object keypoint localization—identifying specific points like a "shoulder," "elbow," or "tail"—is a cornerstone of computer vision. However, traditional models based on CNNs or Transformers are often "brittle," requiring massive amounts of labeled data and failing on out-of-distribution styles or species. The core challenge is a lack of fundamental, generalizable understanding of object structure. GenLoc addresses this by repurposing the "world knowledge" inside pre-trained generative models like Stable Diffusion to extract structural priors.

Methodology: GenLoc

GenLoc treats keypoint localization as a specialized "query" into a Latent Diffusion Model (LDM). The framework consists of several key components:

Generative Priors

Instead of training a new backbone from scratch, GenLoc leverages a pre-trained LDM (Stable Diffusion v1.5). These models possess inherent structural knowledge because they must generate anatomically correct objects during training. To adapt the model efficiently, the authors use LoRA (Low-Rank Adaptation), updating only a tiny fraction of the parameters.

Condition-guided Keypoint Heatmap Extraction (CKHE)

Standard LDMs use cross-attention to blend text and images, which typically results in blurry attention maps. GenLoc flips the math: it treats the keypoint (e.g., "left shoulder") as a query and performs a softmax over the image tokens. This forces the model to produce a sharp, well-localized heatmap rather than a global context map.

Comparison of keypoint localization heatmaps. GenLoc (Our method) produces a significantly sharper and more accurate localization for the 'left shoulder' compared to direct optimization.

Heatmap Expectation Loss (HEL)

To handle unnormalized features, HEL treats the predicted heatmap as a probability distribution and maximizes its overlap with the ground truth, ensuring stable and accurate training.

Experiments and Datasets

GenLoc was evaluated on three major benchmarks to test its robustness:

  • COCO Keypoint: The standard for human keypoint localization.
  • AP-10K: A dataset covering 54 animal species, testing biological structure diversity.
  • Human-Art: Humans in various artistic styles (cartoons, sketches, statues), testing cross-domain generalization.

Key Insights

The primary insight is that generative models are "structural experts." A model capable of creating a realistic animal already possesses a deep internal map of its anatomy. By changing the dimension of the softmax operation in cross-attention (CKHE), the authors transformed a global generation tool into a precise localizing tool. This allows for superior zero-shot ability; for example, GenLoc can find keypoints on a hamster even if it was only fine-tuned on cows, by leveraging shared mammalian structures.

Condition-guided heatmap extraction for different anatomical parts. The model accurately differentiates between 'shoulder' and 'hip' using generative priors.

Results

GenLoc achieves state-of-the-art performance with high data efficiency:

  • Animal Localization: 80.1% AP on AP-10K, a 2.3% improvement over previous SOTA.
  • Zero-Shot Performance: Outperformed the previous leader, CLAMP, by over 20% AP when testing on unseen species.
  • Few-Shot Efficiency: Reached 62.8% AP with only 5 labeled images per category—nearly 10% higher than specialized few-shot models.
  • Cross-Domain Robustness: Demonstrated superior performance when transferring from real photos to artistic domains, proving it understands structure rather than just memorizing pixels.

Conclusion and Future Work

GenLoc demonstrates that generative priors are a powerful resource for discriminative tasks. While computationally heavier than specialized CNNs due to the LDM backbone, its generalization capabilities are unmatched. Future work aims to increase the flexibility of learnable conditions to further reduce the need for fine-tuning, potentially allowing for "one-shot" localization via simple user clicks.

Summary updated

BibTeX
@inproceedings{wang2025generalizable,
  author = {Dongkai Wang and Jiang Duan and Liangjian Wen and Shiyu Xuan and Hao Chen and Shiliang Zhang},
  title = {{Generalizable Object Keypoint Localization from Generative Priors}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01887},
}
Figure