Image super-resolution reconstruction method, device, storage medium and electronic device

By using multi-scale processing of feature extraction, residual and upsampling modules in the image super-resolution reconstruction network, the problem of detail loss in image super-resolution reconstruction in the existing technology is solved, and higher accuracy and efficiency are achieved. .

CN112488923BActive Publication Date: 2024-10-25GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011455129.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-10
Publication Date
2024-10-25
Estimated Expiration
2040-12-10

AI Technical Summary

Technical Problem

Existing image super-resolution reconstruction methods are prone to losing details during the reconstruction process, resulting in poor super-resolution reconstructed images and affecting accuracy.

Method used

An image super-resolution reconstruction network including a feature extraction module, a residual module and an upsampling module is used to improve the accuracy and efficiency of image reconstruction through multi-scale sampling processing and a dense residual connection structure.

Benefits of technology

It effectively improves the accuracy and efficiency of image super-resolution reconstruction, reduces the generation of artifacts, enhances the recovery of high-frequency details and low-frequency contours, and improves the quality of the reconstructed image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112488923B_ABST
    Figure CN112488923B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide an image super-resolution reconstruction method, device, storage medium and electronic device. The embodiments of the present application obtain a first image that needs to be super-resolution reconstructed, obtain a pre-trained image super-resolution reconstruction network, and process the first image through a feature extraction module, a residual module, an upsampling module and a reconstruction module in the image super-resolution reconstruction network to obtain a second image with a resolution greater than the first image. Since the image super-resolution reconstruction network provided by the embodiments of the present application adopts an upsampling module to sample and process image data from multiple scales, the prediction accuracy is effectively improved, thereby effectively improving the accuracy of image super-resolution reconstruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an image super-resolution reconstruction method, device, storage medium and electronic device. Background Art

[0002] Image super-resolution reconstruction refers to reconstructing a high-resolution image from a low-resolution image. Common image super-resolution reconstruction methods include those based on statistical features and deep learning. However, common methods are prone to losing details during the reconstruction process, and the resulting super-resolution reconstructed image is not good, which affects the accuracy of image super-resolution reconstruction. Summary of the invention

[0003] The embodiments of the present application provide a model training method, an image reconstruction method, related devices, a storage medium and an electronic device, which can improve the accuracy of image super-resolution reconstruction.

[0004] In a first aspect, an embodiment of the present application provides an image super-resolution reconstruction method, comprising:

[0005] Acquire a first image that needs to be super-resolution reconstructed;

[0006] Obtaining a pre-trained image super-resolution reconstruction network, wherein the image super-resolution reconstruction network includes a feature extraction module, a residual module, an upsampling module and a reconstruction module;

[0007] Performing feature extraction on the first image by the feature extraction module to obtain a feature extraction result;

[0008] Performing residual processing on the feature extraction result by the residual module to obtain a residual processing result;

[0009] Performing upsampling processing on the feature extraction result through the upsampling module to obtain a first upsampling result, and performing upsampling processing on the residual processing result through the upsampling module to obtain a second upsampling result;

[0010] fusing the first upsampling result and the second upsampling result to obtain a fusion result;

[0011] The fusion result is reconstructed with super-resolution by a reconstruction module to obtain a second image, wherein the resolution of the second image is greater than the resolution of the first image.

[0012] In a second aspect, an embodiment of the present application provides an image super-resolution reconstruction device, comprising:

[0013] An acquisition module, used for acquiring a first image to be super-resolution reconstructed;

[0014] An acquisition network module is used to acquire a pre-trained image super-resolution reconstruction network, wherein the image super-resolution reconstruction network includes a feature extraction module, a residual module, an upsampling module and a reconstruction module;

[0015] A feature extraction module, used to extract features from the first image through the feature extraction module to obtain a feature extraction result;

[0016] A residual processing module, used for performing residual processing on the feature extraction result through the residual module to obtain a residual processing result;

[0017] A sampling processing module, configured to perform upsampling processing on the feature extraction result through the upsampling module to obtain a first upsampling result, and to perform upsampling processing on the residual processing result through the upsampling module to obtain a second upsampling result;

[0018] A fusion module, used for fusing the first upsampling result and the second upsampling result to obtain a fusion result;

[0019] A reconstruction module is used to perform super-resolution reconstruction on the fusion result through the reconstruction module to obtain a second image, wherein the resolution of the second image is greater than the resolution of the first image.

[0020] In a third aspect, the storage medium provided in the embodiments of the present application stores a computer program thereon, and when the computer program is run on a computer, the computer executes the image super-resolution reconstruction method provided in any embodiment of the present application.

[0021] In a fourth aspect, an electronic device provided in an embodiment of the present application includes a processor and a memory, wherein the memory has a computer program, and the processor is used to execute the image super-resolution reconstruction method provided in any embodiment of the present application through the computer program.

[0022] The embodiment of the present application obtains a first image that needs to be super-resolution reconstructed; obtains a pre-trained image super-resolution reconstruction network, wherein the image super-resolution reconstruction network includes a feature extraction module, a residual module, an upsampling module and a reconstruction module; extracts features from the first image through the feature extraction module to obtain a feature extraction result; performs residual processing on the feature extraction result through the residual module to obtain a residual processing result; performs upsampling processing on the feature extraction result through the upsampling module to obtain a first upsampling result, and performs upsampling processing on the residual processing result through the upsampling module to obtain a second upsampling result; fuses the first upsampling result and the second upsampling result to obtain a fusion result; performs super-resolution reconstruction on the fusion result through the reconstruction module to obtain a second image, wherein the resolution of the second image is greater than the resolution of the first image. Since the image super-resolution reconstruction network provided by the embodiment of the present application adopts an upsampling module to sample and process image data from multiple scales, the prediction accuracy is effectively improved, thereby effectively improving the accuracy of image super-resolution reconstruction. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.

[0024] Figure 1 It is a structural diagram of the image super-resolution reconstruction network provided in the embodiment of the present application.

[0025] Figure 2 It is a structural diagram of the feature extraction module provided in the embodiment of the present application.

[0026] Figure 3 It is a schematic diagram of the structure of the reconstruction module provided in the embodiment of the present application.

[0027] Figure 4 It is a detailed structural diagram of the image super-resolution reconstruction network provided in the embodiment of the present application.

[0028] Figure 5 It is a schematic diagram of the composition structure of the residual unit provided in an embodiment of the present application.

[0029] Figure 6 It is a schematic diagram of the composition structure of the residual weight unit provided in an embodiment of the present application.

[0030] Figure 7 It is a schematic diagram of the composition structure of the residual convolution unit provided in an embodiment of the present application.

[0031] Figure 8 It is a schematic diagram of the structure of the upsampling unit provided in an embodiment of the present application.

[0032] Fig. 9 It is a schematic diagram of the composition structure of the upsampling subunit provided in an embodiment of the present application.

[0033] Fig.10 It is a schematic diagram of the composition structure of the splicing subunit provided in the embodiment of the present application.

[0034] Fig.11 It is a flowchart of the image super-resolution reconstruction method provided in an embodiment of the present application.

[0035] Fig.12 It is a flowchart of the training method of the image super-resolution reconstruction network provided in the embodiment of the present application.

[0036] Fig.13 It is a module schematic diagram of the image super-resolution reconstruction device provided in an embodiment of the present application.

[0037] Fig.14 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.

[0038] Fig.15 It is another structural schematic diagram of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] Please refer to the drawings, where the same component symbols represent the same components, and the principles of the present application are illustrated by implementing them in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present application, which should not be considered as limiting other specific embodiments of the present application that are not described in detail herein.

[0040] The embodiment of the present application provides an image super-resolution reconstruction method, and the execution subject of the image super-resolution reconstruction method can be the image super-resolution reconstruction device provided in the embodiment of the present application, or an electronic device integrating the image super-resolution reconstruction device, wherein the image super-resolution reconstruction device can be implemented in hardware or software. Among them, the electronic device can be a computer device, and the computer device can be a terminal device such as a smart phone, a tablet computer, a personal computer, or a server. When the computer device is used to execute the image processing method, the computer device includes a pre-trained image super-resolution reconstruction network. The following is a specific analysis and explanation.

[0041] Refer to the diagram, Figure 1 A schematic diagram of the structure of an image super-resolution reconstruction network provided in an embodiment of the present application, wherein the image super-resolution reconstruction network includes a feature extraction module, a residual module, an upsampling module, and a reconstruction module.

[0042] The feature extraction module is used to input an image and extract features from the input image. Figure 2 As shown, the feature extraction module may include an input unit and a convolution unit. The input unit is used to input a first image, which may be an image with a resolution lower than a preset threshold, for example, a low-resolution image. The convolution unit is used to perform convolution processing on the input image to extract feature information in the image.

[0043] The reconstruction module is used to perform super-resolution reconstruction on the fusion result to obtain a high-resolution reconstructed image. Specifically, convolution processing is performed and the image is output. Figure 3 As shown, the reconstruction module may include two convolution units and an output unit. When the fusion result is input, the fusion result is convolved by the two convolution units to obtain a reconstructed image of the input image. Then, the reconstructed image is output by the output module.

[0044] The residual module includes a residual unit (e.g., ARRU, adaptable residual in residual unit, weight adaptive residual dense residual unit). Figure 4 , Figure 4 This is a detailed structural diagram of the image super-resolution reconstruction network provided by the embodiment of the present application. The residual module in the dotted box in the figure is a structural schematic diagram of the residual module. Each residual unit is connected in series, and the output result of each residual unit is used as the input data of the next adjacent residual unit. Figure 4 As shown, the input data of residual unit 1 is the output result of the feature extraction module, and the output data of residual unit 1 is used as the input data of residual unit 2, until residual unit n outputs the residual processing result.

[0045] like Figure 5 As shown, Figure 5 Schematic diagram of the composition structure of the residual unit. Each residual unit includes multiple residual weight units (eg, AWRB, adaptive weight residual block, adaptive weight residual block).

[0046] In some embodiments, the residual unit may include four residual weight units. Figure 5As shown, the input data and output data of residual weight unit 1 are used as input data of residual weight unit 2, and the input data and output data of residual weight unit 1 are used as input data of residual weight unit 2, and so on. When the output data of residual weight unit 4 is obtained, the output data is multiplied by a preset coefficient (in_scale) to give it a weight. Similarly, the input data of residual weight unit 1 is also multiplied by another preset coefficient (res_scale). These two preset coefficients are related to the number of training times. As the training update size increases, the accuracy of super-resolution reconstruction can be effectively improved. Afterwards, the multiplication results of the two are spliced ​​together as the output data of the residual unit.

[0047] like Figure 6 As shown, Figure 6 Schematic diagram of the composition structure of the residual weight unit. The residual weight unit includes multiple residual convolution units (e.g., AWCB, adaptive weight convolution block) and convolution units. Among them, multiple residual convolution units are connected in a dense connection manner.

[0048] In some embodiments, the adaptive weight residual module may include 4 residual convolution units and 1 convolution unit.

[0049] like Figure 6 As shown, the input data and output data of residual convolution unit 1 are used as input data of residual convolution unit 2. The input data, output data of residual convolution unit 2 and the input data of residual convolution unit 1 are used as input data of residual convolution unit 3. The input data, output data of residual convolution unit 3 and the input data of residual convolution unit 1 and the input data of residual convolution unit 2 are used as input data of residual convolution unit 4. The output data of residual convolution unit 4, the input data of residual convolution unit 1, the input data of residual convolution unit 2 and the input data of residual convolution unit 3 are used as input data of the convolution unit. The convolution unit performs convolution processing on the input data. Afterwards, similar to the processing method inside ARRU, the convolution processed data is multiplied by a preset coefficient, and then the residual convolution unit 1 is multiplied by another preset coefficient, and the multiplication results of the two are concatenated as output data.

[0050] like Figure 7 As shown, Figure 7 Schematic diagram of the composition structure of the residual convolution unit. The residual convolution unit includes a first convolution layer, an activation layer, and a second convolution layer. In some embodiments, Figure 7As shown, the first convolution layer, the activation layer, and the second convolution layer are connected in series. The activation function may be a nonlinear activation function, such as a Leaky RELU function (Leaky Rectified Linear Units function). For example, the feature extraction result is input from the first convolution layer, and after being processed by the first convolution layer, the activation layer, and the second convolution layer in sequence, a residual extraction result may be obtained.

[0051] like Figure 4 As shown in FIG, after the residual module performs residual processing on the input data and the feature extraction module performs feature extraction on the input data, the upsampling module needs to perform multi-scale sampling and fusion processing on the obtained residual processing results and feature extraction results. The upsampling module may include multiple upsampling units, such as Figure 4 The upsampling module is shown in the box of the internal upsampling module. The upsampling module is used to sample and fuse the input data. The upsampling module may include multiple upsampling units (eg, MSFU, multi-scale feature upsampling unit).

[0052] like Figure 8 As shown, Figure 8 Schematic diagram of the composition structure of the upsampling unit. Each upsampling unit includes a splicing subunit and multiple upsampling subunits, wherein the output data of the multiple upsampling subunits are used as input data of the splicing module.

[0053] The up-sampling subunit is used to amplify the input data. Fig. 9 As shown, Fig. 9 1 is a schematic diagram of the composition structure of the upsampling subunit provided in an embodiment of the present application. The upsampling subunit may include an upsampling function and a convolution layer. The input data is upsampled by the upsampling function, and the result after the upsampling is convoluted by the convolution layer to achieve amplification of the input data.

[0054] The splicing subunit is used to splice the output data of multiple upsampling subunits. Fig.10 As shown, Fig.10 1 is a schematic diagram of the composition structure of the splicing subunit provided in the embodiment of the present application. The splicing subunit may include a splicing function and a convolution layer. The splicing function may be of various types, such as a concat function, which may be specifically set according to actual needs.

[0055] It is understandable that in order to achieve multi-scale sampling and fusion processing, the number of convolution kernels in each upsampling unit (that is, the convolution kernels of the convolution layer in the upsampling sub-unit and the splicing sub-unit) is different. In some embodiments, as shown in the figure, when the image super-resolution reconstruction network includes 4 upsampling units, the number of convolution kernels of the convolution layer contained in the 4 upsampling units is different, and can be 1×1, 3×3, 5×5, and 7×7 convolution kernels from top to bottom. The upsampling module is conducive to recovering rich detail information by fusing features with different receptive fields.

[0056] It can be understood that in order to improve the convergence speed of the image super-resolution reconstruction network and reduce memory usage, the convolution unit and convolution layer in the embodiment of the present application (including the convolution unit in the feature extraction module, the convolution unit in the reconstruction module, and the convolution unit and convolution layer in each unit) are all weight normalized convolution modules, that is, the weight of the convolution is normalized, where the weight normalization formula is as follows:

[0057]

[0058] Among them, v is the original convolution kernel in the convolution, g is the training parameter with the same dimension as v, and w is the normalized convolution kernel.

[0059] from Figure 4 It can be seen that the input data of the residual module is used as the input data of the upsampling unit 1, the output data of the residual module is used as the input data of the upsampling unit 2, the output data of the upsampling unit 1 and the upsampling unit 2 are used as the input data of the upsampling unit 4, the output data of the upsampling unit 1 is used as the input data of the upsampling unit 3, and the output data of the upsampling unit 3 and the upsampling unit 4 are used as the input data of the reconstruction module, and the reconstructed image is obtained after convolution processing.

[0060] From the overall structure, the image super-resolution reconstruction network in the embodiment of the present application adopts a macro structure of dense residual connection. Specifically, for each internal module, the connection mode between the residual module and multiple upsampling units adopts the connection mode of the dense residual network (Residual Dense Network), and part of the connection within the residual module adopts a jump connection. On the one hand, it makes the network converge faster, on the other hand, it can reduce the generation of artifacts and improve the accuracy of image reconstruction. On the other hand, multi-scale prediction is performed using convolution kernels of different sizes to further improve the accuracy of image reconstruction.

[0061] The present application provides an image super-resolution reconstruction method. Fig.11 As shown, Fig.11A schematic diagram of a process flow of an image super-resolution reconstruction method provided in an embodiment of the present application, wherein the image super-resolution reconstruction method may include:

[0062] 101. Acquire a first image that needs to be super-resolution reconstructed.

[0063] The first image may be obtained in a variety of ways, for example, it may be an image obtained from a local storage, or an image obtained from an external monitoring device, medical device, etc.

[0064] It is understandable that the first image may be an image with a lower resolution, for example, a monitoring image with a lower definition, which requires super-resolution reconstruction.

[0065] In some embodiments, after acquiring the first image, the resolution of the first image can be acquired. When it is determined that the resolution of the first image is greater than a preset resolution, that is, the first image is an image with a higher resolution, it can be determined that it meets the user's image resolution requirements, and reconstruction is not performed through a pre-trained image super-resolution reconstruction network. The preset resolution can be set according to actual needs.

[0066] 102. Obtain a pre-trained image super-resolution reconstruction network, wherein the image super-resolution reconstruction network includes a feature extraction module, a residual module, an upsampling module, and a reconstruction module.

[0067] Among them, the image super-resolution reconstruction network can be obtained through pre-training.

[0068] In some embodiments, the image super-resolution reconstruction network can be a generative network in a generative adversarial network (GAN).

[0069] For example, during the pre-training process, high-resolution image samples can be obtained from an image data set, and the corresponding low-resolution images can be obtained by processing the high-resolution image samples. The low-resolution image is input into an untrained generative network for reconstruction to obtain a reconstructed image. The loss between the high-resolution image sample and the reconstructed image is calculated, and then the untrained generative network is pre-trained first, and then the pre-trained generative network and the untrained discriminant network are iteratively trained. Specifically, during training, the generative network is trained separately first, and then the discriminant network and the generative network are trained together, that is, fine-tuning is performed on the basis of the separately trained generative network. When the neural network parameters converge, the training is completed, and a trained generative network is obtained, and the trained generative network is used as an image super-resolution reconstruction network.

[0070] Among them, the image super-resolution reconstruction network includes a feature extraction module, a residual module, an upsampling module and a reconstruction module.

[0071] 103. Perform feature extraction on the first image by the feature extraction module to obtain a feature extraction result.

[0072] Among them, the feature extraction module may include an input unit and a convolution unit.

[0073] For example, after the first image is input into the convolution unit through the input unit, the convolution unit performs convolution processing on the first image, extracts features of the first image, and obtains a feature extraction result.

[0074] 104. Perform residual processing on the feature extraction result by the residual module to obtain a residual processing result.

[0075] In some embodiments, the residual module may include multiple residual units, and the residual processing result may be obtained by performing residual processing on the feature extraction result through the multiple residual units. Then the method of performing residual processing on the feature extraction result through the residual module may include:

[0076] The feature extraction result is input into the first residual unit for adaptive residual processing, and the adaptive residual result is output;

[0077] The adaptive residual result is input into the second residual unit for adaptive residual processing, and so on, until the output result of the previous residual unit is input into the last residual unit for adaptive residual processing, and the residual processing result is output.

[0078] In some embodiments, the residual unit may be an adaptive residual in residual unit (ARRU). The residual unit may be specifically configured according to actual requirements.

[0079] For example, Figure 4 As shown, Figure 4 In the example, multiple residual units are connected in series. After residual unit 1 performs adaptive residual processing on the feature extraction result, an adaptive residual result is obtained. The adaptive residual result is input into residual unit 2 to continue the adaptive residual processing, and so on, until the last residual unit outputs the residual processing result.

[0080] In some embodiments, the residual unit may include multiple residual weight units, and an adaptive residual result may be obtained after processing by the multiple residual weight units, wherein each residual weight unit is processed in the same manner. Taking the processing of the first residual weight unit as an example, the feature extraction result is input to the first residual unit for adaptive residual processing, and the method of outputting the adaptive residual result may include:

[0081] The feature extraction result is input into the first residual weight unit for residual fusion processing, and the residual fusion result is output;

[0082] The residual fusion result and the feature extraction result are spliced ​​and input into the second residual weight unit for residual fusion processing, and so on, until the output result of the penultimate residual weight unit is spliced ​​with the input data and input into the last residual weight unit for residual fusion processing;

[0083] The output result of the last residual weight unit is concatenated with the input data to obtain a concatenated result;

[0084] Multiplying the concatenation result by a first preset coefficient to obtain a first product result, and multiplying the feature extraction result by a second preset coefficient to obtain a second product result, wherein the first preset coefficient and the second preset coefficient are updated following the pre-training process;

[0085] The first product result and the second product result are concatenated to obtain the adaptive residual result.

[0086] Among them, the method of multiplying the feature extraction result and the second preset coefficient to obtain the second product result, for other residual units, is to multiply the input data of the first residual weight unit in the residual unit by the second preset coefficient to obtain the second product result.

[0087] The residual weight unit may be an adaptive weight residual block (AWRB) and may be set according to actual requirements.

[0088] The first preset coefficient and the second preset coefficient can be set according to actual needs. For example, the first preset coefficient and the second preset coefficient can be initialized to 1 during the training process and increase linearly as the training process proceeds.

[0089] For example, Figure 5 As shown, Figure 5The four residual weight units are mainly connected in a skip connection manner. After residual weight unit 1 performs residual fusion processing on the input feature extraction result, a residual fusion result is obtained. The residual fusion result and the feature extraction result are spliced ​​and input to residual weight unit 2 for further residual fusion processing. And so on, until the output result of residual weight unit 3 and the input data are spliced ​​and processed, and then continue to be input to residual weight unit 4 for residual fusion processing.

[0090] Next, the output result of the residual weight unit 4 and the input data are spliced ​​to obtain a spliced ​​result. The spliced ​​result is multiplied by the first preset coefficient, and then the feature extraction result (that is, the input data of the residual weight unit 1) is multiplied by the second preset coefficient. After the multiplication results of the two are spliced, an adaptive residual result can be obtained.

[0091] In the past, when using a generative adversarial network for super-resolution reconstruction, the generated images are prone to various artifacts (Artifacts refer to various forms of images that do not exist on the original object but appear on the image). The embodiment of the present application innovates the structure of the generative network, and adopts a dense residual structure and a jump connection connection method in the generative network. The innovative structure can reduce the frequency of artifacts and make the reconstructed image more accurate.

[0092] In some embodiments, the residual weight unit may include m residual convolution units, and the method of performing residual fusion on the feature extraction result through the first residual weight unit to obtain the residual fusion result may include:

[0093] The feature extraction result is input into the first residual convolution unit for residual extraction processing, and the residual extraction result is output;

[0094] Inputting the residual extraction result and the feature extraction result into a second residual convolution unit for residual extraction processing;

[0095] Similarly, the input data of the first m-1 residual convolution units and the processing result of the m-1th residual convolution unit are input to the mth residual convolution unit for residual extraction processing;

[0096] Convolve the output result of the mth residual convolution unit with the input data of the first m-1 residual convolution units to obtain a convolution result;

[0097] Multiplying the convolution processing result and the first preset coefficient to obtain a third product result, and multiplying the feature extraction result and the second preset coefficient to obtain a fourth product result, wherein the first preset coefficient and the second preset coefficient are updated following the pre-training process;

[0098] The third product result and the fourth product result are concatenated to obtain a residual fusion result.

[0099] In some embodiments, the residual convolution unit may be an adaptive weight convolution block (AWCB). It may be specifically set according to actual needs. The number m of the residual convolution units may be a positive integer, for example, m=1, 2, 3, ...

[0100] For example, Figure 6 As shown, Figure 6 The figure shows the connection structure of four residual convolutional units. The residual convolutional units are mainly connected in a similar way to dense residual connections.

[0101] The feature extraction result is input into the residual convolution unit 1 for residual extraction processing to obtain the residual extraction result. Then, the output result (i.e., the residual extraction result) and input data (i.e., the feature extraction result) of the residual convolution unit 1 are input into the residual convolution unit 2 for processing. As can be seen from the figure, for each residual convolution unit, the input data is the sum of the output result of the previous residual convolution unit and the input data of the previous residual convolution units. By analogy, the input data of the first three residual convolution units and the processing result of the residual convolution unit 3 are input into the residual convolution unit 4 for residual extraction processing.

[0102] Afterwards, the output result of the residual convolution unit 4 and the input data of the first three residual convolution units are input into the convolution unit for convolution processing to obtain a convolution processing result. The convolution processing result is multiplied by the first preset coefficient to obtain a third product result, and the feature extraction result is multiplied by the second preset coefficient to obtain a fourth product result. The third product result and the fourth product result are spliced ​​to obtain a residual fusion result.

[0103] The first preset coefficient and the second preset coefficient can be set according to actual needs. For example, the first preset coefficient and the second preset coefficient can be initialized to 1 during the training process and increase linearly as the training process proceeds.

[0104] In some embodiments, the residual convolution unit includes an activation layer, a first convolution layer, and a second convolution layer, and the feature extraction result is input to the first residual convolution unit for residual extraction processing. The method of outputting the residual extraction result may include:

[0105] The feature extraction result is processed sequentially through the first convolution layer, the activation layer and the second convolution layer to obtain a residual extraction result.

[0106] For other residual convolution units, the feature extraction result is input to the first residual convolution unit for residual extraction processing, and the residual extraction result can be output in other forms. For example, residual extraction processing can be performed on the input data of other residual convolution units.

[0107] The activation layer may include an activation function. The activation function may be a Leaky ReLu function, for example, Figure 7 As shown, the first convolution layer, the activation function and the second convolution layer are connected in series. The feature extraction result is input from the first convolution layer, and after being processed by the first convolution layer, the activation layer and the second convolution layer in sequence, the residual extraction result can be obtained.

[0108] As can be seen from the above, the residual module provided in the embodiment of the present application adopts a dense residual structure similar to that in a dense residual network. At the same time, a jump connection is added inside the residual module. This not only makes the reconstruction more accurate, but also makes the network converge faster, thereby improving the efficiency of reconstructing the image.

[0109] 105. Perform upsampling processing on the feature extraction result through the upsampling module to obtain a first upsampling result, and perform upsampling processing on the residual processing result through the upsampling module to obtain a second upsampling result.

[0110] The upsampling module may include n upsampling units. There may be multiple values ​​for n, which may be determined according to the computing power of the image super-resolution reconstruction network. It is understood that the larger the value of n, the greater the amount of computation, and the higher the accuracy of the corresponding reconstructed image. For example, n may be a positive even number (n=2, 4, 6...), that is, the upsampling units appear in pairs.

[0111] In some embodiments, the upsampling module may be a multi-scale feature upsampling unit (MSFU), which may be configured according to actual needs.

[0112] In some embodiments, when the upsampling module may include n upsampling units, the method of performing upsampling processing on the feature extraction result through the upsampling module to obtain the first upsampling result may include:

[0113] The feature extraction result is upsampled by a first upsampling unit;

[0114] The output result of the first upsampling unit is upsampled by the third upsampling unit, and so on, until the n-1th upsampling unit upsamples the output result of the n-3th upsampling unit to obtain a first upsampling result;

[0115] Then, the method of performing upsampling processing on the residual processing result by the upsampling module to obtain a second upsampling result may include:

[0116] Performing up-sampling processing on the residual processing result by a second up-sampling unit;

[0117] The output result of the first up-sampling unit and the output result of the second up-sampling unit are spliced ​​to obtain a sampling splicing result, and the sampling splicing result is up-sampled by a fourth up-sampling unit;

[0118] And so on, until the output result of the n-3th upsampling unit and the output result of the n-2th upsampling unit are spliced ​​to obtain a sampling fusion result, and the sampling fusion result is upsampled by the nth upsampling unit to obtain a second upsampling result.

[0119] Take the input data of the first upsampling unit as the feature extraction result as an example, Figure 4 As shown, Figure 4 The dotted box in the upsampling module is a schematic diagram of the composition structure of the upsampling module when the upsampling module has four upsampling units. The feature extraction result is input to the first upsampling unit for upsampling processing, and then the output result is input to the third and fourth upsampling units; at the same time, the second upsampling unit upsamples the residual processing result output by the residual module, and then the output result is input to the fourth upsampling unit for processing.

[0120] The third up-sampling unit performs up-sampling processing on the output result of the first up-sampling unit to obtain a first up-sampling result. The fourth up-sampling unit performs up-sampling processing on the sum of the output results of the first and second up-sampling units to obtain a second up-sampling result.

[0121] In some embodiments, the upsampling unit may include multiple upsampling subunits and splicing subunits, and the method of performing upsampling processing on the feature extraction result by the first upsampling unit may include:

[0122] Performing multi-scale sampling processing on the feature extraction result by the multiple up-sampling sub-units to obtain multiple scale sampling results;

[0123] The multiple scale sampling results are spliced ​​through the splicing subunit.

[0124] Each upsampling subunit may be composed of an upsampling function and a convolution layer in sequence. When data is input into the upsampling subunit, it is first processed by upsampling and then by convolution. The number of the upsampling subunits may be set according to actual needs. In some embodiments, the upsampling unit may include four upsampling subunits.

[0125] In order to realize multi-scale sampling processing, the convolution kernels of the convolution layers contained in different upsampling units are different. For example, when the upsampling module includes four upsampling units, the convolution kernels of the convolution layers contained in different upsampling units can be 1×1, 3×3, 5×5, and 7×7 respectively.

[0126] Each concatenation subunit may be composed of a concatenation function and a convolution layer. The data input into the concatenation subunit is processed by the concatenation function and the convolution layer in turn, and then the concatenation result is output. The concatenation function may be set according to actual needs, for example, the concatenation function may be a con-cat function.

[0127] Taking the input data of the first upsampling unit as the feature extraction result as an example, as shown in the figure, the first upsampling unit includes four upsampling subunits and one splicing subunit. The feature extraction result is input into the four upsampling subunits, and processed by the upsampling function and the convolution layer in turn to obtain four output results. Then the four output results are input into the splicing subunit, and processed by the splicing function and the convolution layer to obtain the output result of the first upsampling unit.

[0128] 106. Fusing the first upsampling result and the second upsampling result to obtain a fusion result.

[0129] There are multiple methods for fusing the first upsampling result and the second upsampling result to obtain a fusion result. For example, the first upsampling result and the second upsampling result may be summed to obtain a fusion result. For another example, the first upsampling result and the second upsampling result may be spliced ​​to obtain a fusion result.

[0130] 107 . Perform super-resolution reconstruction on the fusion result through a reconstruction module to obtain a second image, wherein the resolution of the second image is greater than the resolution of the first image.

[0131] The reconstruction module may include a plurality of convolution units and output units.

[0132] In some embodiments, the reconstruction module may include two convolution units and an output unit. After the fusion result is reconstructed by the two convolution units in sequence, the second image is output through the output unit. When the first image is a low-resolution image, the second image may be a high-resolution reconstructed image, so the resolution of the second image is greater than the resolution of the first image.

[0133] It can be understood that the convolution units and convolution layers (including the convolution units in the feature extraction module, the convolution units in the reconstruction module, and the convolution units and convolution layers in each unit) in the embodiments of the present application are all weight normalized convolution modules, that is, the weights of the convolutions are normalized, which can improve the convergence speed of the image super-resolution reconstruction network and reduce memory usage. The formula for weight normalization is as follows:

[0134]

[0135] Among them, v is the original convolution kernel in the convolution, g is the training parameter, which has the same dimension as v, and w is the normalized convolution kernel.

[0136] From the above, it can be seen that the embodiment of the present application obtains a first image that needs to be super-resolution reconstructed, obtains a pre-trained image super-resolution reconstruction network, and processes the first image through a feature extraction module, a residual module, an upsampling module, and a reconstruction module in the image super-resolution reconstruction network to obtain a second image with a resolution greater than that of the first image.

[0137] The embodiment of the present application improves the accuracy of super-resolution image reconstruction by innovating the structure of the network. In the macro network structure composed of each module, a dense residual connection method similar to that in a dense residual network is adopted. For the structure of each module, a dense residual structure similar to that in a dense residual network is also adopted. At the same time, a jump connection is added inside the residual module.

[0138] On the one hand, the dense residual structure and jump connection reduce the probability of artifacts in the generated image, improving the accuracy of the reconstructed image; on the other hand, the added jump connection makes the image super-resolution reconstruction network converge faster, improving the efficiency of reconstructed images. In addition, when sampling, convolution kernels of different sizes are used for multi-scale sampling and prediction, which improves the accuracy of the reconstructed image.

[0139] Before performing image super-resolution reconstruction, the image super-resolution reconstruction network may be trained in advance. Then the present application embodiment also provides a method for training an image super-resolution reconstruction network, such as Fig.12 As shown, Fig.12 A flowchart of a training method provided in an embodiment of the present application, the training method may include:

[0140] 201. Obtain an image sample group.

[0141] Each image sample group includes a first image sample and a second image sample. The first image sample corresponds to the second image sample, and the resolution of the first image sample is higher than that of the second image sample.

[0142] The first image sample may be a high-resolution image. The first image sample may be obtained from a high-resolution image dataset. For example, a mixture of a DIV2K dataset and a Flicker2K dataset may be used as a high-resolution image dataset, where the image resolutions in the datasets are all 2K, and the first image sample is obtained from the mixed dataset. Since the dataset contains rich image scenes and diverse content, it can meet the needs of model training.

[0143] The second image sample may be obtained by reducing the resolution of the first image sample. There are multiple ways to reduce the resolution of the first image sample. In some embodiments, the second image sample may be obtained by reducing the size of the first image sample. For example, the second image sample may be obtained by reducing the size of the first image sample to 1 / 16 of the original size. Specifically, the second image sample may be obtained by downsampling the first image sample by 16 times using bilinear interpolation in MATLAB.

[0144] In some embodiments, there may be multiple ways to obtain the image sample group. For example, after obtaining multiple first image samples, the first image samples are downsampled to obtain multiple second image samples, and the first image samples and their corresponding second image samples are combined into an image sample group. The method for obtaining the image sample group may specifically include:

[0145] Acquire a plurality of first image samples; perform downsampling processing on each of the first image samples to obtain a second image sample corresponding to each group of the first image samples; and set each group of the first image samples and its corresponding second image sample as the image sample group.

[0146] For example, multiple first image samples can be obtained from a high-resolution image dataset obtained by mixing the DIV2K dataset and the Flicker2K dataset. By using bilinear interpolation in MATLAB, each first image sample is downsampled 16 times to obtain the second image sample corresponding to each first image sample group, and each first image sample and its corresponding second image sample are set as an image sample group.

[0147] It is understandable that, in the training process, in order to improve the training efficiency and accuracy, it is necessary to fix the size of the image samples, that is, fix the size of each first image sample and each second image sample. However, since the sizes in the training data set are not consistent, in some embodiments, the sizes in the image sample group can be fixed by randomly intercepting a fixed size in each first image sample and intercepting the same position in the size of each second image sample.

[0148] 202. Construct a discriminant network corresponding to the image super-resolution reconstruction network.

[0149] In some embodiments, the generative model in the generative adversarial network (GAN) can be used as the image super-resolution reconstruction network, and the discriminative model therein can be used as the discriminative network. When constructing the network, the untrained generative adversarial network (GAN) is used as the basis for construction.

[0150] Among them, the generative adversarial network is a deep learning model, which includes at least two modules: a generative model and a discriminative model. During the training process, the generative model generates similar data by learning real data. For example, after the generative model learns some real animal pictures, it can generate animal pictures by itself. The discriminative model classifies the animal pictures generated by the generative model and the real animal pictures, and feeds the classification results back to the generative model to train the generative model. For example, 0 is output for the generated picture and 1 is output for the real picture. The discriminative result is fed back to the generative model and trained. This will make the animal pictures generated by the generative model closer and closer to the real pictures. Through repeated training, when the discriminative model cannot distinguish between the generated pictures and the real pictures, the generative adversarial network is fitted, that is, the training is completed.

[0151] 203. Pre-train the image super-resolution reconstruction network according to the image sample group, and jointly train the image super-resolution reconstruction network and the discriminant network according to the image sample group.

[0152] The embodiment of the present application is explained by taking the image super-resolution reconstruction network as an example, which is a generative network. During pre-training, the generative network can be trained separately according to the image sample group, and the discriminant network can be fine-tuned according to the generative network obtained by the separate training (fine-tune, a neural network training method, fine-tuning some parameters in other models according to the trained neural network model to achieve the purpose of reducing the number of training times), and then the discriminant network and the generative network can be trained together.

[0153] There can be multiple methods for jointly training the image super-resolution reconstruction network and the discriminant network based on the image sample group. Similar to the training method of the generative adversarial network, the image super-resolution reconstruction network and the discriminant network can be jointly trained using an image sample group including a first image sample and a corresponding second image sample.

[0154] For example, when the image super-resolution reconstruction network is a generative network, the second image sample can be reconstructed through the generative network to obtain a reconstructed image, and the generative network and the discriminative network are trained alternately by comparing the reconstructed image with the first image sample. The training is completed when the network parameters converge.

[0155] In some embodiments, the method of jointly training the image super-resolution reconstruction network and the discriminant network according to the image sample group may include:

[0156] Performing image super-resolution reconstruction on the second image sample through the image super-resolution reconstruction network to obtain a reconstructed image corresponding to the second image sample;

[0157] Obtaining a generation loss of the image super-resolution reconstruction network according to the first image sample, the reconstructed image and the discriminant network;

[0158] Obtaining a discriminant loss of the discriminant network according to the first image sample and the reconstructed image;

[0159] Taking the convergence of network parameters as a constraint, the image super-resolution reconstruction network and the discriminant network are jointly trained according to the generation loss and the discriminant loss.

[0160] For example, the image super-resolution reconstruction network is a generative network. When the first image sample is a high-resolution image, the second image sample is a low-resolution image processed from the high-resolution image. The low-resolution image data is input into the generative network to generate a super-resolution reconstructed image. Then, for the generative network, the generative loss includes the relative adversarial loss obtained after the discriminant network discriminates between the high-resolution image and the reconstructed image, and the loss obtained from the difference between the high-resolution image and the reconstructed image. For the discriminant network, the discriminant loss includes the adversarial loss calculated based on the high-resolution image and the reconstructed image. The training process of the generative network and the discriminant network is performed alternately according to different losses, and the training is completed when the neural network parameters of the two networks converge.

[0161] In some embodiments, there may be multiple methods for alternately training the generative network and the discriminative network. In some embodiments, the Adam optimizer may be used to iteratively train the generative network and the discriminative network. When the error between the reconstructed image and the high-resolution image is less than a preset error value, or the weight change between two iterations is less than a preset weight value, the neural network parameters converge and the training is completed. For another example, the number of iterations may be preset. When the number of iterations exceeds the preset number, the neural network parameters converge and the training is completed.

[0162] In some embodiments, the generation loss of the image super-resolution reconstruction network includes a reconstruction loss and an adversarial loss. Then, according to the first image sample, the reconstructed image and the discriminant network, a method for obtaining the generation loss of the image super-resolution reconstruction network may include:

[0163] Obtaining a reconstruction loss of the image super-resolution reconstruction network according to the first image sample and the reconstructed image;

[0164] By means of the discriminant network, an adversarial loss of the image super-resolution reconstruction network is calculated according to the similarity between the first image sample and the reconstructed image;

[0165] The generation loss of the image super-resolution reconstruction network is obtained according to the reconstruction loss and the adversarial loss.

[0166] In some embodiments, the reconstruction loss may include high-frequency loss, low-frequency loss, and full-image loss. Then, according to the first image sample and the reconstructed image, the method for obtaining the reconstruction loss of the image super-resolution reconstruction network may include:

[0167] Extract features from the first image sample and the reconstructed image according to the frequency to obtain feature information;

[0168] Acquire a high-frequency loss and a low-frequency loss between the first image sample and the reconstructed image according to the characteristic information;

[0169] According to the correlation between the first image sample and the reconstructed image, a full image loss of the first image sample and the reconstructed image is calculated;

[0170] The reconstruction loss of the image super-resolution reconstruction network is obtained according to the high-frequency loss, the low-frequency loss and the full-image loss.

[0171] There are many methods for extracting features from the first image sample and the reconstructed image according to the frequency. For example, the first image sample and the reconstructed image may be decomposed to obtain multiple sub-images, and feature information of the image may be obtained by extracting the sub-images.

[0172] For example, the first image sample and the reconstructed image sample can be divided into four sub-images through the first-level wavelet decomposition: A, H, V, and D. A is a low-frequency sub-image, H is a horizontal high-frequency sub-image, V is a vertical high-frequency sub-image, and D is a diagonal high-frequency sub-image. The size of each sub-image is half of the original image. By extracting features from the sub-images, the corresponding high-frequency loss and low-frequency loss are obtained.

[0173] There are multiple ways to obtain the high-frequency loss and low-frequency loss between the first image sample and the reconstructed image according to the characteristic information.

[0174] For example, for high-frequency loss, the features of high-frequency sub-images can be extracted through a neural network, and their Euclidean distance can be calculated as the high-frequency loss. For example, the features of the high-frequency sub-images corresponding to the reconstructed image and the first image sample can be extracted through the 5_4 layer of the VGG19 network, and their Euclidean distance can be calculated as the high-frequency perceptual loss. The formula is as follows:

[0175]

[0176] Among them, H gen refers to the horizontal high-frequency sub-image of the reconstructed image, H hr refers to the horizontal high-frequency sub-image of the first image sample, VGG() refers to the feature extraction function of the VGG network, and L H It refers to the loss between the horizontal high-frequency sub-image of the reconstructed image and the first image sample. Similarly, the loss between the vertical high-frequency sub-image of the reconstructed image and the first image sample and the loss between the diagonal high-frequency sub-images can be obtained. The sum of these three losses is taken as the high-frequency loss of the reconstructed image and the first image sample.

[0177] For example, for low-frequency loss, the L1 loss between the reconstructed image and the low-frequency sub-image can be used as the low-frequency loss. L1 loss is also called the minimum absolute deviation (LAD) and the minimum absolute error (LAE). The formula is as follows:

[0178] L 1,A =L1(A gen ,A hr )

[0179] Among them, A gen refers to the low-frequency sub-image of the reconstructed image, A hr refers to the low-frequency sub-image of the first image sample, L 1,A It refers to the L1 loss between the reconstructed image and the first image sample.

[0180] There are multiple ways to calculate the full image loss of the first image sample and the reconstructed image according to the correlation between the first image sample and the reconstructed image. For example, the L1 loss between the first image sample and the reconstructed image can be used as the full image loss, and the formula is as follows:

[0181] L 1,img =L1(gen,hr)

[0182] There are multiple ways to obtain the reconstruction loss of the image super-resolution reconstruction network based on the high-frequency loss, the low-frequency loss and the full-image loss. For example, according to actual needs, the high-frequency loss and the low-frequency loss can be multiplied by a preset coefficient, and the full-image loss can be multiplied by another preset coefficient, and the multiplication results can be added to obtain the reconstruction loss of the image super-resolution reconstruction network.

[0183] In some embodiments, there are multiple ways to calculate the adversarial loss of the image super-resolution reconstruction network based on the similarity between the first image sample and the reconstructed image through the discriminant network. For example, the entire image data of the first image sample and the reconstructed image can be input into the discriminant network, and the relative adversarial loss is obtained through the discriminant network. The formula is as follows:

[0184]

[0185] Among them, hr refers to the first image sample, gen refers to the reconstructed image, and L D (hr,gen) refers to the loss between the first image sample and the reconstructed image, L D (gen,hr) refers to the loss between the reconstructed image and the first image sample.

[0186] In some embodiments, there are multiple ways to obtain the generation loss of the image super-resolution reconstruction network based on the reconstruction loss and the adversarial loss. For example, different weights may be assigned to the reconstruction loss and the adversarial loss, and then the weights are summed to obtain the generation loss. For example, the high-frequency loss is multiplied by the first coefficient, the sum of the low-frequency loss and the full-image loss is multiplied by the second coefficient, and the adversarial loss is multiplied by the third coefficient. The three multiplication results are summed to obtain the generation loss. The formula is as follows:

[0187]

[0188] Among them, α, γ, and λ are coefficients set according to actual needs.

[0189] In some embodiments, there are multiple ways to obtain the discriminant loss of the discriminant network based on the first image sample and the reconstructed image. In some embodiments, the discriminant loss can be obtained by the loss function of the discriminant network, and the formula is as follows:

[0190]

[0191] For example, after obtaining the generation loss and the discrimination loss, the Adam optimizer can be used to iteratively train the two networks alternately. When the error between the reconstructed image and the high-resolution image is less than the preset error value, the neural network parameters of the two networks converge and the training is completed.

[0192] Since common image reconstruction methods usually use L1 or L2 losses to train image super-resolution reconstruction networks, the generated images are often too smooth and lack details, resulting in poor viewing experience. At the same time, in extreme super-resolution image reconstruction, due to the large magnification, it is difficult to restore high-frequency details. When training the image super-resolution reconstruction network according to the loss function, the embodiment of the present application innovates the loss function by extracting the high and low frequencies of the image, and calculating the high-frequency loss and low-frequency loss respectively, thereby enhancing the recovery of high-frequency details and low-frequency contours, improving the effect of image reconstruction, and thereby improving the accuracy of image reconstruction.

[0193] From the above, it can be seen that the image super-resolution reconstruction network training method provided in the embodiment of the present application can obtain an image sample group, which includes a first image sample and a second image sample, and the resolution of the first image sample is greater than the resolution of the second image sample; construct a discriminant network corresponding to the image super-resolution reconstruction network; pre-train the image super-resolution reconstruction network according to the image sample group, and jointly train the image super-resolution reconstruction network and the discriminant network according to the image sample group.

[0194] In order to facilitate better implementation of the image super-resolution reconstruction method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above image super-resolution reconstruction method. The meanings of the terms are the same as those in the above image super-resolution reconstruction method, and the specific implementation details can refer to the description in the method embodiment.

[0195] See also Fig.13 , Fig.13 The module diagram of the image super-resolution reconstruction device 300 provided in the embodiment of the present application is shown in FIG. Specifically, the image super-resolution reconstruction device 300 includes:

[0196] An image super-resolution reconstruction device includes: an acquisition module 301, an acquisition network module 302, a feature extraction module 303, a residual processing module 304, a sampling processing module 305, a fusion module 306, and a reconstruction module 307.

[0197] An acquisition module 301 is used to acquire a first image that needs to be super-resolution reconstructed;

[0198] An acquisition network module 302 is used to acquire a pre-trained image super-resolution reconstruction network, wherein the image super-resolution reconstruction network includes a feature extraction module 303, a residual module, an upsampling module and a reconstruction module 307;

[0199] A feature extraction module 303 is used to extract features from the first image through the feature extraction module 303 to obtain a feature extraction result;

[0200] A residual processing module 304 is used to perform residual processing on the feature extraction result through the residual module to obtain a residual processing result;

[0201] A sampling processing module 305, configured to perform upsampling processing on the feature extraction result through the upsampling module to obtain a first upsampling result, and to perform upsampling processing on the residual processing result through the upsampling module to obtain a second upsampling result;

[0202] A fusion module 306, configured to fuse the first upsampling result and the second upsampling result to obtain a fusion result;

[0203] The reconstruction module 307 is used to perform super-resolution reconstruction on the fusion result through the reconstruction module 307 to obtain a second image, wherein the resolution of the second image is greater than the resolution of the first image.

[0204] In some implementations, the residual module includes a plurality of residual units, and the feature extraction module 303 is specifically used for:

[0205] Inputting the feature extraction result into the first residual unit for adaptive residual processing, and outputting an adaptive residual result;

[0206] The adaptive residual result is input to the second residual unit for adaptive residual processing, and so on, until the output result of the previous residual unit is input to the last residual unit for adaptive residual processing, and the residual processing result is output.

[0207] In some implementations, the residual unit includes a plurality of residual weight units, and the feature extraction module 303 is specifically used for:

[0208] Inputting the feature extraction result into the first residual weight unit for residual fusion processing, and outputting the residual fusion result;

[0209] The residual fusion result and the feature extraction result are spliced ​​and input into the second residual weight unit for residual fusion processing, and so on, until the output result of the penultimate residual weight unit is spliced ​​with the input data and input into the last residual weight unit for residual fusion processing;

[0210] The output result of the last residual weight unit is concatenated with the input data to obtain a concatenated result;

[0211] Multiplying the splicing result and a first preset coefficient to obtain a first product result, and multiplying the feature extraction result and a second preset coefficient to obtain a second product result, wherein the first preset coefficient and the second preset coefficient are updated following the pre-training process;

[0212] The first multiplication result and the second multiplication result are concatenated to obtain the adaptive residual result.

[0213] In some implementations, the residual weight unit includes m residual convolution units, where m is a positive integer, and the feature extraction module 303 is specifically used for:

[0214] Inputting the feature extraction result into the first residual convolution unit for residual extraction processing, and outputting the residual extraction result;

[0215] Inputting the residual extraction result and the feature extraction result into a second residual convolution unit for residual extraction processing;

[0216] Similarly, the input data of the first m-1 residual convolution units and the processing result of the m-1th residual convolution unit are input to the mth residual convolution unit for residual extraction processing;

[0217] Convolve the output result of the mth residual convolution unit with the input data of the first m-1 residual convolution units to obtain a convolution result;

[0218] Multiplying the convolution processing result and the first preset coefficient to obtain a third product result, and multiplying the feature extraction result and the second preset coefficient to obtain a fourth product result, wherein the first preset coefficient and the second preset coefficient are updated following the pre-training process;

[0219] The third multiplication result and the fourth multiplication result are concatenated to obtain a residual fusion result.

[0220] In some implementations, the residual convolution unit includes an activation layer, a first convolution layer, and a second convolution layer, and the feature extraction module 303 is specifically used for:

[0221] The feature extraction result is processed sequentially through the first convolution layer, the activation layer and the second convolution layer to obtain a residual extraction result.

[0222] In some implementations, the up-sampling module includes n up-sampling units, where n is a positive even number greater than or equal to 4, and the sampling processing module 305 is specifically configured to:

[0223] Performing upsampling processing on the feature extraction result by a first upsampling unit;

[0224] The output result of the first upsampling unit is upsampled by the third upsampling unit, and so on, until the n-1th upsampling unit upsamples the output result of the n-3th upsampling unit to obtain a first upsampling result;

[0225] Performing upsampling processing on the residual processing result by a second upsampling unit;

[0226] splicing the output result of the first upsampling unit and the output result of the second upsampling unit to obtain a sampling splicing result, and performing upsampling processing on the sampling splicing result through a fourth upsampling unit;

[0227] And so on, until the output result of the n-3th upsampling unit and the output result of the n-2th upsampling unit are spliced ​​to obtain a sampling fusion result, and the sampling fusion result is upsampled by the nth upsampling unit to obtain a second upsampling result.

[0228] In some implementations, the upsampling unit includes a plurality of upsampling subunits and a splicing subunit, and the sampling processing module 305 is specifically configured to:

[0229] Performing multi-scale sampling processing on the feature extraction result through the multiple up-sampling sub-units to obtain multiple scale sampling results;

[0230] The plurality of scale sampling results are spliced ​​by the splicing subunit.

[0231] In some implementations, the image super-resolution reconstruction apparatus further includes a pre-training unit 308, wherein the pre-training unit 308 is used to:

[0232] Acquire an image sample group, the image sample group comprising a first image sample and a second image sample, the resolution of the first image sample being greater than the resolution of the second image sample;

[0233] Constructing a discriminant network corresponding to the image super-resolution reconstruction network;

[0234] The image super-resolution reconstruction network is pre-trained according to the image sample group, and the image super-resolution reconstruction network and the discriminant network are jointly trained according to the image sample group.

[0235] In some implementations, the pre-training unit 308 is specifically used to:

[0236] Performing image super-resolution reconstruction on the second image sample by using the image super-resolution reconstruction network to obtain a reconstructed image corresponding to the second image sample;

[0237] Obtaining a generation loss of the image super-resolution reconstruction network according to the first image sample, the reconstructed image and the discriminant network;

[0238] Obtaining a discriminant loss of the discriminant network according to the first image sample and the reconstructed image;

[0239] Taking the convergence of network parameters as a constraint, the image super-resolution reconstruction network and the discriminant network are jointly trained according to the generation loss and the discriminant loss.

[0240] In some implementations, the pre-training unit 308 is specifically used to:

[0241] Obtaining a reconstruction loss of the image super-resolution reconstruction network according to the first image sample and the reconstructed image;

[0242] By means of the discriminant network, an adversarial loss of the image super-resolution reconstruction network is calculated according to the similarity between the first image sample and the reconstructed image;

[0243] The generation loss of the image super-resolution reconstruction network is obtained according to the reconstruction loss and the adversarial loss.

[0244] In some implementations, the pre-training unit 308 is specifically used to:

[0245] Extracting features from the first image sample and the reconstructed image according to the frequency to obtain feature information;

[0246] Acquire a high-frequency loss and a low-frequency loss between the first image sample and the reconstructed image according to the feature information;

[0247] Calculating, according to the correlation between the first image sample and the reconstructed image, a full image loss of the first image sample and the reconstructed image;

[0248] The reconstruction loss of the image super-resolution reconstruction network is obtained according to the high-frequency loss, the low-frequency loss and the full-image loss.

[0249] In some implementations, the pre-training unit 308 is specifically used to:

[0250] Assign corresponding weights to the high-frequency loss, low-frequency loss, full-image loss and adversarial loss respectively;

[0251] The weighted high-frequency loss, low-frequency loss, full-image loss, and adversarial loss are added together to obtain the generation loss of the generation network.

[0252] In some implementations, the pre-training unit 308 is specifically used to:

[0253] Acquiring a plurality of first image samples;

[0254] Performing down-sampling processing on each of the first image samples to obtain a second image sample corresponding to each of the first image samples;

[0255] Each of the first image samples and its corresponding second image sample are set as the image sample group.

[0256] As can be seen from the above, the embodiment of the present application provides an image super-resolution reconstruction device, in which an acquisition module 301 is used to acquire a first image that needs to be super-resolution reconstructed; an acquisition network module 302 is used to acquire a pre-trained image super-resolution reconstruction network, wherein the image super-resolution reconstruction network includes a feature extraction module 303, a residual module, an upsampling module and a reconstruction module 307; the feature extraction module 303 is used to extract features from the first image through the feature extraction module 303 to obtain a feature extraction result; the residual processing module 304 is used to extract features from the first image through the residual module The result is subjected to residual processing to obtain a residual processing result; a sampling processing module 305 is used to perform upsampling processing on the feature extraction result through the upsampling module to obtain a first upsampling result, and to perform upsampling processing on the residual processing result through the upsampling module to obtain a second upsampling result; a fusion module 306 is used to fuse the first upsampling result and the second upsampling result to obtain a fusion result; a reconstruction module 307 is used to perform super-resolution reconstruction on the fusion result through the reconstruction module 307 to obtain a second image, wherein the resolution of the second image is greater than the resolution of the first image. Since the image super-resolution reconstruction device provided in the embodiment of the present application is composed of multiple modules, the image can be super-resolution reconstructed from multiple scales during the reconstruction process, thereby improving the accuracy of the image super-resolution reconstruction.

[0257] The present application embodiment also provides an electronic device 400. Fig.14 , the electronic device 400 includes a processor 401 and a memory. The processor 401 is electrically connected to the memory.

[0258] The processor 400 is the control center of the electronic device 400. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device 400 and processes data by running or loading computer programs stored in the memory 402, as well as data stored in the memory 402, thereby monitoring the electronic device 400 as a whole.

[0259] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the computer programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0260] In the embodiment of the present application, the processor 401 in the electronic device 400 will load instructions corresponding to the processes of one or more computer programs into the memory 402 according to the following steps, and the processor 401 will run the computer program stored in the memory 402, thereby realizing various functions, as follows:

[0261] Acquire a first image that needs to be super-resolution reconstructed; acquire a pre-trained image super-resolution reconstruction network, wherein the image super-resolution reconstruction network includes a feature extraction module, a residual module, an upsampling module and a reconstruction module; perform feature extraction on the first image through the feature extraction module to obtain a feature extraction result; perform residual processing on the feature extraction result through the residual module to obtain a residual processing result; perform upsampling processing on the feature extraction result through the upsampling module to obtain a first upsampling result, and perform upsampling processing on the residual processing result through the upsampling module to obtain a second upsampling result; fuse the first upsampling result and the second upsampling result to obtain a fused result; perform super-resolution reconstruction on the fused result through the reconstruction module to obtain a second image, wherein the resolution of the second image is greater than the resolution of the first image.

[0262] As can be seen from the above, the electronic device of the embodiment of the present application obtains a first image that needs to be super-resolution reconstructed, obtains a pre-trained image super-resolution reconstruction network, and processes the first image through a feature extraction module, a residual module, an upsampling module, and a reconstruction module in the image super-resolution reconstruction network to obtain a second image with a resolution greater than the first image. Since the image super-resolution reconstruction network provided by the embodiment of the present application adopts an upsampling module to sample and process image data from multiple scales, the prediction accuracy is effectively improved, thereby effectively improving the accuracy of image super-resolution reconstruction.

[0263] Please also read Fig.15 In some embodiments, the electronic device 400 may further include: a display 403, a radio frequency circuit 404, an audio circuit 405, and a power supply 406. The display 403, the radio frequency circuit 404, the audio circuit 405, and the power supply 406 are electrically connected to the processor 401, respectively.

[0264] The display 403 may be used to display information input by a user or information provided to a user and various graphical user interfaces, which may be composed of graphics, text, icons, videos, and any combination thereof. The display 403 may include a display panel, and in some embodiments, the display panel may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).

[0265] The radio frequency circuit 404 can be used to send and receive radio frequency signals to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals between the network device or other electronic devices.

[0266] The audio circuit 405 can be used to provide an audio interface between a user and the electronic device through a speaker and a microphone.

[0267] The power supply 406 can be used to supply power to various components of the electronic device 400. In some embodiments, the power supply 406 can be logically connected to the processor 401 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.

[0268] Although not shown, the electronic device 400 may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0269] An embodiment of the present application also provides a storage medium, which stores a computer program. When the computer program runs on a computer, the computer executes the image super-resolution reconstruction method in any of the above embodiments, such as: obtaining a first image that needs to be super-resolution reconstructed; obtaining a pre-trained image super-resolution reconstruction network, wherein the image super-resolution reconstruction network includes a feature extraction module, a residual module, an upsampling module and a reconstruction module; performing feature extraction on the first image through the feature extraction module to obtain a feature extraction result; performing residual processing on the feature extraction result through the residual module to obtain a residual processing result; performing upsampling processing on the feature extraction result through the upsampling module to obtain a first upsampling result, and performing upsampling processing on the residual processing result through the upsampling module to obtain a second upsampling result; fusing the first upsampling result and the second upsampling result to obtain a fused result; performing super-resolution reconstruction on the fused result through the reconstruction module to obtain a second image, wherein the resolution of the second image is greater than the resolution of the first image.

[0270] In the embodiment of the present application, the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0271] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0272] It should be noted that, for the image super-resolution reconstruction method of the embodiment of the present application, ordinary testers in the field can understand that all or part of the process of implementing the image super-resolution reconstruction method of the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as stored in the memory of an electronic device, and executed by at least one processor in the electronic device, and the execution process may include the process of the embodiment of the image super-resolution reconstruction method. Among them, the storage medium can be a disk, an optical disk, a read-only memory, a random access memory, etc.

[0273] For the image super-resolution reconstruction device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.

[0274] The term "module" used herein can be regarded as a software object executed on the computing system. The different components, modules, engines and services described herein can be regarded as implementation objects on the computing system. The devices and methods described herein are preferably implemented in software, but can also be implemented in hardware, all within the scope of protection of this application.

[0275] The above is a detailed introduction to an image super-resolution reconstruction method, device, storage medium and electronic device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for super-resolution image reconstruction, characterized in that: include: Acquire a first image that needs to be super-resolution reconstructed; Obtaining a pre-trained image super-resolution reconstruction network, wherein the image super-resolution reconstruction network comprises a feature extraction module, a residual module, an upsampling module and a reconstruction module; the residual module comprises a plurality of residual units, and the residual unit comprises a plurality of residual weight units; Performing feature extraction on the first image by the feature extraction module to obtain a feature extraction result; The residual module performs residual processing on the feature extraction result to obtain a residual processing result, including: inputting the feature extraction result into a first residual weight unit for residual fusion processing, and outputting a residual fusion result; splicing the residual fusion result and the feature extraction result and inputting them into a second residual weight unit for residual fusion processing, and so on, until the output result of the penultimate residual weight unit and the input data are spliced ​​and input into the last residual weight unit for residual fusion processing; splicing the output result of the last residual weight unit and the input data to obtain a spliced result; multiplying the splicing result and the first preset coefficient to obtain a first product result, and multiplying the feature extraction result and the second preset coefficient to obtain a second product result, wherein the first preset coefficient and the second preset coefficient are updated following the pre-training process; splicing the first product result and the second product result to obtain the adaptive residual result; inputting the adaptive residual result to the second residual unit for adaptive residual processing, and so on, until the output result of the previous residual unit is input to the last residual unit for adaptive residual processing, and outputting the residual processing result; Performing upsampling processing on the feature extraction result through the upsampling module to obtain a first upsampling result, and performing upsampling processing on the residual processing result through the upsampling module to obtain a second upsampling result; fusing the first upsampling result and the second upsampling result to obtain a fusion result; The fusion result is reconstructed with super-resolution by a reconstruction module to obtain a second image, wherein the resolution of the second image is greater than the resolution of the first image.

2. The image super-resolution reconstruction method according to claim 1, characterized in that: The residual weight unit includes m residual convolution units, where m is a positive integer. The residual fusion is performed on the feature extraction result by the first residual weight unit to obtain a residual fusion result, including: Inputting the feature extraction result into the first residual convolution unit for residual extraction processing, and outputting the residual extraction result; Inputting the residual extraction result and the feature extraction result into a second residual convolution unit for residual extraction processing; Similarly, the input data of the first m-1 residual convolution units and the processing result of the m-1th residual convolution unit are input to the mth residual convolution unit for residual extraction processing; Convolve the output result of the mth residual convolution unit with the input data of the first m-1 residual convolution units to obtain a convolution result; Multiplying the convolution processing result and the first preset coefficient to obtain a third product result, and multiplying the feature extraction result and the second preset coefficient to obtain a fourth product result, wherein the first preset coefficient and the second preset coefficient are updated following the pre-training process; The third multiplication result and the fourth multiplication result are concatenated to obtain a residual fusion result.

3. The image super-resolution reconstruction method according to claim 1, characterized in that: The residual convolution unit includes an activation layer, a first convolution layer and a second convolution layer. The feature extraction result is input into the first residual convolution unit for residual extraction processing. The output residual extraction result includes: The feature extraction result is processed sequentially through the first convolution layer, the activation layer and the second convolution layer to obtain a residual extraction result.

4. The image super-resolution reconstruction method according to claim 1, characterized in that: The upsampling module includes n upsampling units, where n is a positive even number greater than or equal to 4, and the upsampling module performs upsampling processing on the feature extraction result to obtain a first upsampling result, including: Performing upsampling processing on the feature extraction result by a first upsampling unit; The output result of the first upsampling unit is upsampled by the third upsampling unit, and so on, until the n-1th upsampling unit upsamples the output result of the n-3th upsampling unit to obtain a first upsampling result; The upsampling the residual processing result by the upsampling module to obtain a second upsampling result includes: Performing upsampling processing on the residual processing result by a second upsampling unit; splicing the output result of the first upsampling unit and the output result of the second upsampling unit to obtain a sampling splicing result, and performing upsampling processing on the sampling splicing result through a fourth upsampling unit; And so on, until the output result of the n-3th upsampling unit and the output result of the n-2th upsampling unit are spliced ​​to obtain a sampling fusion result, and the sampling fusion result is upsampled by the nth upsampling unit to obtain a second upsampling result.

5. The image super-resolution reconstruction method according to claim 4, characterized in that: The upsampling unit includes a plurality of upsampling subunits and a splicing subunit, and the upsampling process of the feature extraction result by the first upsampling unit includes: Performing multi-scale sampling processing on the feature extraction result through the multiple up-sampling sub-units to obtain multiple scale sampling results; The plurality of scale sampling results are spliced ​​by the splicing subunit.

6. The image super-resolution reconstruction method according to claim 1, characterized in that: Before acquiring the first image to be super-resolution reconstructed, the method further includes: Acquire an image sample group, the image sample group comprising a first image sample and a second image sample, the resolution of the first image sample being greater than the resolution of the second image sample; Constructing a discriminant network corresponding to the image super-resolution reconstruction network; The image super-resolution reconstruction network is pre-trained according to the image sample group, and the image super-resolution reconstruction network and the discriminant network are jointly trained according to the image sample group.

7. The image super-resolution reconstruction method according to claim 6, characterized in that: The jointly training the image super-resolution reconstruction network and the discriminant network according to the image sample group comprises: Performing image super-resolution reconstruction on the second image sample by using the image super-resolution reconstruction network to obtain a reconstructed image corresponding to the second image sample; Obtaining a generation loss of the image super-resolution reconstruction network according to the first image sample, the reconstructed image and the discriminant network; Obtaining a discriminant loss of the discriminant network according to the first image sample and the reconstructed image; Taking the convergence of network parameters as a constraint, the image super-resolution reconstruction network and the discriminant network are jointly trained according to the generation loss and the discriminant loss.

8. The image super-resolution reconstruction method according to claim 7, characterized in that: Obtaining a generation loss of the image super-resolution reconstruction network according to the first image sample, the reconstructed image, and the discriminant network, including: Obtaining a reconstruction loss of the image super-resolution reconstruction network according to the first image sample and the reconstructed image; By means of the discriminant network, an adversarial loss of the image super-resolution reconstruction network is calculated according to the similarity between the first image sample and the reconstructed image; The generation loss of the image super-resolution reconstruction network is obtained according to the reconstruction loss and the adversarial loss.

9. The image super-resolution reconstruction method according to claim 8, characterized in that: Obtaining a reconstruction loss of the image super-resolution reconstruction network according to the first image sample and the reconstructed image, including: Extracting features from the first image sample and the reconstructed image according to the frequency to obtain feature information; Acquire a high-frequency loss and a low-frequency loss between the first image sample and the reconstructed image according to the feature information; Calculating, according to the correlation between the first image sample and the reconstructed image, a full image loss of the first image sample and the reconstructed image; The reconstruction loss of the image super-resolution reconstruction network is obtained according to the high-frequency loss, the low-frequency loss and the full-image loss.

10. The image super-resolution reconstruction method according to claim 9, characterized in that: Obtaining the generation loss of the generation network according to the image super-resolution reconstruction loss and the adversarial loss includes: Assign corresponding weights to the high-frequency loss, low-frequency loss, full-image loss and adversarial loss respectively; The weighted high-frequency loss, low-frequency loss, full-image loss, and adversarial loss are added together to obtain the generation loss of the generation network.

11. The image super-resolution reconstruction method according to claim 6, characterized in that: The step of acquiring an image sample group comprises: Acquiring a plurality of first image samples; Performing down-sampling processing on each of the first image samples to obtain a second image sample corresponding to each of the first image samples; Each of the first image samples and its corresponding second image sample are set as the image sample group.

12. An image super-resolution reconstruction device, characterized in that: include: An acquisition module, used for acquiring a first image to be super-resolution reconstructed; An acquisition network module is used to acquire a pre-trained image super-resolution reconstruction network, wherein the image super-resolution reconstruction network includes a feature extraction module, a residual module, an upsampling module and a reconstruction module; the residual module includes a plurality of residual units, and the residual unit includes a plurality of residual weight units; A feature extraction module, used to extract features from the first image through the feature extraction module to obtain a feature extraction result; The residual processing module is used to perform residual processing on the feature extraction result through the residual module to obtain a residual processing result, including: inputting the feature extraction result into the first residual weight unit for residual fusion processing, and outputting the residual fusion result; splicing the residual fusion result and the feature extraction result and inputting them into the second residual weight unit for residual fusion processing, and so on, until the output result of the penultimate residual weight unit and the input data are spliced ​​and input into the last residual weight unit for residual fusion processing; splicing the output result of the last residual weight unit and the input data, Obtain a splicing result; multiply the splicing result and a first preset coefficient to obtain a first product result, and multiply the feature extraction result and a second preset coefficient to obtain a second product result, wherein the first preset coefficient and the second preset coefficient are updated following the pre-training process; perform splicing processing on the first product result and the second product result to obtain the adaptive residual result; input the adaptive residual result to a second residual unit for adaptive residual processing, and so on, until the output result of the previous residual unit is input to the last residual unit for adaptive residual processing, and output the residual processing result; A sampling processing module, configured to perform upsampling processing on the feature extraction result through the upsampling module to obtain a first upsampling result, and to perform upsampling processing on the residual processing result through the upsampling module to obtain a second upsampling result; A fusion module, used for fusing the first upsampling result and the second upsampling result to obtain a fusion result; A reconstruction module is used to perform super-resolution reconstruction on the fusion result through the reconstruction module to obtain a second image, wherein the resolution of the second image is greater than the resolution of the first image.

13. A storage medium having a computer program stored thereon, characterized in that: When the computer program is loaded by a processor, the image super-resolution reconstruction method according to any one of claims 1 to 11 is executed.

14. An electronic device comprising a processor and a memory, wherein the memory stores a computer program, characterized in that: The processor is used to execute the image super-resolution reconstruction method according to any one of claims 1 to 11 by loading the computer program.