[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115439361B - Underwater image enhancement method based on self-adversarial generative adversarial network - Google Patents

Underwater image enhancement method based on self-adversarial generative adversarial network Download PDF

Info

Publication number
CN115439361B
CN115439361B CN202211072112.9A CN202211072112A CN115439361B CN 115439361 B CN115439361 B CN 115439361B CN 202211072112 A CN202211072112 A CN 202211072112A CN 115439361 B CN115439361 B CN 115439361B
Authority
CN
China
Prior art keywords
image
discriminator
self
generator
adversarial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211072112.9A
Other languages
Chinese (zh)
Other versions
CN115439361A (en
Inventor
杨淼
董金耐
王海文
邹晔
谢卓冉
蔡立鹏
张汉森
蒋海阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Ocean University
Original Assignee
Jiangsu Ocean University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Ocean University filed Critical Jiangsu Ocean University
Priority to CN202211072112.9A priority Critical patent/CN115439361B/en
Publication of CN115439361A publication Critical patent/CN115439361A/en
Application granted granted Critical
Publication of CN115439361B publication Critical patent/CN115439361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an underwater image enhancement method based on a self-countermeasure generation countermeasure network, which is used for realizing the improvement of the underwater image quality based on a self-countermeasure mode and a double-input type discriminator. A new constraint is added to the enhancement process by the self-countermeasure mode, i.e., the constraint generator causes the second generated image to be superior to the first generated image. The guiding function of the discriminator on the generator is enhanced through the dual-input discriminator, and the quality of the enhanced image is further improved.

Description

基于自对抗生成对抗网络的水下图像增强方法Underwater image enhancement method based on self-adversarial generative adversarial network

技术领域Technical field

本发明属于图像处理技术领域,具体涉及基于自对抗生成对抗网络的水下图像增强方法。The invention belongs to the field of image processing technology, and specifically relates to an underwater image enhancement method based on a self-confrontational generative adversarial network.

背景技术Background technique

由于水下图像没有参考图像,水下图像增强数据集中的成对水下图像往往是通过生成退化水下图像或对水下图像进行增强得到的,在使用这些图像训练模型时,增强后图像的质量只能接近于原始水下图像的质量或其他方法增强后的水下图像的质量。不使用成对数据而是使用水下图像和自然图像进行训练的方法,虽然提高了增强后图像质量的上限,但由于使用了两个不同域的图像,会导致增强结果不自然,图像质量退化。Since underwater images do not have reference images, the paired underwater images in the underwater image enhancement dataset are often obtained by generating degraded underwater images or enhancing underwater images. When using these images to train the model, the enhanced image The quality can only be close to the quality of the original underwater image or the quality of the underwater image enhanced by other methods. The method of training using underwater images and natural images instead of paired data improves the upper limit of image quality after enhancement. However, due to the use of images from two different domains, the enhancement results will be unnatural and the image quality will be degraded. .

发明内容Contents of the invention

本发明提出一种基于自对抗生成对抗网络的水下图像增强方法,实现不需要水下参考图像,而是在常用的自然图像质量数据库上进行训练,将质量改进转移到低质量水下图像上实现水下图像增强。The present invention proposes an underwater image enhancement method based on a self-confrontational generative adversarial network, which does not require underwater reference images, but trains on a commonly used natural image quality database to transfer quality improvements to low-quality underwater images. Achieve underwater image enhancement.

为了实现上述目的,本发明采用的技术方案如下:In order to achieve the above objects, the technical solutions adopted by the present invention are as follows:

基于自对抗生成对抗网络的水下图像增强方法,采用自对抗模式,其整体结构如图1所示,自对抗模式并没有相应的参考图像作为训练的最终目标,在自对抗模式中输入图像经过生成器G后得到输出图像,输出图像/>再次输入到生成器G中得到输出图像G(G(x)),两幅输出图像同时输入到判别器D中进行判别,目的在于约束生成器,使第二次生成的图像优于第一次生成的图像。The underwater image enhancement method based on the self-confrontation generative adversarial network adopts the self-confrontation mode. Its overall structure is shown in Figure 1. The self-confrontation mode does not have a corresponding reference image as the final target of training. In the self-confrontation mode, the input image is Get the output image after generator G , output image/> Input it again into the generator G to get the output image G(G(x)). The two output images are simultaneously input into the discriminator D for discrimination. The purpose is to constrain the generator so that the second generated image is better than the first one. generated image.

自对抗模式的整体优化目标为:The overall optimization goals of the self-confrontation mode are:

(4-1) (4-1)

自对抗模式首先由生成器G得到一幅输出图像:然后将/>输入到生成器中得到G(G(x)),此时,固定生成器G训练判别器D:The self-adversarial mode first obtains an output image from the generator G : Then change/> Input into the generator to get G(G(x)). At this time, the fixed generator G trains the discriminator D:

(4-2) (4-2)

在公式4-2中,来自生成器的第二次输出图像G(G(x))希望被D判别为正样本,而第一次输出的图像希望被判别为负样本,此时训练生成器G:In Formula 4-2, the second output image G(G(x)) from the generator is expected to be judged as a positive sample by D, while the first output image It is hoped that the sample will be judged as a negative sample. At this time, the generator G is trained:

(4-3) (4-3)

在公式4-3中,则希望第一次输出的图像要优于第二次输出图像G(G(x)),以此形成生成器和判别器之间的对抗,但是与对抗训练不同,在这个对抗过程中,并没有一组真正的正样本来与负样本之间形成对抗,而是负样本处于与其自身的对抗状态。In formula 4-3, you want the first output image It is better than the second output image G(G(x)), thus forming a confrontation between the generator and the discriminator. However, unlike adversarial training, in this confrontation process, there is no real set of positive samples to It forms a confrontation with negative samples, but the negative samples are in a state of confrontation with themselves.

基于自对抗模式的生成对抗水下图像增强方法:Generative adversarial underwater image enhancement method based on self-adversarial mode:

本文提出的方法由一个生成器和两个判别器组成,方法的整体流程如图2所示,图中x为低质量图像,y为高质量图像,G是生成器,D是对抗训练的判别器,是自对抗模式的判别器,两个判别器的结构均为提出的双输入图像质量对比模型结构,而不是传统的单输入二分类器结构来判断图像真假,因此能获得更好的判别效果。G(x)是第一次增强后的图像,G(G(x))是第二次增强得到的图像。其中,判别器/>和生成器G共同构成了自对抗模式。原始图像x经过生成器G增强后,输入到判别器D中与高质量图像y进行判别,然后再次输入到生成器G中进行增强,然后由自对抗判别器/>对两幅增强后的图像进行判别,通过判别器的来约束生成过程中的质量改进,通过反复迭代增强得到质量更好的图像。另外,判别器D是Patch-GAN结构和判别器/>是二分类判别器结构,两者结合可以从全局和细节两个角度进行判别。The method proposed in this article consists of a generator and two discriminators. The overall process of the method is shown in Figure 2. In the figure, x is a low-quality image, y is a high-quality image, G is the generator, and D is the discriminator of adversarial training. device, It is a self-confrontation mode discriminator. The structure of the two discriminators is the proposed dual-input image quality comparison model structure, instead of the traditional single-input two-classifier structure to determine whether the image is true or false, so it can obtain better discriminant results. . G(x) is the image after the first enhancement, and G(G(x)) is the image after the second enhancement. Among them, the discriminator/> Together with the generator G, it forms a self-confrontation mode. After being enhanced by the generator G, the original image Discriminate the two enhanced images through the discriminator to constrain the quality improvement during the generation process, and obtain better quality images through repeated iterative enhancement. In addition, the discriminator D is the Patch-GAN structure and discriminator/> It is a two-class discriminator structure. The combination of the two can make discrimination from two perspectives: global and detailed.

与现有水下图像处理技术相比,上述技术方案可以得到以下有益效果:Compared with existing underwater image processing technology, the above technical solution can achieve the following beneficial effects:

该方法基于自对抗模式和双输入式判别器来实现水下图像质量提高,通过自对抗模式给增强过程添加一条新的约束,即约束生成器使第二次生成的图像优于第一次生成的图像,通过双输入式判别器加强了判别器对生成器的指导作用,进一步提高增强后图像的质量。This method is based on the self-confrontational mode and the dual-input discriminator to improve the quality of underwater images. The self-confrontational mode adds a new constraint to the enhancement process, that is, the constraint generator makes the second generated image better than the first generated image. The dual-input discriminator strengthens the guiding role of the discriminator on the generator and further improves the quality of the enhanced image.

同时,还使用未配对的自然图像进行训练,然后将质量改进迁移到水下图像上,既在一定程度上解决了成对水下图像数量不足的问题,同时也解决了使用现有的水下图像增强数据集中人工方法生成的成对水下图像训练时存在的问题。实验证明,本方法可以有效地实现水下图像质量的改善,而且生成的图像在视觉上更加美观。At the same time, unpaired natural images are also used for training, and then the quality improvements are transferred to underwater images, which not only solves the problem of insufficient number of paired underwater images to a certain extent, but also solves the problem of using existing underwater images. Problems in training pairs of underwater images generated by artificial methods in image augmentation datasets. Experiments have proven that this method can effectively improve the quality of underwater images, and the generated images are more visually beautiful.

附图说明Description of the drawings

图1是自对抗模式结构图。Figure 1 is a structural diagram of the self-confrontation mode.

图2是方法流程图。Figure 2 is a method flow chart.

图3是生成器结构。Figure 3 is the generator structure.

图4是判别器D结构图。Figure 4 is the structure diagram of discriminator D.

图5是判别器结构图。Figure 5 is the discriminator Structure diagram.

图6是KADID-10k数据集部分图像。Figure 6 is a partial image of the KADID-10k data set.

图7是KonIQ-10k数据集中部分高质量图像。Figure 7 is some high-quality images in the KonIQ-10k data set.

图8是本发明方法增加结果和U45数据集中8种方法的增强结果图。Figure 8 is a diagram showing the increased results of the method of the present invention and the enhanced results of 8 methods in the U45 data set.

图9是本发明方法与其他5种较为先进的水下图像增强方法在U45数据集上进行对比图。Figure 9 is a comparison chart between the method of the present invention and five other more advanced underwater image enhancement methods on the U45 data set.

具体实施方式Detailed ways

下面结合附图对本发明做进一步的说明:The present invention will be further described below in conjunction with the accompanying drawings:

基于自对抗生成对抗网络的水下图像增强方法,其特征在于:所述方法采用自对抗模式,自对抗模式的结构是输入图像x经过生成器G后得到输出图像,输出图像/>再次输入到生成器G中得到输出图像/>,两幅输出图像同时输入到判别器D中进行判别,约束生成器D,使输出图像/>优于输出图像/>An underwater image enhancement method based on a self-confrontational generative adversarial network, which is characterized in that: the method adopts a self-confrontational mode, and the structure of the self-confrontational mode is that the input image x passes through the generator G to obtain the output image , output image/> Input it again into the generator G to get the output image/> , the two output images are input to the discriminator D at the same time for discrimination, and the generator D is constrained so that the output image/> Better than output image/> ;

自对抗模式的整体优化目标为:The overall optimization goals of the self-confrontation mode are:

(4-1) (4-1)

自对抗模式首先由生成器G得到一幅输出图像:然后将/>输入到生成器中得到G(G(x)),此时,固定生成器G训练判别器D:The self-adversarial mode first obtains an output image from the generator G : Then change/> Input into the generator to get G(G(x)). At this time, the fixed generator G trains the discriminator D:

(4-2) (4-2)

在公式4-2中,来自生成器的第二次输出图像G(G(x))希望被D判别为正样本,而第一次输出的图像希望被判别为负样本,此时训练生成器G:In Formula 4-2, the second output image G(G(x)) from the generator is expected to be judged as a positive sample by D, while the first output image It is hoped that the sample will be judged as a negative sample. At this time, the generator G is trained:

(4-3) (4-3)

在公式4-3中,则希望第一次输出的图像要优于第二次输出图像G(G(x)),以此形成生成器和判别器之间的对抗,但是与对抗训练不同,在这个对抗过程中,并没有一组真正的正样本来与负样本之间形成对抗,而是负样本处于与其自身的对抗状态。In formula 4-3, you want the first output image It is better than the second output image G(G(x)), thus forming a confrontation between the generator and the discriminator. However, unlike adversarial training, in this confrontation process, there is no real set of positive samples to It forms a confrontation with negative samples, but the negative samples are in a state of confrontation with themselves.

自对抗模式具体应用到水下图像增强方法如下:The specific application of self-confrontation mode to underwater image enhancement methods is as follows:

S1:原始输入图像x经过生成器G增强后,得到输出图像并输入到判别器D中与高质量图像y进行判别,更新并固定判别器D,更新生成器G;S1: After the original input image x is enhanced by the generator G, the output image is obtained And input it into the discriminator D to discriminate against the high-quality image y, update and fix the discriminator D, and update the generator G;

S2: 输出图像再次输入到生成器G中进行增强得到输出图像/>,输出图像G(G(x))和高质量图像y输入到判别器D中进行判别,并更新判别器D;S2: Output image Input it again into the generator G for enhancement to obtain the output image/> , the output image G(G(x)) and the high-quality image y are input to the discriminator D for discrimination, and the discriminator D is updated;

S3:自对抗判别器对增强后输出图像/>和输出图像/>进行判别,通过判别器/>来约束生成过程中的质量改进,反复迭代增强得到质量更好的图像。S3: Self-adversarial discriminator Output image after enhancement/> and output image/> Discriminate through the discriminator/> To constrain the quality improvement during the generation process, iterative enhancement is used to obtain better quality images.

其中生成器G是一个编解码网络,总体结构如图3所示。编码部分由卷积核大小为3×3卷积连接组成,在每次卷积后增加残差块以增强网络深度和特征提取能力。在每次卷积前使用反射填充确保图像的特征图大小是每次下采样前大小的一半。在每个卷积层之后,使用Batch-norm层和LeakyReLU激活函数来增加网络的鲁棒性和非线性。解码部分由多个上采样级联组成。在每个上采样后,在增加一个残差块来增强了解码部分的图像重建能力。在编码和解码之间采用跳跃连接,以补充下采样过程中丢失的图像信息。最后采用Tanh激活函数避免梯度消失问题。The generator G is an encoding and decoding network, and the overall structure is shown in Figure 3. The encoding part consists of a convolutional connection with a convolution kernel size of 3×3, and a residual block is added after each convolution to enhance network depth and feature extraction capabilities. Reflective padding is used before each convolution to ensure that the feature map size of the image is half of the size before each downsampling. After each convolutional layer, a Batch-norm layer and LeakyReLU activation function are used to increase the robustness and nonlinearity of the network. The decoding part consists of multiple upsampling cascades. After each upsampling, a residual block is added to enhance the image reconstruction capability of the decoding part. Skip connections are used between encoding and decoding to supplement the image information lost during downsampling. Finally, the Tanh activation function is used to avoid the vanishing gradient problem.

判别器具体是使用双重判别器来实现自对抗模式和监督学习,双重判别器结构如图4和图5所示。判别器D是Patch-GAN结构,判别器是传统的二元分类网络结构。判别器D的结构如图4所示,判别器/>的结构如图5所示。两个判别器都有两个输入图像/>和/>,输入图像大小为512×512。两个输入分别进入两个结构相同的特征提取模块。特征提取模块由三个卷积核尺寸为3×3,步长为2的卷积层组成。在特征提取模块之后,将提取的特征图串联起来,将串联后的特征图输入到Inception模块中,该模块包含3个大小不同的卷积层和1个池化层。卷积核的尺寸分别为5×5,3×3,1×1,池化层的尺寸为3×3。之后将经过Inception模块获得的不同大小的卷积层和池化层的特征映射串联起来,输入到Reduction模块中进行下采样。Reduction模块包含两个分支,其中一个分支为单卷积层,卷积核尺寸为3×3,步长大小为2,另一个分支为叠加的三层卷积层,卷积层的卷积核尺寸从上到下分别为为1×1,3×3,3×3,卷积层的步长大小从上到下分别为1,1,2。之后对Reduction两个不同分支进行下采样后的得到的特征图进行连接,使得到的特征映射包含不同深度的网络,获得更丰富的特征信息。最后,经过两个卷积核尺寸为3×3,步长大小为2的卷积层,得到大小为7×7的特征图,判别器/>直接输出7×7的特征图进行判别,判别器D经过自适应平均池化层后,输入到两个全连接层。The discriminator specifically uses a dual discriminator to implement self-confrontation mode and supervised learning. The dual discriminator structure is shown in Figures 4 and 5. The discriminator D is a Patch-GAN structure, the discriminator It is a traditional binary classification network structure. The structure of the discriminator D is shown in Figure 4. Discriminator/> The structure is shown in Figure 5. Both discriminators have two input images/> and/> , the input image size is 512×512. The two inputs enter two feature extraction modules with the same structure. The feature extraction module consists of three convolutional layers with a convolution kernel size of 3×3 and a stride of 2. After the feature extraction module, the extracted feature maps are concatenated, and the concatenated feature maps are input into the Inception module, which contains 3 convolutional layers of different sizes and 1 pooling layer. The sizes of the convolution kernels are 5×5, 3×3, and 1×1 respectively, and the size of the pooling layer is 3×3. Afterwards, the feature maps of convolutional layers and pooling layers of different sizes obtained through the Inception module are concatenated and input into the Reduction module for downsampling. The Reduction module contains two branches. One branch is a single convolution layer with a convolution kernel size of 3×3 and a step size of 2. The other branch is a superimposed three-layer convolution layer with a convolution kernel of the convolution layer. The sizes are 1×1, 3×3, and 3×3 from top to bottom, and the step sizes of the convolutional layers are 1, 1, and 2 from top to bottom. Then, the feature maps obtained after downsampling the two different branches of Reduction are connected, so that the obtained feature map contains networks of different depths and obtains richer feature information. Finally, after two convolutional layers with a convolution kernel size of 3×3 and a step size of 2, a feature map of size 7×7 is obtained, and the discriminator/> Directly output a 7×7 feature map for discrimination. After the discriminator D passes through the adaptive average pooling layer, it is input to two fully connected layers.

具体针对方法训练如下:The specific training methods are as follows:

每次参数更新包含两个步骤。在第一步中,将低质量图像x输入生成器G中, 得到增强后的图像G(x),然后将获得的增强图像G(x)和高质量的图像y输入到判别器D中进行判别,同时更新判别器D的参数,之后,固定判别器D的参数,更新生成器G的参数。在第二步中,将第一步得到的增强图像G(x)输入到生成器G中,得到再次增强后的图像G(G(x)),然后将第二次增强后的图像G(G(x))和高质量的图像y输入到判别器D中进行判别,并更新判别器D的参数,同时,将第二次增强后图像G(G(x))和第一次增强图像G(x)输入到自对抗判别器中进行判别,并更新自对抗判别器/>的参数,之后再次更新生成器G的参数。Each parameter update consists of two steps. In the first step, the low-quality image x is input into the generator G to obtain the enhanced image G(x), and then the obtained enhanced image G(x) and high-quality image y are input into the discriminator D. Discriminate and update the parameters of the discriminator D at the same time. After that, fix the parameters of the discriminator D and update the parameters of the generator G. In the second step, the enhanced image G(x) obtained in the first step is input into the generator G to obtain the enhanced image G(G(x)) again, and then the second enhanced image G( G(x)) and high-quality image y are input to the discriminator D for discrimination, and the parameters of the discriminator D are updated. At the same time, the second enhanced image G(G(x)) and the first enhanced image are G(x) is input to the self-adversarial discriminator Discriminate in and update the self-adversarial discriminator/> parameters, and then update the parameters of generator G again.

方法模型的训练采用了Adam优化器,学习率设置为0.001,batch size设置为2,共迭代训练了50次。训练是在一台配备i7处理器、Nvidia Titan XP GPU和64G内存的计算机上进行的,使用的是Pytorch框架。The method model was trained using the Adam optimizer, the learning rate was set to 0.001, the batch size was set to 2, and a total of 50 iterative trainings were performed. Training was performed on a computer equipped with an i7 processor, Nvidia Titan XP GPU and 64G memory, using the Pytorch framework.

上述训练方法中采用损失函数:The loss function is used in the above training method:

在方法的整个训练过程中包括3个对抗损失、2个感知损失和2个范数损失。在第一个步骤中,本文使用了对抗损失来约束生成器和判别器的优化过程,并使用感知损失和范数损失的加权和作为内容损失,以保证图像在增强过程中保留内容信息。总损失函数如公式(4-4)所示。The entire training process of the method includes 3 adversarial losses, 2 perceptual losses and 2 norm loss. In the first step, this paper uses adversarial loss to constrain the optimization process of the generator and discriminator, and uses perceptual loss and The weighted sum of norm losses is used as content loss to ensure that the image retains content information during the enhancement process. The total loss function is shown in formula (4-4).

(4-4) (4-4)

其中和/>分别是/>范数损失和感知损失的权值,这个数值是通过实验来确定的,在本文中设置为0.1。/>,/>和/>如公式(4-5)至(4-7)所示。in and/> They are/> The weight of norm loss and perceptual loss, this value is determined through experiments and is set to 0.1 in this article. /> ,/> and/> As shown in formulas (4-5) to (4-7).

(4-5) (4-5)

(4-6) (4-6)

(4-7) (4-7)

其中D为判别器,G为生成器,x为输入图像,G(x)为第一个步骤中得到的增强后图像,是在ImageNet数据集上预训练过的VGG-19网络的第j个卷积层。Among them, D is the discriminator, G is the generator, x is the input image, and G(x) is the enhanced image obtained in the first step. is the jth convolutional layer of the VGG-19 network pre-trained on the ImageNet dataset.

在第二个步骤中,本文使用了2个不同的对抗损失,其中一个对抗损失与第一个步骤中的对抗损失相似,用于指导生成器生成的图像质量更接近与参考图像,另一个对抗损失则用于自对抗模式,通过对在两个步骤中得到的两幅增强后图像进行判别,来实现增强结果的进一步提高。同时,为了保留图像内容,使用了感知损失和范数损失的加权和作为约束。总损失函数如公式(4-8)所示。In the second step, this paper uses 2 different adversarial losses, one of which is similar to the adversarial loss in the first step, used to guide the generator to generate an image quality closer to the reference image, and the other adversarial loss The loss is used in the self-confrontational mode to further improve the enhancement results by discriminating the two enhanced images obtained in the two steps. At the same time, in order to preserve the image content, perceptual loss and The weighted sum of norm losses serves as constraints. The total loss function is shown in formula (4-8).

(4-8) (4-8)

和/>分别是/>范数损失和感知损失的权值,这里的取值与第一步中保持一致,,/>,/>和/>如公式(4-9)至(4-12)所示。 and/> They are/> The weights of norm loss and perceptual loss, the values here are consistent with the first step, ,/> ,/> and/> As shown in formulas (4-9) to (4-12).

(4-9) (4-9)

(4-10) (4-10)

(4-11) (4-11)

(4-12) (4-12)

其中是自对抗模式的判别器,G(G(x))为第二个步骤中得到的增强后图像。in is the discriminator of self-adversarial mode, and G(G(x)) is the enhanced image obtained in the second step.

数据集选取:Data set selection:

根据水下图像中存在的低对比度、色偏、低照度、模糊等退化问题,选择自然图像数据集中带有与水下退化类型相近的失真图像和高质量图像来训练提出的水下图像增强方法。According to the degradation problems such as low contrast, color shift, low illumination, and blur existing in underwater images, distorted images and high-quality images with similar underwater degradation types in the natural image data set are selected to train the proposed underwater image enhancement method. .

KADID-10k是一个自然图像质量评价数据集,其中包含81幅原始图像以及这81幅图像对应的25种失真图像,每种失真中包含5个等级,共计10125幅失真图像。本文从KADID-10k数据集的所有失真等级为5的失真图像中,选择了水下图像中存在失真类型包含色彩失真、噪声、低对比度等的失真图像,共计1620幅失真图像,部分图像如图6所示。KADID-10k is a natural image quality evaluation data set, which contains 81 original images and 25 types of distortion images corresponding to these 81 images. Each distortion contains 5 levels, totaling 10125 distortion images. From all distortion images with a distortion level of 5 in the KADID-10k data set, this paper selected distortion images with distortion types in underwater images including color distortion, noise, low contrast, etc., a total of 1620 distorted images, some of which are shown in the figure 6 shown.

KonIQ-10k是一个大型IQA数据集,包含10073幅非人工的自然失真图像,这10073幅自然图像通过投票得到质量得分,由于KADID-10k数据集中的原始参考图像只有81幅,这81幅图像用于训练模型是远远不够的,所以本文从KonIQ-10k数据集中选择了1539幅高质量图像补充到高质量图像集合中,部分图像如7所示。KonIQ-10k is a large IQA dataset that contains 10,073 non-artificial natural distortion images. These 10,073 natural images receive quality scores through voting. Since there are only 81 original reference images in the KADID-10k dataset, these 81 images are It is far from enough to train the model, so this article selected 1539 high-quality images from the KonIQ-10k data set to add to the high-quality image collection. Some images are shown in 7.

使用了U45数据集上的45幅低质量水下图像进行测试,并将本发明方法的增强结果与U45数据集上的中包含的8种水下图像增强方法进行了对比,另外本文还与一些其他最先进的水下图像增强方法进行了对比:45 low-quality underwater images on the U45 data set were used for testing, and the enhancement results of the method of the present invention were compared with 8 underwater image enhancement methods included in the U45 data set. In addition, this article also compared with some Other state-of-the-art underwater image enhancement methods are compared:

在U45数据集上的实验结果对比:Comparison of experimental results on the U45 data set:

U45真实水下图像数据集是一个包含45幅存在不同色差的水下图像、低对比度的水下图像和带雾水下图像,以及8种增强方法对这些水下图像增强后的结果的数据集。将U45数据集作为测试集,并将本发明方法的增强结果与其中包含的所有增强结果进行了对比,如图8所示。The U45 real underwater image data set is a data set that contains 45 underwater images with different color differences, low contrast underwater images and foggy underwater images, as well as the results of 8 enhancement methods to enhance these underwater images. . The U45 data set was used as a test set, and the enhancement results of the method of the present invention were compared with all the enhancement results contained in it, as shown in Figure 8.

图8 中本发明方法增强结果和U45数据集中8种方法的增强结果,最左侧(a)为原始图像,其余的图像从左到右分别来自于(b)CycleGAN,(c)FE,(d)DewaterNet, (e)RB,(f)RED,(g)UDCP,(h)UIBLA,(i)WSCT,(j)本发明方法。In Figure 8, the enhancement results of the method of the present invention and the enhancement results of 8 methods in the U45 data set are shown. The leftmost (a) is the original image, and the remaining images from left to right are from (b) CycleGAN, (c) FE, ( d) DewaterNet, (e) RB, (f) RED, (g) UDCP, (h) UIBLA, (i) WSCT, (j) method of the present invention.

通过图像对比分析:Through image comparison analysis:

(b)CycleGAN实现了校正了色偏,但增强效果不够好,增强结果种带有明显的棋盘格纹理如图8(b)所示。(b) CycleGAN corrects the color shift, but the enhancement effect is not good enough. The enhancement result has an obvious checkerboard texture, as shown in Figure 8(b).

(c)FE的增强结果有明显的红色色偏,如图8(c)所示。(c) The enhancement result of FE has an obvious red color cast, as shown in Figure 8(c).

(d)DewaterNet的增强结果整体颜色偏暗,如图8(d)所示。(d) The overall color of the enhancement result of DewaterNet is darker, as shown in Figure 8(d).

(e)RB增强结果中也出现了一些较暗的图像,如图8(e)所示。(e) Some darker images also appear in the RB enhancement results, as shown in Figure 8(e).

(f)RED的色彩校正不足,如图8(f)所示。(f) RED has insufficient color correction, as shown in Figure 8(f).

(g)UDCP,(h)UIBLA,(i)WSCT不能完全纠正色差,而且部分增强结果的色差更为严重,如图8(g-i)所示。(g) UDCP, (h) UIBLA, (i) WSCT cannot completely correct the chromatic aberration, and the chromatic aberration of some enhancement results is more serious, as shown in Figure 8(g-i).

而本发明方法能很好地纠正各种色差问题,且增强后图像的视觉效果更好,如图8(j)所示。The method of the present invention can well correct various chromatic aberration problems, and the visual effect of the enhanced image is better, as shown in Figure 8(j).

为了进一步证明本发明方法的性能,本文还将本发明方法与其他5种较为先进的水下图像增强方法在U45数据集上进行了对比,如图9所示。In order to further prove the performance of the method of the present invention, this paper also compares the method of the present invention with five other more advanced underwater image enhancement methods on the U45 data set, as shown in Figure 9.

Yang等人提出的方法对偏绿图像无法完全校正色彩,如图9(b)所示。The method proposed by Yang et al. cannot completely correct the color of greenish images, as shown in Figure 9(b).

DeepSESR没有完全实现颜色校正,并且在部分图像中引入了红色色偏,如图9(c)所示。DeepSESR does not fully implement color correction and introduces a red color cast in some images, as shown in Figure 9(c).

UWCNN在浅色图像上引入了更为严重的红色色偏,如图9(d)所示。UWCNN introduces a more severe red color cast on light-colored images, as shown in Figure 9(d).

FUnIEGAN对偏绿水下图像色彩校正后导致图像偏黄,如图9(e)所示。FUnIEGAN's color correction of greenish underwater images results in yellowish images, as shown in Figure 9(e).

HybridDectionGAN增强后的图像偏离了图像本来的颜色,而且图像中出现了明显的棋盘格纹理,如图9(f)所示。The image enhanced by HybridDectionGAN deviates from the original color of the image, and an obvious checkerboard texture appears in the image, as shown in Figure 9(f).

本发明方法实现了色彩校正,同时也保留了图像本来的颜色,视觉效果也更加美观,如图9(g)所示。The method of the present invention realizes color correction, while also retaining the original color of the image, and the visual effect is more beautiful, as shown in Figure 9(g).

使用了两个常见水下图像质量评价指标UCIQE和UIQM来对本发明所提出的方法做出客观评价,UCIQE和UIQM均在值越大时表示水下图像质量越好。评价结果如上表所示,其中每项指标的前三名用粗体标出。从表中可以看出本发明方法在UCIQE上的结果可以达到第三,但在UIQM上的结果并不理想,因为本发明方法在上采样过程中使用了插值来保证输出图像的尺寸与输入图像尺寸一致,因此导致本发明方法在水下图像清晰度度量分量上得分不高,导致整体评价得分不够高。Two common underwater image quality evaluation indicators, UCIQE and UIQM, are used to objectively evaluate the method proposed in the present invention. The larger the value of UCIQE and UIQM, the better the underwater image quality. The evaluation results are shown in the table above, where the top three for each indicator are marked in bold. It can be seen from the table that the result of the method of the present invention on UCIQE can reach the third place, but the result on UIQM is not ideal because the method of the present invention uses interpolation in the upsampling process to ensure that the size of the output image is consistent with the input image. The size is consistent, so the method of the present invention does not score high in the underwater image definition measurement component, resulting in an overall evaluation score that is not high enough.

该方法基于自对抗模式和双输入式判别器来实现水下图像质量提高。通过自对抗模式给增强过程添加一条新的约束,即约束生成器使第二次生成的图像优于第一次生成的图像。通过双输入式判别器加强了判别器对生成器的指导作用,进一步提高增强后图像的质量。同时,还使用未配对的自然图像进行训练,然后将质量改进迁移到水下图像上,既在一定程度上解决了成对水下图像数量不足的问题,同时也解决了使用现有的水下图像增强数据集中人工方法生成的成对水下图像训练时存在的问题。实验证明,本文提出的方法可以有效地实现水下图像质量的改善,而且生成的图像在视觉上更加美观。This method is based on self-confrontational mode and dual-input discriminator to improve underwater image quality. The self-adversarial mode adds a new constraint to the enhancement process, which constrains the generator to make the second generated image better than the first generated image. The dual-input discriminator strengthens the guidance role of the discriminator on the generator and further improves the quality of the enhanced image. At the same time, unpaired natural images are also used for training, and then the quality improvements are transferred to underwater images, which not only solves the problem of insufficient number of paired underwater images to a certain extent, but also solves the problem of using existing underwater images. Problems in training pairs of underwater images generated by artificial methods in image augmentation datasets. Experiments have proven that the method proposed in this article can effectively improve the quality of underwater images, and the generated images are more visually beautiful.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables those skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be practiced in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1.基于自对抗生成对抗网络的水下图像增强方法,其特征在于:所述方法采用自对抗模式,自对抗模式的结构是输入图像x经过生成器G后得到输出图像G(x),输出图像G(x)再次输入到生成器G中得到输出图像G(G(x)),两幅输出图像同时输入到判别器D中进行判别,约束生成器D,使输出图像G(G(x))优于输出图像G(x),自对抗模式具体应用到水下图像增强方法如下:1. An underwater image enhancement method based on a self-confrontational generative adversarial network, characterized in that: the method adopts a self-confrontational mode. The structure of the self-confrontational mode is that the input image x passes through the generator G to obtain the output image G(x), and the output The image G(x) is input into the generator G again to obtain the output image G(G(x)). The two output images are simultaneously input into the discriminator D for discrimination. The generator D is constrained so that the output image G(G(x) )) is better than the output image G(x). The specific application of self-confrontation mode to underwater image enhancement methods is as follows: S1:原始输入图像x经过生成器G增强后,得到输出图像G(x)并输入到判别器D中与高质量图像y进行判别,更新并固定判别器D,更新生成器G;S1: After the original input image x is enhanced by the generator G, the output image G(x) is obtained and input into the discriminator D for discrimination with the high-quality image y. The discriminator D is updated and fixed, and the generator G is updated; S2:输出图像G(x)再次输入到生成器G中进行增强得到输出图像G(G(x)),输出图像G(G(x))和高质量图像y输入到判别器D中进行判别,并更新判别器D;S2: The output image G(x) is input again into the generator G for enhancement to obtain the output image G(G(x)). The output image G(G(x)) and the high-quality image y are input into the discriminator D for discrimination. , and update the discriminator D; S3:自对抗判别器Ds对增强后输出图像G(x)和输出图像G(G(x))进行判别,通过判别器Ds来约束生成过程中的质量改进,反复迭代增强得到质量更好的图像;S3: The self-adversarial discriminator D s distinguishes the enhanced output image G(x) and the output image G(G(x)). The discriminator D s is used to constrain the quality improvement in the generation process. Iterative enhancement is repeated to obtain quality improvement. good images; 自对抗模式的整体优化目标为:The overall optimization goals of the self-confrontation mode are: 自对抗模式首先由生成器G得到一幅输出图像G(x):然后将G(x)输入到生成器G中得到G(G(x)),此时,固定生成器G训练判别器D:The self-adversarial mode first obtains an output image G(x) from the generator G: then inputs G(x) into the generator G to obtain G(G(x)). At this time, the generator G is fixed to train the discriminator D. : 在公式4-2中,来自生成器G的第二次输出图像G(G(x))希望被判别器D判别为正样本,而第一次输出的图像G(x)希望被判别为负样本,此时训练生成器G:In Formula 4-2, the second output image G(G(x)) from the generator G hopes to be judged as a positive sample by the discriminator D, while the first output image G(x) hopes to be judged as a negative sample. Sample, now train the generator G: 在公式4-3中,则希望第一次输出的图像G(x)要优于第二次输出图像G(G(x)),以此形成生成器和判别器之间的对抗。In Formula 4-3, it is hoped that the first output image G(x) is better than the second output image G(G(x)), thus forming a confrontation between the generator and the discriminator. 2.根据权利要求1所述的基于自对抗生成对抗网络的水下图像增强方法,其特征在于:所述生成器G为编解码网络,编码部分由卷积核大小为3×3卷积连接组成,在每次卷积后增加残差块以增强网络深度和特征提取能力;在每次卷积前使用反射填充确保图像的特征图大小是每次下采样前大小的一半;在每个卷积层之后,使用Batch-norm层和LeakyReLU激活函数来增加网络的鲁棒性和非线性;解码部分由多个上采样级联组成;在每个上采样后,在增加一个残差块来增强了解码部分的图像重建能力;在编码和解码之间采用跳跃连接,采用Tanh激活函数避免梯度消失问题。2. The underwater image enhancement method based on self-adversarial generative adversarial network according to claim 1, characterized in that: the generator G is a codec network, and the coding part is connected by a convolution kernel with a size of 3×3. Composition, adding a residual block after each convolution to enhance network depth and feature extraction capabilities; using reflection padding before each convolution to ensure that the feature map size of the image is half of the size before each downsampling; in each convolution After the accumulation layer, the Batch-norm layer and LeakyReLU activation function are used to increase the robustness and nonlinearity of the network; the decoding part consists of multiple upsampling cascades; after each upsampling, a residual block is added to enhance The image reconstruction ability of the decoding part is improved; skip connections are used between encoding and decoding, and Tanh activation functions are used to avoid the vanishing gradient problem. 3.根据权利要求1所述的基于自对抗生成对抗网络的水下图像增强方法,其特征在于:判别器D是Patch-GAN结构,判别器Ds是二元分类网络结构。3. The underwater image enhancement method based on self-antagonistic generative adversarial network according to claim 1, characterized in that: the discriminator D is a Patch-GAN structure, and the discriminator D s is a binary classification network structure. 4.根据权利要求1所述的基于自对抗生成对抗网络的水下图像增强方法,其特征在于:所述S1中,得到输出图像G(x)并输入到判别器D中与高质量图像y进行判别时,需要同时更新判别器D的参数,之后,固定判别器D的参数,更新生成器G的参数。4. The underwater image enhancement method based on self-adversarial generative adversarial network according to claim 1, characterized in that: in said S1, the output image G(x) is obtained and input into the discriminator D together with the high-quality image y When making the discrimination, the parameters of the discriminator D need to be updated at the same time. After that, the parameters of the discriminator D are fixed and the parameters of the generator G are updated. 5.根据权利要求1所述的基于自对抗生成对抗网络的水下图像增强方法,其特征在于:使用对抗损失来约束生成器和判别器的优化过程,并使用感知损失和L1范数损失的加权和作为内容损失,以保证图像在增强过程中保留内容信息。5. The underwater image enhancement method based on self-adversarial generative adversarial network according to claim 1, characterized in that: using adversarial loss to constrain the optimization process of the generator and the discriminator, and using perceptual loss and L1 norm loss The weighted sum of is used as the content loss to ensure that the image retains content information during the enhancement process. 6.根据权利要求1或4所述的基于自对抗生成对抗网络的水下图像增强方法,其特征在于:S2和S3中需要将第二次增强后的图像G(G(x))和高质量的图像y输入到判别器D中进行判别,并更新判别器D的参数,同时,将第二次增强后图像G(G(x))和第一次增强图像G(x)输入到自对抗判别器Ds中进行判别,将第二次增强后图像G(G(x))和第一次增强图像G(x)输入到自对抗判别器Ds中进行判别,并更新自对抗判别器Ds的参数,之后再次更新生成器G的参数。6. The underwater image enhancement method based on self-adversarial generative adversarial network according to claim 1 or 4, characterized in that: in S2 and S3, the second enhanced image G (G (x)) needs to be combined with high The high-quality image y is input to the discriminator D for discrimination, and the parameters of the discriminator D are updated. At the same time, the second enhanced image G(G(x)) and the first enhanced image G(x) are input to the self- Discrimination is performed in the adversarial discriminator D s , and the second enhanced image G(G(x)) and the first enhanced image G(x) are input into the self-adversarial discriminator D s for discrimination, and the self-adversarial discriminant is updated. parameters of generator D s , and then update the parameters of generator G again. 7.根据权利要求6所述的基于自对抗生成对抗网络的水下图像增强方法,其特征在于:对自对抗模式中使用对抗损失,通过得到的两幅增强后图像进行判别,来实现增强结果的进一步提高,同时,为了保留图像内容,使用了感知损失和L1范数损失的加权和作为约束。7. The underwater image enhancement method based on self-confrontation generative adversarial network according to claim 6, characterized in that: using adversarial loss in the self-confrontation mode, the enhancement result is achieved by discriminating the two enhanced images obtained. For further improvement, at the same time, in order to preserve the image content, a weighted sum of perceptual loss and L1 norm loss is used as a constraint.
CN202211072112.9A 2022-09-02 2022-09-02 Underwater image enhancement method based on self-adversarial generative adversarial network Active CN115439361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211072112.9A CN115439361B (en) 2022-09-02 2022-09-02 Underwater image enhancement method based on self-adversarial generative adversarial network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211072112.9A CN115439361B (en) 2022-09-02 2022-09-02 Underwater image enhancement method based on self-adversarial generative adversarial network

Publications (2)

Publication Number Publication Date
CN115439361A CN115439361A (en) 2022-12-06
CN115439361B true CN115439361B (en) 2024-02-20

Family

ID=84246088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211072112.9A Active CN115439361B (en) 2022-09-02 2022-09-02 Underwater image enhancement method based on self-adversarial generative adversarial network

Country Status (1)

Country Link
CN (1) CN115439361B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118469888B (en) * 2024-07-15 2024-09-17 中国空气动力研究与发展中心高速空气动力研究所 Temperature-sensitive paint image contrast enhancement method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833268A (en) * 2020-07-10 2020-10-27 中国海洋大学 A Conditional Generative Adversarial Network-Based Underwater Image Enhancement Method
CN112541865A (en) * 2020-10-15 2021-03-23 天津大学 Underwater image enhancement method based on generation countermeasure network
CN113362299A (en) * 2021-06-03 2021-09-07 南通大学 X-ray security check image detection method based on improved YOLOv4

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11024009B2 (en) * 2016-09-15 2021-06-01 Twitter, Inc. Super resolution using a generative adversarial network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833268A (en) * 2020-07-10 2020-10-27 中国海洋大学 A Conditional Generative Adversarial Network-Based Underwater Image Enhancement Method
CN112541865A (en) * 2020-10-15 2021-03-23 天津大学 Underwater image enhancement method based on generation countermeasure network
CN113362299A (en) * 2021-06-03 2021-09-07 南通大学 X-ray security check image detection method based on improved YOLOv4

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
多输入融合对抗网络的水下图像增强;林森;刘世本;唐延东;;红外与激光工程(05);全文 *

Also Published As

Publication number Publication date
CN115439361A (en) 2022-12-06

Similar Documents

Publication Publication Date Title
CN110097550B (en) Medical image segmentation method and system based on deep learning
CN115661144B (en) Adaptive medical image segmentation method based on deformable U-Net
CN111696046A (en) Watermark removing method and device based on generating type countermeasure network
CN112614070B (en) defogNet-based single image defogging method
CN114581356B (en) Image enhancement model generalization method based on style transfer data augmentation
CN116739899A (en) Image super-resolution reconstruction method based on SAUGAN network
CN111091059A (en) Data equalization method in household garbage plastic bottle classification
CN111339862A (en) A method and device for remote sensing scene classification based on channel attention mechanism
CN111696021A (en) Image self-adaptive steganalysis system and method based on significance detection
CN115439361B (en) Underwater image enhancement method based on self-adversarial generative adversarial network
CN117853805A (en) Method, system and device for generating long-wave infrared image
CN115222592A (en) An underwater image enhancement method and network model training method based on super-resolution network and U-Net network
CN116844008A (en) A content-aware reference-free image quality evaluation method guided by attention mechanism
CN114511475B (en) Image generation method based on improved Cycle GAN
CN112241741A (en) Adaptive Image Attribute Editing Model and Editing Method Based on Classification Adversarial Net
CN117876530B (en) A method for colorization of infrared images based on reference images
CN118333884A (en) Underwater image enhancement method and system based on feature learning and multidimensional replacement
CN113139899A (en) Design method of high-quality light-weight super-resolution reconstruction network model
CN117853342A (en) Underwater image super-resolution reconstruction method based on generation countermeasure network
CN118172283A (en) Marine target image dehazing method based on improved gUNet model
CN117495718A (en) A multi-scale adaptive remote sensing image dehazing method
CN116823659A (en) A low-light image enhancement method based on deep feature extraction
CN116993639A (en) Visible and infrared image fusion method based on structural reparameterization
CN116309545A (en) Single-stage cell nucleus instance segmentation method for medical microscopic image
CN116091918A (en) Land utilization classification method and system based on data enhancement

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant