# Attention Mechanism Used in Monocular Depth Estimation: An Overview
## 3 Attention Mechanism in MDE Methods
### CNN-Based Attention Methods  
#### 3.2.1 Supervised Training  
In 2021, [PERSON] et al. proposed a weakly supervised MDE method utilizing a commonly used U-net architecture [31]. Both encoder and decoder are constructed based on VGG blocks and channel self-attention modules to recalibrate the channel-wise information. A spatial self-attention module is inserted before the prediction head to capture the large dependency. Different from attentions of CBAM and SE, they adopted adaptive weighted pooling to generate attention maps, which are shown in Figure 10.  
[PERSON] et al. designed a context aggregation module, which is inserted between an encoder and a decoder to model the pixel-level similarity [32]. The context aggregation module consists of two branches: a spatial self-attention same as that of Transformer, and an image-level global average pooling to obtain the awareness of categories. [PERSON] et al. proposed a bidirectional attention mechanism to calculate attention maps across all the intermediate features [33], which can be seen as a cross-attention within different groups of features. In their method, global context is implemented by average pooling with a large kernel. In addition to the stages of encoder and decoder, attention modules can  
Figure 10: Channel attention and spatial attention used in [31].  
Figure 9: Parallel scheme of CNN–Transformer-based supervised MDE.  
also be inserted into the skip connections of the widely used U-net architecture. [PERSON] et al. designed a CBAM and embedded them into the skip connections [34]. [PERSON] et al. reported a patch-wise attention mechanism with which EdgeConv [35] is used to extract patch-wise edge features and patch-wise attention weights are produced based on the edge features [36]. In their method, the spatial self-attention module is placed after the last layer of encoder. Attention maps are commonly calculated over channel direction and spatial view. However, [PERSON] et al. adopted a multi-view attention mechanism in which attention maps are created from channel, height, and width directions [37]. Each attention block consisting of channel attention and spatial attention can be located at any stage of decoders. The multi-view attention model is shown in Figure 11.  
The edge features are salient parts in both RGB images and depth maps. Motivated by that fact, [PERSON] et al. proposed an adaptive geometric attention (AGA) module to measure the structure similarity of the features outputted by encoders and decoders [38]. The AGA module consists of two parallel branches, namely, a SE channel attention model with the inputs of concatenation of the outputs of encoders and decoders, and a spatial attention model constructed by cosine distance between the intermediate representations of encoders and decoders at each spatial points. The AGA scheme is shown in Figure 12.  
[PERSON] et al. used Fourier transform to separate the low frequency and high frequency information of RGB images at different frequency bands, and combined coarse depth maps with intermediate features to refine the depth maps [39]. [PERSON] et al. proposed a novel MDE method using temporal attention in which cross-channel attention is performed along the temporal channel dimension [40]. The inputs of the temporal attention model are three consecutive frames wrapped by the results of optical flow estimation.  
Figure 11: Channel and spatial attentions across three directions (image: courtesy to [PERSON] et al. [37]).  
Figure 12: AGA module used in [38] (image: courtesy to [PERSON] et al. [38]).