A light-weight underwater target detection method and system based on degraded image enhancement
By eliminating color bias in underwater images using the UWCNN-SD algorithm and improving the YOLOV5 model, and employing GhostNet and CA attention mechanisms, the problems of accuracy and speed in underwater target detection are solved, achieving lightweight and efficient underwater target detection.
Patent Information
- Application Number
- CN202310366420.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-07
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2043-04-07
AI Technical Summary
Existing underwater target detection methods suffer from image quality degradation and low detection accuracy in complex underwater environments. Furthermore, their complex network structures and large number of parameters make them unsuitable for real-time detection.
A lightweight underwater target detection method based on degraded image enhancement is adopted. Color bias is eliminated by using the UWCNN-SD algorithm, the feature extraction network of YOLOV5 is replaced by GhostNet, and the CA attention mechanism is introduced to construct a lightweight underwater target detection model.
It improves the accuracy and speed of underwater target detection, reduces the amount of computation, and enhances the model's generalization ability.
Smart Images

Figure CN116543295B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning image processing technology, specifically a lightweight underwater target detection method and system based on degraded image enhancement. Background Technology
[0002] Underwater target detection is indispensable for ocean exploration, playing a vital role in resource development, seabed fishing, ecological protection, and military operations. However, the complex underwater environment presents challenges to manual or semi-manual detection methods, leading to issues such as high cost and low security. Currently, with the rapid development of deep learning technology, vision-based target detection has become a hot topic and is widely used in underwater target identification tasks, playing a crucial role in resource development, underwater monitoring, and ecological protection, providing strong support for underwater detection missions.
[0003] The complex underwater environment poses significant challenges to target detection tasks. Light undergoes selective attenuation underwater, meaning its propagation varies with wavelength. Red light attenuates fastest underwater, followed by green, and then blue. Consequently, underwater images often exhibit a blue-green background, resulting in color distortion. Furthermore, floating debris scatters light, blurring image details. These issues degrade image quality, directly impacting the accuracy of subsequent detection tasks.
[0004] In recent years, deep learning has been booming. Object detection technology has made great progress and is widely used in various scenarios. However, current methods have complex network structures and a large number of parameters, which is not conducive to real-time detection. At present, object detection algorithms are mainly divided into two categories: one is a one-stage detector, which directly predicts the category of the location on the feature image, such as SSD and YOLO series, which are characterized by high speed and high accuracy. The other is a two-stage algorithm based on detection frames and classifiers, which first generates region candidate boxes, and then uses a convolutional neural network to classify each region candidate box, such as R-CNN, Fast-RCNN and Faster-RCNN, which are characterized by high accuracy but slow speed. Summary of the Invention
[0005] To address the shortcomings mentioned in the background section, the present invention aims to provide a lightweight underwater target detection method and system based on degraded image enhancement.
[0006] The objective of this invention can be achieved through the following technical solution: a lightweight underwater target detection method based on degraded image enhancement, the method comprising the following steps:
[0007] Receive the image enhancement dataset UIE and the underwater target detection dataset URPC, preprocess UIE and URPC, and divide the preprocessed UIE and URPC into training set, validation set and test set;
[0008] A pre-established underwater imaging model is embedded into the UWCNN-SD network, and underwater images from the UIE dataset are input into the UWCNN-SD network for training. The network is trained using both raw underwater images and real images, and the trained weights are saved and loaded into the UWCNN-SD network. The URPC dataset is then input into the trained UWCNN-SD network, ultimately yielding clear underwater images.
[0009] A clear underwater image, training set, validation set, and test set are input into a pre-built lightweight underwater target detection model. The final output is an image containing underwater target detection boxes. Targets within the underwater target detection boxes are identified and labeled, and the average accuracy is calculated to obtain the detection result.
[0010] Optionally, the UIE dataset contains 950 pairs of underwater images and real images, wherein the real images are clear underwater images without color deviation.
[0011] Optionally, the URPC dataset contains 7,600 images and corresponding label files. The label files include bounding boxes, the location information of the bounding boxes, and the true category information of the content of the bounding boxes.
[0012] Optionally, the underwater imaging model performs a discrete cosine transform on the underwater image to separate it into high-frequency and low-frequency components. Then, a CNN network and a loss function are constructed. Embedding the underwater imaging model into the network can eliminate color deviation in the low-frequency component and highlight texture details in the high-frequency component. Finally, the two are fused to output a clear underwater image.
[0013] Optionally, the underwater imaging model is as follows:
[0014] I λ (x)=J λ (x)t λ (x)+A λ (1-t λ (x))
[0015] In the formula, I λ (x) represents the captured underwater image, J λ (x) represents a clear image, t λ (x) represents transmittance, A λ For global background light, λ represents the RGB channel;
[0016] Transform the atmospheric scattering model:
[0017] J λ (x)=K λ (x)I λ (x)-K λ (x)+1
[0018] t λ (x) and A λ Combined into a single variable K λ (x), the underwater image is subjected to discrete cosine transform to separate it into high-frequency and low-frequency components:
[0019] I λ (x)=I λ LF (x)+I λ HF (x)
[0020] J λ LF (x)=K λ (x)I λ LF (x)-K λ (x)+1
[0021] J λ HF (x)=K λ (x)I λ HF (x)-K λ (x)+1
[0022] LF represents low-frequency components, HF represents high-frequency components. A CNN network is constructed by inputting underwater images from the UIE dataset into the network for training, learning the parameters K. λ (x), K λ Substituting (x) into the underwater imaging model, a clear underwater image is obtained by inverse solving.
[0023] Optionally, the CNN network training process is as follows:
[0024] The network is trained by minimizing a loss function. First, the network parameters are initialized using a Gaussian distribution. The Adam optimizer is then used to optimize the network parameters. Finally, the learned weights are saved and loaded into a test file. Underwater images from the URPC dataset are input into the test file to obtain enhanced underwater target detection images. The loss function is as follows:
[0025]
[0026] in,
[0027]
[0028]
[0029]
[0030] μ and σ represent the grayscale image J, respectively. λ (x) and I λ The mean and standard deviation of (x), J represents a grayscale image λ (x) and I λ The covariance of (x), C1=(K1+L) 2 C2 = (K2 + L) 2 In the formula, K1 = 0.01, K2 = 0.03, and L = 1.
[0031] Optionally, the lightweight underwater target detection model replaces the feature extraction network in YOLOV5 with a lightweight GhostNet module to extract three feature maps of different sizes, adds a CA attention mechanism to the neck, and then inputs the three feature maps of different scales into three classification and regression layers for prediction.
[0032] Optionally, the CA attention mechanism includes the following three operations:
[0033] Information embedding operation: For a given input feature map, global average pooling is used to perform pooling operations along the horizontal and vertical directions of the feature map, respectively, to obtain two embedded information feature maps. A pooling kernel of H×1 is used in the horizontal direction. The H×W×C input features are then processed by global average pooling to obtain an H×1×C information feature map, as shown in the following formula:
[0034]
[0035] In the vertical direction (Y direction), a 1×W pooling kernel is used to obtain a 1×W×C information feature map from the H×W×C input features through a global average pooling operation, as shown in the formula below:
[0036]
[0037] Attention generation operation: Combine the two information feature maps Z generated in the previous step h c and Z w c The feature maps are concatenated along the spatial dimension, then subjected to a 1×1 convolution and activation function. Afterward, they are sliced along the spatial dimension to obtain two separate feature maps. These two separate feature maps are then transformed and activated separately to obtain two attention vectors g. h and g w The formula is shown below:
[0038]
[0039] in,
[0040]
[0041]
[0042] g h =σ(F h (f h ))
[0043] g w =σ(F w (f w ))
[0044] Feature map correction operation: The previous step yielded two attention vectors g. h ∈C×H×1 and g w Given a feature map ∈C×1×W, after performing a broadcast transformation to a dimension of C×H×W, it is compared with the input feature map x after residual operation. c Perform multiplication at corresponding positions to obtain the final attention features.
[0045] Optionally, the calculation process for the average accuracy is as follows:
[0046] Precision is measured using statistics of p and recall r. Precision is the ratio of true positives tp to all predicted positives tp+fp, representing the proportion of correctly predicted results. Recall is the ratio of true positives to actual positives tp+fn, representing the proportion of correctly predicted results among all targets. Average precision AP is the average of all precision values obtained under all possible values of recall.
[0047] in,
[0048]
[0049]
[0050]
[0051] A lightweight underwater target detection system based on degraded image enhancement, comprising:
[0052] Image processing module: It receives the image enhancement dataset UIE and the underwater target detection dataset URPC, preprocesses UIE and URPC, and divides the preprocessed UIE and URPC into training set, validation set and test set;
[0053] Image enhancement module: The pre-built underwater imaging model is embedded into the UWCNN-SD network, and the underwater images in the pre-processed UIE dataset are input into the UWCNN-SD network for training. The network is trained using the original underwater images and real images, the trained weights are saved, and the weights are loaded into the UWCNN-SD network. The URPC dataset is input into the trained UWCNN-SD network to obtain clear underwater images.
[0054] Image generation module: It is used to input clear underwater images and training, validation and test sets into a pre-built lightweight underwater target detection model, and finally output an image containing underwater target detection boxes, identify and label targets within the underwater target detection boxes, and calculate the average accuracy.
[0055] The beneficial effects of this invention are:
[0056] This invention utilizes cutting-edge image enhancement and target detection technologies, bringing these advanced technologies to practical application. Addressing the challenges of underwater target detection, this invention first employs the UWCNN-SD algorithm to enhance degraded underwater images, eliminating color deviations caused by light attenuation. Then, it improves upon the YOLOv5 model by replacing the feature extraction network with GhostNet to reduce parameters and computational load, thereby increasing inference speed. Furthermore, it introduces a CA attention mechanism to enhance feature extraction. Ultimately, this results in higher accuracy, faster speed, and better generalization ability in underwater target detection. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 This is an overall flowchart of the present invention;
[0059] Figure 2 This is a network structure diagram of the UWCNN-SD algorithm used in this invention;
[0060] Figure 3 This is a network structure diagram of the improved YOLOv5 model of this invention;
[0061] Figure 4 This is a flowchart of the CA attention mechanism used in this invention;
[0062] Figure 5 This is a screenshot showing the performance of YOLOv5.
[0063] Figure 6This is a diagram showing the effect of the present invention. Detailed Implementation
[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] like Figure 1 As shown, a lightweight underwater target detection method based on degraded image enhancement is proposed, the method comprising the following steps:
[0066] S1. Obtain the image augmentation dataset UIE and the underwater target detection dataset URPC. The UIE dataset contains 960 pairs of underwater images and their corresponding sharpened images. The URPC dataset contains 7600 images and labels. Use PASCALVOC to convert the URPC dataset labels from XML to TXT. Divide the dataset into training, validation, and test sets in a 7:2:1 ratio. The URPC dataset consists of images and labels. The images contain four targets: sea urchins, starfish, scallops, and sea cucumbers. The labels contain target category information and location information.
[0067] S2. The image size of the dataset in step S1 is unified to 640×640×3, and the underwater images are enhanced using the UWCNN-SD algorithm. The UWCNN-SD algorithm is based on an underwater imaging model:
[0068] I λ (x)=J λ (x)t λ (x)+A λ (1-t λ (x))
[0069] In the formula, I λ (x) represents the captured underwater image, J λ (x) represents a clear image, t λ (x) represents transmittance, A λ For global background light, λ represents the RGB channel;
[0070] Transform the atmospheric scattering model:
[0071] J λ (x)=K λ (x)I λ (x)-K λ (x)+1
[0072] t λ(x) and A λ Combined into a single variable K λ (x), the underwater image is subjected to discrete cosine transform to separate it into high-frequency and low-frequency components:
[0073] I λ (x)=I λ LF (x)+I λ HF (x)
[0074] J λ LF (x)=K λ (x)I λ LF (x)-K λ (x)+1
[0075] J λ HF (x)=K λ (x)I λ HF (x)-K λ (x)+1
[0076] LF represents low-frequency components, HF represents high-frequency components. A CNN network is constructed by inputting underwater images from the UIE dataset into the network for training, learning the parameters K. λ (x), K λ Substituting (x) into the underwater imaging model, a clear underwater image is obtained by inverse solving.
[0077] The network is trained by minimizing a loss function, initially initializing the network parameters using a Gaussian distribution. The Adam optimizer is then used to optimize these parameters. During training, the learning rate is set to 0.0001, the batch size to 16, and the training epochs to 30. Finally, the learned weights are saved and loaded into a test file. Underwater images from the URPC dataset are input into the test file to obtain enhanced underwater target detection images. The loss function is as follows:
[0078]
[0079] in,
[0080]
[0081]
[0082]
[0083] μ and σ represent the grayscale image J, respectively. λ (x) and I λ The mean and standard deviation of (x), J represents a grayscale image λ (x) and I λ The covariance of (x), C1=(K1+L) 2 C2 = (K2 + L) 2 In the formula, K1 = 0.01, K2 = 0.03, and L = 1.
[0084] S3. Construct a lightweight underwater target detection network by replacing the feature extraction network in YOLOv5 with a lightweight GhostNet module to extract three feature maps of different sizes: 80×80×40, 40×40×112, and 20×20×160. Add a CA attention mechanism to the neck area, and then input the three feature maps of different scales into three classification and regression layers for prediction.
[0085] The GhostNet module first extracts features from the input feature map using a small number of convolutional kernels. Then, it uses depth-wise convolution to linearly transform the feature map Φ_i of each channel to obtain the Ghost feature map. Finally, the Ghost feature map and the feature map are compressed to generate the final feature map. This module consists of two stacked Ghost parts. The first part is an extension of Ghost-BottleNeck, mainly used to increase the number of channels, thereby increasing the dimensionality of the feature map. The second part reduces the dimensionality of the feature map to ensure consistency with the input. Finally, the two parts are connected together through skip connections. The first part uses the ReLU activation function to prevent the gradient vanishing phenomenon during backpropagation. The second part does not use the ReLU activation function because using it would cause the data distribution of the next layer to differ from that of the previous layer, requiring constant adaptation to different input data, which would reduce the training speed of the network.
[0086] The CA attention mechanism described above includes the following three operations:
[0087] Coordinate Information Embedding: For a given input feature map, global average pooling is used to perform pooling operations along the horizontal and vertical directions of the feature map, resulting in two embedded information feature maps (e.g., ...). Figure 3 As shown in the figure), a pooling kernel of H×1 is used in the horizontal direction. The H×W×C input features are then processed by global average pooling to obtain an H×1×C information feature map, as shown in the following formula:
[0088]
[0089] In the vertical direction (Y direction), a 1×W pooling kernel is used to obtain a 1×W×C information feature map from the H×W×C input features through a global average pooling operation, as shown in the formula below:
[0090]
[0091] Attention generation operation: Combine the two information feature maps Z generated in the previous step h c and Z w c The feature maps are concatenated along the spatial dimension, then subjected to a 1×1 convolution and activation function. Afterward, they are sliced along the spatial dimension to obtain two separate feature maps. These two separate feature maps are then transformed and activated separately to obtain two attention vectors g. h and g w The formula is shown below:
[0092]
[0093] in,
[0094]
[0095]
[0096] g h =σ(F h (f h ))
[0097] g w =σ(F w (f w ))
[0098] Feature map correction operation: The previous step yielded two attention vectors g. h ∈C×H×1 and g w Given a feature map ∈C×1×W, after performing a broadcast transformation to a dimension of C×H×W, it is compared with the input feature map x after residual operation. c Perform multiplication at corresponding positions to obtain the final attention features.
[0099] S4. Input the enhanced training and validation set images from step S2 into the lightweight object detection model. The training set is used for model training, the validation set provides timely feedback on the model's training progress, and the test set is used to verify the model's final detection performance. The input image size is 640×640×3, the training batch size is set to 32, the training period is 300, the IOU threshold is set to 0.45, and the initial learning rate is set to 0.01. Cosine annealing is used to update the learning rate to accelerate model training. Save the trained weight file as "best.pt" and load it into the model. Input the test set images into the model, and finally output an image with target bounding boxes and target information. Calculate the average accuracy.
[0100] The average precision is measured using statistics on precision (p) and recall (r). Precision is the ratio of true positives (tp) to all predicted positives (tp+fp), representing the proportion of correctly predicted results. Recall is the ratio of true positives to actual positives (tp+fn), representing the proportion of correctly predicted results among all targets. Average precision (AP) is the average of all possible values for recall, calculated as a whole.
[0101] in,
[0102]
[0103]
[0104]
[0105] This simulation experiment uses underwater images from the URPC2020 official dataset, which comes from the optical image competition of the National Underwater Robotics Competition. It contains 7600 labeled real underwater optical images, including various lighting conditions causing color casts and weak contrast. It covers four target types: sea urchins, starfish, scallops, and sea cucumbers, and includes complex detection scenarios such as target overlap and occlusion. The simulation was implemented using Python 3.7 and the PyTorch framework on a server equipped with two NVIDIA RTX 2080 Ti GPUs (11GB of memory).
[0106] The dataset is divided into a training set, a validation set, and a test set in a ratio of 7:2:1.
[0107] Table 1 compares the underwater target detection accuracy, model size, and detection speed results of the YOLOv5 method and the method of the present invention in the test images.
[0108] Table 1 Comparison of underwater target detection accuracy and model parameters in simulation experiments.
[0109]
[0110] Quantitative analysis from Table 1 shows that this invention can effectively detect underwater targets and has significant advantages over the YOLOv5L algorithm, not only improving the average accuracy by 3.2% but also reducing the model size by 53.1%.
[0111] A lightweight underwater target detection system based on degraded image enhancement, comprising:
[0112] Image processing module: It receives the image enhancement dataset UIE and the underwater target detection dataset URPC, preprocesses UIE and URPC, and divides the preprocessed UIE and URPC into training set, validation set and test set;
[0113] Image enhancement module: used to input the pre-processed underwater image of UIE into the pre-established underwater imaging model for enhancement to obtain a clear underwater image, and to input the URPC image into the pre-established underwater imaging model to obtain an enhanced image;
[0114] The save module is used to mark the best-performing underwater images and enhanced images as weight files and save the weight files.
[0115] Image generation module: It is used to input the weight file, training set, validation set and test set into the pre-built lightweight underwater target detection model, and finally output the image containing the underwater target detection box, identify and label the targets within the underwater target detection box, and calculate the average accuracy.
[0116] Based on the same inventive concept, this invention also provides a computer device, comprising: one or more processors, and a memory for storing one or more computer programs; the programs include program instructions, and the processor executes the program instructions stored in the memory. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, used to implement one or more instructions, specifically for loading and executing one or more instructions stored in a computer storage medium to implement the above-described method.
[0117] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, performs the above-described method. This storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0118] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0119] The foregoing has shown and described the basic principles, main features, and advantages of this disclosure. Those skilled in the art should understand that this disclosure is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of this disclosure. Various changes and modifications can be made to this disclosure without departing from its spirit and scope, and all such changes and modifications fall within the scope of this disclosure as claimed.
Claims
1. A lightweight underwater target detection method based on degraded image enhancement, characterized in that, The method includes the following steps: Receive the image enhancement dataset UIE and the underwater target detection dataset URPC, preprocess UIE and URPC, and divide the preprocessed UIE and URPC into training set, validation set and test set; The pre-established underwater imaging model is embedded into the UWCNN-SD network, and the underwater images in the pre-processed UIE dataset are input into the UWCNN-SD network for training. The network is trained using the original underwater images and real images, the trained weights are saved, and the weights are loaded into the UWCNN-SD network. The URPC dataset is input into the trained UWCNN-SD network to obtain clear underwater images. The model inputs clear underwater images, training sets, validation sets, and test sets into a pre-built lightweight underwater target detection model. The final output is an image containing underwater target detection boxes. The model identifies and labels targets within the underwater target detection boxes and calculates the average accuracy to obtain the detection results. The lightweight underwater target detection model replaces the feature extraction network in YOLOV5 with a lightweight GhostNet module, extracts three feature maps of different sizes, adds a CA attention mechanism to the neck, and then inputs the three feature maps of different scales into three classification and regression layers for prediction. The CA attention mechanism described above includes the following three operations: Information embedding operation: For a given input feature map, global average pooling is used to perform pooling operations along the horizontal and vertical directions of the feature map, respectively, to obtain two embedded information feature maps. A pooling kernel of H×1 is used in the horizontal direction, and the H×W×C input features are processed by global average pooling to obtain an H×1×C information feature map, as shown in the following formula: In the vertical direction (Y direction), a 1×W pooling kernel is used to obtain a 1×W×C information feature map by applying a global average pooling operation to the H×W×C input features, as shown in the following formula: Attention generation operation: Combine the two information feature maps generated in the previous step and The feature maps are concatenated along the spatial dimension, then subjected to a 1×1 convolution and activation function. Next, they are sliced along the spatial dimension to obtain two separate feature maps. These two separate feature maps are then transformed and activated separately to obtain two attention vectors. and The formula is shown below: in, Feature map correction operation: The previous step yielded two attention vectors. ∈C×H×1 and Given a feature map ∈C×1×W, after performing a broadcast transformation to a dimension of C×H×W, it is compared with the input feature map after residual operation. Perform multiplication at corresponding positions to obtain the final attention features.
2. The lightweight underwater target detection method based on degraded image enhancement according to claim 1, characterized in that, The UIE dataset contains 950 pairs of underwater images and real images, where the real images are clear underwater images without color deviation.
3. The lightweight underwater target detection method based on degraded image enhancement according to claim 1, characterized in that, The URPC dataset contains 7,600 images and corresponding label files. The label files include bounding boxes, the location information of the bounding boxes, and the true category information of the content of the bounding boxes.
4. A lightweight underwater target detection method based on degraded image enhancement according to claim 1, characterized in that, The underwater imaging model performs a discrete cosine transform on the underwater image to separate it into high-frequency and low-frequency components. Then, a CNN network and a loss function are constructed. Embedding the underwater imaging model into the network can eliminate color deviation in the low-frequency component and highlight texture details in the high-frequency component. Finally, the two are fused to output a clear underwater image.
5. A lightweight underwater target detection method based on degraded image enhancement according to claim 4, characterized in that, The underwater imaging model is as follows: In the formula, For the captured underwater images, For a clear image, Transmittance, As global background light, Indicates the RGB channel; Transform the atmospheric scattering model: Will and Combined into a single variable The underwater image is subjected to discrete cosine transform to separate it into high-frequency and low-frequency components: Indicates low-frequency components, To represent high-frequency components, a CNN network is constructed, and underwater images from the UIE dataset are input into the network for training to learn parameters. ,Will Substituting the data into the underwater imaging model, a clear underwater image is obtained by inverse solving.
6. A lightweight underwater target detection method based on degraded image enhancement according to claim 5, characterized in that, The CNN network training process is as follows: The network is trained by minimizing a loss function. First, the network parameters are initialized using a Gaussian distribution. The Adam optimizer is then used to optimize the network parameters. Finally, the learned weights are saved and loaded into a test file. Underwater images from the URPC dataset are input into the test file to obtain enhanced underwater target detection images. The loss function is as follows: in, and Representing grayscale images respectively and The mean and standard deviation, Represents a grayscale image and covariance, , In the formula , , .
7. A lightweight underwater target detection method based on degraded image enhancement according to claim 1, characterized in that, The calculation process for the average accuracy is as follows: Precision is measured using statistics of p and recall r. Precision is the ratio of true positives tp to all predicted positives tp+fp, representing the proportion of correctly predicted results. Recall is the ratio of true positives to actual positives tp+fn, representing the proportion of correctly predicted results among all targets. Average precision AP is the average of all precision values obtained under all possible values of recall. in, 。 8. A lightweight underwater target detection system based on degraded image enhancement, employing the lightweight underwater target detection method based on degraded image enhancement as described in any one of claims 1 to 7, characterized in that, include: Image processing module: It receives the image enhancement dataset UIE and the underwater target detection dataset URPC, preprocesses UIE and URPC, and divides the preprocessed UIE and URPC into training set, validation set and test set; Image enhancement module: The pre-built underwater imaging model is embedded into the UWCNN-SD network, and the underwater images in the pre-processed UIE dataset are input into the UWCNN-SD network for training. The network is trained using the original underwater images and real images, the trained weights are saved, and the weights are loaded into the UWCNN-SD network. The URPC dataset is input into the trained UWCNN-SD network to obtain clear underwater images. Image generation module: It is used to input clear underwater images and training, validation and test sets into a pre-built lightweight underwater target detection model, and finally output an image containing underwater target detection boxes, identify and label targets within the underwater target detection boxes, and calculate the average accuracy.