---
title: 'ICDepth: Monocular Video Depth Estimation'
url: https://www.emergentmind.com/topics/icdepth
type: topic
---

# ICDepth: Monocular Video Depth Estimation

Searching arXiv for ICDepth and closely related video depth estimation papers to ground the article in current literature.
ICDepth is a monocular video depth estimation framework that repurposes a pre-trained text-to-video diffusion transformer, specifically Wan 2.1, through In-Context Conditioning (ICC) to estimate depth from RGB video while targeting temporal consistency, geometric accuracy, and cross-domain generalization [2607.01677]. The method is positioned against a common trade-off in the literature: discriminative approaches provide strong per-frame accuracy but can exhibit temporal drift under limited context windows, whereas generative approaches improve consistency and generalization but typically require more extensive training data and may lack geometric precision. Within this setting, ICDepth introduces two task-specific mechanisms—SAND-Attention and Semantic-Resolution Feature Modulation (SRFM)—to adapt a video-generation backbone to dense geometric prediction [2607.01677].

## 1. Conceptual framing and problem setting

Monocular video depth estimation requires simultaneous control over temporal consistency, geometric fidelity, and robustness across diverse visual domains. ICDepth is designed for precisely this setting. Its central premise is that pre-trained text-to-video diffusion transformers have already internalized rich spatio-temporal priors from tens of millions of videos, and that these priors can be redirected toward depth estimation through conditioning rather than through a wholesale redesign of the backbone [2607.01677].

The framework adopts In-Context Conditioning as the mechanism for this redirection. In the formulation given for ICDepth, an RGB video $V_I\in\mathbb R^{T\times H\times W\times3}$ is encoded into conditioning latents $\mathbf{c}\in\mathbb R^{n\times d}$, while the corresponding depth video $V_D$ is encoded into clean depth latents $\mathbf{z}_0\in\mathbb R^{n\times d}$. At diffusion timestep $t$, the clean depth latents are corrupted into $\mathbf{z}_t$ and concatenated with the RGB latents along the token dimension:
$$
\mathbf{s}_t = [\,\mathbf{z}_t;\,\mathbf{c}\,]\;\in\;\mathbb R^{2n\times d}.
$$
The transformer $u_\Theta$ is then trained, via flow matching, to predict the instantaneous velocity field that recovers $\mathbf{z}_0$, and inference proceeds by solving the corresponding ODE from random $\mathbf{z}_T$ to produce a depth video conditioned on the input RGB [2607.01677].

A key feature of this design is that it is described as “non-invasive”: no new attention layers or convolutions need to be injected into the pre-trained backbone. Instead, ICDepth relies on the model’s native self-attention and cross-attention patterns, provided that attention is constrained so that alignment is preserved and noisy depth tokens do not corrupt the conditioning stream. This design requirement motivates the SAND-Attention mechanism.

## 2. In-Context Conditioning as adaptation strategy

ICDepth uses ICC to reinterpret a video-generation model as a dense predictor. In the original generative setting, the denoising backbone learns a vector field
$$
\frac{d\mathbf{z}(t)}{dt} \;=\; u_\Theta\bigl(\mathbf{z}_t,\;t,\;\mathbf{c}\bigr),
$$
whose integration yields a video sample consistent with the conditioning input. ICDepth preserves this denoising formalism but changes the semantics of the latent stream: the target latent sequence corresponds to depth rather than RGB video, while the conditioning tokens are the encoded RGB frames [2607.01677].

The framework’s use of ICC distinguishes it from a simpler channel-concatenation strategy. The reported ablation on Sintel states that replacing ICC with standard channel concatenation degrades AbsRel from $0.250$ to $0.367$ [2607.01677]. This suggests that the benefit is not merely the presence of RGB and depth information in a shared tensor, but the exploitation of a pre-trained attention architecture whose token interactions already encode useful spatial-temporal structure.

A plausible implication is that ICC functions as an adaptation interface between generative pretraining and geometric estimation. Rather than requiring domain-specific architectural augmentation at every stage, it enables the model to reuse internal priors while exposing failure modes—especially positional misalignment and contamination from noisy latents—that must be corrected explicitly.

## 3. SAND-Attention: alignment and noise decoupling

SAND-Attention is introduced to solve two problems in vanilla ICC: first, diffusion noise in the depth latent stream can leak into the clean RGB conditioning tokens; second, standard Rotary Positional Encoding can fail to respect the one-to-one spatial-temporal correspondence between depth and RGB tokens [2607.01677]. The mechanism therefore combines shared positional indexing with decoupled attention flow.

The first component is shared RoPE. ICDepth assigns the same positional index $\mathcal P(i)$ to the noisy depth token $\mathbf{z}_t[i]$ and the corresponding RGB token $\mathbf{c}[i]$. Queries and keys are split into depth and conditioning parts and then transformed with RoPE using identical index maps:
$$
Q'_{\mathbf{z}} = \mathrm{RoPE}(Q_{\mathbf{z}},\mathcal P),\quad
Q'_{\mathbf{c}} = \mathrm{RoPE}(Q_{\mathbf{c}},\mathcal P),
$$
$$
K'_{\mathbf{z}} = \mathrm{RoPE}(K_{\mathbf{z}},\mathcal P),\quad
K'_{\mathbf{c}} = \mathrm{RoPE}(K_{\mathbf{c}},\mathcal P).
$$
The stated purpose is to ensure that the attention score between a depth token and its RGB counterpart at the same space-time location is computed with identical positional phase, thereby preserving exact alignment [2607.01677].

The second component is decoupled, unidirectional attention. Clean RGB tokens attend only among themselves:
$$
O_{\mathbf{c}}
=\mathrm{softmax}\!\bigl(Q'_{\mathbf{c}}(K'_{\mathbf{c}})^{T}/\sqrt{d_{\mathrm{head}}}\bigr)\,V_{\mathbf{c}},
$$
whereas noisy depth queries attend to both depth and RGB keys and values:
$$
O_{\mathbf{z}}
=
\mathrm{softmax}\!\bigl(Q'_{\mathbf{z}}[\,K'_{\mathbf{z}};K'_{\mathbf{c}}\,]^{T}/\sqrt{d_{\mathrm{head}}}\bigr)\,[\,V_{\mathbf{z}};V_{\mathbf{c}}\,].
$$
The two outputs are concatenated as
$$
O_s = [\,O_{\mathbf{z}};\,O_{\mathbf{c}}\,],
$$
after which computation proceeds through the usual MLP. The description emphasizes that no gradients or noise flow back into $O_{\mathbf{c}}$, preserving the integrity of the clean conditioning signal [2607.01677].

The paper also gives a multi-head formulation in which the same logic is applied per attention head. Empirically, the ablations identify SAND-Attention as structurally necessary: omitting it and reverting to full attention degrades Sintel AbsRel to $0.413$, while dropping only RoPE alignment yields $0.410$; removing decoupled attention alone results in a smaller but still measurable degradation to $0.262$ [2607.01677]. These results are presented as evidence that both precise alignment and noise decoupling are essential components rather than implementation details.

## 4. Semantic-Resolution Feature Modulation

Even with conditioning and attention control in place, a text-to-video diffusion transformer is not explicitly optimized for geometric precision. ICDepth addresses this by introducing Semantic-Resolution Feature Modulation, which injects two priors into every transformer block’s MLP output: a DINOv2 semantic prior and a resolution prior [2607.01677].

For the semantic prior, per-frame DINOv2 features $f_d$ are extracted from the RGB frames, pooled, and reshaped into an embedding $\mathbf{e}_d\in\mathbb R^{d_d}$. A small MLP $\Theta_d$ produces scale and shift vectors:
$$
\bigl[\mathbf{e}_d^{\mathrm{scale}};\;\mathbf{e}_d^{\mathrm{shift}}\bigr]
\;=\;\Theta_d(\mathbf{e}_d)\;\in\;\mathbb R^{2c}.
$$
Given the layer-$\ell$ MLP output $\mathbf{s}^{\ell}_{\mathrm{mlp}}\in\mathbb R^{n\times c}$, the depth portion $\mathbf{z}^\ell$ is modulated as
$$
\mathbf{z}^\ell_{d\mathsf{mod}}
= \mathbf{z}^\ell\;\odot\;(1 + \mathbf{e}_d^{\mathrm{scale}})\;+\;\mathbf{e}_d^{\mathrm{shift}}.
$$
This modulation is described as adding semantic awareness, particularly around edges and objects [2607.01677].

For the resolution prior, the spatial dimensions $(H,W)$ are encoded into sinusoidal embeddings and processed by another MLP $\Theta_r$ to produce
$$
\bigl[\mathbf{e}_r^{\mathrm{scale}};\;\mathbf{e}_r^{\mathrm{shift}}\bigr]
\;=\;\Theta_r(\mathbf{e}_r)\;\in\;\mathbb R^{2c}.
$$
The semantically modulated depth tokens are then further transformed:
$$
\mathbf{z}^\ell_{dr\mathsf{mod}}
= \mathbf{z}^\ell_{d\mathsf{mod}}
\;\odot\;(1 + \mathbf{e}_r^{\mathrm{scale}})
\;+\;\mathbf{e}_r^{\mathrm{shift}}.
$$
The unchanged conditioning tokens are re-concatenated before the next residual block [2607.01677].

The corresponding ablation results indicate that SRFM is a major contributor to geometric quality. Without SRFM, Sintel AbsRel rises from $0.250$ to $0.306$. Removing only the DINOv2 insert yields $0.269$, and removing only the resolution embedding yields $0.264$ [2607.01677]. The reported interpretation is that semantic and resolution modulation jointly improve geometric accuracy; a plausible implication is that they compensate for inductive biases that are strong for video generation but insufficiently constrained for dense depth boundaries and variable aspect ratios.

## 5. Training protocol, supervision, and inference regime

ICDepth is trained on a compact synthetic mixture comprising Virtual KITTI (VKITTI), a subset of TartanAir and TartanGround with single-direction cameras, and a synthetic subset of OmniWorld [2607.01677]. The total training set contains approximately $0.8$ million frames, which the paper describes as a $6$–$13\times$ reduction relative to competing generative methods. This data-efficiency claim is central to the method’s positioning.

The training regime uses multi-resolution clips containing between $21$ and $77$ frames, with temporal extent adjusted inversely to spatial resolution so that $H\times W\times T\approx672\times384\times77$ tokens [2607.01677]. Supervision is based on a flow matching objective masked to valid depth regions. Let $M\in\{0,1\}^{n}$ denote the downsampled binary mask of valid VAE-latent locations, corresponding to regions where true depth is less than $D_{\max}$. The loss is
$$
\mathcal L
= \mathbb{E}_{t,\mathbf{z}_0,\boldsymbol\epsilon,\mathbf{c},\mathbf{e}_d,\mathbf{e}_r}
\Bigl[\,M\;\odot\;\bigl\lVert
u_\Theta\bigl(\mathbf{z}_t,t,\mathbf{c},\mathbf{e}_d,\mathbf{e}_r\bigr)
- \mathbf{v}_t
\bigr\rVert^2\Bigr],
$$
with $\mathbf{z}_t=\mathbf{z}_0+\alpha_t\boldsymbol\epsilon$ and $\mathbf{v}_t$ the target velocity field [2607.01677].

Optimization is performed for $8$ epochs on $4$ NVIDIA H800 GPUs with batch size $1$ per GPU, learning rate $2\times10^{-4}$, and gradient accumulation over $32$ steps. Inference uses $3$–$5$ DDIM sampling steps as the reported speed–accuracy trade-off [2607.01677].

A common misconception about diffusion-based depth estimation is that generative pretraining alone should suffice once conditioning is provided. The ICDepth formulation does not support that view. The architecture adds explicit attention constraints and feature modulation, and the ablations indicate that these additions materially affect performance. Another misconception is that data efficiency necessarily implies minimal temporal context; in this case, the model is explicitly trained with clips up to $77$ frames, suggesting that compact data usage and extended spatio-temporal context are treated as complementary rather than opposing design choices.

## 6. Empirical performance, generalization, and limitations

In zero-shot evaluation, ICDepth is reported to set new state of the art on Sintel, ScanNet, KITTI, and Bonn [2607.01677]. On Sintel with $50$ frames, it reduces AbsRel to $0.250$ and raises $\delta_1$ to $0.749$. On ScanNet with $90$ frames, it achieves AbsRel $0.076$ and $\delta_1=0.952$, described as nearly matching top specialized methods. On KITTI and Bonn with $110$ frames, it reports AbsRel $0.061/0.053$ and $\delta_1$ $0.968/0.979$, respectively [2607.01677].

The paper also emphasizes robustness under domain shift. On unseen low-light Sintel, ICDepth’s relative $\delta_1$ drop is reported as only $4.0\%$, compared with $8$–$13\%$ for alternatives [2607.01677]. This suggests that the pre-trained spatial-temporal priors inherited from the video diffusion backbone remain useful under appearance changes that commonly destabilize frame-centric discriminative models.

The reported limitations are equally explicit. Inference remains slow because the method is diffusion-based, at approximately $11.8$ seconds for $53$ frames at $480\times640$ [2607.01677]. The model is currently trained for relative depth, up to per-video scale-shift, rather than absolute metric depth. The discussion also notes remaining domain biases in extreme settings such as very high-speed motion or non-Lambertian materials, and states that static backgrounds and motion parallax cues are underused [2607.01677].

These limitations place ICDepth within a broader methodological tension. It demonstrates that a generative video transformer can be converted into a state-of-the-art depth estimator through careful conditioning, alignment control, and task-specific priors, but it does not eliminate the classical costs of diffusion inference or the challenge of recovering absolute scale. A plausible implication is that subsequent work may focus less on proving the viability of the paradigm and more on reducing its computational overhead and extending it toward metric and multimodal depth estimation.

Source: https://www.emergentmind.com/topics/icdepth