## 3 Methodology
### DCW-YOLO Algorithm
#### 3.2.1 DSConv  
In order to overcome the difficulties in identifying small-area and serpentine crack damage in large-scale UAV-captured wind turbine photos, this study introduces an enhanced object detection method that integrates a dynamic convolution structure into the YOLOv8 model's C2f module to improve detection performance [43]. Dynamic convolution, a multi-directional convolutional operation, is designed to enhance the model's capacity to perceive complex geometric structures, thereby more accurately capturing the subtle characteristics and contours of cracks. During the model training phase, dynamic convolution adaptively focuses on elongated and curved regions with tube-like structures, treating these features as significant targets. The model's capacity to resolve the geometric features seen in WTB pictures is much enhanced when dynamic convolution is applied to the C2f module, thus increasing the detection accuracy and  
Figure 1: The structure of YOLOv8 model. robustness for small-area damage and serpentine cracks. The accompanying Figure 2 displays the DSConv schematic diagram. Dynamic snake convolution's fundamental idea involves incorporating adjustable offsets into convolutional kernels, enhancing their spatial adaptability, thereby more accurately capturing the complex geometric features within an image. In traditional convolutional processes, the receptive fields remain static, which can limit the model's capacity to detect intricate characteristics, especially in cases of elongated or tubular shapes. DSConv makes it possible to learn flexible offsets, which enhances the model's capacity to recognize these kinds of characteristics. Additionally, it utilizes an iterative approach (Figure 3) to prevent the receptive fields from straying too far from the intended target, processing one target at a time to ensure sustained attention. Below is the mathematical derivation of DSConv. First, consider a standard 2D convolution given by the coordinate \(K\), with \(K_{i}=(x_{i},y_{i})\) serving as the representation of the center coordinate.The following is an expression for a \(3\times 3\) convolution kernel \(K\) with a dilation factor of 1. \[K=\{(x-1,y-1),(x-1,y),\cdots,(x+1,y+1)\} \tag{1}\]  
Introduce a deformation offset, \(\Delta\), to improve the convolution kernels' flexibility and let them concentrate more precisely on the intricate geometric characteristics of the target. However, permitting the model to freely adjust, there is a risk that the receptive field will deviate greatly from the planned region. To mitigate this, DSConv modifies the convolutional kernel along both the \(x\)-axis and \(y\)-axis directions. As shown in Figure 3, for the \(x\)-axis direction, the coordinates are denoted as follows:  
\[K_{i\pm c}= \begin{cases}(x_{i+c},y_{i+c})=\Big{(}x_{i}+c,y_{i}+\Sigma_{i}^{i+ c}\Delta y\Big{)},\\ (x_{i-c},y_{i-c})=\Big{(}x_{i}-c,y_{i}+\Sigma_{i-c}^{i}\Delta y\Big{)}.\end{cases}  \tag{2}\]  
The coordinates in the \(y\)-axis direction are expressed as follows:  
\[K_{j\pm c}= \begin{cases}\big{(}x_{j+c},y_{j+c})=\Big{(}x_{j}+\Sigma_{j}^{j+c} \Delta x,y_{j}+c\Big{)},\\ \big{(}x_{j-c},y_{j-c})=\Big{(}x_{j}+\Sigma_{j-c}^{j}\Delta x,y_{j}-c\Big{)}. \end{cases}  \tag{3}\]  
Figure 2: The structure of DSConv. where the cumulative deformation is represented by \(\sum\). Considering that \(\Delta\) is typically fractional, we employ bilinear interpolation for processing, as shown below. \[K=\Sigma_{K^{\prime}}B(K^{\prime},K)\cdot K^{\prime} \tag{4}\]  
The fractional position between Equations (2) and (3) is denoted by the letter k in the expression. All integer spatial positions are enumerated by \(K^{\prime}\), and \(B\) represents the bilinear interpolation kernel, capable of being broken down into a pair of one-dimensional interpolation kernels. It is expressed as shown in Equation (5). Herein, \(b\) denotes the interpolation function in one dimension.