Boundary-Aware Sparse Token Routing for Real-Time 4K Streaming Depth
Replace dense cross-frame attention with boundary-aware sparse token routing to enable real-time 4K streaming video depth estimation without excessive GPU memory.
Time
Compute level
Resources
What the paper used
Prerequisites
Scope
The Gap
In Section 3.1, Section 3.3, and Appendix E.3.2, Depth Pro 2 tokenizes every frame at full native resolution with 16x16 patches and runs global within-frame and cross-frame attention over a FIFO cache of C=16 frames in unbuffered streaming (or clips of N=16 frames in buffered mode).
“Each cached frame adds a roughly constant cost of about 1.14 ms in latency and 0.19 GiB in peak memory, from 44 ms and 10.6 GiB at C = 16 to 62 ms and 13.7 GiB at C = 32.”
Limitation
Because dense attention scales quadratically with spatial token count and linearly with cache size, 4K (3840x2160) inference is prohibitively slow and memory-intensive: in Table 13, Depth Pro 2-H+ reaches only 0.4 FPS at 114.6 GiB peak memory and even the 48M Depth Pro 2-S reaches only 3.6 FPS at 31.9 GiB, preventing real-time 30 FPS 4K streaming across all model variants.
Proposed Solution
Replace global cross-frame attention in the upper 2L/3 transformer blocks with spatially windowed epipolar/neighborhood cross-frame attention and adaptive token merging that retains 16x16 full-resolution tokens around high-gradient image or depth edges while merging low-frequency background tokens in cached past frames, fine-tuning Depth Pro 2 checkpoints on high-resolution crops to preserve boundary sharpness.
Why This Matters
Cutting attention FLOPs and KV-cache footprint on redundant background tokens could bring 4K streaming throughput closer to real-time camera frame rates on a single GPU without sacrificing occlusion boundary F1.
How to Get Started
How to test it: Test whether edge-preserving token merging plus local-window cross-frame attention increases 4K unbuffered streaming FPS by at least 3x and cuts peak memory by 50% compared to dense Depth Pro 2-S and 2-B while keeping DynamicReplica boundary F1 and jitter within 0.5 points; stop if boundary F1 degrades by more than 1.5 points on Spring or DynamicReplica.
- Profile the released Depth Pro 2-S and Depth Pro 2-B models at 1080p and 4K on a single GPU to quantify the memory and latency share of within-frame versus cross-frame attention and the DPT decoder.
- Implement a training-free prototype of local-window cross-frame attention and gradient-guided KV-cache token pruning on Depth Pro 2-S and evaluate the speed-accuracy Pareto curve on 720p DynamicReplica and 1080p Spring.
- Fine-tune the modified Depth Pro 2-S and Depth Pro 2-L architectures for 50K-100K steps on 8 GPUs using high-resolution crops from UrbanSyn, Hypersim, and DynamicReplica under the paper's loss formulation.
- Benchmark throughput, peak reserved memory, boundary F1, and jitter at 1080p and 4K against Table 13 baselines.
Suggested by AI. Adapt it to your setup.
Has This Been Done?
Works like Sparse-vDiT and Flow-Guided Sparse Transformer explore sparse attention mechanisms and video acceleration, but none specifically combine spatially windowed epipolar attention and adaptive token merging to retain 16x16 tokens around high-gradient image edges for real-time streaming depth estimation.
- Sparse-vDiT: Unleashing the Power of Sparse Attention to Accelerate Video Diffusion Transformers · 2026 · 49 citations
- Flow-Guided Sparse Transformer for Video Deblurring · 2022 · 102 citations
We searched OpenAlex and arXiv for “sparse token merging windowed attention high resolution video depth” and “Boundary-Aware Sparse Token Routing for Real-Time 4K Streaming Depth” and an AI compared the idea with the top 10 results. A small search can miss relevant work.
Source Paper
Depth Pro 2: Sharp and Temporally Consistent Metric Monocular DepthPeiyun Hu, Marko Mihajlovic, Lyndon Duong +5 more · 2026
Depth Pro 2 is a monocular depth estimation model family (24M to 872M parameters) that predicts metrically accurate, boundary-sharp, and temporally consistent dense depth maps for both single images and streaming video at native resolution. By jointly training a single scalable transformer on mixed image and video datasets without complex multi-stage curricula, it overcomes the historical trade-off between sharp single-frame depth and stable multi-frame video depth.
Related Ideas
- Foveated Spatial KV Compression and Sparse Attention for Interactive 720p Video GenerationFastFrames: Video Generation at Interactive Latency🔴Hard
- Adaptive Strided Sampling and Pruning for Real-Time Edge InferenceLoGeR: Long-Context Geometric Reconstruction with Hybrid Memory🟡Fairly easy
- Motion-Adaptive Frame Sampling and Hierarchical Memory for Long-Horizon Egocentric CaptioningEgoCaptioner: Towards Comprehensive and Fine-Grained Egocentric Video Captioning🔴Hard
- Graph-Compatible Dynamic Sparse Attention for End-to-End Prefix CaptureTideway: Phase-Aware Tiered Memory Management for MoE Inference on Consumer Devices🟡Fairly easy
- Query-Adaptive Video Context Compression and Frame-Level Visual Dependence for Long-Video Speculative DraftingMMFlash: Faster Speculative Decoding for Vision-Language Models🟠Medium