An image super-resolution method based on improved generative adversarial network

By introducing the RFB module and U-net discriminator into the image super-resolution algorithm and optimizing the loss function, the problem of image artifacts and unrealistic details in the generative adversarial network is solved, and the quality of image super-resolution is significantly improved.

CN114463181BActive Publication Date: 2024-09-03CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202210128444.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-11
Publication Date
2024-09-03
Estimated Expiration
2042-02-11

AI Technical Summary

Technical Problem

Existing image super-resolution algorithms, especially methods based on generative adversarial networks, suffer from artifacts and unrealistic details in generated images, resulting in poor quality of reconstructed images.

Method used

Adopt an improved generative adversarial network method, by using the RFB module and residual block in the generator module of ESRGAN, using the U-net discriminator in the discriminator, and introducing LPIPS perceptual loss and L1 loss to optimize the generation loss of the GAN network function to improve the authenticity and quality of images.

Benefits of technology

It effectively reduces artifacts and unrealistic details of the generated images, making the generated images look more realistic and improving the quality of super-resolution images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114463181B
    Figure CN114463181B
Patent Text Reader

Abstract

The present invention relates to an image super-resolution method based on an improved generative adversarial network, and belongs to the field of image processing. A high-resolution image dataset is obtained, and the dataset is divided into a training set and a test set; the high-resolution image training set is bicubicly downsampled to obtain a low-resolution image dataset; an RFB module and a residual block are used in the generator module of ESRGAN, and a U-net discriminator is used instead of a relative discriminator in the discriminator module of ESRGAN; LPIPS perceptual loss and L1 loss are introduced into the loss function to improve the generation loss function of the GAN network. The low-resolution image in the training set is input into the generator G for training, and a reconstructed super-resolution image is output; the output result of the generator G and the original high-resolution image are input into the U-net discriminator D together. U The present invention can effectively improve the quality of super-resolution images and reduce artifacts and unreal details in the images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of image processing and relates to an image super-resolution method based on an improved generative adversarial network. Background Art

[0002] In the field of image processing, image super-resolution has always been a topic worth studying. In the Internet era, image super-resolution has applications in many areas. Image super-resolution technology can use software methods to improve the resolution of images, and can magnify images by a large multiple while maintaining image clarity. These advantages have received widespread attention in Internet communications and storage devices. Image super-resolution technology can well meet users' requirements for image details, allowing humans to obtain better visual and interactive experiences.

[0003] However, the existing image super-resolution algorithms have some problems to a greater or lesser extent. There are currently three types of research methods, namely, interpolation-based algorithms, reconstruction-based algorithms, and learning-based algorithms. Interpolation-based algorithms include: nearest neighborhood method, bilinear interpolation method, etc. These algorithms have good real-time performance, but the obtained super-resolution images are poor. Reconstruction-based algorithms include: convex set projection method, maximum a posteriori probability, etc. These algorithms require prior knowledge of image degradation to achieve reconstruction. However, the quality of the obtained super-resolution image will drop sharply with the increase of magnification. Learning-based algorithms include: image super-resolution based on convolutional neural network (SRCNN), image super-resolution based on generative adversarial network (SRGAN), etc. This type of algorithm has good quality of super-resolution images and can achieve super-resolution reconstruction close to the original image. However, there are also some problems, such as the reconstructed image will have some unrealistic textures and unpleasant artifacts. Summary of the invention

[0004] In view of this, an object of the present invention is to provide an image super-resolution method based on an improved generative adversarial network.

[0005] In order to achieve the above object, the present invention provides the following technical solutions:

[0006] An image super-resolution method based on an improved generative adversarial network, the method comprising the following steps:

[0007] S1: Get a high-resolution image dataset, downsample it using the bicubic interpolation method to obtain the corresponding low-resolution images, and randomly divide them into a training set and a test set;

[0008] S2: The RFB (Receptive Field Block) module and residual block are used in the generator module of ESRGAN, and the U-net discriminator is used instead of the relative discriminator in the discriminator module of ESRGAN;

[0009] S3: Introducing LPIPS perception loss and L1 loss into the loss function to improve the generation loss function of the GAN network;

[0010] S4: Input the low-resolution images in the training set into the generator G for training, and output the reconstructed super-resolution images;

[0011] S5: The output of the generator G is input into the U-net discriminator DU together with the original high-resolution image.

[0012] Optionally, the downsampling multiples of the bicubic interpolation method are 2 times and 4 times respectively.

[0013] Optionally, the use of a U-net discriminator instead of a relative discriminator is specifically: replacing the relative discriminator D with a U-net discriminator D U ; The U-net discriminator judges the authenticity of the generated image, and the loss function is:

[0014]

[0015]

[0016]

[0017] Where E is the averaging operation, is the loss function of the encoder part of the U-net discriminator, is the loss function of the decoder part of the U-net discriminator, L cons is the CutMix regularization function of the U-net discriminator; D enc is the encoder part of the U-net discriminator, D dnc is the decoder part of the U-net discriminator.

[0018] Optionally, the use of the RFB module and the residual block in the generator module of ESRGAN is specifically:

[0019] The first half of the network is the SCDB residual block, and the second half is the RFB module. To speed up the reconstruction, the pixel attention mechanism module PA is used in the upsampling U-PA module.

[0020] Optionally, the S3 is specifically:

[0021] L G =λ 1 L 1 +λ 2 L Lpips +λ 3 L fm +λ 4 Ladv

[0022] Where L 1 is the norm between the pixels of the reconstructed image HR and the original image GT; L Lpips is the LPIPS perception loss function, L fm is the regularization term of the generator, specifically the difference between the decoder and encoder at each layer in the U-net discriminator; L adv is the adversarial loss function; 1 ,λ 2 ,λ 3 ,λ 4 To balance the hyperparameters of various parameters;

[0023]

[0024] Where H, W are the height and width of the image, h, w are the height and width of the patch, y, y 0 They are the feature maps of HR and GT respectively;

[0025]

[0026] In the formula, E is the averaging operation, z is the input low-definition image LR, and D enc is the encoder output of the U-net discriminator, D dnc is the decoder output of the U-net discriminator, and G(z) is the image HR output of the generator;

[0027] Optionally, the S4 is specifically:

[0028] Divide the input low-resolution image into image blocks of a set size;

[0029] The obtained image blocks are input into the generator G for training, and a set number of feature maps are output;

[0030] The feature maps output by several SCDB residual convolutional layers in the first half of the generator are input into the RFB module in the second half;

[0031] The obtained feature map is input into the upsampling module U-PA, and the output result is obtained after upsampling.

[0032] Optionally, the S5 is specifically:

[0033] S5.1: In the U-net discriminator, the discriminator is divided into two parts, the decoder and the encoder. The generated super-resolution image and the original high-resolution image are first convolved with a convolution kernel of size 3×3.

[0034] S5.2: The obtained feature map is passed through a batch normalization convolutional layer;

[0035] S5.3: The feature map obtained in S5.3 is passed through a pooling layer to reduce the size of the feature map by half;

[0036] S5.4: Pass the feature map obtained in the previous step through the LeakyReLU activation function to output a nonlinear feature map;

[0037] S5.5: Repeat the above steps S5.2 to S5.4 for a set number of times, and the convolution kernel is 3×3, and the number of convolution kernels increases from 64 to 1024 at a rate of 2 times;

[0038] S5.6: Input the feature map obtained in S5.5 into a fully connected layer to obtain the encoder output;

[0039] S5.7: Send the feature map obtained in S5.5 to the decoder module, and first upsample the feature map;

[0040] S5.8: Pass the feature map obtained in S5.7 through a 3×3 convolution layer, an upsampling layer, a batch normalization layer, and a LeakyReLU activation function;

[0041] S5.9: repeat the above steps S5.7 to S5.8 for a set number of times, and the convolution kernel is 3×3, and the number of convolution kernels is reduced from 1024 to 64 at a rate of 2 times;

[0042] S5.10: Input the feature map obtained in S5.9 into a fully connected layer to obtain the output of the decoder;

[0043] S5.11: Finally, the output of the encoder and decoder is used to comprehensively judge whether the generated image is real.

[0044] The beneficial effect of the present invention is that the present invention can effectively solve the artifacts and unreal details of the images generated in ESRGAN, making the generated pictures look more realistic.

[0045] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0047] Figure 1 It is a flow chart of an image super-resolution method based on an improved generative adversarial network in an example of the present invention;

[0048] Figure 2 A schematic diagram of a generated network model in an embodiment of the present invention;

[0049] Figure 3 The RFB module in the embodiment of the present invention;

[0050] Figure 4 Schematic diagram of the U-net discriminator model in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0052] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0053] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0054] like Figure 1 As shown, an image super-resolution method based on an improved generative adversarial network in this embodiment includes:

[0055] S1: Preprocess high-resolution images, downsample the high-resolution images to obtain low-resolution images, and then form training sets and test sets.

[0056] Specifically, in step S1, high-resolution images are collected and down-sampled respectively to obtain corresponding high-resolution and low-resolution image pairs, which are randomly divided into a training set and a test set.

[0057] Among them, the downsampling multiples of the low-resolution images are 2 times and 4 times respectively.

[0058] S2: Using the improved ESRGAN structure to image I LR Perform super-resolution reconstruction.

[0059] S2.1: First, input I LR The image is divided into blocks of size 128×128.

[0060] S2.2: Reference Figure 2 , and the obtained image is input into the generator G for training: the input low-resolution image first passes through a shallow feature extraction network with two layers of convolution kernels of 3×3, a step size of 1, and an output of 64 feature maps.

[0061] S2.3: Input the feature map output in the previous step into an SC residual block, and jump-connect the feature map of the convolutional layer to each SC residual block.

[0062] In the present invention, the network structure of the generator G is divided into two parts, namely the SCDB residual module and the RFB module. The residual module includes 16 SCDB residual blocks, each of which has 3 1×1 convolution kernels and 4 3×3 convolution kernels. The LeakyReLU parameter correction linear unit is an improved version of ReLU, and the mathematical expression is as follows:

[0063]

[0064] Among them, a i is (1,+∞), x i is the input, y i is the output result.

[0065] S2.4: The feature map output in the previous step enters the next convolution operation with a size of 1×1 and a stride of 1. The purpose is to reduce the number of input feature maps to save computational cost and model size.

[0066] S2.5: Finally, the output of the previous layer is activated by LeakyRelu and sent to the RFB module, and the final output result is G(z).

[0067] The loss function of the generator is:

[0068] L G =λ 1 L 1 +λ 2 L Lpips+λ 3 L fm +λ 4 L adv

[0069] Where L 1 is the L distance between the pixels of the reconstructed image (HR) and the original image (GT). 1 Norm. L Lpips is the LPIPS perception loss function, L fm L is the regularization term of the generator, specifically the difference between the decoder and encoder at each layer in the U-net discriminator. adv is the adversarial loss function. 1 ,λ 2 ,λ 3 ,λ 4 In order to balance the hyperparameters of various parameters, λ is taken here 1 =10 -2 ,λ 2 =1,λ 3 =1,λ 4 =5×10 -3 .

[0070]

[0071] Where H, W are the height and width of the image, h, w are the height and width of the patch, y, y 0 They are the feature maps of HR and GT respectively.

[0072]

[0073] Where E is the averaging operation, z is the input low-resolution image (LR), and D enc is the encoder output of the U-net discriminator, D dnc is the decoder output of the U-net discriminator, and G(z) is the output image (HR) of the generator.

[0074] The corresponding loss function of the U-net discriminator is:

[0075]

[0076]

[0077]

[0078] Where E is the averaging operation, is the loss function of the encoder part of the U-net discriminator, is the loss function of the decoder part of the U-net discriminator, L cons is the CutMix regularization function of the U-net discriminator.enc is the encoder part of the U-net discriminator, D dnc is the decoder part of the U-net discriminator, λ is a hyperparameter, where λ = 1.

[0079] S2.6: Finally, the output of the encoder and decoder is used to comprehensively judge whether the generated image is real.

[0080] The various parameter settings of the network are as follows: batchsize is set to 16; the number of training rounds is 1000000, the initial learning rate is 1×10-4, and the learning rate is updated every 5000 rounds; the optimizer uses Adam, β1=0.9, β2=0.999; the model is trained on the pytorch framework and RTX 3070GPU platform; the loss function is minimized by adjusting the parameters, thus completing the model training and obtaining the image super-resolution model of the improved generative adversarial network.

[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. An image super-resolution method based on an improved generative adversarial network, characterized by: The method comprises the following steps: S1: Get a high-resolution image dataset, downsample it using the bicubic interpolation method to obtain the corresponding low-resolution images, and randomly divide them into a training set and a test set; S2: The RFB (Receptive Field Block) module and residual block are used in the generator module of ESRGAN, and the U-net discriminator is used instead of the relative discriminator in the discriminator module of ESRGAN; S3: Introducing LPIPS perception loss and L1 loss into the loss function to improve the generation loss function of the GAN network; S4: Input the low-resolution images in the training set into the generator G for training, and output the reconstructed super-resolution images; S5: The output of the generator G and the original high-resolution image are input into the U-net discriminator D U middle.

2. The image super-resolution method based on an improved generative adversarial network according to claim 1, characterized in that: The downsampling multiples of the bicubic interpolation method are 2 times and 4 times respectively.

3. The image super-resolution method based on improved generative adversarial network according to claim 1, characterized in that: The use of the U-net discriminator to replace the relative discriminator is specifically: the relative discriminator D is replaced by the U-net discriminator D U ; The U-net discriminator judges the authenticity of the generated image, and the loss function is: Where E is the averaging operation, is the loss function of the encoder part of the U-net discriminator, is the loss function of the decoder part of the U-net discriminator, L cons is the CutMix regularization function of the U-net discriminator; D enc is the encoder part of the U-net discriminator, D dnc is the decoder part of the U-net discriminator.

4. The image super-resolution method based on an improved generative adversarial network according to claim 1, characterized in that: The use of the RFB module and the residual block in the generator module of ESRGAN is specifically as follows: The first half of the network is the SCDB residual block, and the second half is the RFB module. To speed up the reconstruction, the pixel attention mechanism module PA is used in the upsampling U-PA module.

5. The image super-resolution method based on improved generative adversarial network according to claim 1, characterized in that: The S3 is specifically: L G =λ1L1+λ2L Lpips +λ3L fm +λ4L adv Where L1 is the norm between the pixels of the reconstructed image HR and the original image GT; L Lpips is the LPIPS perception loss function, L fm is the regularization term of the generator, specifically the difference between the decoder and encoder at each layer in the U-net discriminator; L adv is the adversarial loss function; λ1,λ2,λ3,λ4 are the hyperparameters for balancing various parameters; Where H, W are the height and width of the image, h, w are the height and width of the patch, y, y0 are the feature maps of HR and GT respectively; In the formula, E is the averaging operation, z is the input low-definition image LR, and D enc is the encoder output of the U-net discriminator, D dnc is the decoder output of the U-net discriminator, and G(z) is the image HR output of the generator.

6. The image super-resolution method based on improved generative adversarial network according to claim 5, characterized in that: The S4 is specifically: Divide the input low-resolution image into image blocks of a set size; The obtained image blocks are input into the generator G for training, and a set number of feature maps are output; The feature maps output by several SCDB residual convolutional layers in the first half of the generator are input into the RFB module in the second half; The obtained feature map is input into the upsampling module U-PA, and the output result is obtained after upsampling.

7. The image super-resolution method based on improved generative adversarial network according to claim 6, characterized in that: The S5 is specifically: S5.1: In the U-net discriminator, the discriminator is divided into two parts, the decoder and the encoder. The generated super-resolution image and the original high-resolution image are first convolved with a convolution kernel of size 3×3. S5.2: The obtained feature map is passed through a batch normalization convolutional layer; S5.3: The feature map obtained in S5.3 is passed through a pooling layer to reduce the size of the feature map by half; S5.4: Pass the feature map obtained in the previous step through the LeakyReLU activation function to output a nonlinear feature map; S5.5: Repeat the above steps S5.2 to S5.4 for a set number of times, and the convolution kernel is 3×3, and the number of convolution kernels increases from 64 to 1024 at a rate of 2 times; S5.6: Input the feature map obtained in S5.5 into a fully connected layer to obtain the encoder output; S5.7: Send the feature map obtained in S5.5 to the decoder module, and first upsample the feature map; S5.8: Pass the feature map obtained in S5.7 through a 3×3 convolution layer, an upsampling layer, a batch normalization layer, and a LeakyReLU activation function; S5.9: repeat the above steps S5.7 to S5.8 for a set number of times, and the convolution kernel is 3×3, and the number of convolution kernels is reduced from 1024 to 64 at a rate of 2 times; S5.10: Input the feature map obtained in S5.9 into a fully connected layer to obtain the output of the decoder; S5.11: Finally, the output of the encoder and decoder is used to comprehensively judge whether the generated image is real.

Citation Information

Cited By

  • An image super-resolution enhancement method based on detail consistency constraint

    CN123093423A