# Small-Target Detection Based on an Attention Mechanism for Apron-Monitoring Systems
## 3 Materials and Methods
### Attention Module: CBAM  
Spatially, small targets on airport aprons are randomly located, and the attention module can guide the neural network to highlight important features during detection to improve the locating accuracy. Therefore, the algorithm used in this study refers to the convolutional block attention module (CBAM) [34; 35]. The differences in the attention module (Figure 2) between the original method and the proposed method are as follows: the attention module of the original method is embedded into the feature extraction network, which is a connection module of residual blocks; however, this study uses an independent attention module to connect the attention module with the output of the feature extraction network, the proposed method does not change the structure of the original feature extraction network, which can be initialised with pre-trained weights. Each attention module  
one feature channel differs from that extracted from the other, and more features can be extracted using a conventional neural network. Although it is necessary to increase the number of feature channels in the feature extraction process, not all features are necessary, and some features only play an auxiliary role. The purpose of the channel attention module is to allow the network to give greater weight to the important feature channels, amplify feature information that contributes significantly to subsequent tasks, and suppress the irrelevant feature channels. The feature map processed via channel attention pays more attention to the amplified feature information. Different feature channels contain different convolutional information. The channel attention module allows the network to place more weight on the important small-target feature channels, thereby suppressing insignificant feature channels, as shown in Figure 3. Global maximum pooling and global average pooling are performed on the input feature map to aggregate the spatial information on the feature map, as can be seen from this figure. Subsequently, two different average pooling vectors and maximum pooling vectors are generated from the previous step. Both vectors are separately sent to the shared multilayer perceptron (MLP). To reduce the parameter overhead, the number of neurones in the first layer is C/r (r is the reduction rate of the attention channel) using rectified linear unit (ReLU) activation, and the second layer uses C neurones. Therefore, the length of the feature vector is first decreased and then increased, to reduce certain parameter overheads and improve the speed of attention generation. After MLP processing, the output feature vectors are added to form a feature vector via element-wise addition [36; 37; 38]. The output features are then added together and activated by the sigmoid to generate the final channel attention features. The channel attention can be calculated as follows:  
\[ \begin{array}{ll}M_{c}(F)&=\sigma(MLP(AvgPool(F))+MLP(MaxPool(F)))\\ &=\sigma(W_{1}(W_{0}(F_{avg}^{c}))+W_{1}(W_{0}(F_{max}^{c})))\end{array}  \tag{1}\]  
where \(F\) represents the input feature map, \(F_{avg}^{c}\) represents average pooled feature vectors, \(F_{max}^{c}\) represents the maximum pooling vectors, and \(W_{0}\) and \(W_{1}\) represent the weight parameter of the shared MLP, \(\sigma\) which represents the sigmoid activation function. _2. Spatial attention module:_ In addition to knowing which features of the channel are important, the feature extraction network can distinguish the attention of local spatial features. The spatial attention module guides the network to highlight areas containing useful information based on spatial relationships, and small targets may exist in specific areas. In most cases, owing to the random location of small targets on the apron, highlighting important local feature information is conducive to positioning these targets. The input of the spatial attention module is the feature from the output of the channel attention module.