# Transfer Learning Model for Crack Detection in Side SlopesBased on Crack-Net
## 3 Materials and Methods  
### Detection Model with Crack-Net  
#### 3.1.1 Overall Structure  
This paper aims to establish simultaneous interaction and local context awareness between low-level feature maps of crack images and enhance the detectability of cracks. \begin{table}
\begin{tabular}{p{56.9 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Method** & \begin{tabular}{c} **Typical** \\ **Scenario** \\ \end{tabular} & **Advantages** & **Limitations** & \begin{tabular}{c} **Applicability** \\ **to Slopes** \\ \end{tabular} \\ \hline \hline Image Processing & \begin{tabular}{c} Roads/Concrete \\ surfaces \\ \end{tabular} & Simple and fast & \begin{tabular}{c} Sensitive to lighting; \\ background interference; poor \\ for fine cracks \\ \end{tabular} & Low \\ \hline \hline Machine Learning & \begin{tabular}{c} Buildings/ \\ Pavements \\ \end{tabular} & Learns complex features & \begin{tabular}{c} Requires feature engineering; \\ limited generalization \\ \end{tabular} & Moderate to \\ \hline \hline Deep Learning & \begin{tabular}{c} General \\ structures \\ \end{tabular} & \begin{tabular}{c} Automatic feature extraction; \\ high accuracy \\ \end{tabular} & \begin{tabular}{c} Requires large datasets; high \\ computational cost \\ \end{tabular} & High potential \\ \hline \hline Transfer Learning & \begin{tabular}{c} Pavements/ \\ Slopes \\ \end{tabular} & \
\begin{tabular}{c} Efficient with small samples; \\ strong generalization \\ \end{tabular} &
\begin{tabular}{c} Sensitive to domain differences; \\ few studies on slopes \\ \end{tabular} & High \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of crack detection methods. To this end, a Transformer-based crack detection model, Crack-Net, was developed. Crack-Net adopts an encoder-decoder structure and combines an attention mechanism and a fusion module to improve the ability to extract crack features and integrate information. The overall structure is shown in Figure 1.  
Crack-Net consists of three main stages: the encoder, the decoder, and the feature fusion stage. Initially, the input image passes through a 3 \(\times\) 3 convolutional layer, which transforms the RGB channels into a 64-dimensional feature representation. H, W, and C represent the height, width, and number of channels of the feature map, respectively. After each encoder block, max pooling is applied to reduce the spatial dimensions of the feature map by half, which facilitates the extraction of semantic information. Simultaneously, convolutional operations increase the number of channels (C\(\rightarrow\)2C\(\rightarrow\)4C\(\rightarrow\)8C), allowing the network to extract richer features at lower spatial resolutions. Max unpooling is used to upsample the feature map at corresponding positions in the decoder. During decoding, the spatial resolution of the feature map is gradually restored (from H/32 \(\times\) W/32 to H \(\times\) W), while the number of channels is reduced (8C\(\rightarrow\)4C\(\rightarrow\)2C\(\rightarrow\)C). Finally, a 1 \(\times\) 1 convolution generates a single-channel crack detection map. The prediction results from each scale and the fused features are then resized to match the original dimensions of the input image, producing the final crack detection map. This multi-scale, multi-path feature fusion strategy enables the model to capture subtle crack features at various spatial resolutions, thereby improving detection accuracy and robustness. However, the traditional encoder-decoder architecture confronts two challenges in the context of slope crack detection. First, the fine-grained characteristics of cracks are susceptible to disruption by complex backgrounds, and conventional convolution operations are  
Figure 1: Structure of Crack-Net. ineffective in separating frequency-domain coupled features. Second, channel mismatch and spatial misalignment during cross-layer feature fusion hinder the accurate alignment of shallow details with deep semantics.