# Integrating Prior Knowledge into Attention for Ship Detection in SAR Images
## 6 Discussion  
Overall, our paper establishes a simple way of integrating prior knowledge into the CNN-based detectors by attention mechanisms. Through analyzing the ships in SAR images, we discovered that clustering extracts the prior knowledge easily. From the extensive experiments, we demonstrate that BDAM could be successfully applied to various CNN-based detectors easily. For example, on the SSDD data, RetinaNet's \(AP_{L}\) improves by 7.7% after adding BDAM while it improves by 9.2% on the HRSID dataset, which is a significant improvement. Furthermore, the ablation study implies that the most important component in the BDAM is BDSM.  
However, the limitation of the BDAM is obvious. As a proof-of-concept, our prior knowledge is constructed by the fact that backgrounds in most images are shores or water surfaces for ship detection. The task is hard to escalate into general object detection in SAR images.  
Conceptualization, Y.P. and L.Y.; Methodology, Y.P. and L.Y.; Software, Y.P.; Validation, Y.P.; Formal analysis, Y.P.; Investigation, Y.P.; Resources, Y.P. and J.L.; Data curation, Y.P.; Writing--original draft, Y.P.; Writing--review & editing, L.Y. and Y.X.; Visualization, Y.P. and L.Y.; Supervision, L.Y. and Y.X.; Project administration, L.Y.; Funding acquisition, Y.X. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the Zhejiang Provincial Natural Science Foundation of China, grant number LY20F020029.  
Not applicable.  
The authors declare no conflict of interest.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Algorithm** & **AP** & \(AP_{\text{50}}\) & \(AP_{\text{75}}\) & \(AP_{\text{S}}\) & \(AP_{\text{M}}\) & \(AP_{L}\) \\ \hline Faster R-CNN & 0.626 & 0.866 & 0.716 & 0.502 & **0.768** & 0.599 \\ + BDAM & 0.625 & **0.876** & **0.719** & 0.505 & 0.764 & 0.628 \\ + BDSM & **0.626** & 0.868 & 0.716 & **0.506** & 0.762 & **0.678** \\ + CAM & 0.622 & 0.856 & 0.713 & 0.500 & 0.763 & 0.622 \\ + CBAM & 0.625 & 0.875 & 0.712 & 0.505 & 0.761 & 0.612 \\ \hline RetinaNet & 0.561 & 0.787 & 0.627 & 0.380 & 0.765 & 0.507 \\ + BDAM & 0.565 & 0.795 & 0.630 & **0.387** & 0.766 & **0.563** \\ + BDSM & **0.567** & **0.796** & **0.633** & 0.385 & **0.767** & 0.558 \\ + CAM & 0.551 & 0.777 & 0.624 & 0.370 & 0.752 & 0.525 \\ + CBAM & 0.561 & 0.785 & 0.627 & 0.380 & 0.765 & 0.494 \\ \hline SSD & 0.449 & 0.686 & 0.510 & 0.255 & 0.674 & 0.537 \\ + BDAM & **0.457** & **0.694** & **0.518** & 0.257 & **0.684** & **0.539** \\ + BDSM & 0.457 & 0.693 & 0.518 & **0.261** & 0.682 & 0.536 \\ + CAM & 0.454 & 0.692 & 0.509 & 0.255 & 0.683 & 0.526 \\ + CBAM & 0.454 & 0.690 & 0.513 & 0.259 & 0.683 & 0.528 \\ \hline YOLOv4 & 0.550 & 0.914 & 0.603 & 0.395 & 0.686 & 0.607 \\ + BDAM & 0.552 & **0.920** & 0.618 & 0.389 & **0.702** & **0.650** \\ + BDSM & **0.556** & 0.920 & **0.622** & **0.399** & 0.695 & 0.641 \\ + CAM & 0.549 & 0.908 & 0.599 & 0.389 & 0.687 & 0.565 \\ + CBAM & 0.550 & 0.912 & 0.610 & 0.377 & 0.690 & 0.621 \\ \hline \hline \end{tabular}
\end{table}
Table 11: Comparison of BDSM with different attention mechanisms. Bolded data represent the best and underlined data represent the second best.