LocLLM: Exploiting Generalizable Human Keypoint Localization via Large Language Model

Dongkai Wang, Shiyu Xuan, Shiliang ZhangCVPR 2024

Abstract

Existing human keypoint localization models are often constrained by the fixed keypoint priors inherent in their training data, limiting their ability to generalize across diverse datasets or identify novel landmarks. To address this, we introduce LocLLM, the first framework to reformulate keypoint localization as a reasoning task within a Large Language Model (LLM). By integrating visual features with descriptive text instructions, LocLLM leverages the anatomical knowledge and reasoning capabilities of LLMs to identify keypoint coordinates. Our approach utilizes a parameter-efficient fine-tuning pipeline and represents coordinates as decimal strings, allowing the model to achieve sub-pixel accuracy without modifying the LLM vocabulary. LocLLM demonstrates state-of-the-art performance on standard 2D/3D benchmarks and exhibits superior generalization, including the ability to detect "zero-shot" keypoints unseen during training.

Introduction: Moving Beyond Rigid Priors

Traditional human pose estimation models, typically built on Convolutional Neural Networks (CNNs) or Vision Transformers (ViTs), are inherently "rigid." These architectures encode specific keypoint priors—such as the expected location of a "knee" relative to a "hip"—directly into their weights or final layers. While effective for specific datasets like COCO, this approach creates a significant bottleneck in generalization. If a model is trained on a dataset that defines "hips," it often fails when applied to a dataset that defines a "pelvis," despite the anatomical similarity.

LocLLM shifts this paradigm by treating keypoint localization as a Visual Question Answering (VQA) task. Instead of relying solely on statistical pixel patterns, the model uses natural language descriptions to reason about body parts, allowing it to understand why a joint is located in a specific area based on anatomical context.

The LocLLM Architecture

LocLLM consists of three primary components designed to bridge the gap between computer vision and natural language processing:

  1. Visual Encoder: A pre-trained ViT-L/14 (DINOv2) extracts high-resolution image features.
  2. Projection Layer: A linear layer maps these visual features into "image tokens" compatible with the LLM’s embedding space.
  3. Large Language Model: An instruction-tuned Vicuna-7B (based on Llama) serves as the reasoning engine, processing both the image tokens and textual instructions.

Coordinate Representation as Text

A critical technical innovation in LocLLM is the representation of coordinates. Rather than introducing new "location tokens" to the LLM’s vocabulary—which would necessitate training new embeddings from scratch—the authors prompt the model to output coordinates as decimal strings (e.g., [0.406, 0.156]). Since LLMs are pre-trained on vast amounts of numerical data and punctuation, this allows the model to achieve high-precision localization using its existing linguistic knowledge.

Anatomical Reasoning via Textual Clues

The core strength of LocLLM lies in its use of "textual clues." Instead of a simple query like "Find the nose," the model is provided with detailed anatomical descriptions: "The nose is the central, protruding feature on their face, located just above the upper lip. Please locate nose coordinates."

This instruction-based approach enables the model to perform anatomical reasoning. By grounding the visual search in descriptive language, LocLLM can navigate complex scenarios—such as artistic depictions or occluded limbs—where traditional models might fail.

Training Pipeline

The model is trained using LoRA (Low-Rank Adaptation), a parameter-efficient method that updates only a small fraction of the model's weights. The process occurs in two stages:

  • Stage 1 (Alignment): Aligning image and text features using the CC3M dataset (approx. 595K pairs).
  • Stage 2 (Fine-tuning): Task-specific tuning for localization on datasets like COCO, using localization-based instruction conversations.

Experimental Results and Generalization

LocLLM was evaluated across several rigorous 2D and 3D benchmarks, demonstrating both competitive accuracy and unprecedented flexibility.

Standard and Cross-Dataset Performance

On the standard COCO Keypoint benchmark, LocLLM achieved 77.4 AP, matching or exceeding specialized state-of-the-art models like ViTPose. However, its true strength appeared in cross-dataset evaluations. When tested on the Human-Art dataset—which features humans in paintings, statues, and cartoons—LocLLM scored 64.8 AP, a significant improvement over ViTPose’s 53.8 AP. This suggests that the LLM's reasoning capabilities make it more robust to stylistic shifts than traditional models.

Zero-Shot Keypoint Detection

Perhaps the most striking finding is LocLLM's ability to identify "novel" keypoints. When provided with a description of a "pelvis," the model could localize it with 43.6% accuracy, even if it had only been trained to identify hips and knees. Because traditional models lack a language interface, they are fundamentally incapable of this type of zero-shot transfer.

3D Localization

By simply extending the output string to include a third decimal, LocLLM successfully localized 3D keypoints on the Human3.6M benchmark. This demonstrates the inherent flexibility of the string-based coordinate system, which can adapt to different dimensionalities without architectural changes.

Discussion and Limitations

While LocLLM represents a breakthrough in generalizable localization, it faces practical challenges:

  • Computational Overhead: Utilizing a 7-billion parameter LLM requires significantly more GPU memory and inference time compared to lightweight, specialized CNNs.
  • Inference Speed: The model currently processes keypoints primarily in a sequential or batch-wise manner, which is slower than the simultaneous multi-point heat-map regression used by standard models.
  • Prompt Sensitivity: The success of zero-shot detection is highly dependent on the quality of the anatomical descriptions. Vague or poorly structured prompts can lead to degraded accuracy.

Conclusion

LocLLM demonstrates that human keypoint localization can be effectively reframed as a language-based reasoning task. By leveraging the vast internal knowledge of LLMs and providing anatomical context through text, LocLLM overcomes the rigidity of traditional models. This work opens new avenues for general-purpose vision systems capable of understanding and localizing complex landmarks across diverse domains and artistic styles.

Summary updated

BibTeX
@inproceedings{wang2024locllm,
  author = {Dongkai Wang and Shiyu Xuan and Shiliang Zhang},
  title = {{LocLLM: Exploiting Generalizable Human Keypoint Localization via Large Language Model}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  url = {https://openreview.net/forum?id=K1qLLNr0T4},
}
Figure