Underwater target detection and tracking method based on image enhancement technology

By employing image enhancement techniques and deep learning methods, the problem of low detection accuracy caused by fogging and color shift in underwater target detection and tracking has been solved. Contrast and color correction have been achieved, the dataset has been expanded, and the detection capability and tracking accuracy of small targets have been improved.

CN120913048APending Publication Date: 2025-11-07GUANGZHOU UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511026251.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing underwater target detection and tracking technologies suffer from poor detection accuracy and tracking performance when faced with challenges such as fogging, color distortion, and low visibility in underwater environments. In particular, the limited availability of underwater image data and the difficulty in feature extraction have resulted in limited effectiveness of traditional and deep learning-based methods in underwater applications.

Method used

Image enhancement techniques are employed to process underwater target images, including dark channel prior dehazing and UCM color correction. The dataset is expanded using a deep convolutional generative adversarial network (DCGAN), and a small target detector and convolutional attention module are added to the YOLOv12 detection algorithm. Target tracking is performed using a Kalman filter.

Benefits of technology

It improves the contrast and color quality of underwater target detection, expands the dataset, enhances the detection capability for small targets, and achieves high-precision target detection and tracking in complex underwater environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120913048A_ABST
    Figure CN120913048A_ABST
Patent Text Reader

Abstract

The invention discloses an underwater target detection and tracking method based on an image enhancement technology. The method comprises the following steps: acquiring a plurality of underwater target images; performing enhancement processing on the underwater target image to obtain an enhanced underwater target image; carrying out expansion processing on the underwater target image to obtain an expanded underwater target image; performing target detection according to the enhanced underwater target image and the expanded underwater target image to obtain a detection result; and inputting the detection result into a Kalman filter to obtain a prediction result, and matching the prediction result with the detection result to obtain an underwater target tracking result. According to the invention, underwater image data are enhanced and expanded, and a detection result is tracked based on a detection tracking method.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of underwater target detection and tracking, and particularly relates to an underwater target detection and tracking method based on image enhancement technology. BACKGROUND

[0002] Motion target detection and tracking in video scenes is one of the most basic problems in computer vision. Although several surveillance-based techniques have been developed for outdoor scenes in recent years, few techniques have been developed for underwater applications. Most underwater target detection techniques are used to track marine life, underwater objects and underwater vehicles, each of which exhibits different visual features and behaviors.

[0003] Due to the inherent properties of water, the task of motion target detection in underwater environments is more complex compared to traditional above-water environments. There are two main factors that greatly affect underwater images. The former includes light from the target in the scene being absorbed and scattered due to suspended particles in the water, thereby creating a mist in underwater scenes. The latter is due to the difference in viscosity of water, light will attenuate, thereby creating a color cast problem in the scene. In addition, low visibility and desaturation under underwater conditions pose challenges to traditional computer vision techniques for accurate analysis of underwater images and videos.

[0004] Although many traditional target detection algorithms are used for underwater surveillance, few are specifically designed to detect underwater moving targets to cope with underwater challenges, including fogging, color cast, low visibility, desaturation, etc.

[0005] Compared with traditional methods, most of the current popular target detection and tracking algorithms are developed based on deep learning, which avoids the work of manual feature extraction, and its feature engineering is achieved through a large amount of data and the update learning of deep network structure, and has achieved certain research results.

[0006] Currently, deep learning-based target detection algorithms can be divided into two categories: two-stage target detection methods and one-stage target detection methods. The former generates region proposals through algorithms, derives candidate frames as detection samples, and represents algorithms such as Fast R-CNN and Faster R-CNN. The latter does not have a candidate frame generation process, and directly converts the target positioning problem into a regression problem, of which the representative algorithm is YOLO and SSD. Bouindour uses pre-trained CNN features and a deep learning method based on SVM and an improved 3D residual convolutional network to detect abnormal events in surveillance videos and achieves good results. YOLO is one of the earliest one-stage target detection algorithms, and its proposal greatly improves the speed of target detection. YOLOv12 improves the YOLO series by adjusting the network depth and width of the backbone network and the bottleneck. These improvements include mosaic data enhancement and adaptive anchor frame calculation in the data input part, Focus and SPP (Spatial Pyramid Pooling) modules in the backbone network part, FPN (Feature Pyramid Network) and PAN (Path Aggregation Network) modules in the neck part, and the loss function of the classification head. In addition, deep learning methods have made significant progress, making them widely used in the field of target detection and tracking. Techniques such as transfer learning and diffusion models have become significant contributors to this progress.

[0007] There are many precedents for underwater image enhancement. Traditional dehazing methods, such as the dark channel prior (DCP) and its improved versions, can effectively remove fogging, while dehazing techniques such as polarization filtering and multi-scale Retinex can improve image clarity. Image enhancement can also be achieved through histogram equalization and color correction methods, which can adjust contrast and color balance. Deep learning methods, including CNN, U-Nets, WaterGAN, and CycleGAN, provide advanced solutions for comprehensive image enhancement. However, these methods are currently at a low level of optimization for underwater target recognition, especially for imaging systems installed on underwater robots. In recent years, deep learning-based target detection has been widely welcomed due to its high detection accuracy. However, as mentioned earlier, there are challenges such as limited underwater samples and difficulty in obtaining them for underwater target detection and tracking. Therefore, there is an urgent need to propose an underwater target detection and tracking method based on image enhancement technology. SUMMARY

[0008] To solve the above technical problems, the present application proposes an underwater target detection and tracking method based on image enhancement technology, a target detection algorithm based on YOLOv12, image data enhancement and expansion based on underwater image data, and a tracking method based on detection results.

[0009] To achieve the above purpose, the present application provides an underwater target detection and tracking method based on image enhancement technology, comprising:

[0010] obtaining a plurality of underwater target images;

[0011] performing enhancement processing on the underwater target images to obtain enhanced underwater target images;

[0012] performing expansion processing on the underwater target images to obtain expanded underwater target images;

[0013] performing target detection according to the enhanced underwater target images and the expanded underwater target images to obtain a detection result;

[0014] inputting the detection result into a Kalman filter to obtain a prediction result, matching the prediction result with the detection result, and obtaining an underwater target tracking result.

[0015] Optionally, obtaining the enhanced underwater target images comprises:

[0016] performing dark channel prior defogging and UCM color correction processing on the underwater target images respectively to obtain the enhanced underwater target images.

[0017] Optionally, obtaining the expanded underwater target images comprises:

[0018] inputting the underwater target images into a deep convolution generative adversarial network, reshaping the underwater target images through a full connection layer, performing four times of deconvolution processing on the reshaped images, and obtaining output images;

[0019] extracting feature maps after four times of convolution on the output images, performing one-dimensional convolution kernel processing on the extracted feature maps, and obtaining the expanded underwater target images.

[0020] Optionally, performing target detection according to the enhanced underwater target images and the expanded underwater target images comprises:

[0021] inputting the enhanced underwater target images and the expanded underwater target images into an improved YOLOv12, adjusting the weight of the improved YOLOv12, and obtaining the detection result.

[0022] Optionally, the improved YOLOv12 is a detector for detecting small targets added on the basis of YOLOv12, and a convolution attention module is added, wherein the convolution attention module comprises a channel attention unit and a spatial attention unit.

[0023] Optionally, inputting the enhanced underwater target images and the expanded underwater target images into the channel attention unit comprises:

[0024] The enhanced underwater target image and the expanded underwater target image are respectively subjected to maximum pooling and average pooling to obtain maximum values and average values of each channel, the maximum values and the average values of each channel are connected through a convolution layer to adjust the number of channels, a Sigmoid activation function is used to output weight values of each feature point, and the weight values are multiplied with original input feature images to obtain channel attention output features.

[0025] Optionally, inputting the enhanced underwater target image and the expanded underwater target image into the spatial attention unit comprises:

[0026] The channel attention output features are input into a convolution layer for processing, and a Sigmoid activation function is used to calculate spatial attention features for the processed features.

[0027] Optionally, inputting the detection result into a Kalman filter to obtain a prediction result comprises:

[0028] After the detection result is input into the Kalman filter, a Mahalanobis distance is calculated, and a depth appearance descriptor is combined to obtain a prediction result.

[0029] Technical effects of the present application: The present application discloses an underwater target detection and tracking method based on image enhancement technology. In order to solve the problems of low contrast, blurring and color distortion in underwater image degradation, various methods such as defogging, histogram equalization and color correction are used for enhancement processing to improve the contrast of the original image and improve the color cast. In order to solve the problem of insufficient underwater target image data, a deep convolution generative adversarial network (DCGAN) algorithm is used to enhance the data to supplement and improve the data set. A small target detection head is added to the YOLOv12 detection network to improve the adaptability of the detector to scale changes, and a convolution block attention model is introduced into the detection network to improve the importance of the target in the large-scale underwater scene detection. The detected target is tracked in real time by using depth sorting to fuse target motion and surface feature information. BRIEF DESCRIPTION OF DRAWINGS

[0030] The accompanying drawings, which form a part of this application, are included to provide a further understanding of the application and are incorporated in and constitute a part of this application. The embodiments of this application and their description, as set forth and illustrated in the drawings, serve as an example of the application. In the drawings:

[0031] Figure 1 A flowchart of an underwater target detection and tracking method based on image enhancement technology according to an embodiment of the present application is shown in the figure.

[0032] Figure 2 A generative adversarial network structure diagram according to an embodiment of the present application is shown in the figure.

[0033] Figure 3This is a schematic diagram of the DCGAN generator model structure according to an embodiment of the present invention;

[0034] Figure 4 This is a schematic diagram of the discriminator model structure according to an embodiment of the present invention;

[0035] Figure 5 This is a schematic diagram of the SENet structure according to an embodiment of the present invention;

[0036] Figure 6 This is a schematic diagram of the convolutional attention module in an embodiment of the present invention;

[0037] Figure 7 This is a schematic diagram of the channel attention unit according to an embodiment of the present invention;

[0038] Figure 8 This is a schematic diagram of the spatial attention unit according to an embodiment of the present invention;

[0039] Figure 9 This is a structural diagram of the improved YOLOv12 according to an embodiment of the present invention;

[0040] Figure 10 This is a schematic diagram of the framework of the real-time tracking method according to an embodiment of the present invention;

[0041] Figure 11 This is a flowchart of the underwater target tracking strategy according to an embodiment of the present invention. Detailed Implementation

[0042] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0043] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0044] like Figure 1 As shown, this embodiment provides an underwater target detection and tracking method based on image enhancement technology, including:

[0045] Acquire images of several underwater targets;

[0046] The underwater target image is enhanced to obtain an enhanced underwater target image;

[0047] The underwater target image is expanded to obtain an expanded underwater target image;

[0048] Target detection is performed based on the enhanced underwater target image and the expanded underwater target image to obtain detection results;

[0049] inputting the detection result into a Kalman filter to obtain a prediction result, matching the prediction result with the detection result, and obtaining an underwater target tracking result.

[0050] Further, obtaining the enhanced underwater target image comprises:

[0051] respectively performing dark channel prior defogging and UCM color correction processing on the underwater target image to obtain an enhanced underwater target image.

[0052] Further, obtaining the expanded underwater target image comprises:

[0053] inputting the underwater target image into a deep convolution generative adversarial network, reshaping the underwater target image through a full connection layer, performing four times of deconvolution processing on the reshaped image, and obtaining an output image;

[0054] extracting a feature map after four times of convolution on the output image, performing one-dimensional convolution kernel processing on the extracted feature map, and obtaining an expanded underwater target image.

[0055] Further, target detection according to the enhanced underwater target image and the expanded underwater target image comprises:

[0056] inputting the enhanced underwater target image and the expanded underwater target image into an improved YOLOv12, adjusting the weight of the improved YOLOv12, and obtaining a detection result.

[0057] Further, the improved YOLOv12 is an improved YOLOv12 with an added detector for detecting small targets and a convolution attention module, and the convolution attention module comprises a channel attention unit and a spatial attention unit.

[0058] Further, inputting the enhanced underwater target image and the expanded underwater target image into the channel attention unit comprises:

[0059] respectively performing maximum pooling and average pooling on the enhanced underwater target image and the expanded underwater target image to obtain the maximum value and the average value of each channel, adjusting the number of channels through a convolution layer connecting the maximum value and the average value of each channel, using a Sigmoid activation function to output the weight value of each feature point, multiplying the weight value with the original input feature image to obtain a channel attention output feature.

[0060] Further, inputting the enhanced underwater target image and the expanded underwater target image into the spatial attention unit comprises:

[0061] The channel attention output feature is input into a convolution layer for processing, and a spatial attention feature is calculated by using a Sigmoid activation function on the processed feature.

[0062] Further, inputting the detection result into a Kalman filter to obtain a prediction result comprises:

[0063] After inputting the detection result into the Kalman filter, a Mahalanobis distance is calculated, and a prediction result is obtained in combination with a deep appearance descriptor.

[0064] Specifically, the implementation process of the embodiment comprises:

[0065] In view of the problems of low contrast, blurring and color distortion in underwater image degradation, various methods such as dehazing, histogram equalization and color correction are used for enhancement processing to improve the contrast of the original image and improve the color cast. In order to solve the problem of insufficient underwater target image data, the deep convolution generative adversarial network (DCGAN) algorithm is used to expand the data to supplement and improve the data set. A small target detection head is added to the YOLOv12 detection network to improve the adaptability of the detector to scale changes, and a convolution block attention model is introduced into the detection network to improve the importance of the target in the large-scale underwater scene detection. Finally, the detected target is tracked in real time by using deep sorting to fuse the target motion and surface feature information indicators.

[0066] Underwater image preprocessing:

[0067] In the training of deep learning models, the quality of the data set plays a crucial role in the final output results of the model. Enhancing and expanding underwater image data are two main aspects of data set processing, aiming to improve the quality and quantity of data.

[0068] Underwater image enhancement method:

[0069] Light propagation in water and fog share similar characteristics, and images taken underwater often appear hazy. Light scattering by water and small impurities in the water can cause low-contrast objects to be imaged with blurred outlines, while the intensity of the light can be attenuated by moderate absorption, and the color of the image can be biased towards blue-green. In the above problems, post-processing such as defogging, color restoration, and histogram equalization is used to improve the profile, color, and contrast of underwater target objects. The selection of dark channel prior defogging and UCM (unsupervised color correction technique) for image enhancement is mainly to deal with specific challenges encountered in underwater image processing and expected application environments. In the field of underwater image enhancement, in addition to dark channel prior dehazing and UCM color correction, there are various techniques. Histogram equalization and contrast limited adaptive histogram equalization (CLAHE) are notable alternatives, each with its own strengths and limitations, and there are some image enhancement methods for large-scale images, but they still need to be modified to adapt to underwater environments.

[0070] Histogram equalization redistributes pixel intensities to enhance overall image contrast, which is beneficial for improving the visibility of underwater scenes with uneven lighting or low contrast. However, this can lead to amplified noise and unnatural results, especially in images with extreme intensity variations. CLAHE addresses the limitations of traditional histogram equalization by limiting contrast enhancement in local regions, thereby preventing excessive amplification of noise and preserving local image details. This makes CLAHE particularly suitable for underwater images with local variations in contrast and illumination. However, CLAHE can be difficult to effectively adapt to high dynamic underwater scenes with rapid changes in lighting conditions.

[0071] Dark channel prior dehazing is particularly suitable for improving underwater visibility by mitigating the effects of water turbidity and scattering, which often degrade image quality in underwater environments. Given the prevalence of these issues in underwater images, dark channel prior dehazing is a powerful choice for improving overall clarity and detail, thereby facilitating target detection tasks in underwater environments.

[0072] Similarly, UCM color correction addresses the color distortion and variation inherent in underwater imaging due to factors such as water absorption and scattering. By adjusting color balance and contrast, UCM color correction helps restore natural color representation, which is crucial for accurate interpretation and analysis of underwater scenes.

[0073] The rationale for selecting these particular techniques lies in their effectiveness in addressing the challenges posed by underwater imaging, including low visibility, color distortion, and contrast variation. While alternative solutions such as histogram equalization or CLAHE may offer benefits in other contexts, they may not be well-suited to alleviate the specific issues prevalent in underwater image processing. Therefore, the selection of dark channel prior dehazing and UCM color correction is justified as they enable improved underwater image quality and facilitate accurate analysis and interpretation in underwater applications.

[0074] Underwater image data augmentation based on DCGAN:

[0075] The underwater image dataset used by the present application is annotated by LabelImg. Due to the difficulty of collecting underwater image datasets and the poor generalization ability of network models trained on small datasets, the dataset needs to be expanded.

[0076] There are many available data augmentation methods, however, most of them are based on traditional techniques that involve geometric or color transformations of the original image, such as rotation, cropping, and scaling, to generate new samples. However, these traditional methods only transform existing images, resulting in generated samples that are highly similar in content and features to the original images. This similarity limits the diversity of the dataset, making the model prone to overfitting specific features, thereby limiting its generalization ability. In contrast, generative adversarial networks (GANs), as a generative model, learn the distribution of the original data to generate entirely new image samples. This generation method significantly enhances the diversity of the training data, enabling object detection models to learn a broader feature distribution and ultimately improving detection performance.

[0077] Generative adversarial networks (GANs) are a network model that generates data through an adversarial approach, by training the model with samples, the model can generate the required data, and the output data distribution will be close to the real data. Through the generative adversarial network, new images similar to the real target are generated, thereby expanding the dataset. GAN sets a generator and a discriminator in the network, which are mutually antagonistic, and the network structure is as shown in Figure 2 .

[0078] The objective function of the generative adversarial network can be represented by the following equation:

[0079]

[0080] The objective function indicates that in GAN training, the generator and the discriminator are iteratively optimized. First, the discriminator is optimized using the following expression:

[0081]

[0082] where D(x) is the correct prediction for real samples, G(z) is the generated sample from noise z, D(G(z)) is the correct prediction for the generated sample, p data (x) represents the distribution of real sample data, p z (z) represents the distribution of noise data. For the discriminative model, the goal of the loss function is to let the generated fake samples be identified as fake by the discriminator, i.e., D(G(z)) tends to 0, so the value function takes the maximum value.

[0083] The purpose of the generated model optimization is to let the generated fake samples be identified as fake samples by the discriminator, D(G(z)) tends to 1, so the value function takes the minimum value, and its expression is:

[0084]

[0085] For the processing of image data, Radford et al. proposed a deep convolutional generative adversarial network (DCGAN) that introduced a convolutional neural network (CNN) into GAN. DCGAN integrates the CNN network into the generator and discriminator of GAN, discards the pooling layer of the convolutional neural network to realize the network differentiability, and deletes the fully connected layer to speed up the network update. The image feature map is extracted by the convolutional network, and the feature map contains various feature representations of the target. The deeper the layer of transmission, the more detailed the feature representation.

[0086] In DCGAN, the purpose of the generator is opposite to the convolutional neural network, which generates an image through a series of feature values, and the initial input is noise data, which is reshaped into a 4*4*1024 vector through a fully connected layer from the initial input of a 1*100 random vector, and then sequentially increases in size through subsequent deconvolution operations, and finally outputs a 64*64 image. Figure 3 As shown in the structure of the model, it goes through four deconvolution steps, and the initial input of a 1*100 random vector is reshaped into a 4*4*1024 vector through a fully connected layer, and then sequentially increases in size through subsequent deconvolution operations, and finally outputs a 64*64 image.

[0087] The input 64*64 image in the discriminator is extracted as a 4*4 size feature map after 4 convolutions, and a one-dimensional convolution kernel is used in the last layer. The structure is shown in Figure 4 .

[0088] In order to evaluate the quality of the generated image, it is necessary to compare the image before and after generation. Two main image comparison methods used in computer vision are pixel distance and feature distance comparison, where pixel distance is the subtraction of corresponding pixel values in the image, and feature distance is the comparison of feature vectors in the image feature extraction process. This calculation is more robust because the feature vector reflects the global information of the image. The Frechet Inception Distance (FID) is used to evaluate the quality of the generated data, which calculates the distance between real samples and generated samples in the feature space, and the calculation formula is:

[0089]

[0090] where (μ r ,σ r ) and (μ g ,σ g ) are Gaussian distributions of real data and generated data, respectively, and μ and σ are mean vector and covariance matrix, respectively.

[0091] Improved YOLOv12 underwater target detection and tracking method:

[0092] Improved YOLOv12 underwater target detection:

[0093] The embodiment adds a detector for detecting small targets on the basis of YOLOv12, and adds a CBAM (convolutional attention module) to highlight useful information and suppress useless information.

[0094] Based on SENet (squeeze and excitation network), the convolutional attention module is combined with spatial attention to improve the detection accuracy of the model. Attention in deep learning network refers to the fact that the convolutional network pays more attention to important areas when processing images, and the network automatically goes to more important places through the attention mechanism. SENet introduces input channel attention, making the network pay more attention to features on important channels. Its network structure is shown in Figure 5 The input is a vector of size C'xH'xW', and the structure after convolution is CxHxW. Next, the activation feature map is compressed by keeping the number of channels unchanged and merging the height and width dimensions into 1x1, then activated and finally multiplied by U to output the result. The implementation steps are as follows:

[0095] 1. The input feature map is globally pooled evenly.

[0096] 2. Perform two fully connected operations, where the number of neurons in the first fully connected operation is smaller, and the number of neurons in the second fully connected operation is the same.

[0097] 3. Use the Sigmod function to activate the output of the previous layer, and the output is the weight value of each channel.

[0098] 4. Multiply the channel weight with the input feature map. The convolutional attention module adds the consideration of spatial attention, and its structure is shown in Figure 6 Two attention modules are used as channel attention and spatial attention modules between input and output. The structure of the channel attention module is shown in Figure 7The channel attention processing is similar to the SENet, in which the number of channels remains unchanged and is compressed in the spatial dimension, so that the network model pays more attention to the basis of positive and negative sample judgment. The convolutional attention module adds a max-pooling layer on top of the average pooling, both of which make the extracted features more rich.

[0099] Figure 8 The structure of the spatial attention module is shown, and the operation steps are to take the maximum value and the average value of each channel of the input feature, connect the two through a convolutional layer to adjust the number of channels, then use the Sigmoid activation function to output the weight value of each feature point, and finally multiply the weight value with the original input feature image.

[0100] YOLOv12 sets three groups of detection layers of different sizes. When the input image is 640*640, the sizes of the detection layers are 80*80, 40*40 and 20*20 respectively, which are used to detect targets of 8*8, 16*16 and 32*32 or larger. In order to improve the detection ability of small targets, the embodiment adds a small target detection layer to the detection head, which is used to detect 4*4 size targets. The improved structure is as shown in Figure 9 In the YOLO method, the training sample image can have different resolutions. The YOLOv12 network performs adaptive image scaling. That is, the original input image is scaled to a fixed size that is an integer multiple of 32 pixels, and then it is sent to the detection network. The commonly used sizes in the YOLO series algorithm include 416*416, 608*608, 640*640 and other sizes.

[0101] The original scaling method has some problems, because many pictures in actual use have different aspect ratios, so after scaling and padding, the size of the black border at both ends is different, but if the padding is too much, there will be a lot of information redundancy, which will affect the overall inference speed. The resolution of the sample image is usually a flexible parameter, which can be adjusted according to specific tasks and resource limitations. Sometimes, in order to improve the training effect and generalization ability of the model, it is better to uniformly adjust the resolution of all images. However, in some cases, different strategies can be adopted, such as multi-scale training or adjusting the image size and cropping the image to achieve uniform resolution. Overall, the YOLO model can usually handle images of different resolutions, but during the training process, it needs to be considered how to fully utilize the sample data while ensuring the performance and generalization ability of the model.

[0102] Underwater multi-target tracking method:

[0103] Figure 10 The overall framework of the real-time tracking method is shown, in which F min represents the minimum number of frames required for track confirmation, F maxIndicates the maximum number of frames allowed for a track break. The intersection over union (IOU) between the predicted bounding box and the ground truth bounding box is calculated.

[0104] The real-time tracking method incorporates appearance information of the target, effectively utilizing the powerful feature extraction capability of deep learning. This enables strong performance in re-identification (ReID), even in the presence of occlusions, maintaining strong tracking accuracy. As a result, the real-time tracking method effectively suppresses ID switches and reduces tracking segments, thereby improving tracking performance.

[0105] The real-time tracking method includes the following key steps, and the flow chart of the underwater target tracking strategy is as shown in Figure 11

[0106] 1. Object detection using YOLOv12: YOLOv12 is used to detect objects in each frame of the input video sequence. This model has high precision and efficiency, making it very suitable for real-time applications.

[0107] 2. Feature extraction: YOLOv12 is used to extract features for each detected object, capturing important features and appearance information.

[0108] 3. Trajectory prediction: The real-time tracking method predicts the future trajectory of each detected object based on its current state, including position and velocity.

[0109] 4. Data association: Methods such as the Hungarian algorithm are used to associate detected objects with existing trajectories in previous frames, ensuring consistent tracking across frames.

[0110] 5. Trajectory management: Update and manage object trajectories to cope with challenges such as occlusions and object interactions.

[0111] 6. Output results: The final output includes the tracked object trajectories, providing continuous updates as the video sequence progresses.

[0112] The real-time tracking method enhances traditional tracking algorithms by integrating deep learning models for feature extraction. In real-world scenarios, due to rapid movement, targets may encounter missed detections, occlusions, or significant position changes between frames, making traditional IOU-based matching inaccurate for tracking targets. In such cases, the real-time tracking method uses a target appearance feature extraction model to encode target features into feature vectors, which are then stored in a trajectory sequence. When the detection result does not match the IOU-based trajectory, the system calculates the similarity between the feature vector of the detected target and the feature vector saved in the trajectory sequence. If the similarity exceeds a predefined threshold, it is assumed to be a match. The matching process combines IOU matching with feature-based matching methods, and the real-time tracking method introduces a cascading matching and new trajectory confirmation mechanism.

[0113] ​Target tracking adopts a real-time tracking algorithm, which inputs the detection results of YOLOv12 detector and the prediction results generated by Kalman filter. Then, the Hungarian algorithm is used to match between the detected objects and the predicted targets. The real-time tracking method combines motion and appearance information to evaluate object matching, and the motion information is quantified using Mahalanobis distance. The Mahalanobis distance in space can be calculated as follows.

[0114] d (1) (i,j)=(d j ,y i ) T S i (d j ,y i )(5);

[0115] d (1) (i,j) represents the Mahalanobis distance between target i and target j, S i represents the covariance matrix of the observation space predicted by Kalman filter for the current trajectory, y i represents the position prediction provided by tracker i, d j represents the position of detection box j.

[0116] When the certainty of target motion is high, the Mahalanobis distance can achieve good data association. However, in actual scenes, target motion often involves uncertainty, and changes in camera position increase uncertainty, reducing the matching accuracy relying only on Mahalanobis distance. Therefore, appearance matching needs to be introduced. The minimum cosine distance is used to describe the similarity between the feature vectors of all detected targets in the current detection and all detected targets in the historical trajectory. The calculation formula is:

[0117]

[0118] where represents the k latest features associated with tracker i, r j represents the feature vector of detection target j.

[0119] The above two indicators are combined by weighted summation to obtain the final indicator.

[0120] c i,j =λd (1) (i,j)+(1-λ)d (2) (i,j)(7);

[0121] When c i,j is within the set threshold range, it is considered that the detected and predicted targets are correctly associated.

[0122] The application discloses an underwater target detection and tracking method based on image enhancement technology, aiming at the problems of low contrast, blurring and color distortion in underwater image degradation, adopts multiple methods such as defogging, histogram equalization and color correction for enhancement processing to improve the contrast of the original image and improve the color deviation; in order to solve the problem of insufficient underwater target image data, the deep convolution generative adversarial network (DCGAN) algorithm is used to enhance the data to supplement and improve the data set; a small target detection head is added in the YOLOv12 detection network to improve the adaptability of the detector to the scale change, and a convolution block attention model is introduced in the detection network to improve the importance of the target in the large-scale underwater scene detection. The detected target is tracked in real time by using deep sorting by fusing target motion and surface feature information indicators.

[0123] The above is only a preferred specific embodiment of the application, but the protection scope of the application is not limited to this, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the application, which should be covered in the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.

Claims

1. An underwater target detection and tracking method based on image enhancement techniques, characterized in that, The method comprises the following steps: obtaining a plurality of underwater target images; performing enhancement processing on the underwater target images to obtain enhanced underwater target images; performing expansion processing on the underwater target images to obtain expanded underwater target images; performing target detection on the enhanced underwater target images and the expanded underwater target images to obtain a detection result; inputting the detection result into a Kalman filter to obtain a prediction result, matching the prediction result with the detection result, and obtaining an underwater target tracking result.

2. The image enhancement technique based underwater target detection and tracking method of claim 1, wherein, obtaining enhanced underwater target images comprises: performing dark channel prior dehazing and UCM color correction on the underwater target images respectively to obtain enhanced underwater target images.

3. The image enhancement technique based underwater target detection and tracking method of claim 1, wherein, obtaining expanded underwater target images comprises: inputting the underwater target images into a deep convolution generative adversarial network, reshaping the underwater target images through a full connection layer, performing four times of deconvolution processing on the reshaped images to obtain output images; performing four times of convolution on the output images to extract feature maps, performing one-dimensional convolution kernel processing on the extracted feature maps to obtain expanded underwater target images.

4. The image enhancement technique based underwater target detection and tracking method of claim 1, wherein, performing target detection on the enhanced underwater target images and the expanded underwater target images comprises: inputting the enhanced underwater target images and the expanded underwater target images into an improved YOLOv12, adjusting the weight of the improved YOLOv12 to obtain a detection result.

5. The image enhancement technique based underwater target detection and tracking method of claim 4, wherein, The improved YOLOv12 adds a detector for detecting small targets and a convolution attention module based on YOLOv12, and the convolution attention module comprises a channel attention unit and a spatial attention unit.

6. The image intensifier-based underwater target detection and tracking method of claim 5, wherein, inputting the enhanced underwater target images and the expanded underwater target images into the channel attention unit comprises: performing maximum pooling and average pooling on the enhanced underwater target images and the expanded underwater target images respectively to obtain the maximum value and the average value of each channel, adjusting the number of channels through a convolution layer connecting the maximum value and the average value of each channel, using a Sigmoid activation function to output the weight value of each feature point, multiplying the weight value with the original input feature image to obtain channel attention output features.

7. The image enhancement technique based underwater target detection and tracking method of claim 6, wherein, inputting the enhanced underwater target images and the expanded underwater target images into the spatial attention unit comprises: inputting the channel attention output features into a convolution layer for processing, and using a Sigmoid activation function to calculate spatial attention features from the processed features.

8. The image intensification technique based underwater target detection and tracking method of claim 1, wherein, inputting the detection result into a Kalman filter to obtain a prediction result comprises: after inputting the detection result into a Kalman filter, calculating Mahalanobis distance, combining a depth appearance descriptor to obtain a prediction result.