# Adaptive Feature Fusion for Small Object Detection
## 2 Materials and Methods
### Methods
#### 2.2.4 Feature Enhancement Extraction and Object Detection Head  
The small object of the natural image is highly similar to the background information, especially at night or in the case of weak lighting conditions. In order to distinguish between the two lots of information, we used multi-scale multi-path multi-flow feature fusion module processing; although it can bring rich information at each scale, it can also inevitably bring feature overlap and background information that is highly similar to the object. In order to obtain more information that is beneficial to small objects, we performed feature enhancement extraction after feature fusion, and further filtered the fused information. The feature enhancement extraction module (FEE) is a double residual structure, as shown in Figure 4, which consists of two paths. One of the paths uses the convolution kernel of 3 \(\times\) 3 conventional convolution as the filter to extract features. Meanwhile, in order to extract the effective information of a large number of small objects, we chose to place the M-CBAM into the 1 \(\times\) 1 filter and the 3 \(\times\) 3 filter between filters. The purpose was to make the network focus on the channel and space dimensions before filtering the feature information, thus focusing the effective information of each fused feature on the channel and space while discarding unnecessary features. The structure of the feature enhancement extraction module with the addition of the M-CSAM attention mechanism is shown in Figure 4.  
Figure 3: M-CBAM attention mechanism structure. \begin{table}
\begin{tabular}{c c} \hline \hline
**Attention Mechanism** & **mAP/\%** \\ \hline - & 33.10 \\ CBAM & 33.27 \\ M-CBAM & 33.53 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of the experimental results of the attention mechanism. Figure 4 shows the simple structure of the feature extraction module, M-C represents M-CBAM, and its specific calculation process can be expressed as:  
\[P_{n}=Add\left(f_{conv}^{1\times 1}(x),f_{conv}^{3\times 3}\bigg{(}C\Big{(}f_{ conv}^{1\times 1}\big{(}f_{conv}^{1\times 1}(f^{in})\big{)}\Big{)}\bigg{)}\right) \tag{10}\]  
\[P_{b}=f_{conv}^{1\times 1}(x) \tag{11}\]  
\[f^{out}=Add(P_{n},P_{b}) \tag{12}\]  
Among them, \(f^{in}\) represents the input feature; \(P_{n}\) represents the feature output in the main path in the residual structure; \(P_{b}\) represents the secondary residual edge feature output; and \(f^{out}\) is the final output feature. Unlike the large- and medium-sized objects in the image, the small objects are small in size, and some small objects even have only a few pixels to a dozen pixels, so their detection mainly relies on shallow features. Since the features of the shallow network have not been subjected to a large number of downsampling and the information about the small object in the features has not been lost, it is necessary to use the output of the shallow features as the detection head while simultaneously considering that the small-size detection head is not helpful for small object detection, and its existence will increase the network calculation amount. After balancing the two, we decided to abandon the small-size detection head extended by the deep network. Because the small object pixels were between 0 and 32 \(\times\) 32, and the scale changed greatly, detection heads of different scales were required to complete the detection task. Therefore, the detection head extended from the shallower and deeper features in the original network was retained. Finally, the size of the detection head was determined as 160 \(\times\) 160, 80 \(\times\) 80, and 40 \(\times\) 40, and its structure is shown in Figure 5.  
Figure 4: Simplified structure diagram of FEE. Figure 5: Improved schematic diagram of the object detection head structure.