## 3 DAMP-YOLO Network
### Aggregated Triplet Attention
Given an input tensor \(X\in\mathbb{R}^{\mathbb{C}\times H\times W}\), the equation can be represented as following:  
\[Y=\frac{1}{3}(\overline{Y_{1}}+\overline{Y_{2}}+Y_{3})=\frac{1}{3}(\overline{ X_{1}\sigma(\psi_{1}(\hat{X_{1}^{*}}))}+\overline{X_{2}\sigma(\psi_{2}(\hat{X_{2}^{*} }))}+X\sigma(\psi_{3}(\hat{X_{3}^{*}}))) \tag{3}\]  
where \(\sigma\) represents the sigmoid activation function; \(\psi_{1}\), \(\psi_{2}\), and \(\psi_{3}\) represent the standard two-dimensional convolutional layers defined by a kernel size of \(k\times k\); \(\hat{X_{1}}\) and \(\hat{X_{2}}\) represent the rotated tensor that interacts with two dimensions; \(\hat{X_{1}}\), \(\hat{X_{2}}\), and \(X\) are passed through Z-Pool and are, subsequently, reduced to \(\hat{X_{1}^{*}}\), \(\hat{X_{2}^{*}}\), and \(\hat{X_{3}^{*}}\) in the three branches of triplet attention. Triplet attention eliminates the information bottleneck and dimensionality-reduction problems common in most attention mechanism structures by capturing the interactive information between two dimensions. Because the network structure does not include a fully connected layer structure but uses three convolutional layers for calculation, the parameter amount of this module is meager. However, since the three branches of this structure are calculated independently, the overall interactive information of the three dimensions is ignored, and using three \(7\times 7\) large convolution kernels to calculate three branches will affect the reasoning speed due to computational overhead. Thus, we proposed aggregated triplet attention. The core concept of this module is to aggregate the features of three concurrent branches, blend them with a convolutional layer to focus on the information from all branches simultaneously, and subsequently split them into the original branches for attention-weight calculations in distinct dimensions. The structure diagram of the proposed module is shown in Figure 8. First, the input features \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Model** & **mAP@50\%** & **mAP@50:95/\%** & **Parameters/M** \\ \hline YOLOv8n & 62.02 & 41.03 & **3.15** \\ +SE & 62.29 & 41.35 & 3.16 \\ +ECA & 62.14 & 41.12 & **3.15** \\ +CA & 61.95 & 40.67 & 3.17 \\ +FCA & 61.89 & 40.61 & 3.16 \\ +CBAM & 61.65 & 40.48 & 3.16 \\ +TripletAttention & **62.92** & **41.87** & **3.15** \\ \hline \hline \end{tabular}
\end{table} 
Table 1: A comparison of different attention mechanisms. The optimal result is shown in bold font. Adding the triplet attention module to the YOLOv8n model provides the best performance. Figure 7: The structure of the triplet attention module. are fed into three branches. Each branch performs global average pooling to compress two dimensions, and this is responsible for capturing crossdimensional information interactions between channel C and spatial height, H, between channel C and spatial width, W, and between spatial height, H, and width, W. After the three branches are concatenated, a convolution layer with a 3 \(\times\) 3 convolution kernel is applied to capture the information interaction between all branches. The output is then split back into three branches, and each branch performs convolution with a 1 \(\times\) 1 convolution kernel to calculate its attention weight. The calculated attention weights are multiplied with the original input features and passed through a Sigmoid activation function to range the values between 0 and 1. Finally, the average of the three branches is taken as the output. The aggregated triplet attention mechanism better captures the interactive information among its three branches and computes the corresponding attention weights through feature aggregation. Additionally, employing small convolution kernels instead of the original 7 \(\times\) 7 large kernel enhances the network's inference speed.