Image super-resolution method, device and equipment based on entropy attention

By using the entropy attention module and the large-core attention module in series in the image super-resolution method, the information entropy is calculated and the receptive field is enhanced, which solves the problem of difficult balance between reconstruction effect and inference speed in the lightweight image super-resolution method, and achieves It achieves efficient image reconstruction performance and expression capabilities.

CN118333863BActive Publication Date: 2024-08-23SOUTHWEST JIAOTONG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410772902.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-08-23
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

Existing lightweight image super-resolution methods are difficult to achieve a balance between reconstruction effect and inference speed. Due to depth limitations, the receptive field of the model is small, the expressive ability is insufficient, and the dependence between long-distance pixels cannot be effectively processed.

Method used

An image super-resolution method based on entropy attention is designed. By stacking dual attention modules in the deep feature extraction module, using the large core attention module and the entropy attention module in series, the information entropy is calculated instead of pooling to compress the image information. , and enhance the receptive field through the offset convolution kernel to improve the expression ability of the model.

Benefits of technology

It achieves an efficient lightweight image super-resolution model, improves image reconstruction performance and inference speed, solves the problem of insufficient feature information measurement in traditional methods, and improves the model's expression ability and image processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118333863B
    Figure CN118333863B
Patent Text Reader

Abstract

The present application provides an image super-resolution method, device and equipment based on entropy attention, which relates to the field of image processing technology. The method comprises: creating a single super-resolution network, wherein the single super-resolution network comprises: a shallow feature extraction module, a deep feature extraction module and an image reconstruction module; the deep feature extraction module comprises a plurality of stacked dual attention modules, wherein the dual attention module is composed of a large core attention module and an entropy attention module connected in series; inputting the original image into the shallow feature extraction module to obtain shallow features; inputting the shallow features into the deep feature extraction module for feature extraction to obtain deep features; inputting the deep features into the image reconstruction module to obtain a reconstructed super-resolution image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image super-resolution method, device and equipment based on entropy attention. Background Art

[0002] Among the existing image super-resolution reconstruction methods, many super-resolution methods only pursue better reconstruction effects, ignoring the computational burden brought by the huge number of parameters, which makes image reconstruction very time-consuming and the corresponding super-resolution models difficult to deploy in actual scenarios. Therefore, it is particularly important to design a sufficiently efficient and lightweight image super-resolution method to balance the reconstruction effect and inference speed.

[0003] However, compared with the conventional image super-resolution methods, the scale of lightweight image super-resolution methods is too small to save enough feature information, and the existing attention plug-and-play units are only designed around the conventional model, lacking consideration for scenes with insufficient information, and are not strong enough in lightweight image super-resolution methods. In addition, compared with conventional image super-resolution methods, the depth of lightweight image super-resolution methods limits the size of the model's receptive field, which results in almost no dependencies between long-distance pixels, ultimately resulting in insufficient expressiveness of the model.

[0004] Therefore, it is necessary to develop an image super-resolution method, device and equipment based on entropy attention to improve the image reconstruction accuracy of the model on the basis of a lightweight model and achieve a balance between image reconstruction effect and model inference speed. Summary of the invention

[0005] In view of the above problems, the embodiments of the present application provide an image super-resolution method, apparatus and device based on entropy attention to overcome the above problems or at least partially solve the above problems.

[0006] According to a first aspect of an embodiment of the present application, an image super-resolution method based on entropy attention is provided, the method comprising:

[0007] Creating a single super-resolution network, the single super-resolution network comprising: a shallow feature extraction module, a deep feature extraction module and an image reconstruction module; the deep feature extraction module comprises a plurality of stacked dual attention modules, the dual attention module being composed of a large core attention module and an entropy attention module connected in series;

[0008] Inputting the original image into the shallow feature extraction module to obtain shallow features;

[0009] Inputting the shallow features into the deep feature extraction module to extract features to obtain deep features;

[0010] The deep features are input into the image reconstruction module to obtain a reconstructed super-resolution image.

[0011] The second aspect of the embodiment of the present application further proposes an image super-resolution device based on entropy attention, which is used to execute the image super-resolution method based on entropy attention described in the first aspect, and the device includes:

[0012] A network creation module is used to create a single super-resolution network, wherein the single super-resolution network includes: a shallow feature extraction module, a deep feature extraction module and an image reconstruction module; the deep feature extraction module includes a plurality of stacked dual attention modules, wherein the dual attention module is composed of a large core attention module and an entropy attention module connected in series;

[0013] A first processing module, used for inputting the original image into the shallow feature extraction module to obtain shallow features;

[0014] A second processing module is used to input the shallow features into the deep feature extraction module to extract features and obtain deep features;

[0015] The third processing module is used to input the deep features into the image reconstruction module to obtain a reconstructed super-resolution image.

[0016] The third aspect of the embodiments of the present application also provides an electronic device, including a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps in the image super-resolution method based on entropy attention described in the first aspect of the embodiments of the present application.

[0017] The fourth aspect of the embodiment of the present application also provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the image super-resolution method based on entropy attention described in the first aspect of the embodiment of the present application are implemented.

[0018] The fifth aspect of the embodiments of the present application also provides a computer program product. When the computer program product is run on an electronic device, the processor is enabled to implement the steps in the image super-resolution method based on entropy attention as described in the first aspect of the embodiments of the present application.

[0019] An entropy attention-based image super-resolution method provided in an embodiment of the present application comprises: creating a single super-resolution network, wherein the single super-resolution network comprises: a shallow feature extraction module, a deep feature extraction module and an image reconstruction module; the deep feature extraction module comprises a plurality of stacked dual attention modules, wherein the dual attention module is composed of a large core attention module and an entropy attention module connected in series; inputting the original image into the shallow feature extraction module to obtain shallow features; inputting the shallow features into the deep feature extraction module for feature extraction to obtain deep features; and inputting the deep features into the image reconstruction module to obtain a reconstructed super-resolution image.

[0020] The specific beneficial effects are:

[0021] On the one hand, the present application realizes an efficient lightweight image super-resolution model by performing deep feature extraction through multiple stacked dual attention modules in a single super-resolution network. As a lightweight model (the feature distillation module is composed of multiple dual attention modules in series), the single super-resolution network has faster model inference speed and higher image processing efficiency.

[0022] On the other hand, in the dual attention module, this application innovatively proposes to use the entropy attention module to calculate information entropy instead of pooling to compress image information, providing more information for the model to solve the problem that traditional channel attention cannot measure the amount of feature information. In addition, it is proposed to connect the large core attention module in series with the entropy attention module, and use the large core attention module to provide the model with a larger receptive field, so that the model can obtain better expression ability, improve the model's image reconstruction performance, and achieve a balance between the model's reasoning speed and image reconstruction effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0024] Figure 1 It is a flowchart of the steps of an image super-resolution method based on entropy attention provided in an embodiment of the present application;

[0025] Figure 2 Schematic diagram of the architecture of a single super-resolution network provided in an embodiment of the present application;

[0026] Figure 3 It is a processing flow diagram of a dual attention module provided in an embodiment of the present application;

[0027] Figure 4 It is a schematic diagram of a processing flow of shifting a large core attention layer provided in an embodiment of the present application;

[0028] Figure 5 It is a schematic diagram of a processing flow of an entropy attention layer provided in an embodiment of the present application;

[0029] Figure 6 is a structural schematic diagram of an image super-resolution device provided in an embodiment of the present application;

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

[0031] The exemplary embodiments of the present application will be described in more detail below in conjunction with the accompanying drawings in the embodiments of the present application. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to enable the scope of the present application to be fully communicated to those skilled in the art.

[0032] Among the existing image super-resolution reconstruction methods, many super-resolution methods only pursue better reconstruction effects, ignoring the computational burden brought by the huge number of parameters, which makes image reconstruction very time-consuming and the corresponding super-resolution models difficult to deploy in actual scenarios. Therefore, it is particularly important to design a sufficiently efficient and lightweight image super-resolution method to balance the reconstruction effect and inference speed.

[0033] However, compared with the conventional image super-resolution methods, the scale of lightweight image super-resolution methods is too small to save enough feature information, and the existing attention plug-and-play units are only designed around the conventional model, lacking consideration for scenes with insufficient information, and are not strong enough in lightweight image super-resolution methods. In addition, compared with conventional image super-resolution methods, the depth of lightweight image super-resolution methods limits the size of the model's receptive field, which results in almost no dependencies between long-distance pixels, ultimately resulting in insufficient expressiveness of the model.

[0034] In view of the above problems, the embodiment of the present application proposes an image super-resolution method based on entropy attention to improve the image reconstruction performance of the lightweight model and achieve a balance between the model reasoning speed and the image reconstruction effect. The following is a detailed description of the image super-resolution method based on entropy attention provided by the embodiment of the present application through some embodiments and their application scenarios in conjunction with the accompanying drawings.

[0035] The first aspect of the present application embodiment provides an image super-resolution method based on entropy attention, referring to Figure 1 , Figure 1 A flowchart of a method for image super-resolution based on entropy attention is provided in an embodiment of the present application, such as Figure 1 As shown, the method includes:

[0036] Step S101, creating a single super-resolution network, the single super-resolution network comprising: a shallow feature extraction module, a deep feature extraction module and an image reconstruction module; the deep feature extraction module comprises a plurality of stacked dual attention modules, the dual attention module is composed of a large core attention module and an entropy attention module connected in series.

[0037] Specifically, refer to Figure 2 , Figure 2 A schematic diagram of the architecture of a single super-resolution network is shown, Figure 2 As shown in the figure, the single super-resolution network consists of three key components: a shallow feature extraction module, a deep feature extraction module (consisting of multiple stacked dual attention modules) and an image reconstruction module.

[0038] Among them, the deep feature extraction module in the single super-resolution network is composed of multiple dual-attention blocks (DAB) connected alternately in series, and each dual-attention module is composed of a large core attention module and an entropy attention module connected in series. In order to achieve excellent reconstruction effects, the overall structure of Transformer is imitated, but the difference is that the convolution-based large core attention mechanism and entropy attention mechanism are used as substitutes in the attention part, that is, the large core attention module and the entropy attention module use different attention mechanisms. The large core attention module uses the large core attention mechanism to extract the input features of the dual attention module, and the entropy attention module uses the entropy attention mechanism to further extract the output features of the large core attention module to obtain the output features of the dual attention module.

[0039] In the related art, the attention plug-and-play unit often used in the image super-resolution model is only designed around the model of regular size, lacks consideration of the scene with insufficient information, and is not strong enough in the lightweight image super-resolution method, which easily leads to problems such as blurred details of the reconstructed image. To solve this problem, the embodiment of the present application proposes a dual attention module, referring to Figure 3 , Figure 3 A schematic diagram of the processing flow of a dual attention module is shown, such as Figure 3As shown, the dual attention module (DAB) is composed of a large core attention module and an entropy attention module in series, wherein the large core attention module and the entropy attention module respectively adopt different attention mechanisms. On the one hand, the embodiment of the present application innovatively proposes to use the entropy attention module (using the corresponding entropy attention mechanism) to calculate the information entropy instead of pooling to compress the image information, and provide more information for the model (i.e., a single super-resolution network) to solve the problem that the traditional channel attention cannot measure the amount of feature information. On the other hand, it is proposed to use a large core attention module (using a large core attention mechanism) to use the large core attention module to provide a larger receptive field for the model, so that the model can obtain better expression ability, improve the image reconstruction performance of the model, and achieve a balance between the model reasoning speed and the image reconstruction effect. Therefore, when extracting deep features, different attention mechanisms are used to alternately extract features to achieve efficient extraction of image features, so that the final reconstructed image is more accurate and the image reconstruction performance of the model is improved.

[0040] The following content specifically describes the big core attention module and an entropy attention module of different attention mechanisms adopted in the embodiments of the present application.

[0041] In a possible implementation, the processing flow of the large core attention module is as follows:

[0042] Step S201, performing a layer normalization operation on a given first input feature, and passing a 1×1 convolution layer to increase the number of channels to obtain a first processed feature.

[0043] For the dual attention module, the given input feature (i.e., the first input feature) is first extracted by the large core attention module to obtain the first output feature. In this embodiment, a more efficient large core attention mechanism is used to perceive a wider range of information in the image, thereby increasing the receptive field of the super-resolution model. First, a layer normalization (LN) operation (such as Figure 3 The first processed feature is obtained by using the LayerNorm module in , and then passing through a convolution layer with a convolution kernel size of 1 to increase the number of channels.

[0044] Step S202, the first processed feature is passed through an offset large core attention layer (such as Figure 3 The SLKA module in the image is processed to obtain the second processed feature.

[0045] In a possible implementation, the step S202, processing the first processed feature through an offset large core attention layer to obtain a second processed feature, includes:

[0046] Step S2021, processing the first processed feature through a convolution layer with an offset convolution kernel of 1 to obtain a first large kernel attention feature.

[0047] Reference Figure 4 , Figure 4 A schematic diagram of the processing flow of a shifted large kernel attention layer (SLKA) is shown, as Figure 4 As shown, first, for the input feature (the first processed feature), a 1×1 convolution layer with an offset is used (such as Figure 4 ShiftConv module in ), obtain the first large core attention feature. The core logic of the large core attention mechanism is to decompose a large convolution kernel into three parts: a spatial local convolution, a spatial long-range convolution, and a channel convolution. In the related large core attention mechanism, when the internal convolution kernel size is set too large, the effect of the model will decrease. Therefore, in order to further enhance the receptive field of the model, the embodiment of the present application uses a convolution layer with an offset convolution kernel of 1 to replace the convolution layer with a convolution kernel of 1 in the traditional large core attention mechanism LKA.

[0048] Step S2022: Input the first large core attention feature into a deep convolution layer with a convolution kernel size of 5 for processing to obtain a second large core attention feature. Specifically, the feature of the convolution layer with a convolution kernel size of 1 is input into a deep convolution layer (DWC) with a convolution kernel size of 5, that is, Figure 4 The DWConv module in ,gets the second largest core attention feature.

[0049] Step S2023, the second largest core attention feature is input into a deep convolution layer with a convolution kernel size of 7 and a dilation rate of 3 for processing to obtain a third largest core attention feature. Specifically, the feature passing through the deep convolution layer with a convolution kernel size of 5 is input into a deep convolution layer with a convolution kernel size of 7 and a dilation rate of 3 (Dilated Depth-Wise Convolution, D2WC), such as Figure 4 The DDWConv module in ,gets the third largest core attention feature.

[0050] Step S2024, multiply the third core attention feature by the first processed feature to obtain the second processed feature.

[0051] In this embodiment, the processing flow of shifting the large core attention layer can be expressed as the following formula:

[0052] ;

[0053] in, xrepresents the input feature of the offset large core attention layer (i.e., the first processed feature of step S2021), y represents the output feature of the offset large core attention layer (i.e., the second processed feature of step S2024), represents the convolution layer with offset convolution kernel 1 in step S2021, represents the depthwise convolution with a kernel size of 5 in step S2022, Indicates that the convolution kernel size in step S2023 is 7 and the depth convolution with a dilation rate of 3. The present application embodiment proposes a shifting large kernel attention (SLKA) with a larger receptive field. Figure 4 As shown in the figure, the composition of SLKA is simple. The input is first processed by a convolution layer with an offset convolution kernel of 1, then input to a deep convolution layer with a convolution kernel size of 5, and finally input to a deep convolution with a convolution kernel size of 7 and a dilation rate of 3 to obtain large-core attention. Therefore, by setting an offset large-core attention layer and decomposing large-core convolution, the model can capture long-range relationships with a smaller computational cost and fewer parameters, thereby enhancing the model's ability to reconstruct details.

[0054] Step S203: Pass the second processed features through a 1×1 convolution layer to reduce the number of channels to obtain third processed features.

[0055] Step S204, adding the third processed feature to the first input feature (corresponding to Figure 3 The ⊕ symbol after the SLKA module in is used to obtain the first intermediate feature.

[0056] Step S205, the first intermediate feature is layer-normalized and processed by a spatial-gate feed-forward network (SGFN) (corresponding to Figure 3 The SGFN module in ), obtains the fourth processed feature.

[0057] Step S206, adding the fourth processed feature to the first intermediate feature (corresponding to Figure 3 The ⊕ symbol after the SGFN module in is used to obtain the first output feature.

[0058] In this embodiment, the processing flow of the large core attention module can be expressed as the following formula:

[0059]

[0060] ;

[0061] Wherein, x represents the input feature of the large core attention module (i.e., the first input feature in step S201), represents the layer normalization operation in step S201, represents the convolution layer with a convolution kernel size of 1 in step S201, represents the offset large core attention layer in step S202, represents the convolution layer with a convolution kernel size of 1 in step S203, represents the first intermediate feature in step S204, represents the spatial gated feedforward network in step S205, Represents the output feature of the large core attention module (i.e., the first output feature in step S206). Therefore, the embodiment of the present application proposes an offset large core attention layer, which introduces offset convolution into the large core attention module, and provides a larger receptive field for the model without changing the size of the convolution kernel inside the traditional large core attention mechanism, so that the model has better expression ability and improves image reconstruction performance.

[0062] In a possible implementation, the processing flow of the entropy attention module is as follows:

[0063] Step S301, perform a layer normalization operation on the given second input feature, and pass a 1×1 convolution layer to increase the number of channels to obtain a fifth processed feature.

[0064] For the dual attention module, the given input feature (i.e., the first input feature) is first extracted by the large core attention module to obtain the first output feature, and then the first output feature is used as the input feature of the entropy attention module (i.e., the second input feature), which is processed by the entropy attention module to obtain the second output feature. First, perform layer normalization (such as Figure 3 The LayerNorm module in ), and then passes through a convolution layer with a convolution kernel size of 1 to increase the number of channels to obtain the fifth processed feature.

[0065] Step S302, processing the fifth processed feature through an entropy attention layer to obtain a sixth processed feature.

[0066] In a possible implementation, the step S302, processing the fifth processed feature through an entropy attention layer to obtain a sixth processed feature, includes:

[0067] Step S3021, processing the fifth processed feature through a 1×1 convolution layer to obtain a first entropy attention feature.

[0068] Reference Figure 5 , Figure 5A schematic diagram of the processing flow of an entropy attention layer (EA) is shown, Figure 5 As shown, first, for the input feature (the fifth processed feature), a 1×1 convolution layer with an offset is passed to obtain the first entropy attention feature.

[0069] Step S3022, calculate the differential entropy of the first entropy attention feature under Gaussian distribution to obtain a differential entropy vector.

[0070] In the traditional channel attention mechanism, pooling operation is usually used to compress the information of each channel, but the essence of the pooling operation is to take the average value of the features, and the average value itself does not have the ability to measure the amount of feature information, so the embodiment of the present application sets an entropy attention module to calculate the information entropy to compress the information of each channel. However, information entropy itself is not suitable for data that obeys continuous random distribution, so this embodiment calculates differential entropy applicable to data that obeys continuous random distribution. However, the traditional way of calculating differential entropy requires calculating the calculus and probability density distribution of the data, which makes it unsuitable for designing plug-and-play channel attention units, so this embodiment makes the features obey Gaussian distribution as much as possible, and calculates differential entropy under Gaussian distribution.

[0071] In a possible implementation, the differential entropy of the first entropy attention feature under Gaussian distribution is calculated according to the following formula:

[0072] ;

[0073] in, x represents the first entropy attention feature, represents the standard deviation, Indicates Bottom function, represents the differential entropy under Gaussian distribution.

[0074] Step S3023, normalize the differential entropy vector to obtain channel weight.

[0075] Step S3024: multiply the channel weight by the fifth processed feature, and pass it through a 1×1 convolution layer to obtain the sixth processed feature.

[0076] Specifically, the processing flow of the entropy attention layer is shown in the formula:

[0077] ;

[0078] in, x represents the input features of the entropy attention layer (i.e., the fifth processed features), yrepresents the output features of the entropy attention layer (the sixth processed feature), The convolution layer that represents the convolution kernel of step S3021 is 1, which is used to reduce the number of channels. The convolution layer that represents the convolution kernel of step S3024 is 1 is used to increase the number of channels. It means calculating the differential entropy under Gaussian distribution. Indicates pixel-by-pixel multiplication. Figure 5 As shown, for the input features, the entropy attention layer first compresses the number of channels through a convolution layer with a convolution kernel size of 1, and then calculates the differential entropy under the Gaussian distribution to obtain a vector, and then the vector is normalized to obtain the weight of each channel. At this time, the weight is multiplied back to the feature, and then the number of channels is restored through a convolution layer with a convolution kernel size of 1. Therefore, the embodiment of the present application proposes an entropy attention mechanism (corresponding to the entropy attention layer), which innovatively calculates information entropy instead of pooling to compress image information, provides more information for the model, and solves the problem that traditional channel attention cannot measure the amount of feature information.

[0079] Step S303: Pass the sixth processed feature through a 1×1 convolution layer to reduce the number of channels to obtain a seventh processed feature.

[0080] Step S304, adding the seventh processed feature to the second input feature (corresponding to Figure 3 The ⊕ symbol after the EA module in is used to obtain the second intermediate feature.

[0081] Step S305, the second intermediate feature is layer-normalized and processed by a spatial gated feedforward network (corresponding to Figure 3 The SGFN module in ), obtains the eighth processed feature.

[0082] Step S306: Add the eighth processed feature to the second intermediate feature to obtain a second output feature.

[0083] In this embodiment, the processing flow of the entropy attention module can be expressed as the following formula:

[0084]

[0085] ;

[0086] in, x represents the input feature of the entropy attention module (i.e., the second input feature of step S301), represents the layer normalization operation in step S301, represents the convolution layer with a convolution kernel size of 1 in step S301, represents the entropy attention layer in step S302, represents the convolution layer with a convolution kernel size of 1 in step S303, represents the second intermediate feature in step S304, represents the spatial gated feedforward network in step S305, Represents the output feature of the entropy attention module (i.e., the second output feature in step S306).

[0087] In summary, the deep feature extraction module in the single super-resolution network proposed in the embodiment of the present application is composed of multiple dual attention modules connected in series, wherein each dual attention module is composed of a large core attention module and an entropy attention module connected in series. On the one hand, the embodiment of the present application innovatively proposes to use the entropy attention module to calculate the information entropy instead of pooling to compress the image information, so as to provide more information for the model to solve the problem that the traditional channel attention cannot measure the amount of feature information. On the other hand, the embodiment of the present application proposes an offset large core attention layer, introducing the offset convolution into the large core attention module, and providing the model with a larger receptive field without changing the size of the convolution kernel inside the traditional large core attention mechanism, so that the model has better expression ability and improves image reconstruction performance.

[0088] After the single super-resolution network is created, it is used to perform super-resolution reconstruction on the image, that is, the original image (the image to be reconstructed) is input into the single super-resolution network, and the output result of the single super-resolution network is used as the reconstructed super-resolution image. The specific process is shown in steps S102 to S104.

[0089] Step S102, inputting the original image into the shallow feature extraction module to obtain shallow features.

[0090] In a possible implementation, the shallow feature extraction module includes: a convolution layer with a convolution kernel size of 3.

[0091] Specifically, the input image (i.e., the original image) is used as the input LR and input into the shallow feature extraction module of the single super-resolution network. This process can be expressed as:

[0092] Among them, LR represents the original image input into the single super-resolution network. represents the output of shallow feature extraction, represents a convolution layer with a convolution kernel size of 3. In this embodiment of the application, a 3×3 convolution layer (such as Figure 2 The 3×3Conv module in the input image performs convolution calculations on the original image to achieve initial feature extraction and generate shallow features based on the original image input. .

[0093] Step S103: input the shallow features into the deep feature extraction module to extract features to obtain deep features.

[0094] like Figure 2 As shown in Figure 1, the deep feature extraction module in a single super-resolution network is composed of a series of dual attention modules (DAB) connected in series. Figure 2 As shown, the first dual attention module DAB processes the shallow features obtained in step S102 through the large core attention module (according to the above steps S201-S206) to obtain the first output feature, and inputs the first output feature (as the second input feature) into the series entropy attention module (according to the above steps S301-S306) to obtain the second output feature, that is, the first feature extracted by the first dual attention module. Then the first feature is input into the second dual attention module to extract the second feature... until the last dual attention module outputs the corresponding feature.

[0095] In a possible implementation, the deep feature extraction module further includes: a convolution layer with a convolution kernel size of 3, and a global residual module;

[0096] The method further comprises:

[0097] The output feature of the last dual attention module is processed by a convolution layer with a convolution kernel size of 3, and then added to the shallow feature through the global residual module to obtain the deep feature.

[0098] Specifically, after extracting shallow features, the single super-resolution network uses a series of dual attention modules (such as Figure 2 The DAB module shown in the figure is used to extract deep features. As shown in the formula:

[0099] in, represents the output features of the deep feature extraction module, Represents the first A dual attention module, Conv() represents a convolution layer with a convolution kernel size of 3. In the deep feature extraction part, this embodiment does not use a complex structure to improve the reconstruction effect of the model, but stacks several dual attention modules, and after the last dual attention module outputs the corresponding feature, it performs convolution processing through a convolution layer with a convolution kernel size of 3, and then uses a global residual connection to prevent possible model degradation and obtain deep features.

[0100] Step S104: input the deep features into the image reconstruction module to obtain a reconstructed super-resolution image.

[0101] In a possible implementation, the image reconstruction module includes: a convolution layer with a convolution kernel size of 3, and a sub-pixel convolution layer. The image reconstruction process is shown in the formula:

[0102] ;in, represents the deep features, Conv() represents the convolution layer with a convolution kernel size of 3, PS() represents the sub-pixel convolution layer, and HR represents the output of a single super-resolution network (the reconstructed super-resolution image). In this embodiment, the deep features extracted in step S104 are passed through a 3×3 convolution layer and then through a sub-pixel convolution layer (such as Figure 2 PixeyShuffle as shown) to restore the image size.

[0103] In summary, the embodiment of the present application realizes an efficient lightweight image super-resolution model (i.e., the single super-resolution network created in step S101) through the above-mentioned image super-resolution method based on entropy attention. Specifically, the present application performs deep feature extraction through multiple stacked dual attention modules in a single super-resolution network, thereby realizing an efficient lightweight image super-resolution model. As a lightweight model (the feature distillation module is composed of multiple dual attention modules connected in series), the single super-resolution network has a faster model reasoning speed and higher image processing efficiency. At the same time, in the dual attention module, the present application innovatively proposes to use the entropy attention module to calculate information entropy instead of pooling to compress image information, and provide more information for the model to solve the problem that traditional channel attention cannot measure the amount of feature information. In addition, it is proposed to connect the large core attention module in series with the entropy attention module, introduce the offset convolution into the large core attention module, and provide a larger receptive field for the model (i.e., the single super-resolution network) without changing the size of the convolution kernel inside the traditional large core attention mechanism, so that the model has better expression ability and improves image reconstruction performance.

[0104] In order to evaluate the image reconstruction performance of the above-mentioned single super-resolution network, it is compared with related lightweight super-resolution algorithms, including EARFA, EARFA-tiny, EDSR, CARN, IMDN, LatticeNet, ESRT, SwinIR-light and SRFormer-light. Quantitative comparisons were performed on five benchmark datasets. The single super-resolution network proposed in the embodiment of the present application achieved the best results on the benchmark datasets with three magnifications of ×2, ×3, and ×4. The inference speed of the single super-resolution network proposed in the embodiment of the present application is several times that of SwinIR-light and SRFormer-light. On the Urban100 validation set, the single super-resolution network proposed in the embodiment of the present application is 0.22db, 0.19db, and 0.21db higher than SwinIR-light in three different magnifications. On the Manga109 validation set, the single super-resolution network proposed in the embodiment of the present application is 0.08db, 0.19db, and 0.08db higher than SRFormer-light in three different magnifications. This illustrates the efficient performance of the single super-resolution network proposed in the embodiment of the present application in image reconstruction. In addition, the time-consuming method of calculating the differential entropy under the traditional method and the method of calculating the differential entropy under the Gaussian distribution are compared. It can be seen that as the batch increases, the time consumed by the traditional calculation method continues to increase, while the method of calculating the differential entropy under the Gaussian distribution takes almost no time. These results also prove that the image super-resolution method based on entropy attention proposed in the embodiment of the present application performs deep feature extraction through the designed dual attention module, which effectively achieves a balance between image reconstruction effect and model reasoning speed.

[0105] The second aspect of the embodiment of the present application further provides an image super-resolution device based on entropy attention, which is used to execute the image super-resolution method based on entropy attention described in the first aspect, referring to Figure 6 , Figure 6 A schematic diagram of the structure of an image super-resolution device is shown. Figure 6 As shown, the device comprises:

[0106] A network creation module is used to create a single super-resolution network, wherein the single super-resolution network includes: a shallow feature extraction module, a deep feature extraction module and an image reconstruction module; the deep feature extraction module includes a plurality of stacked dual attention modules, wherein the dual attention module is composed of a large core attention module and an entropy attention module connected in series;

[0107] A first processing module, used for inputting the original image into the shallow feature extraction module to obtain shallow features;

[0108] A second processing module is used to input the shallow features into the deep feature extraction module to extract features and obtain deep features;

[0109] The third processing module is used to input the deep features into the image reconstruction module to obtain a reconstructed super-resolution image.

[0110] In a possible implementation, the processing flow of the large core attention module is as follows:

[0111] Perform layer normalization on the given first input feature, pass it through a 1×1 convolution layer to increase the number of channels, and obtain the first processed feature;

[0112] Processing the first processed features through an offset large kernel attention layer to obtain second processed features;

[0113] The second processed feature is passed through a 1×1 convolution layer to reduce the number of channels to obtain a third processed feature;

[0114] Adding the third processed feature to the first input feature to obtain a first intermediate feature;

[0115] performing layer normalization on the first intermediate feature, and processing the feature through a spatial gated feedforward network to obtain a fourth processed feature;

[0116] The fourth processed feature is added to the first intermediate feature to obtain a first output feature.

[0117] In a possible implementation, processing the first processed features through an offset large kernel attention layer to obtain second processed features includes:

[0118] Processing the first processed feature through a convolution layer with an offset convolution kernel of 1 to obtain a first large kernel attention feature;

[0119] Input the first large core attention feature into a deep convolution layer with a convolution kernel size of 5 for processing to obtain a second large core attention feature;

[0120] The second largest core attention feature is input into a deep convolution layer with a convolution kernel size of 7 and a dilation rate of 3 for processing to obtain the third largest core attention feature;

[0121] Multiply the third large core attention feature by the first processed feature to obtain the second processed feature.

[0122] In a possible implementation, the processing flow of the entropy attention module is as follows:

[0123] Perform layer normalization on the given second input feature, pass it through a 1×1 convolution layer to increase the number of channels, and obtain the fifth processed feature;

[0124] Processing the fifth processed feature through an entropy attention layer to obtain a sixth processed feature;

[0125] Passing the sixth processed feature through a 1×1 convolution layer to reduce the number of channels, thereby obtaining a seventh processed feature;

[0126] Adding the seventh processed feature to the second input feature to obtain a second intermediate feature;

[0127] performing layer normalization on the second intermediate feature, and processing the feature through a spatial gated feedforward network to obtain an eighth processed feature;

[0128] The eighth processed feature is added to the second intermediate feature to obtain a second output feature.

[0129] In a possible implementation, processing the fifth processed feature through an entropy attention layer to obtain a sixth processed feature includes:

[0130] Processing the fifth processed feature through a 1×1 convolutional layer to obtain a first entropy attention feature;

[0131] Calculate the differential entropy of the first entropy attention feature under Gaussian distribution to obtain a differential entropy vector;

[0132] Normalizing the differential entropy vector to obtain a channel weight;

[0133] The channel weight is multiplied by the fifth processed feature, and the sixth processed feature is obtained through a 1×1 convolution layer.

[0134] In a possible implementation, the differential entropy of the first entropy attention feature under Gaussian distribution is calculated according to the following formula:

[0135] ;

[0136] in, represents the first entropy attention feature, represents the standard deviation, Indicates Bottom function, represents the differential entropy under Gaussian distribution.

[0137] In a possible implementation, the shallow feature extraction module includes: a convolution layer with a convolution kernel size of 3;

[0138] The image reconstruction module includes: a convolution layer with a convolution kernel size of 3, and a sub-pixel convolution layer.

[0139] In a possible implementation, the deep feature extraction module further includes: a convolution layer with a convolution kernel size of 3, and a global residual module;

[0140] The device also includes:

[0141] The fourth processing module is used to process the output features of the last dual attention module through a convolution layer with a convolution kernel size of 3, and then add them to the shallow features through the global residual module to obtain the deep features.

[0142] The present application also provides an electronic device, referring to Figure 7 , Figure 7 Schematic diagram of an electronic device proposed in an embodiment of the present application. Figure 7 As shown, the electronic device 100 includes: a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus communication. A computer program is stored in the memory 110. The computer program can be run on the processor 120 to implement the steps in the image super-resolution method based on entropy attention disclosed in the embodiment of the present application.

[0143] An embodiment of the present application also provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps in the entropy attention-based image super-resolution method disclosed in the embodiment of the present application.

[0144] The embodiment of the present application also provides a computer program product, which, when running on an electronic device, enables a processor to implement the steps of the image super-resolution method based on entropy attention as disclosed in the embodiment of the present application.

[0145] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0146] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices, electronic devices, and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0147] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0148] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0149] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0150] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0151] The above is a detailed introduction to the image super-resolution method, device and equipment based on entropy attention provided by 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 general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An image super-resolution method based on entropy attention, characterized in that: The method comprises: Creating a single super-resolution network, the single super-resolution network comprising: a shallow feature extraction module, a deep feature extraction module and an image reconstruction module; the deep feature extraction module comprises a plurality of stacked dual attention modules, the dual attention module being composed of a large core attention module and an entropy attention module connected in series; Inputting the original image into the shallow feature extraction module to obtain shallow features; Inputting the shallow features into the deep feature extraction module to extract features and obtain deep features; Inputting the deep features into the image reconstruction module to obtain a reconstructed super-resolution image; Among them, the processing flow of the entropy attention module is as follows: Perform layer normalization on the given second input feature, pass it through a 1×1 convolution layer to increase the number of channels, and obtain the fifth processed feature; Processing the fifth processed feature through an entropy attention layer to obtain a sixth processed feature; Passing the sixth processed feature through a 1×1 convolution layer to reduce the number of channels, thereby obtaining a seventh processed feature; Adding the seventh processed feature to the second input feature to obtain a second intermediate feature; performing layer normalization on the second intermediate feature, and processing the feature through a spatial gated feedforward network to obtain an eighth processed feature; Adding the eighth processed feature to the second intermediate feature to obtain a second output feature; Processing the fifth processed feature through an entropy attention layer to obtain a sixth processed feature includes: Processing the fifth processed feature through a 1×1 convolutional layer to obtain a first entropy attention feature; Calculate the differential entropy of the first entropy attention feature under Gaussian distribution to obtain a differential entropy vector; Normalizing the differential entropy vector to obtain a channel weight; Multiplying the channel weight by the fifth processed feature, and passing through a 1×1 convolution layer to obtain the sixth processed feature; The differential entropy of the first entropy attention feature under Gaussian distribution is calculated according to the following formula: ; in, represents the first entropy attention feature, represents the standard deviation, Indicates Bottom function, represents the differential entropy under Gaussian distribution.

2. The image super-resolution method based on entropy attention according to claim 1, characterized in that: The processing flow of the large core attention module is as follows: Perform layer normalization on the given first input feature, pass it through a 1×1 convolution layer to increase the number of channels, and obtain the first processed feature; Processing the first processed features through an offset large kernel attention layer to obtain second processed features; The second processed feature is passed through a 1×1 convolution layer to reduce the number of channels to obtain a third processed feature; Adding the third processed feature to the first input feature to obtain a first intermediate feature; performing layer normalization on the first intermediate feature, and processing the feature through a spatial gated feedforward network to obtain a fourth processed feature; The fourth processed feature is added to the first intermediate feature to obtain a first output feature.

3. The image super-resolution method based on entropy attention according to claim 2 is characterized in that: The step of processing the first processed features by means of an offset large core attention layer to obtain second processed features includes: Processing the first processed feature through a convolution layer with an offset convolution kernel of 1 to obtain a first large kernel attention feature; Input the first large core attention feature into a deep convolution layer with a convolution kernel size of 5 for processing to obtain a second large core attention feature; The second largest core attention feature is input into a deep convolution layer with a convolution kernel size of 7 and a dilation rate of 3 for processing to obtain the third largest core attention feature; Multiply the third large core attention feature by the first processed feature to obtain the second processed feature.

4. The image super-resolution method based on entropy attention according to claim 1, characterized in that: The shallow feature extraction module includes: a convolution layer with a convolution kernel size of 3; The image reconstruction module includes: a convolution layer with a convolution kernel size of 3, and a sub-pixel convolution layer.

5. The image super-resolution method based on entropy attention according to claim 1, characterized in that: The deep feature extraction module also includes: a convolution layer with a convolution kernel size of 3, and a global residual module; The method further comprises: The output feature of the last dual attention module is processed by a convolution layer with a convolution kernel size of 3, and then added to the shallow feature through the global residual module to obtain the deep feature.

6. An image super-resolution device based on entropy attention, characterized in that: The device for executing the image super-resolution method based on entropy attention according to any one of claims 1 to 5 comprises: A network creation module is used to create a single super-resolution network, wherein the single super-resolution network includes: a shallow feature extraction module, a deep feature extraction module and an image reconstruction module; the deep feature extraction module includes a plurality of stacked dual attention modules, wherein the dual attention module is composed of a large core attention module and an entropy attention module connected in series; A first processing module, used for inputting the original image into the shallow feature extraction module to obtain shallow features; A second processing module is used to input the shallow features into the deep feature extraction module to extract features and obtain deep features; The third processing module is used to input the deep features into the image reconstruction module to obtain a reconstructed super-resolution image.

7. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor is executed, the steps in the image super-resolution method based on entropy attention are implemented.

Citation Information

Patent Citations

  • Remote sensing image super-resolution method and system based on residual separation attention mechanism and medium

    CN116757930A

  • Frame interpolation via adaptive convolution and adaptive separable convolution

    US20200012940A1

  • Method and apparatus for enhancing image resolution

    US20210073945A1

  • Methods and systems for image and voice processing

    WO2021034463A1