## 3 Materials and Methods
### Deep Learning-Based Visual Detection and Tracking of Target Ship  
#### 3.1.1 Target Ship Detection  
YOLO (You Only Look Once) is a single-stage deep learning object detection algorithm. It has revolutionized real-time object detection by combining region proposals and classification into a unified neural network, significantly reducing computation time. Its unique design has made it highly popular in the deep learning community, offering superior accuracy and faster detection speeds compared to other object detection algorithms. The strength of YOLO is that it is not only limited to the original task, that is, the detection of 80 categories defined by the MS-COCO dataset, but also widely used in various detection fields, becoming the backbone model or benchmark for many tasks. YOLO11, the latest iteration of this series [45], represents the state-of-the-art in object detection technology, providing a solid and cutting-edge technical foundation for our research. In this study, the accuracy of ship target identification plays a crucial role in the final data fusion results. However, limited computational resources on the shipborne edge devices constrain this process. Furthermore, existing ship target detection models primarily focus on medium- to large-sized targets, and their performance for small targets is suboptimal. This makes them unsuitable for scenarios in open waters or nighttime navigation, where small, inconspicuous targets may be present. To enhance the detection of small targets while reducing the model's parameter count, a Bi-YOLO network has been proposed. This network incorporates the C2f_BiFormer module, which combines convolutional operations with the BiFormer block [46] into the backbone layer of YOLOv11, achieving more efficient and accurate ship identification. The structure of the Bi-YOLO network is shown in Figure 3.  
Figure 2: A perception data fusion framework based on ship ST-TF for ship AR navigation assistance. In YOLO11 network, the backbone utilizes Conv and C3k2 modules for downsampling, this can lead to the loss of contextual features to some extent, thereby reducing the resolution of the feature maps and losing important contextual information. The introduction of the C2f_BiFormer module helps mitigate the loss of small target information during downsampling, enabling the model to focus more on task-relevant information when processing inputs. This module employs a dual-level routing attention strategy to enhance feature representation through two key mechanisms: routing between regions via a directed graph, which helps the model focus on specific areas of the image; and token-to-token attention, which further refines the model's attention to these regions. BiFormer block: The overall architecture of the BiFormer block is shown in Figure 4a. The BiFormer block is a transformer-based vision network architecture composed of several submodules, including deep convolution, layer normalization, Bi-Level Routing Attention (BRA), and MLP. The plus sign indicates the merging of two feature vectors. The submodules are executed sequentially to optimize the input features within each BiFormer block. The process begins with a 3 \(\times\) 3 depthwise convolution, which slightly encodes positional information. Then, the BRA module is combined with a two-layer MLP with an expansion rate of e, further optimizing the features by capturing and modeling relationships across positions. Figure 3: The structure of the Bi-YOLO network. BRA module: The operating principle of the BRA module is shown in Figure 4b. BRA is an advanced attention mechanism that employs a bi-level routing strategy to achieve dynamic, query-aware sparsity. The main steps of BRA include the following:  
1. Region partition and input projection: Given a 2D input feature map \(X\in\mathbb{R}^{H\times W\times C}\), where \(H\) is the height, \(W\) is the width, and \(C\) is the number of channels. We divide it into \(S\times S\) nonoverlapping regions, such that each region contains \(\frac{HW}{S^{2}}\) feature vectors.