CN-122023154-A - Underwater image enhancement method and related device
Abstract
The invention discloses an underwater image enhancement method and a related device. The method comprises the steps of constructing an enhanced training model based on an underwater generation countermeasure network, wherein the enhanced training model comprises a generator and a discriminator which adopt a UNet network structure, acquiring an underwater target image, preprocessing the underwater target image, forming an image pair by the underwater target image and the preprocessed underwater target image, constructing a data set, taking the preprocessed underwater target image as an input image of the model, taking the underwater target image as a reference image expected to be output by the model, carrying out alternating countermeasure training on the generator and the discriminator in the enhanced training model based on a preset loss function until the model converges, outputting a current generator as a trained image enhancement model, and inputting the to-be-processed underwater image into the trained image enhancement model to output the underwater enhanced image. The invention can have better image enhancement effect on submarine cable images.
Inventors
- XIONG HUI
- LI TIESHAN
- WEI LI
- YANG CHONG
- FU LIRONG
- LIU JINYI
Assignees
- 海南大学
Dates
- Publication Date
- 20260512
- Application Date
- 20260114
Claims (9)
- 1. An underwater image enhancement method, comprising the steps of: constructing an enhanced training model based on an underwater generated countermeasure network, wherein the enhanced training model comprises a generator and a discriminator adopting a UNet network structure; Acquiring an underwater target image, preprocessing the underwater target image, forming an image pair by the underwater target image and the preprocessed underwater target image, and constructing a data set; Taking the preprocessed underwater target image as an input image of the model, taking the underwater target image as a reference image expected to be output by the model, carrying out alternating countermeasure training on a generator and a discriminator in the enhancement training model based on a preset loss function until the model converges, and outputting the current generator as a trained image enhancement model; inputting the underwater image to be processed into a trained image enhancement model, and outputting the underwater enhanced image.
- 2. An underwater image enhancement method as in claim 1, wherein the preprocessing comprises adding noise and gaussian blur, reducing contrast, color transformation.
- 3. The underwater image enhancement method according to claim 1, wherein the generator comprises a downsampling encoder layer and an upsampling decoder layer with a U-shaped symmetrical structure and a bottleneck layer, the downsampling encoder layer comprises a convolution layer, a batch normalization layer, an activation layer, a convolution layer, a batch normalization layer, an activation layer and a maximum pooling layer which are sequentially connected, the upsampling decoder layer comprises 1 transposed convolution layer and 1 feature extraction layer, the transposed convolution layer is used for restoring the resolution of an image, and jump connection is introduced into the feature extraction layer and used for connecting a resolution feature map obtained by the corresponding downsampling encoding layer with the image obtained by transposed convolution.
- 4. An underwater image enhancement method according to claim 1, wherein the discriminator comprises 4 spectrum normalization convolution layers connected in sequence, and uses one convolution layer and Sigmoid layer as output layers, the spectrum normalization convolution layers comprising a convolution layer and a spectrum normalization layer.
- 5. An underwater image enhancement method as in claim 1, wherein the loss function comprises a antagonism loss and an L1 reconstruction loss of the generator, a true image loss of the arbiter, and a generated image loss as follows: The total loss of the generator is: ; where N is the total number of samples, lambda is the equilibrium super-parameter, For the reference image to be a reference image, For the original input image to be displayed, An image generated by the generator is generated, Judging the probability of the image generated by the generator to be true for the discriminator; the total loss of the discriminator is: ; Wherein, the The probability that the reference image is true is determined for the arbiter.
- 6. The underwater image enhancement method as claimed in claim 1, further comprising the steps of: Dividing the data set into a training set, a verification set and a test set according to a preset proportion; Performing iterative training on the enhanced training model by using the training set, and adjusting the super parameters of the enhanced training model in the training process by using the verification set; And after training is finished, evaluating the performance of the enhanced training model through the test set.
- 7. An underwater image enhancement system, comprising: The building module is used for building an enhanced training model based on an underwater generated countermeasure network, and the enhanced training model comprises a generator and a discriminator which adopt a UNet network structure; the sample module is used for acquiring an underwater target image, preprocessing the underwater target image, forming an image pair by the underwater target image and the preprocessed underwater target image, and constructing a data set; The training module is used for taking the preprocessed underwater target image as an input image of the model, taking the underwater target image as a reference image expected to be output by the model, carrying out alternate countermeasure training on a generator and a discriminator in the enhancement training model based on a preset loss function until the model converges, and outputting the current generator as a trained image enhancement model; the enhancement module is used for inputting the underwater image to be processed into the trained image enhancement model and outputting the underwater enhanced image.
- 8. A computer device comprising a memory for storing a computer program, and a processor for implementing the method according to any one of claims 1 to 6 when the computer program is executed.
- 9. A readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the method according to any of claims 1 to 6.
Description
Underwater image enhancement method and related device Technical Field The invention relates to the technical field of underwater image enhancement, in particular to an underwater image enhancement method and a related device. Background In modern ocean industry, submarine cables carry important works such as resource transportation and information transmission. Submarine cable detection is subjected to extreme environmental challenges such as high voltage, strong corrosion, low visibility (often lower than 1 meter) and the like for a long time, particularly, regular monitoring maintenance is needed, wherein image monitoring is a main mode of fault identification, but acquired cable images often have problems such as color distortion, blurring, noise concentration and the like, so that image enhancement of the submarine cable images is very important. The conventional image enhancement method is very limited in enhancing submarine cable images. Therefore, the deep learning-based method can better capture the characteristic information of the image and is more and more emphasized, and the image enhancement capability of the submarine cable is remarkably improved. The existing technology still faces challenges in landing, namely, marked data is scarce, real seabed defect samples are not enough in groups and are required to be expanded depending on synthesized data, real-time requirements are high, the reasoning time delay of an existing model in edge equipment exceeds 100ms, dynamic monitoring requirements are difficult to meet, model generalization capability is weak, and algorithm failure risks are caused by the difference of the environment across sea areas. Disclosure of Invention The invention provides an underwater image enhancement method and a related device, which are used for solving the problems that the image of a submarine cable cannot be used for fault detection or is low in efficiency due to the defects of poor enhancement effect and weak denoising capability of the traditional image enhancement method in a submarine environment. In order to achieve the above purpose, the technical scheme of the invention is as follows: An underwater image enhancement method, comprising the steps of: constructing an enhanced training model based on an underwater generated countermeasure network, wherein the enhanced training model comprises a generator and a discriminator adopting a UNet network structure; Acquiring an underwater target image, preprocessing the underwater target image, forming an image pair by the underwater target image and the preprocessed underwater target image, and constructing a data set; Taking the preprocessed underwater target image as an input image of the model, taking the underwater target image as a reference image expected to be output by the model, carrying out alternating countermeasure training on a generator and a discriminator in the enhancement training model based on a preset loss function until the model converges, and outputting the current generator as a trained image enhancement model; inputting the underwater image to be processed into a trained image enhancement model, and outputting the underwater enhanced image. Preferably, the preprocessing includes adding noise and gaussian blur, reducing contrast, color transformation. Preferably, the generator comprises a downsampling encoder layer and an upsampling decoder layer with U-shaped symmetrical structures and a bottleneck layer, wherein the downsampling encoder layer comprises a convolution layer, a batch normalization layer, an activation layer, a convolution layer, a batch normalization layer, an activation layer and a maximum pooling layer which are sequentially connected, the upsampling decoder layer comprises 1 transposition convolution layer and 1 feature extraction layer, the transposition convolution layer is used for restoring the resolution of an image, and jump connection is introduced into the feature extraction layer and used for connecting a resolution feature map obtained by the corresponding downsampling encoding layer with the image obtained by transposition convolution. Preferably, the discriminator includes 4 spectrum normalization convolution layers connected in sequence, and uses one convolution layer and Sigmoid layer as output layers, and the spectrum normalization convolution layers include a convolution layer and a spectrum normalization layer. Preferably, the loss function includes a antagonism loss and an L1 reconstruction loss of the generator, a true image loss of the arbiter, and a generated image loss, as follows: The total loss of the generator is: where N is the total number of samples, lambda is the equilibrium super-parameter, For the reference image to be a reference image,For the original input image to be displayed,An image generated by the generator is generated,Judging the probability of the image generated by the generator to be true for the discriminator; the total loss of the