Image restoration method, device, storage medium and electronic device

By optimizing the multi-scale convolution structure in the enhanced depth super-resolution network model (EDSR), the problem of low image restoration efficiency in the existing technology is solved and efficient image restoration is achieved.

CN113920008BActive Publication Date: 2024-10-15WUHAN TCL CORP RES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010652640.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-08
Publication Date
2024-10-15
Estimated Expiration
2040-07-08

AI Technical Summary

Technical Problem

The deep learning network model used for image restoration in the existing technology requires a deeper network when processing more data, resulting in low image restoration efficiency, large computational workload, and difficulty in obtaining high-quality images.

Method used

By optimizing the enhanced deep super-resolution network model (EDSR), multiple multi-scale convolutions are replaced by multiple single-scale convolutions, which improves the scale of image features and reduces the amount of calculation, thereby improving the efficiency of image restoration.

Benefits of technology

While ensuring the performance of the model, it significantly reduces the computational complexity of image restoration, improves the efficiency of image restoration, and obtains high-quality images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113920008B_ABST
    Figure CN113920008B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of image processing technology, and provides an image restoration method, device, storage medium and electronic device, including: obtaining a first image, the first image being the image before image restoration; inputting the first image into an optimized enhanced deep super-resolution network model EDSR for processing, and outputting a second image, the second image being the image after image restoration, the optimized enhanced deep super-resolution network model EDSR being used to improve the scale of image features and reduce the amount of computation; wherein the first residual module in the optimized enhanced deep super-resolution network model EDSR includes multiple multi-scale convolutions that replace the multiple single-scale convolutions included in the second residual module in the enhanced deep super-resolution network model EDSR before optimization. The present application can greatly reduce the amount of computation for image restoration while ensuring the performance of the optimized enhanced deep super-resolution network model EDSR, thereby improving the efficiency of image restoration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and in particular relates to an image restoration method, device, storage medium and electronic device. Background Art

[0002] Image restoration, also known as image recovery, aims to restore high-quality images from degraded images. During the process of shooting, transmitting, and receiving natural images, due to the limitations of the hardware equipment itself and the noise in the environment, the visual effects of natural images are not ideal. The images presented are generally blurred and have noise pollution, making it difficult to obtain high-quality images, which cannot meet the image presentation effects in real life.

[0003] Due to the characteristics of automatic feature extraction, as well as powerful computing power and generalization ability, deep learning methods have become the mainstream method in various fields of computer vision, especially in the field of image restoration. However, in the existing technology, the deep learning network model used for image restoration requires a deeper network when processing more data, and the deep learning network model has a large amount of computation, resulting in low efficiency of image restoration. Summary of the invention

[0004] The embodiments of the present application provide an image restoration method, device, storage medium and electronic device for greatly reducing the amount of image restoration computation while ensuring the performance of an optimized enhanced deep super-resolution network model EDSR, thereby improving the efficiency of image restoration.

[0005] In a first aspect, an embodiment of the present application provides an image restoration method, comprising:

[0006] Obtaining a first image, where the first image is an image before image restoration;

[0007] The first image is input into the optimized enhanced deep super-resolution network model EDSR for processing, and a second image is output, where the second image is an image after image restoration, and the optimized enhanced deep super-resolution network model EDSR is used to increase the scale of image features and reduce the amount of computation;

[0008] Among them, the multiple multi-scale convolutions included in the first residual module in the optimized enhanced deep super-resolution network model EDSR replace the multiple single-scale convolutions included in the second residual module in the enhanced deep super-resolution network model EDSR before optimization, and the multiple single-scale convolutions correspond one-to-one to the multiple multi-scale convolutions.

[0009] In a second aspect, an embodiment of the present application provides an image restoration device, comprising:

[0010] An image acquisition unit, used for acquiring a first image, where the first image is an image before image restoration;

[0011] The image restoration unit is used to input the first image into the optimized enhanced deep super-resolution network model EDSR for processing, and output a second image, where the second image is the restored image. The optimized enhanced deep super-resolution network model EDSR is used to improve the scale of image features and reduce the amount of computation; wherein the multiple multi-scale convolutions included in the first residual module in the optimized enhanced deep super-resolution network model EDSR replace the multiple single-scale convolutions included in the second residual module in the enhanced deep super-resolution network model EDSR before optimization, and the multiple single-scale convolutions correspond one-to-one to the multiple multi-scale convolutions.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the image restoration method of the first aspect when executing the computer program.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the image restoration method of the first aspect.

[0014] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the image restoration method of the first aspect.

[0015] In an embodiment of the present application, a first image is obtained, the first image is the image before image restoration, the first image is input into the optimized enhanced deep super-resolution network model EDSR for processing, and a second image is output, the second image is the image after image restoration, wherein the first residual module in the optimized enhanced deep super-resolution network model EDSR includes multiple multi-scale convolutions to replace the multiple single-scale convolutions included in the second residual module in the enhanced deep super-resolution network model EDSR before optimization, and the multiple single-scale convolutions correspond one-to-one to the multiple multi-scale convolutions. Since the optimized enhanced deep super-resolution network model EDSR is used to increase the scale of image features and reduce the amount of computation, it can not only ensure the performance of the optimized enhanced deep super-resolution network model EDSR, but also greatly reduce the amount of computation for image restoration, thereby improving the efficiency of image restoration. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0017] Figure 1 is a flowchart of an implementation of an image restoration method provided in an embodiment of the present application;

[0018] Figure 2 It is a specific implementation flow chart of the image restoration method provided in the embodiment of the present application, in which the first image is input into the optimized enhanced deep super-resolution network model EDSR to process and output the second image;

[0019] Figure 3 This is a specific implementation flow chart of obtaining the first image feature set in the image restoration method provided in the embodiment of the present application;

[0020] Figure 4 It is a specific implementation flow chart of processing the residual block ResBlock in the image restoration method provided in the embodiment of the present application;

[0021] Figure 5 It is a specific implementation flow chart of multi-scale feature extraction in the image restoration method provided in the embodiment of the present application;

[0022] Figure 5.1 It is a schematic diagram of the structure of multi-scale convolution with integer sampling multiples in the image restoration method provided in an embodiment of the present application;

[0023] Figure 5.2 1 is a schematic diagram of the structure of an enhanced deep super-resolution network model EDSR before optimization in the image restoration method provided in an embodiment of the present application;

[0024] Figure 6 is a structural block diagram of an image restoration device provided in an embodiment of the present application;

[0025] Figure 7 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0027] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0028] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0029] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0030] An embodiment of the present application provides an image restoration method, which is applicable to various types of electronic devices or servers that need to perform image processing such as image restoration and image reconstruction.

[0031] The image restoration method provided by the present application is exemplarily described below in conjunction with specific embodiments.

[0032] Figure 1 The implementation process of the image restoration method provided in the embodiment of the present application is shown, and the method process may include the following steps S101 to S102.

[0033] S101: The electronic device obtains a first image, where the first image is an image before image restoration.

[0034] Image restoration refers to magnifying a low-resolution image to add more image details and obtain a clear high-resolution image. The first image is a low-resolution image before image restoration.

[0035] In the embodiment of the present application, the first image may be a three-primary color image (RGB image) or an original image (RAW image) acquired by an image sensor.

[0036] S102: The electronic device inputs the first image into the optimized enhanced deep super-resolution network model EDSR for processing, and outputs a second image, which is an image after image restoration. The optimized enhanced deep super-resolution network model EDSR is used to improve the scale of image features and reduce the amount of computation; wherein, the multiple multi-scale convolutions included in the first residual module in the optimized enhanced deep super-resolution network model EDSR replace the multiple single-scale convolutions included in the second residual module in the enhanced deep super-resolution network model EDSR before optimization, and the multiple single-scale convolutions correspond one-to-one to the multiple multi-scale convolutions.

[0037] As a possible implementation of the present application, the optimized enhanced deep super-resolution network model EDSR (hereinafter referred to as optimized EDSR) includes a feature extraction module, a first residual module, a global skip connection module and an upsampling reconstruction module. Figure 2 The specific implementation process of the image restoration method provided in the embodiment of the present application, in which the electronic device inputs the first image into the optimized enhanced deep super-resolution network model EDSR for processing and outputs the second image, is shown in detail as follows:

[0038] A1: The electronic device inputs the first image into the feature extraction module for processing and outputs a target feature image.

[0039] Specifically, the first image is input into the feature extraction module for convolution processing, and a target feature image of the first image is output. The feature extraction module is used to extract image features of the first image and generate a target feature image output. Image features mainly include but are not limited to color features, texture features, shape features and spatial relationship features of the image, and the extracted image features are independent of their specific form.

[0040] In some implementations, the feature extraction module may be any one of the existing networks, and the feature extraction module may be composed of a full convolutional layer, for example, a 3×3 convolution.

[0041] In the embodiment of the present application, it is assumed that the resolution of the first image is [C×H×W], where C represents the number of channels of the image, H represents the height, and W represents the width. The number of channels of the color image is 3, and the number of channels of the grayscale image is 1. After the first image is subjected to feature extraction by the feature extraction module, the output feature dimension information is [C 0 ×H×W]. 0 Indicates the number of channels after convolution adjustment in the feature extraction module.

[0042] A2: The electronic device inputs the target feature image into the first residual network module for processing, and outputs a first image feature set.

[0043] In an embodiment of the present application, the output of the feature extraction module is connected to the input of the first residual network module. After the feature extraction module outputs the target feature image, it is input into the first residual network module for processing.

[0044] In a possible implementation, the first residual network module includes N identical optimized residual blocks ResBlock and a first convolution, where N is an integer greater than 2, such as Figure 3 As shown, step A2 specifically includes:

[0045] A21: The electronic device inputs the target feature image into the first optimized residual block ResBlock for processing, and outputs the first processing result. The optimized residual block ResBlock includes a multi-scale convolution for extracting multi-scale features.

[0046] A22: The electronic device executes in a loop, inputs the i-th processing result into the (i+1)-th optimized residual block ResBlock for processing, and outputs the (i+1)-th processing result, until i=(N-1), and obtains the third image feature set, where i is an increasing integer with an initial value of 1 and an interval of 1.

[0047] A23: The electronic device obtains the first image feature set according to the third image feature set and the first convolution.

[0048] In the embodiment of the present application, N identical optimized ResBlocks are stacked, and the feature extraction module is connected to the stacked N identical optimized ResBlocks. Specifically, the target feature image is input to the first optimized ResBlock to obtain the first processing result, and then the first processing result is input to the second optimized ResBlock connected to the first optimized ResBlock to obtain the second processing result, and so on, the target feature image is processed by the N optimized ResBlocks in sequence to obtain the Nth processing result, which is the third image feature set.

[0049] As a possible implementation of the present application, the (i+1)th optimized residual block ResBlock includes two identical multi-scale convolutions, activation functions and composite blocks Mult, such as Figure 4 As shown, the electronic device inputs the i-th processing result into the (i+1)th optimized residual block ResBlock for processing, and outputs the (i+1)th processing result. The specific implementation process is detailed as follows:

[0050] B1: The electronic device obtains the first sub-processing result according to the i-th processing result and the first multi-scale convolution.

[0051] B2: The electronic device obtains the second sub-processing result according to the first sub-processing result and the activation function.

[0052] B3: The electronic device obtains the third sub-processing result based on the second sub-processing result and the second multi-scale convolution.

[0053] B4: The electronic device obtains the fourth sub-processing result according to the third sub-processing result and the composite block Mult.

[0054] B5: The electronic device performs feature fusion on the i-th processing result and the fourth sub-processing result to obtain the (i+1)-th processing result.

[0055] As a possible implementation of the present application, the first multi-scale convolution includes three identical convolution kernels, for example, a 3×3 convolution kernel, such as Figure 5 As shown, step B1 specifically includes:

[0056] B11: The electronic device obtains a first intermediate result according to the i-th processing result and the first convolution kernel, and the scale of the first intermediate result is the size of the first convolution kernel.

[0057] Specifically, the i-th processing result is convolved by the first convolution kernel to output a first intermediate result of a first scale size at the original resolution.

[0058] B12: The electronic device sequentially downsamples the i-th processing result by a first preset multiple, convolves it with the second convolution kernel, and upsamples it by a first preset multiple to obtain a second intermediate result, where the scale of the second intermediate result is the sum of the size of the second convolution kernel and the first preset multiple.

[0059] The first preset multiple is used to adjust the resolution of feature sampling. The first preset multiple can be 1 / 2. In the embodiment of the present application, the i-th processing result is sequentially downsampled by the first preset multiple, convolved with the second convolution kernel, and upsampled by the first preset multiple, and a second intermediate result having a scale of the sum of the size of the second convolution kernel and the first preset multiple is output.

[0060] B13: The electronic device sequentially downsamples the i-th processing result by the second preset multiple, convolves it with the third convolution kernel, and upsamples it by the second preset multiple to obtain a third intermediate result. The scale of the third intermediate result is the sum of the size of the third convolution kernel and the second preset multiple.

[0061] The second preset multiple is used to adjust the image resolution, which can be 1 / 4. The second preset multiple is different from the first preset multiple. In the embodiment of the present application, the i-th processing result is sequentially downsampled by the second preset multiple, convolved with the third convolution kernel, and upsampled by the second preset multiple, and a third intermediate result of the scale of the sum of the size of the third convolution kernel and the second preset multiple is output.

[0062] In an embodiment of the present application, according to the preset multiples of the sampling resolution, such as the first preset multiples and the second preset multiples, the scale of the image feature is increased at a specified ratio, and the increased scale of the output image feature is related to the preset multiples of the sampling resolution.

[0063] In some implementations, the downsampling process may be performed by convolution with Stride=2, maximum pooling, or mean pooling. The upsampling process may be performed by convolution with Stride=2 or nearest neighbor interpolation.

[0064] As a possible implementation of the present application, downsampling + convolution + upsampling constitutes feature extraction at a scale of 3 + s, and the first preset multiple and the second preset multiple used to adjust the sampling multiple can be either an integer multiple or a non-integer multiple. For example, the original resolution of the first image is 300 × 300, and the downsampled resolution after adjustment by the preset multiple is 200 × 200, and the downsampling is 2 / 3 of the original resolution, that is, the downsampling ratio s = 2 / 3.

[0065] For example, Figure 5.1 Multi-scale convolution using integer sampling multiples is shown. Specifically, Figure 5.1 The first branch indicates that the electronic device obtains the first intermediate result according to the i-th processing result and the first convolution kernel; the second branch indicates that the electronic device sequentially performs 2-fold downsampling, convolution with the second convolution kernel, and 2-fold upsampling on the i-th processing result to obtain the second intermediate result. The third branch indicates that the electronic device sequentially performs 4-fold downsampling, convolution with the third convolution kernel, and 4-fold upsampling on the i-th processing result to obtain the third intermediate result. Then, the first intermediate result, the second intermediate result, and the third intermediate result are fused through Add.

[0066] In the embodiment of the present application, for upsampling or downsampling processing of non-integer multiples, bilinear interpolation operation can be used. For upsampling or downsampling processing of integer multiples, in addition to bilinear interpolation operation, space_to_depth function operation can also be used.

[0067] In an embodiment of the present application, the sum of the number of features of the first intermediate result of the first scale size, the second intermediate result of the second scale size, and the third intermediate result of the third scale size is equal to the number of features in the target feature image.

[0068] B14: The electronic device performs feature fusion on the first intermediate result, the second intermediate result and the third intermediate result to obtain a first sub-processing result.

[0069] As a possible implementation of the present application, the first convolution kernel, the second convolution kernel, and the third convolution kernel can be used to control the number of feature channels of the output processing result. In some implementations, feature fusion uses the Add summation fusion method, then the number of feature channels of the first intermediate result, the second intermediate result, and the third intermediate result must be equal, that is, C1=C2=C3. In other implementations, feature fusion uses the Concat full connection fusion method, then the number of feature channels of the first intermediate result, the second intermediate result, and the third intermediate result may not be equal, that is, C1, C2, and C3 may be different.

[0070] Exemplarily, the first multiple and the second multiple used to adjust the image resolution are integer multiples. Assuming that the number of initial image features is C, the i-th processing result is subjected to 3×3 convolution by the first convolution kernel to obtain the first intermediate result of the first scale, the number of features is C1, and the first scale is 3; the i-th processing result is subjected to 2 times downsampling processing + 3×3 convolution processing + 2 times upsampling processing to obtain the second intermediate result of the second scale, the number of features is C2, and the second scale is 5; the third multi-scale network is used to perform 4 times downsampling processing + 3×3 convolution processing + 4 times upsampling processing to obtain the third processing result of the third scale, the number of features is C3, and the third scale is 7; C1+C2+C3=C, and C1=C2=C3. The output of the multi-scale convolution has image feature information of three scales of 3, 5, and 7 at the same time, while the output of the single-scale convolution has only the information of the single scale of 3. In terms of computational complexity, the computational complexity of the standard convolution is: 9HWCC, while in the multi-scale convolution in the embodiment of the present application, the computational complexity of the 3×3 scale information part is 3HWCC, the computational complexity of the 5×5 scale information part is 3HWCC / 4, and the computational complexity of the 7×7 scale information part is 3HWCC / 16. The computational complexity of the multi-scale convolution in the present application is approximately 21 / 48 of that of the standard convolution.

[0071] Generally, the way to obtain image features of multiple scales is to use convolution kernels of different sizes to extract image features of multiple scales. This feature extraction method also requires a deeper network. Figure 5.2 As shown, the EDSR model before optimization includes a residual block ResBlock and an upsampling module, wherein the residual block ResBlock includes multiple single-scale convolutions, activation functions, and a composite block Mult. To obtain image features of multiple scales in EDSR, convolution kernels of different sizes are required, thereby deepening the network. In the embodiment of the present application, the optimized residual block ResBlock includes two identical multi-scale convolutions, activation functions, and a composite block Mult, that is, the convolution kernels of the same scale, such as a 3×3 convolution kernel, are used in the embodiment of the present application. The purpose of obtaining image features of multiple scales is achieved by adjusting the sampling resolution of the first image. The multi-scale feature acquisition process does not deepen the convolution network, thereby avoiding an increase in the amount of calculation.

[0072] A3: The electronic device performs feature fusion on the target feature image and the first image feature set according to the global skip connection module to obtain a second image feature set.

[0073] In the embodiment of the present application, the function of the global skip connection module is to fuse features. Specifically, the global skip connection module fuses the target feature image and the first image feature set, and then outputs the second image feature set. The global skip connection module can not only fuse multi-scale features, but also accelerate network convergence, and allow the gradient to be directly propagated from the back end to the front end, avoiding the gradient vanishing phenomenon.

[0074] A4: The electronic device inputs the second image feature set into the upsampling reconstruction module for processing and outputs a second image. The upsampling reconstruction module is used to output a high-resolution second image according to the second image feature set output by the global skip connection to achieve image restoration.

[0075] In an embodiment of the present application, an optimized enhanced deep super-resolution network model EDSR is constructed, and the optimized enhanced deep super-resolution network model EDSR includes a feature extraction module, a first residual module, a global skip connection module, and an upsampling reconstruction module. The electronic device inputs the first image into the optimized EDSR, and obtains a high-resolution second image after being processed in sequence by the feature extraction module, the first residual module, the global skip connection module, and the upsampling reconstruction module.

[0076] As a possible implementation of the present application, the training of the optimized enhanced deep super-resolution network model EDSR includes:

[0077] D1: The electronic device obtains sample training data, where the sample training data includes a sample original image and a sample restored image corresponding to the sample original image.

[0078] Specifically, the sample original image is a low-resolution image, and the sample restored image is a high-resolution image corresponding to the sample original image.

[0079] D2: The electronic device inputs the sample original image into the optimized enhanced deep super-resolution network model EDSR for processing, and outputs a generated image corresponding to the sample original image, which is a high-resolution image.

[0080] In an embodiment of the present application, an optimized enhanced deep super-resolution network model EDSR is constructed, and the optimized EDSR includes a feature extraction module, a first residual module, a global skip connection module, and an upsampling reconstruction module. The electronic device inputs the sample original image into the constructed optimized enhanced deep super-resolution network model EDSR, and generates an image after being processed in sequence by the feature extraction module, the first residual module, the global skip connection module, and the upsampling reconstruction module.

[0081] D3: The electronic device adjusts the model parameters of the optimized enhanced deep super-resolution network model EDSR according to the sample restored image and the generated image, and continues to execute the step of inputting the sample original image into the optimized enhanced deep super-resolution network model EDSR until the preset training conditions are met to obtain the trained optimized enhanced deep super-resolution network model EDSR.

[0082] In the embodiment of the present application, the sample restored image is a high-resolution image after restoration. By comparing the generated image of the optimized EDSR with the sample restored image, a difference is obtained, and the obtained difference is used to adjust the model parameters of the optimized EDSR, so that the generated image of the optimized EDSR is closer to the sample restored image.

[0083] In an embodiment of the present application, the electronic device adjusts and modifies the model parameters of the optimized EDSR according to the sample restored image and the generated image, and after modifying the model parameters, continues to perform the step of inputting the sample original image into the optimized EDSR until the preset training condition is met. In some embodiments, the preset training condition may be that the number of trainings reaches a preset number, for example, 80,000 times. In other embodiments, the preset training condition may be that the optimized EDSR reaches convergence.

[0084] As can be seen from the above, in the embodiment of the present application, the electronic device obtains a first image, which is an image before image restoration, inputs the first image into the optimized enhanced deep super-resolution network model EDSR for processing, and outputs a second image, which is an image after image restoration. The optimized enhanced deep super-resolution network model EDSR is used to improve the scale of image features and reduce the amount of computation, wherein the multiple multi-scale convolutions included in the first residual module in the optimized enhanced deep super-resolution network model EDSR replace the multiple single-scale convolutions included in the second residual module in the enhanced deep super-resolution network model EDSR before optimization, and the multiple single-scale convolutions correspond one-to-one to the multiple multi-scale convolutions. Since the optimized enhanced deep super-resolution network model EDSR is used to improve the scale of image features and reduce the amount of computation, it can not only ensure the performance of the optimized enhanced deep super-resolution network model EDSR, but also greatly reduce the amount of computation for image restoration, thereby improving the efficiency of image restoration.

[0085] It should be understood that the size of the serial numbers of the steps in the embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0086] Corresponding to the image restoration method of the above embodiment, Figure 6A structural block diagram of an image restoration device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0087] Reference Figure 6 The image restoration device comprises: an image acquisition unit 61, an image restoration unit 62, wherein:

[0088] An image acquisition unit, used for acquiring a first image, where the first image is an image before image restoration;

[0089] The image restoration unit is used to input the first image into the optimized enhanced deep super-resolution network model EDSR for processing, and output a second image, where the second image is the restored image. The optimized enhanced deep super-resolution network model EDSR is used to improve the scale of image features and reduce the amount of computation; wherein the multiple multi-scale convolutions included in the first residual module in the optimized enhanced deep super-resolution network model EDSR replace the multiple single-scale convolutions included in the second residual module in the enhanced deep super-resolution network model EDSR before optimization, and the multiple single-scale convolutions correspond one-to-one to the multiple multi-scale convolutions.

[0090] In a possible implementation, the optimized enhanced deep super-resolution network model EDSR includes a feature extraction module, a first residual module, a global skip connection module and an upsampling reconstruction module. When the first image is input into the optimized enhanced deep super-resolution network model EDSR for processing and the second image is output, the image restoration unit is specifically used for:

[0091] Input the first image into a feature extraction module for processing, and output a target feature image;

[0092] Input the target feature image into the first residual network module for processing, and output a first image feature set;

[0093] Performing feature fusion on the target feature image and the first image feature set according to the global skip connection module to obtain a second image feature set;

[0094] The second image feature set is input into the upsampling reconstruction module for processing, and a second image is output.

[0095] In a possible implementation, the first residual network module includes N identical optimized residual blocks ResBlock and a first convolution, where N is an integer greater than 2. In inputting the target feature image into the first residual network module for processing and outputting the first image feature set, the image restoration unit is specifically used for:

[0096] Input the target feature image into the first optimized residual block ResBlock for processing, and output the first processing result;

[0097] The ith processing result is input into the (i+1)th optimized residual block ResBlock for processing in a loop, and the (i+1)th processing result is output, until i=(N-1), and a third image feature set is obtained, where i is an integer whose initial value is 1 and increases by 1.

[0098] A first image feature set is obtained according to the third image feature set and the first convolution.

[0099] In a possible implementation, the (i+1)th optimized residual block ResBlock includes two identical multi-scale convolutions, activation functions, and composite blocks Mult, and in terms of inputting the i-th processing result into the (i+1)th optimized residual block ResBlock for processing and outputting the (i+1)th processing result, the image restoration unit is specifically used for:

[0100] Obtain the first sub-processing result according to the i-th processing result and the first multi-scale convolution;

[0101] Obtaining a second sub-processing result according to the first sub-processing result and the activation function;

[0102] Obtaining a third sub-processing result according to the second sub-processing result and the second multi-scale convolution;

[0103] Obtaining a fourth sub-processing result according to the third sub-processing result and the composite block Mult;

[0104] The features of the i-th processing result and the 4th sub-processing result are fused to obtain the (i+1)-th processing result.

[0105] In a possible implementation, the first multi-scale convolution includes three identical convolution kernels, and in obtaining the first sub-processing result according to the i-th processing result and the first multi-scale convolution, the image restoration unit is specifically used for:

[0106] Obtain a first intermediate result according to the i-th processing result and the first convolution kernel, where the scale of the first intermediate result is the size of the first convolution kernel;

[0107] The i-th processing result is sequentially downsampled by a first preset multiple, convolved with a second convolution kernel, and upsampled by a first preset multiple to obtain a second intermediate result, where the scale of the second intermediate result is the sum of the size of the second convolution kernel and the first preset multiple;

[0108] The i-th processing result is sequentially downsampled by a second preset multiple, convolved with a third convolution kernel, and upsampled by a second preset multiple to obtain a third intermediate result, where the scale of the third intermediate result is the sum of the size of the third convolution kernel and the second preset multiple;

[0109] The first intermediate result, the second intermediate result and the third intermediate result are subjected to feature fusion to obtain a first sub-processing result.

[0110] It should be noted that the information interaction, execution process, etc. between devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0111] The embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the following is implemented: Figures 1 to 5 The steps of any image restoration method represented.

[0112] The embodiment of the present application also provides an electronic device, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the following is achieved: Figures 1 to 5 The steps of any image restoration method represented.

[0113] The embodiment of the present application also provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the following Figures 1 to 5 The steps of any image restoration method represented.

[0114] Figure 7 is a schematic diagram of an electronic device provided by an embodiment of the present application. Figure 7 As shown, the electronic device 7 of this embodiment includes: a processor 70, a memory 71, and a computer readable instruction 72 stored in the memory 71 and executable on the processor 70. When the processor 70 executes the computer readable instruction 72, the steps in each of the image restoration method embodiments are implemented, such as Figure 1 Alternatively, when the processor 70 executes the computer-readable instructions 72, the functions of each module / unit in each device embodiment are implemented, for example Figure 6 The functions of the units 61 to 62 are shown.

[0115] Exemplarily, the computer readable instructions 72 may be divided into one or more modules / units, one or more modules / units are stored in the memory 71, and are executed by the processor 70 to complete the present application. One or more modules / units may be a series of computer readable instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the computer readable instructions 72 in the electronic device 7.

[0116] The electronic device 7 may be a mobile device or a server. The electronic device 7 may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art will appreciate that Figure 7 It is only an example of the electronic device 7 and does not constitute a limitation of the electronic device 7. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 7 may also include input and output devices, network access devices, buses, etc.

[0117] The processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0118] The memory 71 may be an internal storage unit of the electronic device 7, such as a hard disk or memory of the electronic device 7. The memory 71 may also be an external storage device of the electronic device 7, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 7. Further, the memory 71 may also include both an internal storage unit of the electronic device 7 and an external storage device. The memory 71 is used to store computer-readable instructions and other programs and data required by the electronic device. The memory 71 may also be used to temporarily store data that has been output or is to be output.

[0119] It should be noted that the information interaction, execution process, etc. between devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0120] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of each functional unit and module is used as an example. In actual application, the function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit, and the integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of each functional unit and module are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0121] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the implementation method of the present application can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each method embodiment can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

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

[0123] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An image restoration method, characterized in that: include: Obtaining a first image, where the first image is an image before image restoration; Input the first image into the optimized enhanced deep super-resolution network model EDSR for processing, and output a second image, where the second image is an image restored, and the optimized enhanced deep super-resolution network model EDSR is used to increase the scale of image features and reduce the amount of computation; Among them, the multiple multi-scale convolutions included in the first residual module in the optimized enhanced deep super-resolution network model EDSR replace the multiple single-scale convolutions included in the second residual module in the enhanced deep super-resolution network model EDSR before optimization, and the multiple single-scale convolutions correspond one to one to the multiple multi-scale convolutions; the optimized enhanced deep super-resolution network model EDSR includes a feature extraction module, the first residual module, a global skip connection module and an upsampling reconstruction module, the first residual network module includes N identical optimized residual blocks ResBlock and a first convolution, N is an integer greater than 2, and the first image is input into the optimized enhanced deep super-resolution network model EDSR for processing, and the second image is output, including: Inputting the first image into the feature extraction module for processing, and outputting a target feature image; Inputting the target feature image into the first residual network module for processing, and outputting a first image feature set, including: inputting the target feature image into the first optimized residual block ResBlock for processing, and outputting a first processing result; looping and inputting the i-th processing result into the (i+1)-th optimized residual block ResBlock for processing, and outputting the (i+1)-th processing result, until i=(N-1), to obtain a third image feature set, wherein i is an increasing integer with an initial value of 1 and an interval of 1; The (i+1)th optimized residual block ResBlock includes two identical multi-scale convolutions, an activation function and a composite block Mult, and the i-th processing result is input into the (i+1)th optimized residual block ResBlock for processing, and the (i+1)th processing result is output, including: obtaining a first sub-processing result according to the i-th processing result and the first multi-scale convolution; obtaining a second sub-processing result according to the first sub-processing result and the activation function; obtaining a third sub-processing result according to the second sub-processing result and the second multi-scale convolution; obtaining a fourth sub-processing result according to the third sub-processing result and the composite block Mult; performing feature fusion on the i-th processing result and the fourth sub-processing result to obtain the (i+1)th processing result; and obtaining a first image feature set according to the third image feature set and the first convolution; Performing feature fusion on the target feature image and the first image feature set according to the global skip connection module to obtain a second image feature set; The second image feature set is input into the upsampling reconstruction module for processing, and a second image is output.

2. The method according to claim 1, characterized in that The first multi-scale convolution includes three identical convolution kernels, and the first sub-processing result is obtained according to the i-th processing result and the first multi-scale convolution, including: Obtaining a first intermediate result according to the i-th processing result and the first convolution kernel, wherein the scale of the first intermediate result is the size of the first convolution kernel; Downsampling the i-th processing result by a first preset multiple, convolving it with a second convolution kernel, and upsampling it by the first preset multiple are performed in sequence to obtain a second intermediate result, where the scale of the second intermediate result is the sum of the size of the second convolution kernel and the first preset multiple; Downsampling the i-th processing result by a second preset multiple, convolving it with a third convolution kernel, and upsampling it by the second preset multiple are sequentially performed to obtain a third intermediate result, where the scale of the third intermediate result is the sum of the size of the third convolution kernel and the second preset multiple; Perform feature fusion on the first intermediate result, the second intermediate result, and the third intermediate result to obtain a first sub-processing result.

3. An image restoration device, characterized in that: include: An image acquisition unit, used to acquire a first image, where the first image is an image before image restoration; An image restoration unit is used to input the first image into the optimized enhanced deep super-resolution network model EDSR for processing, and output a second image, wherein the second image is an image after image restoration, and the optimized enhanced deep super-resolution network model EDSR is used to improve the scale of image features and reduce the amount of computation; wherein the first residual module in the optimized enhanced deep super-resolution network model EDSR includes multiple multi-scale convolutions that replace the multiple single-scale convolutions included in the second residual module in the enhanced deep super-resolution network model EDSR before optimization, and the multiple single-scale convolutions correspond one-to-one to the multiple multi-scale convolutions; the optimized enhanced deep super-resolution network model EDSR includes a plurality of multi-scale convolutions. The image restoration unit comprises a feature extraction module, a first residual module, a global skip connection module and an upsampling reconstruction module, wherein in inputting the first image into the optimized enhanced deep super-resolution network model EDSR for processing and outputting a second image, the image restoration unit is further used for: inputting the first image into the feature extraction module for processing and outputting a target feature image; inputting the target feature image into the first residual network module for processing and outputting a first image feature set; performing feature fusion on the target feature image and the first image feature set according to the global skip connection module to obtain a second image feature set; inputting the second image feature set into the upsampling reconstruction module for processing and outputting a second image; The first residual network module includes N identical optimized residual blocks ResBlock and a first convolution, wherein N is an integer greater than 2. In inputting the target feature image into the first residual network module for processing and outputting a first image feature set, the image restoration unit is further used for: Input the target feature image into the first optimized residual block ResBlock for processing, and output the first processing result; loop execution inputs the i-th processing result into the (i+1)-th optimized residual block ResBlock for processing, and outputs the (i+1)-th processing result, until i=(N-1), to obtain a third image feature set, wherein i is an increasing integer with an initial value of 1 and an interval of 1; obtain a first image feature set according to the third image feature set and the first convolution; The (i+1)th optimized residual block ResBlock includes two identical multi-scale convolutions, activation functions and composite blocks Mult. In terms of inputting the i-th processing result into the (i+1)th optimized residual block ResBlock for processing and outputting the (i+1)th processing result, the image restoration unit is further used for: The first sub-processing result is obtained according to the i-th processing result and the first multi-scale convolution; the second sub-processing result is obtained according to the first sub-processing result and the activation function; the third sub-processing result is obtained according to the second sub-processing result and the second multi-scale convolution; the fourth sub-processing result is obtained according to the third sub-processing result and the composite block Mult; the i-th processing result and the fourth sub-processing result are feature fused to obtain the (i+1)-th processing result.

4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the image restoration method according to any one of claims 1 to 2 is implemented.

5. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the image restoration method according to any one of claims 1 to 2 is implemented.