Next Article in Journal
Interactive Fuzzy Logic Interface for Enhanced Real-Time Water Quality Index Monitoring
Previous Article in Journal
Importance Assessment of Distribution Network Nodes Based on an Improved MBCC-HITS Algorithm
Previous Article in Special Issue
Deep Feature Selection of Meteorological Variables for LSTM-Based PV Power Forecasting in High-Dimensional Time-Series Data
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Self-Supervised Monocular Depth Estimation Based on Differential Attention

College of Electronic and Information Engineering, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China
*
Author to whom correspondence should be addressed.
Algorithms 2025, 18(9), 590; https://doi.org/10.3390/a18090590
Submission received: 11 August 2025 / Revised: 12 September 2025 / Accepted: 16 September 2025 / Published: 19 September 2025
(This article belongs to the Special Issue Algorithms for Feature Selection (3rd Edition))

Abstract

Depth estimation algorithms are widely applied in various fields, including 3D reconstruction, autonomous driving, and industrial robotics. Monocular self-supervised algorithms for depth prediction offer a cost-effective alternative to acquiring depth through hardware devices such as LiDAR. However, current depth prediction networks, predominantly based on conventional encoder–decoder architectures, often encounter two critical limitations: insufficient feature fusion mechanisms during the upsampling phase and constrained receptive fields. These limitations result in the loss of high-frequency details in the predicted depth maps. To overcome these issues, we introduce differential attention operators to enhance global feature representation and refine locally upsampled features within the depth decoder. Furthermore, we equip the decoder with a deformable bin-structured prediction head; this lightweight design enables per-pixel dynamic aggregation of local depth distributions via adaptive receptive field modulation and deformable sampling, enhancing the decoder’s fine-grained detail processing by capturing local geometry and holistic structures. Experimental results on the KITTI and Make3D datasets demonstrate that our proposed method produces more accurate depth maps with finer details compared to existing approaches.

1. Introduction

Monocular depth estimation is a fundamental task in computer vision. Depth maps encode the distance between objects in a scene and the camera sensor, significantly enhancing the 3D spatial perception capabilities of industrial robots. These maps have diverse applications: they enable precise facial feature localization for high-accuracy facial recognition and expression analysis through 3D facial contour modeling; combined with other sensor data, they facilitate high-precision map construction and vehicle localization, improving the reliability and accuracy of autonomous driving; and additionally, they empower industrial robotic systems to efficiently perform tasks such as path planning, object grasping, and logistics sorting. Consequently, depth maps are widely utilized in 3D reconstruction [1], autonomous driving [2], and industrial robotics [3].
In the past, depth information was typically obtained by analyzing signals reflected from LiDAR or structured light on object surfaces. However, hardware like LiDAR incurs higher costs compared to monocular industrial cameras. Beyond hardware-based solutions, depth information can also be derived from images using vision algorithms, which are broadly categorized into traditional methods and deep learning-based approaches. Traditional monocular depth estimation leverages image features and cues: methods based on linear perspective [4] detect parallel lines and their intersections; defocus-based techniques [5] exploit varying image blur from scene-camera distances; and weather scattering approaches [6] introduce haze and estimate depth through transmission models. Nevertheless, depth maps from traditional methods are often coarse and sparse. With advances in deep neural networks, architectures, including convolutional neural networks (CNNs), recurrent neural networks (RNNs), graph convolutional networks (GCNs), and diffusion models have achieved more accurate depth predictions. Deep learning-based monocular depth estimation utilizes these networks to predict per-pixel depth from a single image.
Neural network-based depth estimation methods are broadly categorized into supervised [7] and self-supervised approaches. Supervised methods require sparse depth ground truth from sensors like LiDAR, yet collecting large, diverse datasets with accurate depth labels remains challenging. Conversely, self-supervised methods eliminate the costs associated with depth label acquisition and simplify deployment. Without ground truth, self-supervised models are usually trained by making use of the temporal scene consistency in monocular videos. They learn depth from monocular videos by training a depth estimation network along with a separate pose network. To address occlusion issues, where pixels visible in the target image are absent in source images, Monodepth2 [8] employs an image reprojection loss that considers only the minimum photometric error per pixel across multiple source images. However, traditional methods, including Monodepth2, suffer from inadequate explicit scene structure modeling and insufficient detail handling, resulting in performance bottlenecks and blurry artifacts. To overcome these limitations, HR-Depth [9] introduces multi-resolution feature fusion with channel attention optimization; CADepth [10] enhances scene structure representation and local detail processing through channel-wise attention, though it requires substantial computational resources due to its parameter size; SwinDepth [11] integrates a Swin Transformer with a densely cascaded multi-scale network to boost accuracy via global–local feature fusion and cross-scale connections; and Lite-Mono [12] adopts a lightweight CNN–Transformer hybrid, where stacked dilated depthwise separable convolutions and pointwise convolutions strengthen spatial–channel interactions while channel attention facilitates global context aggregation.
In general, current networks with limited feature extraction capabilities struggle to preserve detailed information during depth map reconstruction. Furthermore, the feature fusion process at skip connections suffers from a fundamental semantic discrepancy between encoder and decoder features. This mismatch is exacerbated by the widespread reliance on primitive nearest neighbor interpolation for feature map upsampling in decoder stages, which notably yields coarse feature representations.
This paper presents a novel monocular depth decoder architecture that integrates differential attention mechanisms with bin-based regression to address the critical challenge of detail loss in depth map estimation. The proposed decoder incorporates three key components: (1) A global differential self-attention module enhancing semantic feature representation through joint spatial and channel context modeling; (2) a feature fusion module combining local differential mutual attention with adaptive gated modulation, which effectively bridges semantic gaps in skip connections while refining upsampled decoder features via multi-scale context aggregation; and (3) a deformable bins module that enables adaptive depth distribution focusing within localized regions, substantially enhancing the network’s capacity to recover fine-grained geometric details.

2. Methods

In this section, we begin by reviewing self-supervised training methods for monocular depth estimation. We then introduce the architecture of our differential attention-based network and present our three main contributions: (1) the global differential self-attention module, (2) the local differential mutual attention-based feature fusion module, and (3) the deformable bins module.

2.1. Self-Supervised Training Process

As illustrated in Figure 1, the self-supervised monocular depth estimation framework comprises complementary pose and depth prediction networks, with this paper concentrating on enhancing the depth prediction component. Adopting a classical encoder–decoder architecture, our depth prediction network introduces three novel elements within the decoder: a global differential self-attention module, an optimized feature fusion module, and a deformable bins module.
The entire network is trained through the correspondence between the pixels of RGB images. Denote the target image as It, the source image as Is, and the predicted depth of It as Dt. It and Is are concatenated as inputs into the pose network, and the pose matrix is E t > s , with s { t 1 , t + 1 } . t − 1 and t + 1 denote the previous and subsequent frames of the target image. Moreover, the intrinsic matrix is K, the correspondence between the pixel coordinates pt in It and ps in Is, can be calculated by the following formula:
p s ~ K E t > s D t ( p t ) K 1 p t
The image I s > t reconstructed from the source image can be obtained using bilinear interpolation. Networks are trained using minimum photometric reprojection loss [8]:
L p = min s   p e ( I t , I s > t )
where pe consists of L1 loss and structural similarity loss [13]:
p e ( I t , I s > t ) = α ( 1 S S I M ( I t , I s > t ) ) / 2 + ( 1 α ) | | I t I s > t | | 1
where α = 0.85 .
In self-supervised training, the presence of static objects within images can result in suboptimal training efficacy; therefore, a binary mask [8] is used to filter out static pixels:
μ = [ min s   p e ( I t , I s > t ) < min s   p e ( I t , I s ) ]
where [] is the Iverson bracket.
Moreover, to enhance the smoothness of the predicted depth map, the edge-aware smoothness regularization term [14] Ls is employed:
L s = | x d t * | e | x I t | + | y d t * | e | y I t |
where d t * = d t / d t ¯ is the mean-normalized inverse depth from [15] used to discourage shrinking of the estimated depth.
Furthermore, the deep network performs loss calculations at S scales, and the final loss formula is as follows:
L = 1 S i S u L p i + λ L S i
where i represents the i-th scale, λ = 1 × 10−3.

2.2. Monocular Depth Decoder Based on Differential Attention and Bin Mechanism

Vision Transformers typically rely on self-attention mechanisms to model long-range dependencies. This approach dynamically constructs affinity matrices by computing similarities between query and key vectors, an operation conventionally implemented through matrix multiplication. While effective for many vision tasks, this standard self-attention formulation proves suboptimal when deployed in decoders for monocular depth prediction. This fundamental limitation arises because depth prediction requires continuous value regression per pixel, rather than processing only key pixels through multiplicative operations. To address this constraint, we propose a novel differential attention mechanism inspired by bilateral filtering. This approach replaces multiplication with differentiation operators to model long-range dependencies, better adapting to depth regression tasks. We present two distinct implementation strategies for this mechanism, detailed comprehensively in Section 2.2.1 and Section 2.2.2.

2.2.1. Global Differential Self-Attention Module

As illustrated in Figure 2, the proposed global differential self-attention module models channel-wise interdependencies and aggregates region-specific responses within high-level feature maps.
The multi-head global differential self-attention mechanism integrates two core components: differential spatial attention and differential channel attention. Departing from conventional transformer architectures, the spatial attention module first employs a linear projection layer to compress the channel dimension of input features to match the number of attention heads M, thereby generating queries Q and keys K via dimension reduction. Subsequently, it applies a dimension-aware broadcasting operation, B ( x , d ) , that automatically expands the d-th dimension of tensor x through value replication, ensuring dimensional compatibility when constructing affinity matrices through matrix differentiation:
A = Softmax ( ( B ( Q , 2 ) B ( K T , 1 ) ) 2 )
These affinity matrices are then used as spatial attention weights:
Attention ( Q , K , V ) = A V
The differential channel attention is behind the differential spatial attention, which follows the same calculation process as the differential spatial attention, but operates along the channel dimension.

2.2.2. Feature Fusion Module Based on Local Differential Mutual Attention and Gated Modulation

In this paper, we focus on Monodepth2 [8], which is a classic self-supervised monocular depth estimation algorithm, and many subsequent methods have adopted its training strategy and evaluation method. Here, it is used as the benchmark method. And the traditional feature fusion module at the skip connections of the encoder–decoder architecture is shown in Figure 3.
The second row of Figure 4 compares encoder features, decoder features, and full-resolution decoder features in Monodepth2. Figure 4b reveals that while encoder features contain texture information, their lack of fine detail due to the convolutional architecture may cause depth ambiguity at object boundaries. Figure 4c further demonstrates that nearest-neighbor interpolation in up-sampling introduces aliasing artifacts at object boundaries in full-resolution decoder features, resulting in significant detail degradation. Figure 4d shows that fused features combining elements from both representations exhibit insufficient detail preservation and increased susceptibility to erroneous depth predictions.
To overcome these limitations, we introduce a feature fusion module comprising a local differential mutual attention block and a gated modulation block, as illustrated in Figure 5. Leveraging the encoder’s richer detail information, the attention block employs encoder features to guide decoder feature refinement. Inspired by TransNext’s pixel-focused attention (PFA) in [16], we define e(u,v) as the set of the encoder’s pixels within a sliding window centered on the pixel (u,v). During the implementation process, the window size is 5 × 5. Similarly, we denote the decoder’s corresponding feature set as d(u,v), forming paired regional descriptors that enable differential mutual feature interaction.
The difference between queries and keys of features can be described as follows:
S ( u , v ) ~ e ( u , v ) = Sum ( ( Q ( u , v ) K e ( u , v ) ) 2 )
Sum ( ) represents the sum operation of the input feature vectors in the channel dimension. This module operates on the queries (Q) and keys (K), computing the sum of squared differences between central features and neighboring features within a 5 × 5 local window to generate the pixel-focused differential attention maps (A):
A ( u , v ) ~ e ( u , v ) = Softmax ( S ( u , v ) ~ e ( u , v ) d )
As shown in Figure 5b, the differential attention (A) of encoder features is used to guide the extraction of the decoder feature (V):
Attention ( Q ( u , v ) , K e ( u , v ) , V d ( u , v ) ) = A ( u , v ) ~ e ( u , v ) V d ( u , v )
Since encoder features contain rich texture details while decoder features exhibit smoother representations, a gated modulation block, as shown in Figure 5c, selectively filters encoder features, which may negatively impact depth prediction accuracy.
The effectiveness of our proposed module is demonstrated through visual comparisons in Figure 4. As shown in Figure 4b,e, the local differential mutual attention block preserves significantly more structural detail in wall regions compared to Monodepth2’s encoder features. Figure 4c,f reveal that our gated modulation block effectively suppresses invalid texture information, which is detrimental to depth estimation. The superior performance of our integrated feature fusion module is conclusively demonstrated in Figure 4d,g. Compared with Monodepth2’s decoder features, the features generated by our fusion module maintain essential details while filtering out texture information unrelated to depth, thus effectively bridging semantic gaps at skip connections and refining upsampled features through multi-scale context aggregation.

2.2.3. Deformable Bins Module

Many supervised monocular depth estimation methods currently utilize the AdaBins [17] architecture for their depth prediction head, as depicted in Figure 6a. This structure is predominantly utilized in supervised depth estimation methods but has remained unexplored in self-supervised approaches. In this section, we focus on enhancing this architecture to advance the predictive precision of self-supervised monocular depth estimation methods. The bin mechanism departs from the conventional approach of predicting depth directly using convolutional layers, instead employing a more structured methodology. Initially, it defines a depth interval with specific upper and lower bounds. This interval is then partitioned into a series of monotonically increasing, adaptively adjustable bin values. Subsequently, the network predicts a weight distribution across these bin feature dimensions for each pixel location. Finally, an accurate depth estimate is obtained by performing a weighted summation of the bin features using the predicted weights.
The advantage of AdaBins lies in its use of the bin structure to partition a scene’s depth intervals adaptively. This enables more effective capture and representation of depth values across diverse scenarios. However, a limitation of AdaBins is that it operates with a single, globally shared bin feature.
Given the inherent anisotropy of local depth information in images, a solitary bin feature cannot adequately represent optimal depth intervals per pixel. To address this limitation, we propose assigning a unique bin feature to every pixel, enabling the network to focus on depth distributions within local regions. We introduce the deformable bin module (Figure 6b) for this purpose. Unlike AdaBins, our module jointly incorporates the previous stage’s predicted depth Ds+1 and decoder features during bin generation.
As shown in Figure 6c, while the previous stage’s depth provides a coarse depth range estimate per pixel, deformable sampling addresses potential inaccuracies by adaptively sampling regions around the upsampled depth map to define bins, using offsets derived from decoder features.
Each pixel position on the decoder feature map is denoted as p(u,v), the offset is denoted as { Δ p n | n = 1 , , N } , and the weight of bins is denoted as w ( u , v ) ( n ) ; the prediction result Ds can be obtained from the following formula:
D s ( p ( u , v ) ) = n w ( u , v ) ( n ) D s + 1 ( p ( u , v ) + Δ p n )
This lightweight design enables each pixel to dynamically aggregate depth distributions within its local neighborhood, significantly enhancing the decoder’s capacity for fine-grained spatial detail processing.

3. Results

3.1. Dataset Preprocessing, Splitting, and Implementation Details

The baseline method (Monodepth2) adopts the KITTI dataset for training and evaluation, with subsequent self-supervised monocular depth estimation algorithms commonly utilizing it for experimental validation. To demonstrate the effectiveness of the proposed decoder, experiments were conducted on the KITTI dataset. The KITTI dataset uses the split rules proposed by [18]. The training dataset contains 39,810 images, while the test dataset contains 697 images. The network is implemented with Pytorch 1.9.0 and RTX 3090 GPUs, and the number of training epochs is 20. Both the pose network and the depth network use the Adam optimizer with β 1 = 0.9 and β 2 = 0.999 . The initial learning rate is set to 1 × 10−4 and decays to 1 × 10−5 after 15 epochs. The depth network uses ResNet18 or ConvNeXt-tiny [19], while the pose network only uses ResNet18.

3.2. Experiments for Self-Supervised Monocular Depth Estimation

3.2.1. Ablation Study

For the ablation study, ResNet18 serves as the backbone for both pose and depth networks, with Monodepth2’s monocular evaluation metrics providing the baseline comparison. Experiments employ a fixed image resolution of 640 × 192. Abs Rel, Sq Rel, RMSE and RMSE log quantify the disparity between ground truth and predicted values. Lower values of these metrics indicate superior prediction performance, while the higher the threshold accuracy rates ( δ < 1.25 , δ < 1.25 2 , δ < 1.25 ), the more predicted pixels are closer to the ground truth, indicating a better overall prediction performance. As presented in Table 1, ablation results for the global differential self-attention module (GDAM), the feature fusion module incorporating local differential mutual attention and gated modulation (DGFM), and the deformable bin module (DBM) collectively demonstrate significant performance improvements. These findings confirm that each proposed module enhances the network’s depth estimation capability.

3.2.2. Comparison with Other Works

The network was trained using the KITTI dataset. The monocular training mode is denoted as M, and the monocular–stereo training mode is denoted as MS. The resolution is set to 640 × 192 (L) or 1024 × 320 (H). When the resolution is 640 × 192, the batch size is set to 12; when the resolution is 1024 × 320, the batch size is set to 8. The backbone of the network is either ResNet18 or ConvNeXt-tiny. Table 2 demonstrates the performance metrics of our method under varying experimental configurations.
Additionally, the proposed algorithm in this paper is compared with other high-performing self-supervised monocular depth estimation algorithms (Monodepth2 [8], SGDepth [20], HR-Depth [9], RMSFM6 [21], CADepth [10], Liu [22], Lite-Mono [12], SwinDepth [11]). The experimental results are shown in Table 3. Quantitative analysis shows that compared to other methods, our approach balances prediction error and prediction integrity, achieving excellent performance.
Furthermore, the proposed method is evaluated on the Make3D dataset and compared with other methods. The evaluation results are shown in Table 4. From the table, the method proposed in this paper also demonstrates superior performance across key evaluation metrics. It also demonstrates that our method has good generalization ability.
Qualitative comparisons on the KITTI dataset are shown in Figure 7. From the visualization results, it can be observed that the method proposed in this paper demonstrates significant performance advantages in depth mutation regions (such as the junction of foreground and background): the edge contours of the predicted depth map are clearer and sharper, with more complete detail preservation. Especially when dealing with slender foreground objects, our method maintains better structural continuity and integrity.
Figure 8 shows the comparison of depth maps on the Make3D dataset. In the first row of the figure, it is evident that, in contrast to the other methods, the approach proposed in this paper successfully predicts the complete outline of the tree trunk even in areas where the trunk’s color closely resembles the background. This method demonstrates superior depth prediction capabilities in regions with lower image contrast. Moving to the second row, it is apparent that this method not only accurately predicts the depth of the street lamp but also captures a more comprehensive structure of the surrounding shrubbery. In the third row, it is clear that the proposed method delivers more consistent depth predictions for the road sign, and the contours between the road sign and the background are more distinct. The comparative results on the Make3D dataset underscore the robust generalization ability of the proposed method.
Among the current advanced methods, CADepth, like the method in this paper, focuses on improving the depth decoder; therefore, a further comparison between the proposed method and CADepth is conducted. Additionally, Monodepth2 is the benchmark reference. The comparative results are shown in Table 5. The experimental setup in Table 5 employs an input resolution of 640 × 192 and a batch size of 12 and exclusively uses monocular images for training.
All experiments in this paper were conducted on a ResNet18-based pose network. From the experimental results, it can be seen that compared with methods that use stronger pose networks, our prediction head can achieve better prediction results when trained with a small pose network, which also verifies the effectiveness of our method. During inference, the pose network is not involved. Table 5 presents FPS, GPU footprint, training time, and FLOP metrics, reflecting the inference speed, memory consumption, training duration, and computational complexity of the depth network. Compared to CADepth, our approach achieves reduced inference time, a lower memory footprint, a shorter training time, and decreased computational complexity. Furthermore, under the same experimental setup as Table 5, the FLOPs of CADepth’s SPM module and our GDAM are 50.3 M and 47.1 M, respectively. The decoder with only CADepth’s DEM module added and the decoder with only our DGFM module added have FLOPs of 30,660 M and 5509 M and parameter counts of 32.78 M and 5.42 M, respectively.
On the whole, our method has good inference speed and effectively improves the performance of the self-supervised monocular depth estimation network without significantly increasing the number of parameters and FLOPs.

4. Discussion

This paper proposes a monocular depth decoder enhanced by differential attention and deformable bins to address decoder limitations in depth prediction networks. The main innovations include the introduction of a differential attention mechanism and a deformable bins mechanism in the decoder head. The former effectively solves the inconsistency problem between image edges and depth edges while enhancing global information exchange within the decoder. The latter incorporates a multi-scale depth prediction refinement mechanism, which facilitates the generation of highly accurate depth estimation results. The proposed method achieves Abs Rel and δ < 1.25 metrics of 0.092 and 0.913 on the KITTI dataset, and experiments on the Make3D dataset show that the proposed method has good generalization ability. Our method effectively improves the predictive performance of the network without significantly increasing the number of parameters. However, our approach currently exhibits certain limitations. Occlusion handling remains challenging in self-supervised tasks. While many methods employ object detection or image segmentation techniques to localize and remove dynamic objects, this approach entails significant computational resource consumption. Furthermore, low-contrast illumination conditions and noisy images in datasets impede accurate reprojection loss computation for self-supervised methods, so processing and optimizing the quality of the dataset are also challenges. In future work, we aim to enhance the network’s predictive performance by refining training strategies, optimizing loss functions, and incorporating auxiliary techniques such as pseudo-labeling.

Author Contributions

M.Z.: Conceptualization, methodology, software, writing. H.Y.: Conceptualization, methodology, supervision, funding acquisition. Z.L.: Visualization, validation, writing. Y.Z.: Visualization, validation, writing. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

This research employed publicly available datasets: KITTI: https://www.cvlibs.net/datasets/kitti/raw_data.php (accessed on 15 September 2023) and Make3D: http://make3d.cs.cornell.edu/data.html (accessed on 15 September 2023).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Zollhöfer, M.; Stotko, P.; Görlitz, A.; Theobalt, C.; Nießner, M.; Klein, R.; Kolb, A. State of the Art on 3D Reconstruction with RGB-D Cameras. Comput. Graph. Forum. 2018, 37, 625–652. [Google Scholar] [CrossRef]
  2. Janai, J.; Güney, F.; Behl, A.; Geiger, A. Computer Vision for Autonomous Vehicles: Problems, Datasets and State-of-the-Art. Found. Trends Comput. 2020, 12, 1–308. [Google Scholar] [CrossRef]
  3. Suzuki, R.; Karim, A.; Xia, T.; Hedayati, H.; Marquardt, N. Augmented Reality and Robotics: A Survey and Taxonomy for AR-enhanced Human-Robot Interaction and Robotic Interfaces. In Proceedings of the 2022 CHI Conference on Human Factors in Computing Systems, New Orleans, LA, USA, 30 April–5 May 2022. [Google Scholar]
  4. Tsai, Y.-M.; Chang, Y.-L.; Chen, L.-G. Block-based vanishing line and vanishing point detection for 3D scene reconstruction. In Proceedings of the International Symposium on Intelligent Signal Processing and Communications (ISPAC), Yonago, Japan, 12–15 December 2006. [Google Scholar]
  5. Tang, C.; Hou, C.P.; Song, Z.J. Depth recovery and refinement from a single image using defocus cues. J. Mod. Optic. 2015, 62, 441–448. [Google Scholar] [CrossRef]
  6. Guo, F.; Guo, F.; Peng, H. Adaptive estimation of depth map for two-dimensional to three-dimensional stereoscopic conversion. Opt. Rev. 2014, 21, 60–73. [Google Scholar] [CrossRef]
  7. Song, M.; Lim, S.; Kim, W. Monocular Depth Estimation Using Laplacian Pyramid-Based Depth Residuals. IEEE Trans. Circuits Syst. Video Technol. (TCSVT) 2021, 32, 4381–4393. [Google Scholar] [CrossRef]
  8. Godard, C.; Mac Aodha, O.; Firman, M.; Brostow, G.J. Digging Into Self-Supervised Monocular Depth Estimation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019. [Google Scholar]
  9. Lyu, X.; Liu, L.; Wang, M.; Kong, X.; Liu, L.; Liu, Y.; Chen, X.; Yuan, Y. HR-Depth: High Resolution Self-Supervised Monocular Depth Estimation. In Proceedings of the AAAI, Online, 2–9 February 2021. [Google Scholar]
  10. Yan, J.; Zhao, H.; Bu, P.; Jin, Y. Channel-Wise Attention-Based Network for Self-Supervised Monocular Depth Estimation. In Proceedings of the 9th International Conference on 3D Vision (3DV), London, UK, 1–3 December 2021. [Google Scholar]
  11. Shim, D.; Kim, H.J. SwinDepth: Unsupervised Depth Estimation using Monocular Sequences via Swin Transformer and Densely Cascaded Networks. In Proceedings of the 2023 IEEE International Conference on Robotics and Automation (ICRA), London, UK, 29 May–2 June 2023. [Google Scholar]
  12. Zhang, N.; Nex, F.; Vosselman, G.; Kerle, N. Lite-Mono: A Lightweight CNN and Transformer Architecture for Self-Supervised Monocular Depth Estimation. In Proceedings of the 2023 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, BC, Canada, 17–24 June 2023. [Google Scholar]
  13. Wang, Z.; Bovik, A.C.; Sheikh, H.R.; Simoncelli, E.P. Image quality assessment: From error visibility to structural similarity. IEEE Trans. Image Process. (TIP) 2004, 13, 600–612. [Google Scholar] [CrossRef] [PubMed]
  14. Godard, C.; Mac Aodha, O.; Brostow, G.J. Unsupervised monocular depth estimation with left-right consistency. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017. [Google Scholar]
  15. Wang, C.; Buenaposada, J.M.; Zhu, R.; Lucey, S. Learning Depth from Monocular Videos using Direct Methods. In Proceedings of the 31st IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–23 June 2018. [Google Scholar]
  16. Shi, D. TransNeXt: Robust Foveal Visual Perception for Vision Transformers. In Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–22 June 2024. [Google Scholar]
  17. Bhat, S.F.; Alhashim, I.; Wonka, P. AdaBins: Depth Estimation Using Adaptive Bins. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Online, 19–25 June 2021. [Google Scholar]
  18. Eigen, D.; Fergus, R. Predicting Depth, Surface Normals and Semantic Labels with a Common Multi-Scale Convolutional Architecture. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Santiago, Chile, 11–18 December 2015. [Google Scholar]
  19. Liu, Z.; Mao, H.; Wu, C.Y.; Feichtenhofer, C.; Darrell, T.; Xie, S. A ConvNet for the 2020s. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022. [Google Scholar]
  20. Klingner, M.; Termöhlen, J.A.; Mikolajczyk, J.; Fingscheidt, T. Self-Supervised Monocular Depth Estimation: Solving the Dynamic Object Problem by Semantic Guidance. In Proceedings of the European Conference on Computer Vision 2020, Glasgow, UK, 23–28 August 2020. [Google Scholar]
  21. Zhou, Z.; Fan, X.; Shi, P.; Xin, Y. R-MSFM: Recurrent Multi-Scale Feature Modulation for Monocular Depth Estimating. In Proceedings of the 18th IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 11–17 October 2021. [Google Scholar]
  22. Liu, H.; Zhu, Y.; Hua, G.; Huang, W.; Ding, R. Adaptive Weighted Network With Edge Enhancement Module For Monocular Self-Supervised Depth Estimation. In Proceedings of the 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Singapore, 23–27 May 2022. [Google Scholar]
Figure 1. The structure of this paper’s self-supervised monocular depth estimation network.
Figure 1. The structure of this paper’s self-supervised monocular depth estimation network.
Algorithms 18 00590 g001
Figure 2. Global differential self-attention module.
Figure 2. Global differential self-attention module.
Algorithms 18 00590 g002
Figure 3. Feature fusion structure at skip connections.
Figure 3. Feature fusion structure at skip connections.
Algorithms 18 00590 g003
Figure 4. Comparisons of feature fusion modules. (a) Input image; (b) encoder feature in Monodepth2; (c) upsampled decoder feature in Monodepth2; (d) decoder feature in Monodepth2; (e) output feature of the local differential mutual attention block; (f) output feature of the gated modulation block; (g) decoder feature of the feature fusion module based on local differential mutual attention and gated modulation.
Figure 4. Comparisons of feature fusion modules. (a) Input image; (b) encoder feature in Monodepth2; (c) upsampled decoder feature in Monodepth2; (d) decoder feature in Monodepth2; (e) output feature of the local differential mutual attention block; (f) output feature of the gated modulation block; (g) decoder feature of the feature fusion module based on local differential mutual attention and gated modulation.
Algorithms 18 00590 g004
Figure 5. Structure of the feature fusion module. (a) Feature fusion module based on local differential mutual attention and gated modulation; (b) local differential mutual attention block; (c) gated modulation block.
Figure 5. Structure of the feature fusion module. (a) Feature fusion module based on local differential mutual attention and gated modulation; (b) local differential mutual attention block; (c) gated modulation block.
Algorithms 18 00590 g005
Figure 6. Prediction head of bin structure. (a) Prediction head of AdaBins; (b) deformable bin module; (c) deformable bin block.
Figure 6. Prediction head of bin structure. (a) Prediction head of AdaBins; (b) deformable bin module; (c) deformable bin block.
Algorithms 18 00590 g006
Figure 7. Comparison of depth maps on the KITTI dataset. (a) Input images; (b) Monodepth2; (c) RMSFM6; (d) HR-Depth; (e) CADepth; (f) SwinDepth; (g) ours.
Figure 7. Comparison of depth maps on the KITTI dataset. (a) Input images; (b) Monodepth2; (c) RMSFM6; (d) HR-Depth; (e) CADepth; (f) SwinDepth; (g) ours.
Algorithms 18 00590 g007
Figure 8. Comparison of depth maps on the Make3D dataset. (a) Input image; (b) Monodepth2; (c) CADepth; (d) ours.
Figure 8. Comparison of depth maps on the Make3D dataset. (a) Input image; (b) Monodepth2; (c) CADepth; (d) ours.
Algorithms 18 00590 g008
Table 1. The results of the ablation study. ↓: smaller is better, ↑: larger is better, bold font: best metric, ✔: module used.
Table 1. The results of the ablation study. ↓: smaller is better, ↑: larger is better, bold font: best metric, ✔: module used.
GDAMDGFMDBMAbs Rel ↓Sq Rel ↓RMSE ↓RMSE log ↓ δ < 1.25 δ < 1.2 5 2 δ < 1.2 5 3
0.1150.9034.8630.1930.8770.9590.981
0.1110.8264.7240.1890.8770.9600.982
0.1120.8384.7050.1870.8800.9610.982
0.1120.8674.7540.1900.8780.9600.982
0.1110.8114.6350.1860.8810.9620.982
0.1090.8144.6790.1870.8820.9610.982
0.1110.8504.7060.1880.8820.9620.982
0.1090.8274.6350.1850.8850.9620.982
Table 2. The experimental results of the depth prediction network. ↓: smaller is better, ↑: larger is better.
Table 2. The experimental results of the depth prediction network. ↓: smaller is better, ↑: larger is better.
BackboneH/LM/MSAbs Rel ↓Sq Rel ↓RMSE ↓RMSE log ↓ δ < 1.25  ↑ δ < 1.2 5 2  ↑ δ < 1.2 5 3  ↑
resnet18LM0.1090.8274.6350.1850.8850.9620.982
convnext-tLM0.1020.8294.5700.1800.8980.9650.982
resnet18HM0.1050.7874.4920.1800.8930.9650.983
convnext-tHM0.0970.7204.3400.1740.9070.9670.984
resnet18LMS0.1080.8394.6500.1880.8880.9610.981
convnext-tLMS0.0970.7424.4120.1760.9050.9660.983
resnet18HMS0.1010.7474.4170.1790.8970.9660.983
convnext-tHMS0.0920.6914.2780.1710.9130.9680.984
Table 3. Comparison with other algorithms. ↓: smaller is better, ↑: larger is better, bold font: best metric.
Table 3. Comparison with other algorithms. ↓: smaller is better, ↑: larger is better, bold font: best metric.
MethodH/LM/MSAbs Rel ↓Sq Rel ↓RMSE ↓RMSE log ↓ δ < 1.25 δ < 1.2 5 2 δ < 1.2 5 3
SGDepthLM0.1170.9074.8440.1960.8750.9580.980
Monodepth2LM0.1150.9034.8630.1930.8770.9590.981
HR-DepthLM0.1090.7924.6320.1850.8840.9620.983
RMSFM6LM0.1120.8064.7040.1910.8780.9600.981
CADepthLM0.1050.7694.5350.1810.8920.9640.983
LiuLM0.1050.7654.5980.1850.8880.9630.982
Lite-MonoLM0.1070.7654.5610.1830.8860.9630.983
SwinDepthLM0.1060.7394.5100.1820.8900.9640.984
OursLM0.1020.8294.5700.1800.8980.9650.982
MD2HM0.1150.8824.7010.1900.8790.9610.982
HR-DepthHM0.1060.7554.4720.1810.8920.9660.984
CADepthHM0.1020.7344.4070.1780.8980.9660.984
LiuHM0.1040.7324.4270.1810.8940.9650.984
Lite-MonoHM0.0970.7104.3090.1740.9050.9670.984
OursHM0.0970.7204.3400.1740.9070.9670.984
MD2LMS0.1060.8184.7500.1960.8740.9570.979
HR-DepthLMS0.1070.7854.6120.1850.8870.9620.982
CADepthLMS0.1020.7524.5040.1810.8940.9640.983
OursLMS0.0970.7424.4120.1760.9050.9660.983
Monodepth2HMS0.1060.8064.6300.1930.8760.9580.980
HR-DepthHMS0.1010.7164.3950.1790.8990.9660.983
CADepthHMS0.0960.6944.2640.1730.9080.9680.984
OursHMS0.0920.6914.2780.1710.9130.9680.984
Table 4. Experimental results on the Make3D dataset. ↓: smaller is better, bold font: best metric.
Table 4. Experimental results on the Make3D dataset. ↓: smaller is better, bold font: best metric.
MethodAbs Rel ↓Sq Rel ↓RMSE ↓RMSE log ↓
MD20.3223.5897.4170.163
RMSFM60.3343.2857.2120.169
CADepth0.3123.0867.0660.159
Ours0.3072.8656.8880.159
Table 5. Performance comparison on the KITTI dataset.
Table 5. Performance comparison on the KITTI dataset.
MethodPose Network Parameters
(M)
Depth Network Parameters
(M)
Total Parameters
(M)
FPSAbs Rel δ < 1.25 Gpu Footprint (M)Training Time (H)FLOPs of Depth Network Decoder (G)
MD2 (Res-50)27.2634.5761.83910.1100.88315,81111.56.5
CADepth27.2658.3485.60530.1050.89218,84312.030.7
Ours12.5133.3445.85620.1020.89815,15511.77.9
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhou, M.; Yu, H.; Li, Z.; Zhang, Y. Self-Supervised Monocular Depth Estimation Based on Differential Attention. Algorithms 2025, 18, 590. https://doi.org/10.3390/a18090590

AMA Style

Zhou M, Yu H, Li Z, Zhang Y. Self-Supervised Monocular Depth Estimation Based on Differential Attention. Algorithms. 2025; 18(9):590. https://doi.org/10.3390/a18090590

Chicago/Turabian Style

Zhou, Ming, Hancheng Yu, Zhongchen Li, and Yupu Zhang. 2025. "Self-Supervised Monocular Depth Estimation Based on Differential Attention" Algorithms 18, no. 9: 590. https://doi.org/10.3390/a18090590

APA Style

Zhou, M., Yu, H., Li, Z., & Zhang, Y. (2025). Self-Supervised Monocular Depth Estimation Based on Differential Attention. Algorithms, 18(9), 590. https://doi.org/10.3390/a18090590

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop