## 3 Materials and Methods
### Thin Cloud Removal Model  
Optical satellite images captured under thin cloud cover typically exhibit low contrast and clarity. The low contrast between the target and the background makes it difficult to directly identify targets after feature extraction through the backbone network. Additionally, the uneven distribution of thin cloud cover complicates remote sensing images, reducing the network's ability to capture fine details. To address this, we propose the Thin Cloud Removal (TCR) model, designed to remove thin clouds in remote sensing imagery. The TCR module begins with a \(3\times 3\) convolutional layer, followed by multiple DehazeFormer blocks for cloud removal. Next, another convolutional layer further processes the features, and finally, soft reconstruction is applied to replace global residual learning. To tackle the issues of sparse target pixels and indistinct features, we introduce the Group Attention Refinement Module (GARM). This module emphasizes target information and improves the contrast between the target and its background. The subsequent sections will offer a comprehensive overview of the DF block and GARM. **DehazeFormer (DF) Block. ** The DF block improves upon the Swin Transformer by enhancing the normalization layer, non-linear activation functions, and spatial information aggregation mechanisms [44]. The detailed structure of the DF block is shown in Figure 4. First, Rescale Layer Normalization (RescaleNorm) is constructed based on LayerNorm to perform normalization. This modification effectively mitigates the negative impact that commonly used LayerNorm may have on cloud removal tasks. In addition, the DF block introduces a simple linear activation function called SoftReLU, which serves as a smooth approximation of the excessive REU between Gelu and ReLU. Hence, we propose SoftReLU [45], which is a simple smooth approximation to the ReLU as an excess between GELU and ReLU:  
\[\text{SoftReLU}(x)=\frac{x+\sqrt{x^{2}+\alpha^{2}}-\alpha}{2} \tag{2}\]  
Figure 4: Details regarding DehazeFormer (DF) block: RescaleNorm, SoftReLU, and W-MHSA for enhanced thin cloud removal. Figure 3: Overview of the proposed CRTD ship detection method. where \(\alpha\) is the shape parameter. Using SoftReLU as the activation function provides better denoising performance. Lastly, a W-MHSA with parallel convolutions is employed to enhance the model's ability to aggregate information across windows. Through the DF block, the network effectively improves thin cloud removal while maintaining computational efficiency. **Group Attention Refine Module (GRAM). ** To enhance the contrast between backgrounds and targets under foggy weather, we devised a Group Attention Refine Module (GARM) to augment high-level features. The specifics of GARM are depicted in Figure 5. Given the feature map \(X\in\mathbb{R}^{\mathbb{C}\times H\times W}\), where \(C,H\) and \(W\) denote the channel, height, and width of the input feature, respectively, GARM initially employs a \(3\times 3\) depth-wise convolution(DW Conv), batch normalization, and ReLU activation to extract features. Subsequently, it divides the features into \(g\) sub-features along the channel dimension to capture different semantics. Finally, GARM calculates the attention for each sub-feature independently using Equation (3). \[Atten_{i}=FC(GN(conv(Avg(X_{i})))) \tag{3}\]  
where \(Atten_{i}\) represents the attention score for the input \(X_{i}\). A global average pooling is utilized to encode global spatial information along the channel dimension; subsequently, a \(1\times 1\) convolutional layer is applied to capture local patterns and spatial dependencies within the averaged feature map. To promote stable training dynamics and enhance generalization capabilities, group normalization (GN) is employed to normalize features across independent groups. The normalized features then pass through a fully connected layer (FC) consisting of linear transformations, ReLU activation, and another linear transformation, concluding with a Sigmoid activation function.