H-Net: Unsupervised Attention-based Stereo Depth Estimation Leveraging Epipolar Geometry

Baoru Huang, Jian-Qing Zheng, Stamatia Giannarou, Daniel S. ElsonWorkshops @ CVPR 2021

Abstract

Depth estimation from a stereo image pair has become one of the most explored applications in computer vision, with most previous methods relying on fully supervised learning settings. However, due to the difficulty in acquiring accurate and scalable ground truth data, the training of fully supervised methods is challenging. As an alternative, self-supervised methods are becoming more popular to mitigate this challenge. In this paper, we introduce the H-Net, a deep-learning framework for unsupervised stereo depth estimation that leverages epipolar geometry to refine stereo matching. For the first time, a Siamese autoencoder architecture is used for depth estimation which allows mutual information between rectified stereo images to be extracted. To enforce the epipolar constraint, the mutual epipolar attention mechanism has been designed which gives more emphasis to correspondences of features that lie on the same epipolar line while learning mutual information between the input stereo pair. Stereo correspondences are further enhanced by incorporating semantic information to the proposed attention mechanism. More specifically, the optimal transport algorithm is used to suppress attention and eliminate outliers in areas not visible in both cameras. Extensive experiments on KITTI2015 and Cityscapes show that the proposed modules are able to improve the performance of the unsupervised stereo depth estimation methods while closing the gap with the fully supervised approaches.

Introduction

Depth estimation is a cornerstone of computer vision, enabling critical functions in autonomous driving and augmented reality. While supervised deep learning has achieved remarkable accuracy, it is fundamentally limited by the "ground truth" problem: high-quality depth data from LiDAR or structured light is expensive, difficult to calibrate, and hard to scale.

Unsupervised methods offer a compelling alternative by using view synthesis as a supervisory signal. However, traditional self-supervised approaches often treat stereo images as generic data, failing to exploit the rigid geometric constraints inherent in calibrated camera systems. This leads to difficulties in handling occlusions, textureless regions, and computational inefficiencies in global attention mechanisms.

The H-Net Architecture

The researchers propose H-Net, an unsupervised framework that integrates the fundamental laws of optics—specifically epipolar geometry—directly into the neural network's architecture.

The H-Net framework utilizes a Siamese autoencoder architecture and a re-projective sampler to learn depth in an unsupervised manner.

A key innovation is the Siamese Encoder-Decoder (SE-SD) structure. Unlike standard asymmetric U-Nets, H-Net employs a symmetric architecture where both branches share weights. This forces the network to extract consistent, mutual features from the rectified stereo pair, ensuring that the predicted left-to-right and right-to-left disparity maps are inherently consistent.

Mutual Epipolar Attention and Optimal Transport

The core of H-Net's geometric edge lies in the Mutual Epipolar Attention (MEA) module. In a rectified stereo setup, any point in the left image must correspond to a point on the same horizontal line (the epipolar line) in the right image.

The OT-MEA module constrains feature matching to the epipolar line and uses the Sinkhorn algorithm to handle occlusions and outliers.

Instead of performing a global search, the MEA mechanism restricts attention to these corresponding lines. This not only reduces the search space and computational overhead but also prevents the network from being "distracted" by similar textures in geometrically impossible locations.

To further refine matching, the authors incorporate Optimal Transport (OT). By formulating feature matching as a resource allocation problem and solving it via the Sinkhorn algorithm, the network learns to "transport" feature importance between images. This formulation naturally handles occlusions; if a feature in one image has no valid match in the other, the OT mechanism suppresses its influence, leading to cleaner depth boundaries and fewer outliers.

Experimental Evaluation

H-Net was evaluated on the KITTI 2015 and Cityscapes datasets, demonstrating significant improvements over previous state-of-the-art unsupervised methods.

  • KITTI Benchmark: On the Full Eigen dataset, H-Net achieved an Absolute Relative (Abs Rel) error of 0.076, outperforming the widely used Monodepth2 (0.106) and narrowing the gap with supervised models.
  • Qualitative Performance: Visual analysis confirms that H-Net excels at capturing fine details, such as poles and car mirrors, which are often lost or blurred in other unsupervised frameworks.
  • Efficiency: The OT-MEA module is highly efficient, adding only approximately 0.6 million parameters (a ~2% increase) to the baseline architecture.

Conclusion

By embedding geometric priors directly into the attention mechanism rather than relying solely on loss functions, H-Net demonstrates that "geometry as a prior" is a powerful paradigm for unsupervised learning. While dependencies on perfect rectification and the iterative nature of the Sinkhorn algorithm remain areas for future optimization, H-Net represents a significant step toward robust, scalable depth estimation without the need for ground truth data.

Summary updated

BibTeX
@inproceedings{huang2021h,
  author = {Baoru Huang and Jian-Qing Zheng and Stamatia Giannarou and Daniel S. Elson},
  title = {{H-Net: Unsupervised Attention-based Stereo Depth Estimation Leveraging Epipolar Geometry}},
  booktitle = {Workshops @ CVPR},
  year = {2021},
  url = {https://openreview.net/forum?id=-QHyBS4vOW},
}
Figure