# Ground-Based Cloud Image Segmentation Method Based on Improved U-Net
## 2 Materials and Methods
### Skip Connection Layer Structure  
The skip connection mechanism was first proposed in U-Net, which combines high-level semantic features from the decoder with low-level detailed features from the encoder, aiming to bridge the semantic gap between the encoder and decoder [23]. This paper proposes a novel skip connection layer structure, as shown in Figure 3, which consists of a DS path and an Im-CSAM connected in front and behind. The Im-CSAM is composed of an improved CAM and an improved SAM. The designed DS path combines the advantages of residual structures and depthwise separable convolutions, enhancing edge and texture details while improving across-layer feature fusion. In addition, the Im-CSAM has also improved the structure of channel and spatial attention in the CBAM, enhancingand combining the CBAM's feature extraction capabilities in both spatial and channel dimensions. 1. DS path structure ResNet excels in feature extraction and discrimination [24]. By utilizing the residual structure, the original input information can be directly transmitted to the output layer, mitigating the gradient vanishing issue associated with deep networks, and enhancing model performance [25]. The key to residual learning is to learn the residuals between inputs and outputs through the mapping layers. Each convolutional layer establishes shortcut connections between its input and output, allowing the input to be directly added to the output layer, forming the final target mapping. Therefore, the residual structure can achieve deeper architectures by reusing feature maps, thereby enhancing its learning capability. Depthwise separable convolution is composed of depthwise convolution and pointwise convolution, which significantly reduces the number of model parameters and computation while maintaining better performance compared to standard convolution [26]. The difference between depthwise convolution and standard convolution lies in the fact that depthwise convolution has a single-channel kernel. The core idea is to perform independent convolution operations on each input channel without any interaction between different channels, resulting in an output feature map that has the same number of channels as the input feature map. However, this type of operation does not effectively utilize the feature information from different channels at the same spatial location. Therefore, pointwise convolution is needed to recombine these feature maps. Pointwise convolution is typically a 1 \(\times\) 1 convolution operation that maps the features from multiple channels obtained after depthwise convolution to new channels through a weighted combination, ultimately outputting a new feature map. As shown in Figure 3(1), the input **X** of the DS path originates from the low-level features of the dilate block. After the first depthwise separable convolution in each layer of the DS path, a batch normalization layer and ReLU activation function are applied. After the second depthwise separable convolution, only a batch normalization operation is performed. Its output is concatenated with the features from the shortcut and then passed through a ReLU layer to obtain feature map **X\({}^{2}\)**, which is input into the Im-CSAM module. In segmentation tasks, the boundaries and shapes of cloud layers are often complicated. The use of residual structures allows each layer's encoder output features to be effectively utilized and retained. Especially in the complex hierarchical structure of cloud images, residual structures can ensure the effective fusion of high-level and low-level features. Depthwise separable convolution replaces the standard convolution in traditional residual structures, where depthwise convolution retains the texture details of the cloud layers while pointwise convolution helps integrate information across channels, making cloud image segmentation more accurate and detailed. Figure 3: The main structures of the skip connection layer are (1) a DS path and (2) an Im-CSAM.