StableDPT: Temporal Stable Monocular Video Depth Estimation
Ivan Sobko, Hayko Riemenschneider, Markus Gross, Christopher Schroers
TL;DR
This paper tackles temporal instability in monocular video depth estimation by augmenting image based depth models with a global temporal cross attention head that leverages keyframes sampled across the entire video. StableDPT uses an off the shelf ViT encoder and a DPT style head with temporal layers that cross attend to distant frames, enabling robust depth predictions without post processing. A strided inference strategy anchors context with global keyframes to process arbitrary length videos efficiently while avoiding scale drift. The method is trained on a mix of image and video data with losses including SSI Trim, Gradient Matching, and Temporal Gradient Matching, achieving competitive accuracy and temporal stability with roughly 2x faster inference on standard hardware. The approach is lightweight, end to end trainable, and generalizable to other dense prediction tasks.
Abstract
Applying single image Monocular Depth Estimation (MDE) models to video sequences introduces significant temporal instability and flickering artifacts. We propose a novel approach that adapts any state-of-the-art image-based (depth) estimation model for video processing by integrating a new temporal module - trainable on a single GPU in a few days. Our architecture StableDPT builds upon an off-the-shelf Vision Transformer (ViT) encoder and enhances the Dense Prediction Transformer (DPT) head. The core of our contribution lies in the temporal layers within the head, which use an efficient cross-attention mechanism to integrate information from keyframes sampled across the entire video sequence. This allows the model to capture global context and inter-frame relationships leading to more accurate and temporally stable depth predictions. Furthermore, we propose a novel inference strategy for processing videos of arbitrary length avoiding the scale misalignment and redundant computations associated with overlapping windows used in other methods. Evaluations on multiple benchmark datasets demonstrate improved temporal consistency, competitive state-of-the-art performance and on top 2x faster processing in real-world scenarios.
