## 3 DCNA-YOLO Method Construction
### Deformable Convolution Based on MBCA  
The features of the image become more complex and irregular due to weak texture or lighting changes on the target surface with the detection of weak texture areas and uneven reflection areas, making the fixed receptive field kernel insufficient to adapt complex features. To address this issue, deformable convolution (DCNv2) [30] is applied to learn the offset and modulation parameters for each pixel to better adjust to the sampling position of the convolution kernel and to adapt to different image structures and texture features.  
For each position \(p_{0}\) in the output feature map \(y\), the deformable convolution structure is defined as follows:  
\[y(P_{0})=\sum\
olimits_{p_{n}\in R}w(p_{0})\cdot x(p_{0}+p_{n}+\Delta p_{n}) \cdot\Delta m_{n} \tag{6}\]  
where the grid R defines the size and expansion rate of the receptive field. For a receptive field of size 3 \(\times\) 3 and a dilation rate of 1, \(R=\{(-1,-1),(1,0)\cdots(0,1),(1,1)\}\). \(p_{0}\) corresponds to mapping each point of the output feature map \(y\) to the center of the convolution kernel, and then mapping it to the coordinates in the input feature map \(x\); \(p_{n}\) represents the relative coordinates in \(R\) for \(p_{0}\). \(\omega(\cdot)\) denotes the sampling point weight, and \(x\) (\(\cdot\)) denotes the mapping of the coordinates in the input feature map \(x\) to feature vectors. The offset \(\{\Delta p_{n}|n=1,2\cdots N\},\ N=|R|\), and the modulation parameter \(\Delta m_{n}\) lies within [0, 1].  
The offsets \(\Delta p_{n}\) and modulation parameters \(\Delta m_{n}\) of a deformable convolution are obtained by applying a separate standard convolution layer to the same input feature map, which results in insufficient spatial support range. As a consequence, the effective receptive field of foreground nodes and the prominent region constrained by errors may include background areas irrelevant to detection. The proposed multi-branch coordinate attention (MBCA) is embedded during the process of generating the offsets \(\Delta p_{n}\) and modulation parameters \(\Delta m_{n}\), which is named MBCADC, to further enhance the ability of deformable convolution DCNv2 to manipulate spatial support regions, as illustrated in Figure 5.  
Figure 4: Schematic diagram of YAP, GAP, and UNAP.  
The MBCADC module consists of a Conv2d, MBCA attention, a DCN, BatchNorm2d, and a SiLU activation function, where o1 and o2 represent learned offsets in the \(x\)- and \(y\)-coordinate directions, respectively, and mask denotes the sampling weights at different positions. The structure of the deformable convolution MBCADC is defined as follows:  
\[y(P_{0})=\sum\
olimits_{p_{n}\in R}w(p_{0})\cdot x(p_{0}+p_{n}+\Delta p_{n} \cdot g)\cdot\Delta m_{n}\cdot g \tag{7}\]  
where \(g\) represents the attention weights generated by multi-branch coordinate attention (MBCA).  
Figure 6 illustrates the process of MBCADC deformable convolution. From Figure 6, it can be observed that the sampling matrix of deformable convolution is non-fixed and deformable, with the offsets determined by algorithms that can better learn the geometric properties of the objects to be detected.