## 2 Materials and Methods
### Lightweight and High-Precision Target Detection Network
#### 2.2.2 ECA Attention Mechanism  
ECA is an effective channel attention module, which only adds a few parameters, but this can lead to a clear performance gain. The attention mechanism allows the network to selectively enhance the features with a large amount of information, so that these features can be fully utilized in subsequent processing, and then useless features are suppressed. Taking traditional convolution as an example, the convolution kernel is V = [\(v_{1}\),\(v_{2}\),\(v_{3}\),\(\cdots\),\(v_{c}\)], where \(v_{c}\) represents the \(c\)-th convolution kernel. For input \(X\), the output is \(U=[u_{1},u_{2},u_{3},\cdots,u_{c}]\). \[u_{c}=v_{c}*X=\sum_{s=1}^{c}v_{c}^{s}*x^{s} \tag{6}\]  
where \(*\) in (6) represents a convolution operation, \(v_{c}^{s}\) represents a convolution kernel, its input is a spatial feature on a channel, and it learns a spatial relationship. However, due to a summation operation performed to obtain the convolution results of each channel, the channel feature relationship is mixed with the spatial relationship learned by the convolution kernel. The purpose of the attention mechanism operation is to extract this mixed operation, so that the model directly learns the characteristic relationship of each channel. The ECA net mainly improves the SE (Squeeze and Excitation) module [22], and proposes a local cross-channel interaction strategy (ECA module) without dimensionality reduction and a method of adaptively selecting the size of the one-dimensional convolution kernel, so as to improve the performance. The structure of SE Module is shown in the Figure 3.  
As shown in Figure 4, after performing channel-level global average pooling without reducing the dimension, the local cross-channel interaction information is captured by considering each channel and its k-nearest neighbors. Cross-channel interaction information is captured via rapid one-dimensional convolution with size K.  
Figure 4: ECA Module. Figure 3: SE Module. The ECA module is developed on the SE module. Two fully connected layers are used in the SE module to obtain the correlation between each channel. The two fully connected layers perform dimensionality reduction operations on the global feature compression obtained through global average pooling, which affects the acquisition of the correlation between each channel. The ECA module has improved this. The ECA increases information sharing and interconnection between convolution channels, avoids dimensionality loss and information loss during information sharing, and significantly reduces model complexity while maintaining performance. \[\left[ \begin{array}{cccccccc}w^{1,1}&\cdots&w^{1,k}&0&0&\cdots&\cdots&0\\ 0&w^{2,2}&\cdots&w^{2,k+1}&0&\cdots&\cdots&0\\ \vdots&\vdots&\vdots&\vdots&\vdots&\ddots&\vdots&\vdots&\vdots\\ 0&\cdots&0&0&\cdots&w^{C,C+1}&\cdots&w^{C,C}\end{array} \right] \tag{7}\]  
As shown in (7), the ECA module uses the matrix \(W_{k}\) to learn channel attention. \(W_{k}\) has a total of \(k*C\) parameters, which avoids complete independence between different groups. The weight of the i-th channel is calculated via the correlation between the \(i\)-channel and its \(k\) adjacent channels. The calculation formula is shown as (8). \[\omega_{i}=\sigma(\sum_{j=1}^{k}w_{i}^{j}y_{i}^{j}),y_{i}^{j}\in\omega_{i}^{k} \tag{8}\]  
where \(\omega_{i}\) represents the learned channel attention, \(y_{i}\) represents the output of the \(i\)-th channel after global average pooling, and \(\omega_{i}\) represents the set of k adjacent channels of \(y_{i}\). All channels can share weight information to reduce the amount of parameters and further improve performance. One-dimensional convolution with a convolution kernel size of \(k\) is used to achieve information interaction between channels. \[\omega=\sigma(C1D_{k}(y)) \tag{9}\]  
In (9), C1D represents one-dimensional convolution, which only involves \(k\) parameter information, and it generally has a value of \(k\) = 3.