# SPDepth: Enhancing Self-Supervised Indoor Monocular Depth Estimation via Self-Propagation
## 1 Introduction  
Depth estimation plays an important role in various online computer vision applications, including robots navigation, unmanned driving and scenes reconstruction. Unlike depth capturing with active devices, it is much easier to integrate a single camera into existing wireless network devices. Obtaining depth values from a camera is called monocular depth estimation. The self-supervised monocular depth estimation methods have received widespread attention due to the advantage of not needing ground truth data. Without labeled data for supervising, the design of loss function is of vital importance. The most commonly used loss for depth estimation is based on photometric consistency. The image synthesized by homographic transformation needs to be consistent with the real image. In indoor scenes, there are many low-textured regions such as walls, roofs and tables. It is hard for these regions to find correct matchings, thus making the photometric consistency assumption invalid. To solve the problem, many self-supervised works [1, 2]specifically designed proper loss terms including patch-based photometric consistency loss and geometry-related losses. However, the proposed loss terms are usually not dense enough for covering all the pixels. For example, P\({}^{2}\)Net [1] proposed sparse patch-based photometric loss and plane fitting loss as two main loss terms to supervise the training of low-textured and planar regions. Figure 1 presents the supervised areas under the two losses. The white areas in Figure 1d are not covered by any of the two losses, which means that depth ambiguities exist in these areas. Some indoor depth estimation approaches [3; 4] introduced an optical flow network to provide dense correspondences in training. Yet an additional optical flow network also needs training and overloads the loss function. Contrary to these works, we do not burden the loss function with dense correspondences computation. Instead, we adopt a self-propagation approach. Since direct supervision information is absent, propagating depths from well-supervised pixels to those not supervised can be considered. It can be found that the depths have high structural similarities with the image itself. Thus, feature self-similarities should be well exploited to perform depth self-propagation. An optical flow estimation method GMFlow [5] has taken advantage of feature self-similarities to propagate optical flow from matched pixels to unmatched ones. A simple self-attention layer was added at the end of the network. Following GMFlow, UniMatch [6] performed similar depth propagation. However, UniMatch conducted supervised stereo depth estimation. The effectiveness of self-propagation on the self-supervised monocular depth estimation task has not been explored. Inspired by the abovementioned works, we accomplish depth self-propagation through introducing local window self-attention. Feature self-similarities scores are utilized to weight the depths, which means that the weighted depths are aggregated with extra depth information from similar pixels. In simple terms, pixels with similar features are likely to have similar depths. Figure 1: The areas being supervised in P\({}^{2}\)Net [1]: (**a**) RGB image; (**b**) pixels supervised by the patch-based photometric loss; (**c**) pixels supervised by the plane fitting loss; (**d**) all the pixels being supervised. The pixels in black are supervised. Depth estimation is a dense prediction task and global self-attention brings immense computational cost. Moreover, since depth changes in the global range cannot be ignored, there is no need to perform global self-propagation. The local depth self-similarities are stronger than the global. Therefore, we limit the self-propagation to a local window range to perform more effective depth enhancement. Briefly, the following contributions were made:  
1. We proposed an enhanced self-supervised indoor monocular depth estimation network called SPDepth.