A system and method for underwater target detection and tracking
By improving the YOLOv11 target detection module and the Transformer-based target tracking module, the problems of missed detection of small targets and insufficient feature extraction in complex underwater environments have been solved, achieving efficient and robust underwater target detection and tracking.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2026-01-29
- Publication Date
- 2026-06-30
AI Technical Summary
Existing underwater target detection and tracking technologies suffer from problems such as high false negative rates for small targets, insufficient feature extraction, and inadequate deep interaction of spatiotemporal features in complex underwater environments, resulting in poor detection and tracking performance.
An improved YOLOv11 target detection module and a Transformer-based target tracking module are adopted. Through underwater image enhancement, improved backbone network and attention mechanism, neck network structure, spatiotemporal feature fusion and self-supervised pre-training, the accuracy of feature extraction and tracking is improved.
While ensuring real-time performance, it significantly improves the accuracy and robustness of underwater target detection, achieves effective identification of small and fuzzy targets, and enhances the deep interaction of spatiotemporal features, thereby improving the accuracy and robustness of target tracking.
Smart Images

Figure CN121600389B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and marine exploration technology, specifically to a system and method for underwater target detection and tracking. Background Technology
[0002] Underwater target detection and tracking technology is a key technology for marine resource exploration and environmental monitoring. However, the underwater visual environment is complex, and poor image quality leads to color distortion, blurring, and low contrast. Furthermore, underwater targets are often small and densely packed, with indistinct features. Existing target detection technologies struggle to meet these challenges. While the general-purpose YOLO series algorithms offer real-time advantages, their feature extraction networks are insufficient for capturing subtle features in low-quality images when directly applied to underwater scenarios. The feature fusion networks also have limited ability to preserve and enhance the details of small targets, resulting in a high rate of missed detections of small targets in complex underwater environments. For example, CN117975250A proposes an underwater target recognition method based on a 3D attention-enhanced YOLO model. By introducing the SimamConv and REPBottleneck modules, it improves the foreground / background separation capability and the accuracy of overlapping target recognition in blurred underwater images to some extent, but it still does not fundamentally solve the problems of missed detections of small targets and insufficient feature extraction. For underwater video target tracking tasks, existing video representation learning methods typically employ a cascaded structure based on spatiotemporal attention for feature aggregation. The drawback of this strategy is that it is difficult to apply to more fine-grained downstream tasks (such as precise tracking) and ignores the deep interaction information between spatiotemporal features. Furthermore, since videos can be viewed as temporal extensions of static appearances, there are inherent correspondences between adjacent frames. This can lead to information leakage in self-supervised pre-training based on masks and reconstruction, causing the model to learn only low-level temporal correspondences and fail to extract high-level spatiotemporal inference information, further limiting the performance improvement of Video Transformer (ViT) in underwater target tracking. For example, CN120782817A discloses an underwater single-target tracking method based on wavelet tokens and spatiotemporal Transformer. It separates the target structure and motion details through wavelet decomposition and combines a gating mechanism to achieve temporal modeling, improving tracking robustness in low-light and occluded scenes. However, this method still focuses on single-target tracking and is not deeply integrated with the detection module, making it difficult to handle underwater scenes with multiple and dense targets.
[0003] Given the aforementioned challenges, there is an urgent need for a comprehensive underwater target detection and tracking system and method that can effectively address underwater image quality issues, small target under-detection problems, and enhance the deep interaction of spatiotemporal features while ensuring real-time detection and tracking. Summary of the Invention
[0004] The purpose of this invention is to provide a system and method for underwater target detection and tracking, which can significantly improve the accuracy and robustness of underwater vision tasks, including target detection and tracking, while ensuring real-time performance.
[0005] This invention provides the following technical solution:
[0006] A system for underwater target detection and tracking, the system comprising:
[0007] The underwater image enhancement module is used to preprocess the original underwater video images and output the enhanced images.
[0008] Improved YOLOv11 target detection module (U-YOLO), including improved YOLOv11 (You Only Look Once version 11): replacing the C3K2 module in the backbone network of YOLOv11s with a C3 building block that integrates attention and advanced convolution, replacing the C2PSA attention module in the backbone network with a triple attention module, adding at least one attention module between the output of the backbone network and the detection head, replacing the neck network in YOLOv11s with GOLD-YOLO or ASF-YOLO, and using the improved YOLOv11 to receive enhanced images to locate underwater targets in real time and output target bounding boxes;
[0009] The Transformer-based target tracking module is used to receive video clips with bounding boxes and extract spatiotemporal features, and to perform target association and trajectory prediction based on the target bounding boxes and spatiotemporal features.
[0010] The underwater image enhancement module includes: preprocessing the image and then using an underwater image enhancement method based on adaptive weighted fusion to enhance and restore the image, and outputting the enhanced image.
[0011] The image is preprocessed, including size normalization and color correction, and the enhanced image is used to provide clear input for subsequent detection.
[0012] In the improved YOLOv11 object detection module, the attention is either parameter-free (SimAM) attention or local self (LSKA) attention, and the advanced convolution operation is selected from receptive field attention convolution (RFAConv) or variable kernel convolution (AKConv).
[0013] The improved YOLOv11 structure includes:
[0014] The backbone network consists of multiple convolutional layers and feature modules that are alternately connected, as well as a triple attention module in the deep layers of the network, where the feature module is a C3 building block that integrates attention and advanced convolution.
[0015] The neck network, which is the neck structure of GOLD-YOLO or ASF-YOLO, receives and fuses feature maps from multiple scales from the backbone network;
[0016] The detection head receives the fused features output by the neck network and outputs the target classification result and bounding box coordinates in parallel.
[0017] In the improved YOLOv11 provided by this invention: by replacing the C3K2 module in the backbone network with the C3 building block that integrates attention and advanced convolution, the model's ability to perceive features of underwater blurred targets and small targets is improved, and richer and more discriminative target semantic information is extracted.
[0018] In the improved YOLOv11 provided in this invention: a triple attention module is introduced and replaced at appropriate positions in the backbone network and before the detector head of the U-YOLO network, as well as the C2PSA attention module of the original model. By learning the weights of the channel and spatial domain, the model focuses on key underwater target regions, filters effective information, and suppresses background interference, thereby improving the recognition accuracy of small targets. This enhanced structure utilizes an efficient fusion mechanism (the GD mechanism in GOLD-YOLO) to effectively integrate multi-scale features to enhance the feature representation of densely packed small underwater targets without significantly increasing latency.
[0019] In the improved YOLOv11 provided by this invention: by replacing the neck network with the neck network of GOLD-YOLO or ASF-YOLO, the interaction between deep semantic information and shallow detail information is enhanced by utilizing their global fusion or adaptive spatial fusion mechanism, thereby improving the model's ability to represent features of multi-scale targets.
[0020] In the improved YOLOv11 object detection module, the improved YOLOv11 is pre-trained using an open-source underwater image augmentation dataset: the U-YOLO model is trained using the augmented underwater images and corresponding label datasets and the SGD optimizer, minimizing the bounding box regression loss and classification loss, and obtaining the optimal U-YOLO model weights.
[0021] The Transformer-based target tracking module includes: an embedding module, a dual-branch encoder, a common attention module, a decoder, and a tracking head module.
[0022] The embedding module divides the input video clip into spatial blocks and temporal segments, generating spatial sequences and temporal sequences.
[0023] The dual-branch encoder consists of two parallel Transformer encoders, which extract features from spatial and temporal sequences respectively.
[0024] A shared attention module, embedded between the two encoders, enables bidirectional attention interaction between spatial and temporal features;
[0025] The decoder reconstructs the masked spatiotemporal region based on the interactive features;
[0026] The tracking head module predicts the target's position and scale in subsequent frames based on reconstructed features, enabling cross-frame target association and trajectory tracking.
[0027] In the embedding module, the frame sequence of the input underwater video clip is embedded using both patch embedding and fragment embedding methods simultaneously, resulting in two tensors of different sizes as spatial and temporal sequences, which are used to represent spatial detail P and temporal consistency G, respectively.
[0028] The Transformer-based target tracking module uses a masked autoencoder for self-supervised pre-training. Its pre-training task is to apply a random cube mask to the input video segment and then reconstruct the masked spatiotemporal cube pixels based on the unmasked context information.
[0029] In the Transformer-based target tracking module provided by this invention, spatiotemporal feature learning is achieved through an embedding module and an encoder, while deep fusion and interaction of spatial and temporal features are realized through a common attention mechanism module. Specifically, the embedding module employs both patch embedding and fragment embedding methods to convert the input video frame sequence into token sequences with spatial and temporal dimensions. The dual-branch encoder, composed of two identical Transformer encoders operating in parallel, is used to extract detail features from the spatial token sequence and motion consistency features from the temporal token sequence, respectively. The common attention mechanism module, embedded between the layers of the dual-branch encoder, guides the deep fusion of spatial and temporal features by calculating a cross-spatiotemporal bidirectional attention map.
[0030] In the Transformer-based target tracking module provided in this invention, a custom masking strategy (e.g., the Masked Random Cube strategy) is applied to the embedded features to randomly mask a subset of tokens in a spatiotemporal 3D cube. This strategy can increase the challenge of video reconstruction tasks and encourage Transformer-based target tracking modules to extract more effective video representations while avoiding information leakage.
[0031] In the Transformer-based target tracking module provided in this invention, a lightweight decoder is used to reconstruct the original video from the latent representation and mask token after interaction with the Co-Attention module. The mean squared error (MSE) loss function is employed. To constrain the reconstruction of pixels With the original input pixels The difference between the feature representations is calculated using the loss function formula: The decoder is a lightweight Transformer structure that uses the fused global context information to predict the original pixel values of the randomly masked spatiotemporal cube region.
[0032] In the Transformer-based target tracking module provided by this invention, the tracking head module combines Kalman filtering or other target association algorithms to achieve robust inter-frame target association and accurate tracking based on extracted spatiotemporal features and predicted target trajectories, outputting the complete tracking trajectory of the target. Specifically, using the target region of the previous frame as a template, similarity matching or direct regression is performed on the feature map of the search region in the current frame to achieve continuous target localization and trajectory association.
[0033] The present invention also provides a method for underwater target tracking using the above-described system, the method comprising the following steps:
[0034] Step S1: Underwater image enhancement. The original image is subjected to homomorphic filtering and UCM color correction, as well as CLAHE contrast enhancement. The results are then weighted and fused before sharpening and outputting the enhanced image.
[0035] Step S2: Underwater target detection. The enhanced image is input into the improved YOLOv11 target detection module, which outputs the target bounding box and classification confidence in real time.
[0036] Step S3: Extract video segments of the target region and input them into the Transformer module based on spatiotemporal co-attention to extract the high-dimensional spatiotemporal features of the target.
[0037] Step S4: Combining the target bounding box, classification confidence, and high-dimensional spatiotemporal feature vector extracted from the Transformer module based on spatiotemporal co-attention, underwater inter-frame target association and trajectory prediction are realized based on the integrated strategy of motion prediction and feature matching.
[0038] The integrated strategy includes: using Kalman filtering for motion prediction and initial screening, and using the spatiotemporal feature vectors to calculate appearance similarity to complete the final identity association, thereby realizing underwater inter-frame target association and trajectory prediction.
[0039] Kalman filtering, based on extracted spatiotemporal features and target prediction trajectories, achieves robust inter-frame target association and accurate tracking, outputting the complete tracking trajectory of the target.
[0040] Compared with existing technologies, this invention has the following technical advantages: While ensuring real-time performance, it significantly improves image quality through an underwater image enhancement module; it enhances the detection capability for small and blurred targets by improving the YOLOv11 target detection module; and it improves the accuracy and robustness of target tracking by achieving deep fusion of spatiotemporal features and long-range dependency modeling through a Transformer-based tracking module. The entire system operates efficiently, meeting the real-time target perception requirements of underwater platforms, and forming a complete, efficient, and robust underwater target perception solution. Attached Figure Description
[0041] Figure 1 The flowchart of the underwater image enhancement module method provided by the present invention;
[0042] Figure 2 The network architecture diagram of the improved YOLOv11 model (U-YOLO) provided by this invention;
[0043] Figure 3 This is an improved C3k2 module diagram in the U-YOLO network architecture diagram of the present invention;
[0044] Figure 4 This is an improved C2PSA module diagram in the U-YOLO network architecture diagram of the present invention;
[0045] Figure 5 This is a diagram of the aggregation and allocation GD mechanism module in the U-YOLO network architecture diagram of the present invention;
[0046] Figure 6 This is a framework diagram of the underwater target tracking algorithm based on VideoTransformer of this invention;
[0047] Figure 7 This is a flowchart of the underwater target detection and tracking method of the present invention. Detailed Implementation
[0048] The underwater target detection and tracking system and method based on the improved YOLOv11 and Transformer proposed in this invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] 1. Underwater Image Preprocessing and Enhancement
[0050] An image fusion-based enhancement method is proposed in the system, and the process is as follows: Figure 1 As shown. The specific implementation method is as follows: First, acquire the original underwater image.I On one hand, homomorphic filtering is applied to the original image I to improve uneven lighting and enhance details and features in the dark areas of the image. On the other hand, unsupervised color correction (UCM) algorithm is applied to the homomorphically filtered image to remove the blue-green bias in the underwater image, thereby correcting the color and increasing the image saturation, resulting in the color-corrected image. I c On the other hand, regarding the original image I The contrast-limited histogram equalization (CLAHE) algorithm is applied to the image. By setting a contrast threshold, it ensures a uniform distribution of gray levels, equalizes image brightness, and enhances contrast, resulting in a contrast-enhanced image. I e Next, a pixel-weighted fusion method is used to... I c and I e The fusion process can employ an adaptive module to calculate the fusion weights based on the evaluation difference between the color-corrected and contrast-enhanced images. This is determined based on extensive experimental results. I c With contrast-enhanced images I e When the blending weights are set to 0.4 and 0.6 respectively, the optimal balance between color and contrast can be achieved. The calculation formula is as follows: ,in Finally, the fused image... The Unsharp Mask (USM) sharpening enhancement algorithm is used for sharpening to increase edge detail information and thus improve the final image. I’ Clarity.
[0051] 2. Improved YOLOv11 target detection module U-YOLO
[0052] This system proposes an improved U-YOLO underwater target detection model based on the YOLOv11s model, which enhances the model's robustness against small underwater targets and complex backgrounds. The improved YOLOv11s model structure is as follows: Figure 2 As shown.
[0053] First, the backbone network and enhanced attention mechanism for feature extraction are optimized. Addressing the issue of insufficient feature extraction in small object detection using the YOLO model, the core C3K2 module in the backbone network is optimized. The standard convolutional part of the C3K2 module is replaced with a structure based on receptive field attention convolution (RFA Conv) or variable kernel convolution (AKConv) as an improved C3K2 module (C3 building block). Figure 3 As shown, this improved C3K2 module enhances the richness of target features and semantic information extracted by the network; furthermore, it strengthens the attention mechanism, such as... Figure 4As shown, the improved C2PSA module replaces its attention layer with a triple attention module. At the same time, an attention mechanism module is also introduced between the backbone network and the detection head to learn the weights of the channel and spatial domain, enabling the model to learn deeper semantic information, focus on the target region, filter effective information, and improve attention to small targets.
[0054] Then, some structures of the neck network are strengthened, such as... Figure 5 As shown, the original YOLOv11 Feature Pyramid Network (FPN) + Path Aggregation Network (PAN) structure is replaced with the GOLD-YOLO neck structure. The aggregation and allocation GD mechanism enables the model to more effectively integrate multi-scale features, reduce information loss, and enhance the feature representation of target objects of different sizes, thereby improving the model's detection accuracy and localization accuracy of target objects in complex scenes.
[0055] Finally, the U-YOLO model was trained using the RUOD underwater target detection dataset. A stochastic gradient descent (SGD) optimizer was employed, with a batch size of 24, an initial learning rate of 0.01, and a cosine annealing learning rate decay strategy. The training epochs were 100. The model was trained on 640×640 images as input. After training, the improved U-YOLO model with optimal weights was used to detect targets on the test set, achieving higher detection accuracy (mAP) compared to the original model and a lower false detection rate for small targets in the underwater environment. Furthermore, in ablation experiments on various improved modules—introducing an attention mechanism, optimizing convolutional layers, improving the C3k2 module, and improving the Neck network structure—the corresponding mAP accuracy improvements compared to the original algorithm were 2.52%, 1.03%, 1.96%, and 2.43%, respectively. Ultimately, the overall U-YOLO model detection accuracy improved by 4.18%.
[0056] 3. Transformer-based target tracking module
[0057] This module employs a fuzzy prediction framework based on spatiotemporal co-attention, such as... Figure 6As shown, by learning high-quality spatiotemporal video representations through self-supervised pre-training, the model can learn robust, high-quality spatiotemporal video representations from a large amount of unlabeled underwater video data, thereby significantly improving the accuracy and robustness of tracking. To pre-train the model on large datasets, a self-supervised approach is used to narrow the gap between the feature representations of the original input and the reconstructed pixels, which are designed to handle various contextual and dynamic information in the video. Based on mask autoencoding, the model is pre-trained using a "mask-prediction" scheme. Under this scheme, the model retains a simple masked random cube path and reconstructs the missing parts. To learn rich spatiotemporal information from the video data, the model introduces a parallel structure that simultaneously learns feature representations in both spatial and temporal dimensions.
[0058] First, the model adopts an asymmetric encoder-decoder structure and introduces a parallel structure to learn spatial and temporal features simultaneously: on the one hand, it embeds spatial sequences P, using 16×16 non-overlapping regular spatial blocks (patch) of each frame of the input video segment to extract spatial detail information; on the other hand, it embeds temporal sequences G, using time clips to embed multiple frames along the time axis to extract temporal consistency information.
[0059] Then, a self-supervised random cube masking strategy is adopted, which avoids random masking at the frame or block level, and instead randomly generates spatiotemporal cube masks in the spatiotemporal three-dimensional space (T, H, W). This strategy is better able to simulate the sudden occlusion (such as swimming fish, floating objects) and local turbidity of the real underwater environment than independent frame masks, effectively avoiding the information leakage problem of simply copying and pasting adjacent frames. In addition, a masking ratio of up to 75% is set, that is, only 25% of the spatiotemporal markers (from P and G) are input to the encoder. This extremely high information compression ratio forces the model not to simply learn local textures or short-term motions, but to infer high-level semantic information and long-range spatiotemporal context relationships, thereby learning a more generalizable target representation.
[0060] Next, a Co-Attention deep interaction module is proposed, embedded between two parallel encoders, responsible for deep interaction. This module takes the encoded spatial features FP and temporal features FG as input to compute a bidirectional attention map: The formula for calculating the association state from time marker to spatial marker (temporal dependency of enhanced spatial features) is as follows: ; The formula for representing the association state from spatial markers to temporal markers (enhancing spatial details of temporal features) is as follows: ,in , It is a linear transformation matrix. , These are input features from different modalities. It is a scaling factor for the numerical scale of balanced matrix multiplication. Through this interaction, deep fusion and complementary learning of spatiotemporal features are achieved, solving the problem that traditional cascaded structures ignore the deep interaction of spatiotemporal features. The decoder takes all tags (encoded visible tags + learnable mask tags) as input and reconstructs the original pixel values masked by the spatiotemporal cube based on the fusion context features output by the encoder.
[0061] After pre-training, the framework is adapted to a specific target tracking task. The pre-trained model serves as a powerful feature extraction and fusion backbone network. In the initial frame, based on the given target bounding box, target template features are extracted from the fused feature map. In subsequent frames, the model performs feature extraction and spatiotemporal fusion across the entire search region. The pixel reconstruction decoder is discarded, and a lightweight tracking head is connected on top of the fused features output by the encoder. This tracking head can be a correlation-filter-based module or a simple multilayer perceptron (MLP) classification and regression head, used to predict the target's position and scale within the search region, thus achieving target tracking.
[0062] 4. Real-time target detection and tracking process
[0063] In actual deployment, the system integrates the U-YOLO model and a pre-trained Transformer model to achieve accurate and robust real-time tracking. The overall process is as follows: Figure 7 As shown. First, the input video frame I undergoes the aforementioned fusion image enhancement processing, outputting I'. Then, the enhanced image I' is input into the improved YOLOv11 object detection module in step 2, which outputs the target bounding box B and classification confidence C in real time. Next, depth features are extracted, and based on the target region (RoI) determined by the target bounding box B, combined with historical T-frame data, a short video clip is formed for target tracking. The tracking process is as follows: First, the video clip consisting of the target region and its temporal context is input into the pre-trained Transformer-based target tracking module in step 3 to extract robust spatiotemporal appearance features. F trk Then, a Kalman filter is used to predict the position of each trajectory in the current frame based on the motion model. Finally, a two-stage matching strategy is used for association: the first stage performs a coarse motion consistency matching based on the Mahalanobis distance between the predicted position and the detection box; the second stage calculates the motion consistency of the detected boxes that pass the initial screening. F trk The system performs appearance matching by using the cosine similarity between the features and the historical trajectory feature library. This combined strategy enables the system to achieve accurate and robust inter-frame target identity association and stable trajectory prediction even in underwater scenes with high occlusion and fast movement.
Claims
1. A system for underwater target detection and tracking, characterized in that, The system includes: The underwater image enhancement module is used to preprocess the original underwater video images and output the enhanced images. The YOLOv11 target detection module is improved by replacing the standard convolutional part in the C3K2 block of the YOLOv11 backbone network with receptive field-based attention convolution or variable kernel convolution, replacing the attention layer in the C2PSA attention module of the backbone network with triple attention, adding at least one attention module between the output of the neck network and the detection head, replacing the neck network in YOLOv11 with a GOLD-YOLO or ASF-YOLO neck structure, and using the improved YOLOv11 to receive enhanced images to locate underwater targets in real time and output target bounding boxes. The Transformer-based target tracking module is used to receive video clips with bounding boxes and extract spatiotemporal features, and to perform target association and trajectory prediction based on the target bounding boxes and spatiotemporal features. The Transformer-based target tracking module includes: an embedding module, a dual-branch encoder, a common attention module, a decoder, and a tracking head module. The embedding module divides the input video clip into spatial blocks and temporal segments, generating spatial sequences and temporal sequences. The dual-branch encoder consists of two parallel Transformer encoders, which extract features from spatial and temporal sequences respectively. A shared attention module, embedded between the two encoders, enables bidirectional attention interaction between spatial and temporal features; The decoder reconstructs the masked spatiotemporal cube pixels based on the interactive features; The tracking head module predicts the target's position and scale in subsequent frames based on the reconstructed video segments, enabling cross-frame target association and trajectory tracking.
2. The underwater target detection and tracking system according to claim 1, characterized in that, The underwater image enhancement module includes: preprocessing the image and then using an underwater image enhancement method based on adaptive weighted fusion to enhance and restore the image, and outputting the enhanced image.
3. The underwater target detection and tracking system according to claim 1, characterized in that, The improved YOLOv11 structure includes the following sequentially connected parts: The backbone network consists of multiple convolutional layers and feature modules that are alternately connected, as well as a triple attention module in the deep layers of the network, where the feature module is a C3 building block that integrates attention and advanced convolution. The neck network, which is the neck structure of GOLD-YOLO or ASF-YOLO, receives and fuses feature maps from multiple scales from the backbone network; The detection head receives the fused features output by the neck network and outputs the target classification result and bounding box coordinates in parallel.
4. The underwater target detection and tracking system according to claim 1, characterized in that, In the improved YOLOv11 object detection module, the improved YOLOv11 is pre-trained using an open-source underwater image augmentation dataset: using augmented underwater images and corresponding label datasets, and training the improved YOLOv11 using the SGD optimizer, the bounding box regression loss and classification loss are minimized, and the optimal weights of the improved YOLOv11 are obtained.
5. The underwater target detection and tracking system according to claim 1, characterized in that, In the embedding module, the frame sequence of the input underwater video clip is embedded using both patch embedding and fragment embedding methods simultaneously, resulting in two tensors of different sizes as spatial and temporal sequences, which are used to represent spatial detail P and temporal consistency G, respectively.
6. The underwater target detection and tracking system according to claim 1, characterized in that, The Transformer-based target tracking module employs a self-supervised random cube masking strategy for self-supervised pre-training. Its pre-training task is to apply a random cube mask to the input video segment and then reconstruct the masked spatiotemporal cube pixels based on the unmasked context information.
7. A method for underwater target detection and tracking using the system described in any one of claims 1-6, characterized in that, The method includes the following steps: Step S1: Underwater image enhancement. Homomorphic filtering and color correction are applied to the original image, as well as contrast enhancement. The results are then weighted, fused, and sharpened to output the enhanced image. Step S2: Underwater target detection. The enhanced image is input into the improved YOLOv11 target detection module, which outputs the target bounding box and classification confidence in real time. Step S3: Extract video segments of the target region and input them into the Transformer module based on spatiotemporal co-attention to extract the high-dimensional spatiotemporal features of the target. Step S4: Combining the target bounding box, classification confidence, and high-dimensional spatiotemporal feature vector extracted from the Transformer pre-trained model, underwater inter-frame target association and trajectory prediction are achieved based on an integrated strategy of motion prediction and feature matching. The integrated strategy includes: using Kalman filtering for motion prediction and initial screening, and using the spatiotemporal feature vectors to calculate appearance similarity to complete the final identity association, thereby realizing underwater inter-frame target association and trajectory prediction.