TrackingMiM: Efficient Mamba-in-Mamba Serialization for Real-time UAV Object Tracking

Bingxi Liu, Calvin Chen, Junhao Li, Guyang Yu, Haoqian Song, Xuchen Liu, Jinqiang Cui, Hong ZhangarXiv 2025 · DOI

Abstract

Unmanned Aerial Vehicles (UAVs) demand high-precision object tracking within strict power and memory constraints. While Vision Transformers (ViTs) provide state-of-the-art accuracy, their quadratic computational complexity hinders real-time deployment on edge devices. This paper introduces TrackingMiM, a novel tracking framework based on a "Mamba-in-Mamba" (MiM) architecture. By utilizing State Space Models (SSMs) with linear complexity and a hierarchical spatial-temporal scanning strategy, TrackingMiM achieves a remarkable balance of performance and efficiency, reaching 268.3 FPS on GPU and nearly 100 FPS on CPU.

Introduction

Real-time object tracking is a critical capability for UAVs, yet it presents a significant challenge: balancing high-precision localization with the limited computational resources of onboard hardware. Current leading trackers rely heavily on Vision Transformers, which suffer from quadratic complexity relative to input sequence length. Recent alternatives like Mamba offer linear scaling but often struggle with temporal consistency in video sequences, treating frames as isolated snapshots.

TrackingMiM addresses these limitations by rethinking how image sequences are serialized. It introduces a nested hierarchy that captures both fine-grained spatial details and long-range temporal dependencies without the overhead of global self-attention.

Methodology

The core of TrackingMiM is the Mamba-in-Mamba (MiM) block, designed to handle the dual requirements of spatial precision and temporal coherence.

The TrackingMiM architecture featuring the Mamba-in-Mamba block and Retrieval-Augmented Tracking module.

Mamba-in-Mamba (MiM) Architecture

The MiM architecture employs a nested scanning approach. An Inner Spatial Mamba processes local features within individual frames to capture high-resolution target details, while an Outer Temporal Mamba aggregates these spatial features across the time dimension, ensuring the tracker maintains a consistent understanding of target motion.

Time Serialization Scanning

To solve the "jitter" common in previous SSM-based trackers, the authors developed a specialized scanning path. This path systematically arranges image patches to optimize temporal continuity, effectively modeling the "patch residual"—the change in target appearance and position between consecutive frames.

Retrieval-Augmented Tracking (RAT)

To handle occlusions and drastic appearance changes, TrackingMiM incorporates a Retrieval-Augmented Tracking (RAT) module. This module maintains a memory corpus of high-quality historical target features. By querying this memory via cross-attention, the model can "re-identify" the target even after it has been momentarily lost or obscured. Notably, this module is model-agnostic and can enhance the performance of existing CNN and ViT trackers.

Experimental Evaluation

TrackingMiM was rigorously tested on five major UAV tracking benchmarks: UAV123, UAV123@10fps, VisDrone2018, UAVDT, and DTB70. These datasets cover a wide range of challenging scenarios, including high-speed motion, varying altitudes, and complex backgrounds.

Results and Discussion

TrackingMiM establishes a new state-of-the-art for efficient UAV tracking, particularly in the speed-accuracy trade-off.

Precision vs. Speed comparison across various tracking paradigms, highlighting TrackingMiM's superior efficiency.

Speed and Efficiency

The model achieves a blistering 268.3 FPS on an NVIDIA 3090 Ti. More impressively, it maintains 97.2 FPS on a single CPU, significantly outperforming previous lightweight ViT-based trackers like Aba-ViTrack (52.7 FPS on CPU). The linear complexity of the Mamba backbone allows the model to run comfortably on hardware with as little as 4GB of GPU memory, making it truly field-ready.

Accuracy

On the UAV123 benchmark, TrackingMiM achieved a precision score of 86.6, surpassing 25 other state-of-the-art lightweight trackers. The integration of the RAT module provided a consistent boost across all benchmarks, proving that efficient memory mechanisms are key to robust aerial tracking.

Conclusion

TrackingMiM demonstrates that the shift from quadratic to linear complexity is essential for the next generation of edge AI in robotics. By combining hierarchical Mamba scanning with retrieval-augmented memory, the framework provides a robust solution for high-speed UAV tracking. Future work will explore extending this MiM framework to broader video understanding tasks such as action recognition and long-term surveillance.

Summary updated

BibTeX
@misc{liu2025trackingmim,
  author = {Bingxi Liu and Calvin Chen and Junhao Li and Guyang Yu and Haoqian Song and Xuchen Liu and Jinqiang Cui and Hong Zhang},
  title = {{TrackingMiM: Efficient Mamba-in-Mamba Serialization for Real-time UAV Object Tracking}},
  year = {2025},
  eprint = {2507.01535},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.01535},
}
Figure