Underwater image enhancement method and system based on deep cascade residual network

The problem of detail loss in existing methods when dealing with multiple distortions is solved by recovering underwater images from coarse to fine through deep cascade residual networks, combining gated codecs, original resolution and supervised restoration modules, and achieving more Good visual effect.

CN114936983BActive Publication Date: 2025-02-07FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210680325.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-16
Publication Date
2025-02-07
Estimated Expiration
2042-06-16

AI Technical Summary

Technical Problem

Existing underwater image enhancement methods lack flexibility in dealing with multiple distortions, resulting in loss of image detail and inability to simultaneously correct color deviations and improve contrast and clarity.

Method used

Degraded underwater images are restored from coarse to fine through three cascaded subnets. The first two subnets use gated codec subnets to learn context information, while the third subnet uses the original resolution subnet to preserve fine details, and embed details enhancement modules and supervisory recovery modules between subnets, leveraging details recovery and attention. Supervision will carry out final restoration.

Benefits of technology

Effectively correct the color deviation of underwater images, improve contrast and clarity, and improve overall visual effects, solving the problem of details loss in existing methods when dealing with multiple distortions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114936983B_ABST
    Figure CN114936983B_ABST
Patent Text Reader

Abstract

The present invention relates to an underwater image enhancement method and system based on a deep cascade residual network, the method comprising: S1: constructing a deep cascade residual network; constructing a training set and a test set in proportion; S2: dividing an input image into blocks, and then respectively inputting them into three cascade subnetworks of the deep cascade residual network, allowing the network to perform forward propagation to obtain a clear image output by the trained network; S3: calculating the loss value of the output image compared to the target image, and performing error back propagation according to the loss value to update the network weight; S4: judging whether the deep cascade residual network has been trained, and if so, selecting the best model of the network; S5: inputting the test set into the best model for testing, and judging whether the best model meets expectations; S6: inputting the underwater degraded image into the deep cascade residual network that has passed the test, and obtaining an enhanced underwater image. The method and system are conducive to correcting the color deviation of underwater images, improving contrast and clarity, and improving the overall visual effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image enhancement and restoration, and specifically relates to an underwater image enhancement method and system based on a deep cascade residual network. Background Art

[0002] Due to the attenuation of light when propagating in water, underwater images are often affected by noise, color distortion and low contrast. These problems increase the difficulty of various tasks, such as the automatic detection and recognition of fish and marine species in the environment. Therefore, a large number of underwater image enhancement methods have been proposed to restore or enhance degraded underwater images. In order to improve the quality of underwater images, various methods based on prior enhancement, physical models and deep learning have been fully explored. Prior-based methods aim to directly process image pixel values ​​to enhance specific image features such as color, contrast and brightness; physical model-based methods use image characteristics and physical imaging models to restore clear images. Recently, deep neural networks have achieved remarkable performance in both high-level visual tasks and image processing due to their powerful modeling capabilities and ability to learn rich features from a large amount of training data. At the same time, some underwater image enhancement methods based on deep learning have also been proposed to improve image quality by extracting effective features from synthetic data. Although these deep learning-based methods have made great progress in underwater image tasks, the performance of current methods still has a lot of room for improvement. Underwater images have different types of distortions. Some deep learning-based methods adopt a fixed end-to-end supervised training method, which lacks sufficient flexibility to handle degraded images, resulting in loss of image details. Summary of the invention

[0003] The purpose of the present invention is to provide an underwater image enhancement method and system based on a deep cascade residual network, which is conducive to correcting the color deviation of underwater images, improving contrast and clarity, and improving the overall visual effect.

[0004] To achieve the above object, the technical solution adopted by the present invention is: an underwater image enhancement method based on a deep cascade residual network, comprising the following steps:

[0005] Step S1: construct a deep cascade residual network and set its parameters; construct a training set and a test set in proportion, wherein the training set includes underwater degraded images and their corresponding real images;

[0006] Step S2: the underwater degraded image in the training set is divided into blocks according to a set ratio, and then respectively input into the three cascade subnetworks of the deep cascade residual network, so that the deep cascade residual network performs forward propagation to obtain a clear image output by the trained network;

[0007] Step S3: calculating the loss value of the output image of the deep cascade residual network compared with the corresponding real image, and performing error back propagation according to the loss value to update the weight value of the deep cascade residual network;

[0008] Step S4: Determine whether the deep cascade residual network has been trained. If so, select the best model of the trained deep cascade residual network and execute step S5, otherwise return to execute step S2;

[0009] Step S5: input the test set into the best model of the deep cascade residual network for testing, and judge whether the best model meets the expected requirements according to the test results, if yes, execute the next step S6, otherwise return to re-execute step S2;

[0010] Step S6: input the underwater degraded image to be enhanced into the tested deep cascade residual network to obtain an enhanced underwater image.

[0011] Furthermore, the deep cascaded residual network consists of three cascaded subnetworks, which are used to gradually restore the degraded underwater image from coarse to fine; the input image is divided into blocks in a 4-2-1 ratio and input into the deep cascaded residual network, that is, the image is divided into 4 non-overlapping blocks and input into the first subnetwork, the image is divided into 2 non-overlapping blocks and input into the second subnetwork, and the original image is input into the third subnetwork; the first two subnetworks use a gated codec subnetwork for learning contextual information, and the third subnetwork uses an original resolution subnetwork for retaining the required fine texture without using any up- and down-sampling operations; in order to further improve the information transfer and visual quality between subnetworks, the deep cascaded residual network embeds different modules between different subnetworks: embeds a detail enhancement module DEB to learn the multi-scale features of the image; and embeds a supervised restoration module SRB to fuse previous information for final restoration.

[0012] Furthermore, the gated codec subnetwork firstly adopts a channel attention module to consider the different weighted information contained in different channel features, and secondly utilizes a dilated convolutional layer instead of a transposed convolutional layer to improve the spatial resolution of features in the decoder, further expand the receptive field, and avoid detail loss.

[0013] Furthermore, the original resolution subnetwork retains details from the input image to the output image without using any downsampling operation; considering the influence of the color and water body of the underwater image, the original resolution subnetwork adopts channel attention blocks and pixel attention blocks to obtain pixel and channel information to produce better enhancement; the original resolution subnetwork is composed of multiple original resolution blocks, each of which contains a channel attention block and a pixel attention block.

[0014] Furthermore, the detail enhancement module embeds detail features of different scales based on a multi-layer pyramid structure to obtain the final result; the detail enhancement module includes two 3×3 front ends and other 1×1 convolutional layers; first, the output of the first subnet passes through the front end convolutional layer, and the output of the front end convolutional layer is downsampled by 1 / 8, 1 / 16, and 1 / 32 to establish a three-scale detail pyramid; secondly, the 1×1 convolutional layer is used for dimensionality reduction to upsample the image to the original size; finally, its outputs are connected and a 3×3 convolutional layer is used to generate the final output; by fusing features of different scales, the details of the underwater image in the first subnet are reconstructed, and the rich detail feature map is passed to the next subnet; the detail enhancement module is specifically expressed as follows:

[0015] r 0 =σ(C 3-1 (C 3-2 (I net 1-out ))),

[0016] r 1 =D 8 (r 0 ),r 2 =D 16 (r 0 ),r 3 =D 32 (r 0 ),

[0017] r 11 =σ(C 1-1 (r 1 )),r 22 =σ(C 1-2 (r 2 )),r 33 =σ(C 1-3 (r 3 )), (1)

[0018] r 4 =U 8 (r 11 ),r 5 =U 16 (r 22 ),r 6 =U 32 (r 33 ),

[0019] D out =C 3-3 (Cat(r 4 ,r 5 ,r 6 )),

[0020] Among them C i-jrepresents the convolution layer, i represents the size of the convolution kernel, j represents the jth convolution layer, σ is the ReLU activation function, and D p and U p They represent pooling and upsampling operations respectively, and p represents the scale.

[0021] Furthermore, the supervised restoration module uses the output of the second subnet as a supervision signal, and with the help of supervised prediction, generates an attention map to suppress features with less information and only allow useful features to be trained; the process is expressed as follows: first, a 1×1 convolutional layer is used to process the output of the second subnet to generate the corresponding residual image, i.e., y 0 At the same time, the input image of the third subnet is processed in the same way to generate y 1 ; Then y 1 Add to y 0 In the above example, y is generated. 2 , an attention map is generated through a 1×1 convolution layer and a sigmoid activation function; secondly, the generated attention map is compared with y 0 Multiply to get y 3 ,y 3 Contains more useful information for enhancing the image; third, using skip connections, y 3 Combined with the supervision signal, y 4 ; Finally, y 4 and 1 Combined, the final feature map is obtained and input into the original resolution sub-network; the specific representation is as follows:

[0022] y 0 =C 1-4 (Out Stage2 ),y 1 =C 1-5 (In Stage3 ),

[0023] y 2 =y 0 +y 1 ,

[0024] y 3 =ω(C 1-6 (y 2 ))*y 0 , (2)

[0025] y 4 =y 3 +Out Sub-Network-2 ,

[0026] S out =Cat(y 4 ,y 1 ),

[0027] Where ω is the sigmoid activation function, C i-j represents the convolution layer, i represents the size of the convolution kernel, and j represents the jth convolution layer.

[0028] Furthermore, the weighted sum of the smooth L1 loss and the perceptual loss is used as the network training loss to evaluate the network training process in real time, and to save the trained network and data in real time; wherein the smooth L1 loss function is expressed as:

[0029]

[0030]

[0031] Among them, y′ i and i Represents the real image and enhanced image at pixel i, and N is the total number of pixels. In order to obtain a more realistic image, a perceptual loss function is introduced, which measures the feature difference between the output image and the real image.

[0032] The perceptual loss function is expressed as:

[0033]

[0034] Among them, V j (Φ(y′ i )) and V j Φ(y i ) represent the enhanced feature map and the real feature map of the i-th layer of the VGG network respectively; C j , H j , W j represents the dimension of the feature map of the jth convolutional layer in the VGG network; M is the number of features used in the perceptual loss function;

[0035] The total loss function is the weighted sum of the above two functions, expressed as:

[0036] L loss =L S +λ*L per (6)

[0037] Among them, λ is used to adjust the relative weights of each component of the perceptual loss function.

[0038] Furthermore, the performance evaluation indicators PSNR and SSIM with reference, and the performance evaluation indicators UCIQE and UIQM without reference are used to evaluate the network training process.

[0039] Furthermore, the training adopts the underwater real dataset UIEB; the UIEB dataset consists of 890 real underwater degraded images and their corresponding real images and 60 underwater degraded images to be enhanced.

[0040] The present invention also provides an underwater image enhancement system based on a deep cascade residual network, comprising a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the above-mentioned method steps can be implemented.

[0041] Compared with the prior art, the present invention has the following beneficial effects: it provides an underwater image enhancement method and system based on a deep cascade residual network, which solves the problem that the existing underwater image enhancement algorithm cannot simultaneously solve multiple distortions underwater. The method constructs a deep cascade residual network, and enhances the degraded image from coarse to fine through several cascade sub-networks. The first two sub-networks use attention and gate fusion strategies to learn multi-scale contextual information, while the last sub-network is used to retain fine spatial details. In order to further generate realistic images, the method also embeds detail enhancement blocks and supervised recovery modules between different sub-networks, and uses detail recovery and attention supervision to gradually refine the rough image residues. Experimental results show that the present invention can correct the color deviation of underwater images, improve contrast and clarity, and improve the overall visual effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a flow chart of a method implementation of an embodiment of the present invention;

[0043] Figure 2 is a general framework diagram of a deep cascaded residual network in an embodiment of the present invention;

[0044] Figure 3 is a structural diagram of the original resolution subnetwork in an embodiment of the present invention;

[0045] Figure 4 is a structural diagram of a detail enhancement module in an embodiment of the present invention;

[0046] Figure 5 It is a structural diagram of the supervision and recovery module in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0048] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0049] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0050] like Figure 1 As shown, this embodiment provides an underwater image enhancement method based on a deep cascade residual network, comprising the following steps:

[0051] Step S1: construct a deep cascade residual network (CURE-Net) and set its parameters; construct a training set and a test set in proportion, and the training set includes underwater degraded images and their corresponding real images.

[0052] Step S2: The underwater degraded images in the training set are divided into blocks according to a set ratio, and then respectively input into the three cascade subnetworks of the deep cascade residual network, so that the deep cascade residual network performs forward propagation to obtain a clear image output by the trained network.

[0053] Step S3: Calculate the loss value of the output image of the deep cascade residual network compared to the corresponding real image, and perform error back propagation according to the loss value to update the weight value of the deep cascade residual network.

[0054] Step S4: Determine whether the deep cascade residual network has been trained. If so, select the best model of the trained deep cascade residual network and execute step S5; otherwise, return to execute step S2.

[0055] Step S5: Input the test set into the best model of the deep cascade residual network for testing, and determine whether the best model meets the expected requirements based on the test results. If so, execute the next step S6, otherwise return to re-execute step S2.

[0056] Step S6: input the underwater degraded image to be enhanced into the tested deep cascade residual network to obtain an enhanced underwater image.

[0057] like Figure 2As shown in the figure, the deep cascade residual network consists of three cascade subnetworks, which are used to gradually restore the degraded underwater image from coarse to fine. The input image is divided into blocks in a 4-2-1 ratio and input into the deep cascade residual network, that is, the image is divided into 4 non-overlapping blocks and input into the first subnetwork, the image is divided into 2 non-overlapping blocks and input into the second subnetwork, and the original image is input into the third subnetwork. The first two subnetworks use a gated encoder-decoder subnetwork (Gate Encoder-Decoder Sub-Network) to learn contextual information, and the third subnetwork uses an original resolution subnetwork (Original Resolution Sub-Network) to retain the required fine texture without using any up- and down-sampling operations. In order to further improve the information transfer and visual quality between subnetworks, the deep cascade residual network embeds different modules between different subnetworks: embeds a detail enhancement module DEB (Detail Enhancement Block) to learn the multi-scale features of the image; and embeds a supervised recovery module SRB (Supervised Recovery Block) to fuse previous information for final restoration.

[0058] like Figure 2 As shown in GESNet, the gated codec subnetwork first uses a channel attention block to consider the different weighted information contained in different channel features, and then uses a dilated convolutional layer instead of a transposed convolutional layer to improve the spatial resolution of features in the decoder, further expand the receptive field, and avoid detail loss.

[0059] like Figure 3 As shown, the original resolution sub-network retains the details from the input image to the output image without using any downsampling operation; considering the color of the underwater image and the influence of the water body, the original resolution sub-network adopts the channel attention block and the pixel attention block to obtain the pixel and channel information to produce better enhancement; the original resolution sub-network is composed of multiple original resolution blocks, each of which contains a channel attention block and a pixel attention block.

[0060] like Figure 4As shown in the figure, the detail enhancement module embeds detail features of different scales based on a multi-layer pyramid structure to obtain the final result; the detail enhancement module includes two 3×3 front ends and other 1×1 convolutional layers; first, the output of the first subnet passes through the front end convolutional layer, and the output of the front end convolutional layer is downsampled by 1 / 8, 1 / 16, and 1 / 32 to establish a three-scale detail pyramid; secondly, the 1×1 convolutional layer is used for dimensionality reduction to upsample the image to the original size; finally, its outputs are connected and a 3×3 convolutional layer is used to generate the final output; by fusing features of different scales, the details of the underwater image in the first subnet are reconstructed, and the rich detail feature map is passed to the next subnet; the detail enhancement module helps to restore the color of the underwater image and improve the visibility of the underwater image, which is specifically expressed as follows:

[0061] r 0 =σ(C 3-1 (C 3-2 (I net 1-out ))),

[0062] r 1 =D 8 (r 0 ),r 2 =D 16 (r 0 ),r 3 =D 32 (r 0 ),

[0063] r 11 =σ(C 1-1 (r 1 )),r 22 =σ(C 1-2 (r 2 )),r 33 =σ(C 1-3 (r 3 )), (1)

[0064] r 4 =U 8 (r 11 ),r 5 =U 16 (r 22 ),r 6 =U 32 (r 33 ),

[0065] D out =C 3-3 (Cat(r 4 ,r 5 ,r 6 )),

[0066] Among them C i-j represents the convolution layer, i represents the size of the convolution kernel, j represents the jth convolution layer, σ is the ReLU activation function, and D p and U p They represent pooling and upsampling operations respectively, and p represents the scale.

[0067] like Figure 5 As shown in Figure 1, the supervised restoration module uses the output of the second subnet as a supervisory signal. With the help of supervised prediction, an attention map is generated to suppress features with less information and only allow useful features to be trained. The process is expressed as follows: First, a 1×1 convolutional layer is used to process the output of the second subnet to generate the corresponding residual image, i.e., y 0 At the same time, the input image of the third subnet is processed in the same way to generate y 1 ; Then y 1 Add to y 0 In the above example, y is generated. 2 , an attention map is generated through a 1×1 convolution layer and a sigmoid activation function; secondly, the generated attention map is compared with y 0 Multiply to get y 3 ,y 3 Contains more useful information for enhancing the image; third, using skip connections, y 3 Combined with the supervision signal, y 4 ; Finally, y 4 and 1 Combined, the final feature map is obtained and input into the original resolution sub-network; the specific representation is as follows:

[0068] y 0 =C 1-4 (Out Stage2 ),y 1 =C 1-5 (In Stage3 ),

[0069] y 2 =y 0 +y 1 ,

[0070] y 3 =ω(C 1-6 (y 2 ))*y 0 , (2)

[0071] y 4 =y 3 +Out Sub-Network-2 ,

[0072] S out =Cat(y4 ,y 1 ),

[0073] Where ω is the sigmoid activation function, C i-j represents the convolution layer, i represents the size of the convolution kernel, and j represents the jth convolution layer.

[0074] In this embodiment, the weighted sum of the smooth L1 loss and the perceptual loss is used as the network training loss, the network training process is evaluated in real time, and the trained network and data are saved in real time; wherein the smooth L1 loss function is expressed as:

[0075]

[0076]

[0077] Among them, y′ i and i Represents the real image and enhanced image at pixel i, and N is the total number of pixels. In order to obtain a more realistic image, a perceptual loss function is introduced, which measures the feature difference between the output image and the real image.

[0078] The perceptual loss function is expressed as:

[0079]

[0080] Among them, V j (Φ(y′ i )) and V j Φ(y i ) represent the enhanced feature map and the real feature map of the i-th layer of the VGG network respectively; C j , H j , W j represents the dimension of the feature map of the jth convolutional layer in the VGG network; M is the number of features used in the perceptual loss function;

[0081] The total loss function is the weighted sum of the above two functions, expressed as:

[0082] L loss =L S +λ*L per (6)

[0083] Among them, λ is used to adjust the relative weights of each component of the perceptual loss function.

[0084] In this embodiment, the performance evaluation indicators PSNR and SSIM with reference, and the performance evaluation indicators UCIQE and UIQM without reference are used to evaluate the network training process.

[0085] In this embodiment, the underwater real data set UIEB is used for training; the UIEB data set consists of 890 real underwater degraded images and their corresponding real images and 60 underwater degraded images to be enhanced.

[0086] This embodiment also provides an underwater image enhancement system based on a deep cascade residual network, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the above-mentioned method steps can be implemented.

[0087] In this embodiment, experiments are conducted to prove that the method proposed in the present invention is superior to the most advanced methods. The comparison algorithms include: IBLA, RGHS, ULAP, UWCNN WaterNet, LCNet and Ucolor. The experiment is conducted on the UIEB dataset, and the specific experimental results are as follows:

[0088]

[0089]

[0090] In addition, this embodiment also conducts a module ablation experiment to prove the effectiveness of the module proposed in the present invention. The specific data are shown in the following table:

[0091]

[0092] The UIEB test results in the table show the performance improvement when using different modules. Obviously, when the Detail Enhancement Block and the Supervisory Recovery Block are applied simultaneously between two subnets, the PSNR reaches a maximum value of 26.55db; when the Supervisory Recovery Block or the Detail Enhancement Block is not used, the performance of the network is affected to varying degrees; if there is no connection between any modules between the subnets, the performance of the network drops significantly, and the PSNR can only reach 25.08db. The reasonable use of the Detail Enhancement Block and the Supervisory Recovery Block provides a more outstanding contribution to the network.

[0093] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0094] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

[0098] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

Claims

1. An underwater image enhancement method based on a deep cascade residual network, characterized in that: The following steps are involved: Step S1: construct a deep cascade residual network and set its parameters; construct a training set and a test set in proportion, wherein the training set includes underwater degraded images and their corresponding real images; Step S2: the underwater degraded image in the training set is divided into blocks according to a set ratio, and then respectively input into the three cascade subnetworks of the deep cascade residual network, so that the deep cascade residual network performs forward propagation to obtain a clear image output by the trained network; Step S3: calculating the loss value of the output image of the deep cascade residual network compared with the corresponding real image, and performing error back propagation according to the loss value to update the weight value of the deep cascade residual network; Step S4: Determine whether the deep cascade residual network has been trained. If so, select the best model of the trained deep cascade residual network and execute step S5, otherwise return to execute step S2; Step S5: input the test set into the best model of the deep cascade residual network for testing, and judge whether the best model meets the expected requirements according to the test results, if yes, execute the next step S6, otherwise return to re-execute step S2; Step S6: inputting the underwater degraded image to be enhanced into the tested deep cascade residual network to obtain an enhanced underwater image; The deep cascade residual network consists of three cascade subnetworks, which are used to gradually restore the degraded underwater image from coarse to fine. The input image is divided into blocks according to the ratio of 4-2-1 and input into the deep cascade residual network, that is, the image is divided into 4 non-overlapping blocks and input into the first subnet, the image is divided into 2 non-overlapping blocks and input into the second subnet, and the original image is input into the third subnet; the first two subnets use the gated codec subnet to learn contextual information, and the third subnet uses the original resolution subnet to retain the required fine texture without using any up-sampling or down-sampling operations; in order to further improve the information transfer and visual quality between subnets, the deep cascade residual network embeds different modules between different subnets: embeds the detail enhancement module DEB to learn the multi-scale features of the image; embeds the supervised restoration module SRB to fuse the previous information for the final restoration; The gated codec subnetwork first uses a channel attention module to consider the different weighted information contained in different channel features, and then uses dilated convolutional layers instead of transposed convolutional layers to improve the spatial resolution of features in the decoder, further expanding the receptive field and avoiding detail loss; The original resolution subnetwork retains the details from the input image to the output image without using any downsampling operation; considering the color of the underwater image and the influence of the water body, the original resolution subnetwork adopts channel attention blocks and pixel attention blocks to obtain pixel and channel information to produce better enhancement; the original resolution subnetwork is composed of multiple original resolution blocks, each of which contains a channel attention block and a pixel attention block; The detail enhancement module embeds detail features of different scales based on a multi-layer pyramid structure to obtain the final result; the detail enhancement module includes two 3×3 front ends and other 1×1 convolutional layers; first, the output of the first subnet passes through the front end convolutional layer, and the output of the front end convolutional layer is downsampled by 1 / 8, 1 / 16, and 1 / 32 to establish a three-scale detail pyramid; secondly, the 1×1 convolutional layer is used for dimensionality reduction to upsample the image to the original size; finally, its outputs are connected and a 3×3 convolutional layer is used to generate the final output; by fusing features of different scales, the details of the underwater image in the first subnet are reconstructed, and the rich detail feature map is passed to the next subnet; the detail enhancement module is specifically represented as follows: r0=σ(C 3-1 (C 3-2 (I net1-out ))), r1=D8(r0),r2=D 16 (r0),r3=D 32 (r0), r 11 =σ(C 1-1 (r1)),r 22 =σ(C 1-2 (r2)),r 33 =σ(C 1-3 (r3)), (1) r4=U8(r 11 ),r5=U 16 (r 22 ),r6=U 32 (r 33 ), D out =C 3-3 (Cat(r4,r5,r6)), Among them C i-j represents the convolution layer, i represents the size of the convolution kernel, j represents the jth convolution layer, σ is the ReLU activation function, and D p and U p Represent the pooling and upsampling operations respectively, and p represents the scale; The supervised restoration module uses the output of the second subnetwork as a supervision signal, and with the help of supervised prediction, generates an attention map to suppress features with less information and only allow useful features to be trained; The process is represented as follows: first, a 1×1 convolutional layer is used to process the output of the second subnet to generate the corresponding residual image, i.e., y0; at the same time, the input image of the third subnet is processed in the same way to generate y1; then y1 is added to y0 to generate y2, and the attention map is generated through a 1×1 convolutional layer and a sigmoid activation function; secondly, the generated attention map is multiplied with y0 to obtain y3, which contains more useful information for enhancing the image; thirdly, using a skip connection, y3 is combined with the supervision signal to generate y4; finally, y4 and y1 are combined to obtain the final feature map, which is input to the original resolution subnet; the specific representation is as follows: y0=C 1-4 (Out Stage2 ),y1=C 1-5 (In Stage3 ), y2=y0+y1, y3=ω(C 1-6 (y2))*y0, (2) y4=y3+Out Stage2 , S out =Cat(y4,y1), Where ω is the sigmoid activation function, C i-j represents the convolution layer, i represents the size of the convolution kernel, and j represents the jth convolution layer.

2. The underwater image enhancement method based on deep cascade residual network according to claim 1, characterized in that: The weighted sum of the smooth L1 loss and the perceptual loss is used as the network training loss to evaluate the network training process in real time and save the trained network and data in real time. The smooth L1 loss function is expressed as: Among them, y i ′ and y i Represents the real image and enhanced image at pixel i, and N is the total number of pixels. In order to obtain a more realistic image, a perceptual loss function is introduced, which measures the feature difference between the output image and the real image. The perceptual loss function is expressed as: Among them, V j (Φ(y i ′)) and V j Φ(y i ) represent the enhanced feature map and the real feature map of the i-th layer of the VGG network respectively; C j , H j , W j represents the dimension of the feature map of the jth convolutional layer in the VGG network; M is the number of features used in the perceptual loss function; The total loss function is the weighted sum of the above two functions, expressed as: L loss =L S +λ*L per (6) Among them, λ is used to adjust the relative weights of each component of the perceptual loss function.

3. The underwater image enhancement method based on deep cascade residual network according to claim 2 is characterized in that: The network training process is evaluated using the reference performance evaluation indicators PSNR and SSIM, as well as the non-reference performance evaluation indicators UCIQE and UIQM.

4. The underwater image enhancement method based on deep cascade residual network according to claim 1, characterized in that: The training uses the real underwater dataset UIEB; the UIEB dataset consists of 890 real underwater degraded images and their corresponding real images and 60 underwater degraded images to be enhanced.

5. An underwater image enhancement system based on a deep cascade residual network, characterized in that: The method comprises a memory, a processor and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method steps as described in any one of claims 1 to 4 can be implemented.