I. INTRODUCTION
Single Image Depth Estimation (SIDE) has garnered significant attention due to its low cost, lack of additional sensors, and ease of deployment. Unlike traditional depth sensing technologies such as LiDAR or stereo vision, SIDE requires only a single RGB image as input, offering exceptionally broad application prospects spanning applications such as autonomous driving [1], virtual reality [2], and robot navigation [3]. This versatility presents significant challenges: achieving exceptional generalization capabilities to effectively handle the diversity and complexity of diverse application scenarios. However, variations in scene layout, depth distribution, and lighting conditions render this an exceptionally challenging task.
In recent years, to enhance the generalization capabilities of monocular depth estimation models in unseen domains, primary research approaches have been categorized into two types: data-driven methods [4-6] and model-driven methods [7-9]. The former relies on large-scale, meticulously annotated image-depth pairs to map images to depths, requiring time-consuming and labor-intensive data collection and training processes. In contrast, model-driven approaches aim to leverage rich prior knowledge embedded in pre-trained models to enhance generalization performance. For instance, PixelFormer [9] incorporates skip attention mechanisms within the Transformer [10] architecture based on attention, effectively integrating high-resolution local texture features from the encoder with global contextual information from the decoder. This facilitates long-range propagation of semantic information, significantly mitigating label confusion in pixel-level depth estimation and enhancing model robustness. However, this approach still exhibits noticeable bias in depth predictions under complex conditions such as distant views and strong illumination. This limitation primarily stems from such models’ over-reliance on intra-modal visual features and insufficient understanding of high-level semantic information, resulting in inadequate adaptability to challenging scenarios involving occlusions or texture deficiencies.
To mitigate this constraint, this paper introduces the contrastive language-image pre-training model CLIP [11] as external semantic prior. CLIP, pre-trained on 200 million image-text pairs, possesses robust cross-modal alignment and cross-domain generalization capabilities. Its rich high-level semantic information effectively supplements missing visual representations in complex environments, enhancing the model’s semantic perception and depth inference capabilities in challenging scenes. However, a significant granularity gap exists between its scene-level representations and the pixel-level geometric outputs required for depth estimation. To address this, this paper proposes a framework bridging CLIP’s macro-level semantics with pixel-level geometric understanding. At the feature representation level, we introduce a Text-guided Reverse Cross-Attention matching method. By modeling the relationship between textual descriptions and pixel-level features, this approach adaptively injects scene-level semantic priors into the pixel-level depth estimation task, thereby enhancing the semantic consistency of monocular depth estimation in complex scenes. At the scene understanding level, we introduce a Text-Guided Depth Bins Center Predict module. This module discretizes continuous depth into multiple intervals via a depth binning adapter and employs a gated attention mechanism to filter scene structural information from textual features. This achieves an adaptive mapping from semantic priors to depth distributions, thereby enhancing model robustness in complex scenes. The main contributions of this paper are summarized as follows:
-
(1) We introduce a novel paradigm that adapts scene-level textual descriptions to pixel-level depth estimation, effectively leveraging semantic priors from pre-trained vision-language models;
-
(2) By introducing two core modules-TRCA and TBCP working synergistically, we significantly enhance the generalization capability of the SIDE model in complex scenes;
-
(3) Experiments on NYU Depth v2 show our method reduces Abs Rel and RMSE by 3.5% and 5%, respectively, versus PixelFormer, with further cross-dataset tests confirming superior generalization.
II. RELATED WORK
Single Image Depth Estimation (SIDE) has achieved notable progress on standard benchmarks [12]. Following the pioneering CNN-based work of Eigen et al. [13], subsequent research has evolved along three main avenues: (A) Architecture advancements, including the use of residual networks [14], multi-scale fusion strategies [15], Vision Transformers [16], and diffusion models [17]. (B) Improved optimization, such as classification regression paradigms [18] and geometric constraints [19]. and (C) Multi-task learning with auxiliary cues like surface normal [20] or semantics. While effective on indistribution data, these methods often lack the robustness required for real-world applications under diverse conditions. This has shifted the research focus towards generalizable SIDE.
Current efforts for generalization are primarily two-fold. The first, data-driven, relies on large-scale, often web-collected, image-depth pairs. Methods like MiDaS [4] predict affine-invariant relative depth, enabling training on mixed datasets. Omnidata [5] and Depth Anything [12] expanded this concept with massive datasets for zero-shot transfer. Others, like ZoeDepth [6], fine-tune such relative depth models for metric output. While powerful, this paradigm demands significant data and compute. The second, model-driven, leverages strong priors from models pre-trained on even larger datasets. Notably, vision-language models like CLIP-trained on 200 million image-text pairs offer rich, semantically-aligned cross-modal representations. Harnessing these priors for SIDE presents a promising path for improved generalization without exhaustive data collection.
The success of CLIP has spurred its application to various downstream vision tasks, including monocular depth estimation. For instance, Kim et al. [22] proposed a tuning-free method that realigns CLIP’s internal representations via engineered text prompts to elicit depth-aware priors. Chatterjee et al. [23] systematically studied the robustness of linguistic guidance in low-level vision, establishing an evaluation benchmark and a multi-level language dataset for depth estimation. However, these approaches primarily exploit CLIP’s global image-text matching capability, falling short of achieving pixel-level semantic understanding. This limits their potential in dense prediction tasks like depth estimation, where fine-grained spatial alignment is crucial. Bridging this gap-from global matching to pixel-wise adaptation-remains an open challenge.
To this end, we propose a novel text-to-pixel framework that leverages CLIP’s knowledge in a fine-grained manner. Our model consists of two core components: (1) the TRCA module, which establishes pixel-wise semantic correspondence between image features and text descriptions, enabling fine-grained semantic enhancement from text to pixels. and (2) the TBCP module, which discretizes continuous depth into learnable bins and uses gated attention to filter text-based structural cues, thereby mapping semantic priors to depth distributions adaptively. Together, these modules significantly improve the robustness of depth estimation in complex scenes.
III. METHODOLOGY
Conventional SIDE methods rely solely on visual features, which often leads to significant errors in textureless or occluded regions. To address this, we enhance the Pixelformer architecture with cross-modal priors from CLIP, formulating depth estimation as a classification-regression task. As illustrated in Fig. 1, our framework operates as follows.
The input image I is processed by a Swin Transformer backbone [24] to extract multi-scale visual features {E1, E2, E3, E4} at 1/4, 1/8, 1/16, and 1/32 resolutions, capturing global context via window-based self-attention.
In parallel, a human-written scene description T is tokenized and encoded by the CLIP Text Encoder (CLIP-ViT-L/14) to produce a 1024-dimensional global text embedding Ftext. The core of our method consists of two novel modules that fuse these modalities. First, the TRCA module uses Ftext to semantically enhance the multi-scale visual features. The enriched features are then passed to a pixel query initializer (PQI), which aggregates global context via multi-scale average pooling to generate initial pixel queries. Second, the TBCP module discretizes the continuous depth range into nbins adaptive bins. It utilizes a gated attention mechanism to filter structural cues from Ftext, producing a per-pixel probability distribution over the bins. The final depth d_i for pixel is obtained by a weighted sum of the bin center values using this distribution.
To effectively fuse linguistic and visual features while preserving visual details, we design the TRCA module, as illustrated in Fig. 2(A) as an interaction module between linguistic and visual features. Since E4 and Ftext differ in spatial dimensions and channel counts, a convolution operation reduces E4 dimensions to match Ftext channel count. This channel alignment preserves E4 spatial dimensions, preventing information loss from reduced spatial resolution. Next, the query vector Q from Ftext is dot-multiplied with the key vector K from E4 to obtain the self-similarity score matrix S. The similarity score values determine the weights assigned to the value vector V from E4 in the final output. The weighted sum of S values and vector V is then mapped back to the spatial dimension matching the original visual features via a multilayer perceptron (MLP).
where denotes the dimension of the query and key vectors, and Q,K,V are all N×2C in size, with N=h×w representing the sequence length.
The proposed TBCP module is illustrated in Fig. 2(B). Structurally, it retains the core idea of adaptive prediction of depth interval centers from the Pixelformer method while functionally introducing a gated attention mechanism. This mechanism effectively filters scene structural information from textual features, thereby adaptively mapping semantic priors to the depth distribution. Similar to the TRCA module, Q4 and text features Ftext are first mapped to the same spatial dimension via convolution, as shown in Fig. 2(A). Global average pooling is then applied to pixel query Q4 to extract a global feature vector integrating visual-semantic information. Subsequently, adaptive gating is employed to fuse this with Ftext:
where Wg denotes the gating weight matrix, Fgap represents the globally averaged pooling-processed visual feature vector, Ftext is the global text embedding feature vector, σ is the Sigmoid activation function, and ⊙ denotes element-wise multiplication.
We generate fused features that simultaneously reflect scene visual characteristics and linguistic attributes. subsequently predict the width distribution b across nbins of depth intervals after processing through a 3-layer MLP.
where Gap(Q4, Ftext) denotes the language-visual fused features processed by global average pooling.
The center of each depth interval is calculated within the dynamically adjusted depth range [dmin (T), dmax (T)] guided by linguistic context, ensuring the intervals align with both the image’s actual depth characteristics and the semantic meaning described in the text. Finally, the center of the i-th depth interval is computed as:
where nbins denotes the number of depth bins, set to 256 in this paper following the configuration in [1]. dmin represents the minimum depth value, and dmax denotes the maximum depth value.
Finally, at each pixel location, the final depth valueb̃ is computed as a linear combination of the Softmax score at that pixel and the depth interval c(bi), as shown in equation (6):
where pk denotes the Softmax score of the pixel within the depth interval.
IV. EXPERIMENTAL RESULTS
NYU v2 [26] is an indoor dataset comprising 120,000 RGB images and corresponding depth pairs of size 480×640. These depth pairs were extracted from video sequences captured using a Microsoft Kinect across 464 indoor scenes. This paper evaluates the algorithm using the official training and test set partition:249 scenes comprising 50,000 images for training and 654 images for testing. We adopt the centroid segmentation proposed by Eigen31, with a depth map upper bound of 10 meters. The network outputs depth predictions at 120×160 resolution, which we upsampled by a factor of 4 during training and testing to match ground truth resolution.
For quantitative assessment, we employ four metrics introduced by Eigen [13], which are most widely used in evaluating monocular depth estimation performance. Among these, Abs Rel denotes the absolute relative error at each pixel location, measuring the discrepancy between predicted and ground truth depths. RMSE represents the root mean square error between predicted and ground truth depths. log10 is the average of the absolute values of the logarithmic differences between the predicted and true depths for each pixel. Acc is the proportion of pixels where the error bet-ween the predicted and true depths is below a certain threshold. They are defined as follows:
where N denotes the total number of pixels. di represents the predicted depth value for the i-th pixel. denotes the ground truth depth label for the i-th pixel. thr is the error threshold, typically set to 1.25, 1.252 or 1.253. This paper introduces parameters (Parameters, Params) and floating-point operations (FLOPs) to evaluate the portability and computational complexity of the network model.
To enhance the credibility of the framework results, comparative experiments were conducted. Models were evaluated under identical experimental conditions on the NYU-Depth v2 dataset, including Eigen et al. [13], Yin et al. [19], BTS [27], Naderi [8], TransDepth [29], DPT [21], PackNet-SAN [30], Adabins [18], P3Depth [25], NeWCRFs [5], and PixelFormer [9]. Through comparative experiments, we analyze performance on the NYU-Depth v2 dataset to better evaluate the strengths and weaknesses of the proposed framework. Experimental results are shown in Table 1.
| Method | Venue | Abs Rel ↓ | RMSE ↓ | log10 ↓ | δ1 ↑ | δ2 ↑ | δ3 ↑ |
|---|---|---|---|---|---|---|---|
| Eigen et al. [13] | NIPS’14 | 0.158 | 0.641 | - | 0.769 | 0.950 | 0.988 |
| DAV [28] | ECCV’20 | 0.108 | 0.412 | - | 0.882 | 0.980 | 0.996 |
| TransDepth [29] | ICCV’21 | 0.106 | 0.365 | 0.045 | 0.900 | 0.983 | 0.996 |
| DPT [21] | ICCV’21 | 0.110 | 0.367 | 0.045 | 0.904 | 0.988 | 0.998 |
| PackNet-SAN [30] | CVPR’21 | 0.106 | 0.393 | - | 0.892 | 0.979 | 0.995 |
| Adabins et al. [18] | CVPR’21 | 0.103 | 0.364 | 0.044 | 0.903 | 0.984 | 0.997 |
| Naderi et al. [8] | WACV’22 | 0.097 | 0.444 | 0.042 | 0.897 | 0.982 | 0.996 |
| Lee et al. [27] | WACV’22 | 0.107 | 0.373 | 0.046 | 0.893 | 0.985 | 0.997 |
| P3Depth [25] | CVPR’22 | 0.104 | 0.356 | 0.043 | 0.898 | 0.981 | 0.996 |
| NeWCRFs [5] | CVPR’22 | 0.095 | 0.334 | 0.041 | 0.922 | 0.992 | 0.998 |
| PixelFormer [9] | CVPR’23 | 0.090 | 0.322 | 0.039 | 0.929 | 0.991 | 0.998 |
| Ours | 0.088 | 0.319 | 0.039 | 0.931 | 0.992 | 0.998 |
As shown in Table 1 compares our method with recent state-of-the-art approaches, including Eigen, BTS, AdaBins, NeWCRFs, and PixelFormer. Our method achieves the best performance on key metrics: an Abs Rel of 0.088 and an RMSE of 0.319. This represents a 3.5% reduction in Abs Rel and a 5% reduction in RMSE compared to the strong baseline PixelFormer. The improvement in accuracy thresholds (δ1, δ2) further confirms the effectiveness of integrating cross-modal semantic prior.
To assess generalization, we directly evaluate models rained on NYU Depth v2 on the unseen SUN RGB-D dataset without fine-tuning. As shown in Table 2, our method outperforms all compared methods, including PixelFormer. This demonstrates that the semantic priors from CLIP significantly enhance the model’s robustness to domain shifts. As shown in Fig. 3, compared to PixelFormer, the proposed method demonstrates greater robustness in complex indoor scenes. In the first row of high-glare scenes, depth estimation within the boxed area—covering reflective glass and surrounding environments—is more accurate with clearer hierarchical structure. In the second row of high-brightness metallic scenes, the prediction of highly reflective areas indicated by arrows is more stable. In the third row of large-scale indoor scenes, the edges of distant walls are rendered more clearly, with overall depth hierarchy appearing more distinct.
| Method | Venue | Abs Rel ↓ | RMSE ↓ | log10 ↓ | δ1 ↑ | δ2 ↑ | δ3 ↑ |
|---|---|---|---|---|---|---|---|
| PackNet-SAN [30] | CVPR’21 | 0.166 | 0.494 | 0.071 | 0.757 | 0.943 | 0.984 |
| Adabins et al. [18] | CVPR’21 | 0.183 | 0.541 | 0.082 | 0.696 | 0.912 | 0.973 |
| Naderi et al. [8] | WACV’22 | 0.172 | 0.515 | 0.075 | 0.740 | 0.933 | 0.980 |
| Lee et al. [27] | WACV’22 | 0.159 | 0.476 | 0.068 | 0.771 | 0.944 | 0.983 |
| PixelFormer [9] | CVPR’23 | 0.144 | 0.441 | 0.062 | 0.802 | 0.962 | 0.990 |
| Ours | 0.140 | 0.438 | 0.060 | 0.803 | 0.964 | 0.990 |
Fig. 4 further visualizes results on four distinct indoor test sets, showing that our framework consistently produces more geometrically coherent and robust depth estimates in complex, unseen environments, thanks to the semantically guided feature enhancement and depth discretization mechanisms.
To validate the effectiveness of the proposed module, we conducted stepwise ablation experiments on the NYU Depth v2 dataset, with results shown in Table 3. It can be observed that:
-
Adding the TRCA module significantly reduces AbsRel and SqRel,
-
δ<1.25 improves, indicating that textual semantic priors enhance the discriminative power of depth features, with particularly notable gains in texture-sparse or boundary regions;
-
Incorporating the TBCP markedly reduces RMSE, demonstrating that semantic priors combined with batching strategies effectively model complex depth distributions;
-
Simultaneously integrating TRCA and TBCP achieves optimal performance across all metrics, validating the synergistic complementarity of both modules in feature enhancement and depth interval modeling.
V. CONCLUSION
This paper proposes a single-image depth estimation method that integrates cross-modal semantic priors. By incorporating CLIP text information into the PixelFormer framework, we design a TRCA module and a TBCP module. These innovations effectively enhance the expressive power of depth features and improve the robustness of depth interval segmentation in complex scenes. Experiments demonstrate that our method significantly outperforms PixelFormer on NYU Depth v2 and exhibits stronger generalization capabilities across four out-of-domain benchmarks. These results indicate that cross-modal semantic priors effectively complement traditional visual supervision, offering novel insights for enhancing the generalization ability of single-image depth estimation. Moving forward, we will further explore the potential of larger-scale vision-language models for pixel-level semantic alignment, as well as the robustness of the proposed method in outdoor dynamic scenes and under extreme conditions.









