## 2 Methods
### Introduction of Network Architecture  
#### 2.2.1 Introduction of CNN and CNN-Based Depth Estimation  
CNNs mimic the visual cortex system of animals to recognize object features in images. In CNNs, filters act as cells simulating the visual cortex, while stacked convolutional layers capture different receptive fields, enabling the network to identify target features and their spatial locations. Over the past few years, CNNs have rapidly advanced and become widely used in various computer vision tasks due to their superior accuracy and stability in feature extraction compared to traditional methods. This section introduces the basic theory of CNNs, including key components, such as the convolutional layer, pooling layer, and activation layer. The convolutional layer consists of multiple convolutional kernels, each a fixed-size matrix with adjustable parameters. These kernels slide across the feature map, moving from left to right and top to bottom with a specified stride, covering local regions to extract relevant features. Within each region, the kernel performs a weighted sum of the data, producing a feature map for that area. The convolutional kernel focuses on local feature extraction and maintains constant weights during the sliding process, which enables local connectivity and weight sharing. The convolutional computation can be expressed by the following equation:  
\[S(i,j)=(I*K)(i,j)=\sum_{m}\sum_{n}I(i+m,j+n)K(m,n)+b \tag{7}\]  
where the output image \(S(i,j)\) is called the feature map; the elements in the convolution kernel \(K\) are called the weights, and \(b\) is called the bias; in addition, the number of pixels \(s\) that the convolution kernel moves each time in the input image is called the step size. The pooling layer performs a pooling operation on the input data, reducing its size while retaining as much relevant information as possible. Pooling aims to compress data: it suppresses low-response signals and reduces noise, while also decreasing the number of parameters to be learned, thereby reducing the network's size. Additionally, pooling enlarges the receptive field, enabling the use of smaller convolutional kernels to capture larger-scale features. The key parameters in the pooling operation are the pooling kernel and stride. Typically, the pooling kernel is square to ensure equal sampling in both dimensions. Given an input image with dimensions \(I_{w}\times I_{h}\), a pooling kernel of size \(k\times k\), and a stride \(s\), the output image dimensions after pooling can be calculated as follows:  
\[ \begin{cases}\text{W}_{\text{output}}=\text{floor}\left(\frac{\text{h}-k}{s} +1\right)\\ \text{H}_{\text{output}}=\text{floor}\left(\frac{\text{h}-k}{s}+1\right)\\ \end{cases}  \tag{8}\]  
Figure 5: Image enhancement. The pooling layer parameters are hyperparameters, manually selected and not learned during training. The most common values for the pooling kernel size and stride are both set to 2, typically for non-overlapping pooling. Based on the operation applied within the pooling kernel, the two main types of pooling are max pooling and average pooling. The function in the activation layer that performs nonlinear mapping is called the activation function. It must be nonlinear, though not all nonlinear functions are suitable for this purpose. For efficient backpropagation in neural networks, the activation function must be differentiable and should avoid issues such as gradient explosion or vanishing gradients. In convolutional neural networks, the activation layer typically follows the convolutional layer, with its input being a two or multi-dimensional matrix. The activation function is applied element-wise to the input matrix, without altering its dimensionality. Common activation functions include Sigmoid, Tanh, ReLU, and other ReLU-like functions. The Sigmoid function, also known as the Logistic function, is mathematically expressed as  
\[\sigma(x)=\frac{1}{1+\exp(-x)} \tag{9}\]  
The Tanh function, also known as the hyperbolic tangent function, is similar to the Sigmoid function.