TL;DR
LMGait is the first gait recognition framework to introduce natural language descriptions as explicit semantic priors to guide vision models. By directing a model's attention to motion-rich regions like arm and leg swings, it effectively ignores static distractors like clothing changes and backpacks. Remarkably, the language branch is only used during training, achieving state-of-the-art accuracy on raw RGB video inputs with zero inference-time overhead.
What Problem Does This Paper Address?
Gait recognition—identifying individuals by the way they walk—is a powerful biometric tool because it works from a distance and doesn't require active cooperation. Traditional approaches rely on silhouettes or skeleton maps, which strip away helpful visual context. While recent state-of-the-art methods try to use raw RGB video directly, they face a major hurdle: overfitting to static noise.
When a person changes their clothes or carries a backpack, their visual appearance changes drastically, even though their walking pattern remains identical. Standard RGB models often mistakenly focus on these prominent appearance cues rather than the underlying dynamics of movement. The challenge is forcing a vision network to prioritize dynamic motion (how limbs move) over static appearance (what someone is wearing), especially when dealing with real-world variations in clothing, lighting, and viewing angles.
Methods
To solve this, the authors propose LMGait, a multimodal framework that uses language to teach a vision model what matters.
The architecture consists of several key components:
- Image Encoder: A frozen DINOv2 model extracts rich spatial features from the input RGB video frames.
- Language-Guided Priors: The model accepts domain-specific text queries (e.g., "A walking posture of a pedestrian, focusing on arm and leg swings and regions near the body boundary"). This text acts as a semantic attention mask to guide the visual features.
- Motion Awareness Module (MAM): To bridge the modality gap, MAM introduces learnable adapters into a frozen CLIP text encoder. This allows the text representations to adaptively adjust based on the visual context—for instance, emphasizing arm movements if the lower limbs are temporarily occluded.
- Motion Temporal Capture Module (MTCM): This module captures walking dynamics through two complementary paths: Pixel-wise Temporal Extraction (PTE) using 1D temporal convolutions to track fine-grained pixel trajectories, and Region-wise Temporal Extraction (RTE) using inter-frame differences and 3D convolutions to capture structural posture transitions.
- Zero Inference Overhead: Crucially, the text encoder is only required during training. Once trained, the generated semantic attention maps can be cached and integrated directly into the visual stream. At test time, the entire language branch is discarded, ensuring fast, real-time inference.
Datasets
The authors evaluated LMGait on three prominent gait recognition benchmarks:
- CCPG (Cloth-Changing Gait Dataset): Specifically designed to test model robustness against full, upper, or lower clothing changes.
- SUSTech1K: A large-scale dataset featuring challenging real-world conditions, including occlusions, varied view angles, and night scenes.
- CASIA-B*: A widely used multi-view gait dataset.
Key Insights and Ideas
- Language as an Elegant Filter: Instead of relying on complex human parsing or keypoint detection algorithms—which require expensive manual annotations—natural language can serve as a highly effective, low-cost semantic prior to tell a model where to look.
- The Synergy of Text and Time: The authors discovered that applying temporal modeling (like 3D-CNNs) directly to raw RGB images actually degrades performance because the model aggregates background and clothing noise over time. However, when the visual features are first filtered by text-guided attention, temporal modeling becomes highly effective.
- Training-Only Multimodality: LMGait proves that you don't need to deploy a heavy multimodal model to reap the benefits of multimodal training. Caching the attention weights allows a single-modality vision network to retain all the cross-modal insights at runtime.
Key Results
LMGait achieved state-of-the-art Rank-1 accuracy across all evaluated datasets, outperforming silhouette, skeleton, and alternative RGB-based methods.
- CCPG: Achieved 88.5% average accuracy, outperforming the previous RGB-based state-of-the-art (BigGait) by 1.3% and skeleton-based methods (GPGait) by a massive 24.3%.
- SUSTech1K & CASIA-B*: Reached 97.1% and 97.5% accuracy, respectively.
- Cross-Dataset Generalization: When trained on CCPG and tested directly on the entirely different environments of SUSTech1K and CASIA-B*, LMGait demonstrated superior robustness, proving that it learns generalized motion rather than dataset-specific shortcuts.
As shown in the attention maps above, while alternative models get distracted by backpacks and torso clothing, LMGait successfully concentrates its focus on the boundaries of the body and moving limbs.
Limitations and Future Work
While highly effective, LMGait currently relies on manually engineered text prompts to achieve optimal performance. The authors experimented with using a Multimodal Large Language Model (MLLM) to automatically generate generic descriptions, but this led to a slight performance drop (88.1% vs 88.5% with manual prompts). Future work will likely explore how to fully automate and optimize the text-generation pipeline without sacrificing recognition accuracy.
Summary updated