Image super-resolution method, device and equipment based on multi-scale feature fusion
By introducing multi-scale feature fusion and attention mechanism into the image super-resolution algorithm, the problem of insufficient expression ability of lightweight models is solved, efficient and accurate image reconstruction is achieved, and model complexity and computing resource consumption are balanced.
Patent Information
- Application Number
- CN202410780901.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-18
AI Technical Summary
Existing image super-resolution algorithms ignore the problem of model size when pursuing high performance, resulting in excessive parameter quantities and calculations, making it difficult to implement. At the same time, due to insufficient convolution layers, lightweight super-resolution models have insufficient expressive capabilities and the reconstructed image is unreliable. High-frequency texture details in the image are blurred.
An image super-resolution method based on multi-scale feature fusion is adopted, through shallow feature extraction module, feature distillation module and multi-layer feature fusion module, combined with large-core attention mechanism, spatial attention mechanism and multi-branch attention mechanism, alternately Feature extraction and fusion to improve image reconstruction performance.
It is possible to improve the accuracy and efficiency of image reconstruction while reducing the amount of parameters and calculations, generate clearer high-frequency texture details, and balance model complexity and reconstruction performance.
Smart Images

Figure CN118350996B
Abstract
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 multi-scale feature fusion. Background Art
[0002] In image super-resolution reconstruction technology, related super-resolution algorithms focus too much on the effect of image reconstruction. As the performance improves, the depth of the network gradually increases, the number of parameters and the amount of calculation also gradually increase, ignoring the size of the model. Such algorithms often cannot be implemented in actual projects due to the huge number of parameters. Therefore, it is crucial to design a lightweight and efficient deep super-resolution model to balance accuracy and computing resource consumption.
[0003] However, compared with the deep learning network of conventional size, the ultra-lightweight super-resolution model is very small and lacks sufficient convolution to expand the overall receptive field, resulting in insufficient expression ability of the final model and the problem of blurred high-frequency texture details of the reconstructed image. Therefore, it is necessary to develop an image super-resolution method, device and equipment based on multi-scale feature fusion, which can improve the image reconstruction accuracy of the model on the basis of the lightweight model and achieve a balance between model complexity and reconstruction performance. Summary of the invention
[0004] In view of the above problems, the embodiments of the present application provide an image super-resolution method, apparatus and device based on multi-scale feature fusion to overcome the above problems or at least partially solve the above problems.
[0005] According to a first aspect of an embodiment of the present application, there is provided an image super-resolution method based on multi-scale feature fusion, the method comprising:
[0006] Creating a target super-resolution model, the target super-resolution model includes: a shallow feature extraction module, a feature distillation module, a multi-layer feature fusion module and an image reconstruction module; wherein the feature distillation module is composed of a plurality of feature distillation blocks connected in series, and the feature distillation blocks alternately use the following attention mechanisms in the order of series connection: a large core attention mechanism, a spatial attention mechanism and a multi-branch attention mechanism;
[0007] After copying the original image n times, input the shallow feature extraction module to obtain shallow features, where n is a positive integer greater than 1;
[0008] Inputting the shallow features into the feature distillation module for feature extraction to obtain deep features of different scales;
[0009] Inputting the depth features of different scales into the multi-layer feature fusion module to obtain fused features;
[0010] The image reconstruction module adopts a skip connection method to obtain a reconstructed super-resolution image according to the fused features and the shallow features.
[0011] The second aspect of the embodiment of the present application further proposes an image super-resolution device based on multi-scale feature fusion, which is used to execute the image super-resolution method based on multi-scale feature fusion described in the first aspect, and the device includes:
[0012] A model creation module, used to create a target super-resolution model, the target super-resolution model includes: a shallow feature extraction module, a feature distillation module, a multi-layer feature fusion module and an image reconstruction module; wherein the feature distillation module is composed of a plurality of feature distillation blocks connected in series, and the feature distillation blocks alternately use the following attention mechanisms in the order of series connection: a large core attention mechanism, a spatial attention mechanism and a multi-branch attention mechanism;
[0013] A first processing module is used to copy the original image n times and input the result into the shallow feature extraction module to obtain shallow features, where n is a positive integer greater than 1;
[0014] A second processing module is used to input the shallow features into the feature distillation module for feature extraction to obtain deep features of different scales;
[0015] A third processing module is used to input the depth features of different scales into the multi-layer feature fusion module to obtain fused features;
[0016] The fourth processing module is used to obtain a reconstructed super-resolution image according to the fused features and the shallow features by using a skip connection method through the image reconstruction module.
[0017] A third aspect of an embodiment of the present application further 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 multi-scale feature fusion described in the first aspect of the embodiment of the present application.
[0018] 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 in the image super-resolution method based on multi-scale feature fusion described in the first aspect of the embodiment of the present application are implemented.
[0019] 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 multi-scale feature fusion as described in the first aspect of the embodiments of the present application.
[0020] An embodiment of the present application provides an image super-resolution method based on multi-scale feature fusion, the method comprising: creating a target super-resolution model, the target super-resolution model comprising: a shallow feature extraction module, a feature distillation module, a multi-layer feature fusion module and an image reconstruction module; wherein the feature distillation module is composed of a plurality of feature distillation blocks connected in series in sequence, and the feature distillation blocks alternately adopt the following attention mechanisms in the order of series connection: a large core attention mechanism, a spatial attention mechanism and a multi-branch attention mechanism; after copying the original image n times, the image is input into the shallow feature extraction module to obtain shallow features, where n is a positive integer greater than 1; the shallow features are input into the feature distillation module for feature extraction to obtain deep features of different scales; the deep features of different scales are input into the multi-layer feature fusion module to obtain fused features; the image reconstruction module adopts a jump connection method to obtain a reconstructed super-resolution image according to the fused features and the shallow features.
[0021] The specific beneficial effects are:
[0022] On the one hand, the present application extracts multi-scale deep features through the feature distillation module in the target super-resolution model, and fuses the multi-scale deep features through the multi-layer feature fusion module. As a lightweight model (the feature distillation module is composed of multiple feature distillation blocks connected in series), the target super-resolution model consumes less computing resources and has higher image processing efficiency.
[0023] On the other hand, the feature distillation blocks in the feature distillation module of the target super-resolution model proposed in this application alternately use the following attention mechanisms in a serial order: a large core attention mechanism, a spatial attention mechanism, and a multi-branch attention mechanism. This application proposes the use of a spatial attention mechanism that focuses on local features of the image, as well as a large core attention mechanism that has a stronger understanding of global information, and further designs a multi-branch attention mechanism. When extracting deep features, different attention mechanisms are used alternately for feature extraction to achieve efficient extraction of image features, maximize the use of multi-scale information, make the final reconstructed image more accurate, and improve the image reconstruction performance of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] 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.
[0025] Figure 1 It is a flowchart of the steps of an image super-resolution method based on multi-scale feature fusion provided in an embodiment of the present application;
[0026] Figure 2 Schematic diagram of the architecture of a target super-resolution model provided in an embodiment of the present application;
[0027] Figure 3 It is a flowchart of a multi-branch attention mechanism provided in an embodiment of the present application;
[0028] Figure 4 It is a flowchart of a large core attention mechanism provided in an embodiment of the present application;
[0029] Figure 5 It is a flowchart of a spatial attention mechanism provided by an embodiment of the present application;
[0030] Figure 6 It is a schematic diagram of a processing flow of a characteristic distillation block provided in an embodiment of the present application;
[0031] Figure 7 is a structural schematic diagram of an image super-resolution device provided in an embodiment of the present application;
[0032] Figure 8 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] 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.
[0034] In image super-resolution reconstruction technology, related super-resolution algorithms focus too much on the effect of image reconstruction. As the performance improves, the depth of the network gradually increases, the number of parameters and the amount of calculation also gradually increase, ignoring the size of the model. Such algorithms often cannot be implemented in actual projects due to the huge number of parameters. Therefore, it is crucial to design a lightweight and efficient deep super-resolution model to balance accuracy and computing resource consumption.
[0035] However, compared with the deep learning network of regular size, the ultra-lightweight super-resolution model is very small and lacks sufficient convolution to expand the overall receptive field, resulting in insufficient expression of the final model. On the other hand, most of the existing single-image super-resolution reconstruction algorithms use a single attention mechanism, extract a single feature scale, do not take into account the multi-scale features of the image, and have low feature utilization. The reconstructed image is likely to have problems such as blurred high-frequency texture details. In addition, most of the existing methods lack channel interaction methods between different branches, and are not efficient enough in the fusion of multi-scale features of multi-branch different attention mechanisms.
[0036] In view of the above problems, the embodiment of the present application proposes an image super-resolution method based on multi-scale feature fusion to improve the image reconstruction performance of the lightweight model. The image super-resolution method based on multi-scale feature fusion provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through some embodiments and their application scenarios.
[0037] The first aspect of the present application embodiment provides an image super-resolution method based on multi-scale feature fusion, referring to Figure 1 , Figure 1 A flowchart of a method for image super-resolution based on multi-scale feature fusion provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:
[0038] Step S101, create a target super-resolution model, the target super-resolution model includes: a shallow feature extraction module, a feature distillation module, a multi-layer feature fusion module and an image reconstruction module; wherein the feature distillation module is composed of a plurality of feature distillation blocks connected in series, and the feature distillation blocks alternately use the following attention mechanisms in the order of series connection: a large core attention mechanism, a spatial attention mechanism and a multi-branch attention mechanism.
[0039] Specifically, refer to Figure 2 , Figure 2 A schematic diagram of the architecture of a target super-resolution model is shown, Figure 2 As shown in the figure, the target super-resolution model follows the framework process of super-resolution and consists of four key components: a shallow feature extraction module, a feature distillation module (consisting of multiple stacked feature distillation blocks), a multi-layer feature fusion module and an image reconstruction module.
[0040] The feature distillation module in the target super-resolution model is composed of a series of feature distillation blocks (LSB, LS, SB) connected alternately in series. The feature distillation blocks use the following attention mechanisms alternately in the order of series connection: large core attention mechanism, spatial attention mechanism, and multi-branch attention mechanism. Figure 2As shown, the feature distillation blocks are connected in series, and every two adjacent feature distillation blocks adopt different attention mechanisms. Furthermore, the attention mechanisms adopted by every three adjacent feature distillation blocks are different. Let the feature distillation block using the multi-branch attention mechanism be LSB, the feature distillation block using the large core attention mechanism be LS, and the feature distillation block using the spatial attention mechanism be SB. For example, Figure 2 As shown, in the target super-resolution model, the series order of feature distillation blocks can be: LSB, LS, SB, LSB, LS...SB, LSB, LS, SB.
[0041] The attention mechanism used in the super-resolution model in the related art is single, and the feature scale extracted is single, without considering the multi-scale features of the image, so the image feature utilization rate is low, which easily leads to problems such as blurred high-frequency texture details of the reconstructed image. To address this problem, the embodiment of the present application designs a series of feature distillation blocks that alternately use different attention mechanisms. Compared with a single attention mechanism, the embodiment of the present application adopts a spatial attention mechanism that focuses on local features of the image, and a large core attention mechanism that has a stronger understanding of global information, and further designs a multi-branch attention mechanism. When extracting deep features, different attention mechanisms are used to alternately extract features to achieve efficient extraction of image features, maximize the use of multi-scale information, make the final reconstructed image more accurate, and improve the image reconstruction performance of the model.
[0042] The following content specifically describes the three attention mechanisms (large core attention mechanism, spatial attention mechanism, and multi-branch attention mechanism) adopted in the embodiments of the present application.
[0043] In a possible implementation, the multi-branch attention mechanism is:
[0044] Step S201, performing a channel segmentation operation on the first input feature to obtain four partial features.
[0045] Reference Figure 3 , Figure 3 A schematic diagram of the process of a multi-branch attention mechanism (LSA) is shown, Figure 3 As shown, for a given input feature (i.e., the first input feature), it is first passed through a point-by-point convolutional layer (such as Figure 3 The PWconv module shown in the figure) will then perform a channel splitting operation on it to divide it into four partial features. As shown in the following formula: ;in, X represents the first input feature, Represents the four partial features obtained by segmentation.
[0046] Step S202, the first partial feature and the third partial feature are processed by the large core attention mechanism to obtain the first candidate feature and the third candidate feature. As shown in the formula:
[0047] ; Specifically, the first part feature , as a given input feature, is processed using a large core attention mechanism , get the first candidate feature ; The third part features , as a given input feature, is processed using the large core attention mechanism LA , and get the third candidate feature (Corresponding to the processing flow of the large core attention mechanism LA described in steps S301-S304 later).
[0048] Step S203, the second partial feature and the fourth partial feature are processed by the spatial attention mechanism to obtain the second candidate feature and the fourth candidate feature. As shown in the formula:
[0049] ; Specifically, the second part feature , as a given input feature, is processed using the spatial attention mechanism , get the second candidate feature ; The fourth part features , as a given input feature, the spatial attention mechanism SA is used for processing , and get the fourth candidate feature (Corresponding to the processing flow of the spatial attention mechanism SA described in steps S401-S406 later).
[0050] Step S204: input the first candidate feature, the second candidate feature, the third candidate feature and the fourth candidate feature into the attention mechanism channel interaction unit to obtain a first interaction feature, a second interaction feature, a third interaction feature and a fourth interaction feature.
[0051] Specifically, the multi-branch attention mechanism (LSA) mainly includes three components: a large core attention unit (used to execute step S202), a spatial attention unit (used to execute step S203), and an attention mechanism channel interaction unit (used to execute step S204) developed for more efficient multi-scale feature fusion.
[0052] In a possible implementation, the step S204, inputting the first candidate feature, the second candidate feature, the third candidate feature, and the fourth candidate feature into the attention mechanism channel interaction unit to obtain the first interaction feature, the second interaction feature, the third interaction feature, and the fourth interaction feature, includes:
[0053] Using the attention mechanism channel interaction unit, multiplying the first candidate feature and the second partial feature, performing channel interaction through a convolution operation, and obtaining the first interaction feature;
[0054] Using the attention mechanism channel interaction unit, multiplying the second candidate feature and the third partial feature, performing channel interaction through a convolution operation, and obtaining the second interaction feature;
[0055] The attention mechanism channel interaction unit multiplies the third candidate feature and the fourth partial feature, performs channel interaction through a convolution operation, and obtains the third interaction feature;
[0056] The attention mechanism channel interaction unit multiplies the fourth candidate feature and the first partial feature, performs channel interaction through a convolution operation, and obtains the fourth interaction feature.
[0057] Specifically, as shown in the formula:
[0058] ;
[0059] ;
[0060] in, represents the attention mechanism channel interaction unit, represents the depthwise convolution, Represents element-wise multiplication.
[0061] Step S205: fuse the first interaction feature, the second interaction feature, the third interaction feature and the fourth interaction feature through a 1×1 convolution layer to obtain a fused interaction feature. Specifically, as shown in the formula:
[0062] ;
[0063] in, represents the first interaction feature, represents the second interaction feature, represents the third interaction feature, represents the fourth interaction feature, such as Figure 3 As shown in , in order to fuse the multi-scale features using different attention mechanisms, the above features are connected through the Concat function and then passed through a 1×1 convolution layer (such as Figure 3 The PWConv module in the convolutional layer aggregates local and global relationships to obtain the fused interactive features. .
[0064] Step S206, using a long skip connection operation, multiplying the fused interactive feature with the result of the point-by-point convolution of the first input feature, performing feature fusion through a 1×1 point-by-point convolution layer, and obtaining a first output feature.
[0065] This embodiment uses long jump connections to enhance the residual learning ability of the module. Specifically, as shown in the formula:
[0066] ;
[0067] in, represents the point-wise convolutional layer, represents the interaction features after fusion, X represents the first input feature, Represents the first output feature, that is, for a given input feature (the first input feature, that is Figure 3 The features input to the LSA module in the above example are processed by the multi-branch attention mechanism, and the output features obtained are ( Figure 3 It should be noted that the second input feature refers to the input of the LA module, not the LB module. The output features are similar, corresponding to Figure 6 The input and output of the attention part of the LSB module shown in the figure are changed from LSA to LA. Figure 3 As shown, for the first output feature obtained, it is finally necessary to pass through a point-by-point convolution layer (such as Figure 3 The PWconv module shown in FIG. 1 is used for convolution processing as the final output feature. In the related art, the super-resolution model often lacks a channel interaction method between different branches, while this embodiment uses the attention mechanism channel interaction unit to fuse the features (first candidate feature, second candidate feature, third candidate feature and fourth candidate feature) processed by different attention mechanisms (large core attention mechanism LA and spatial attention mechanism SA), thereby realizing the efficient fusion of multi-scale features of multi-branch different attention mechanisms.
[0068] In a possible implementation, the large core attention mechanism is:
[0069] Step S301, passing the second input feature through a 1×1 point-by-point convolution layer to obtain a point-by-point convolution output feature.
[0070] Step S302 , passing the point-by-point convolution output feature through a (2d-1)×(2d-1) depth convolution layer to obtain a depth convolution output feature.
[0071] Step S303, passing the deep convolution output features through a deep dilation convolution layer with a dilation rate of d to obtain an intermediate feature map.
[0072] Step S304: multiply the intermediate feature map by the second input feature to obtain a second output feature.
[0073] 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. 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. Figure 4 , Figure 4 A schematic diagram of the process of a large core attention mechanism (LA) is shown, Figure 4 As shown, for a given input feature (i.e., the second input feature), it first passes through a 1×1 point-by-point convolution layer (such as Figure 4 shown module), and obtain the point-by-point convolution output features . Where F represents the given input feature (i.e., the second input feature). Then it is input into the (2d-1)×(2d-1) depth convolution layer (such as Figure 4 shown module), and obtain the deep convolution output features . Then it is fed into a deep dilated convolutional layer with a dilation rate of d (e.g. Figure 4 shown module), and obtain the intermediate feature map. As shown in the formula:
[0074] ;
[0075] in, F is the input feature (the second input feature), is the intermediate feature map. Through the above steps S301-S303, a The large kernel convolution is decomposed into a A depth convolution with a dilation rate of of Depth-expanded convolution and another 1×1 point-wise convolution. Then, the obtained intermediate feature map is multiplied by the second input feature to obtain the second output feature, as shown in the formula:
[0076] ;
[0077] in, F is the input feature (the second input feature), is the intermediate feature map, represents element-wise multiplication, Yis the second output feature, that is, for a given input feature (the second input feature, Figure 4 The features of the input LA module in the large core attention mechanism are processed, and the output features (i.e. Figure 4 Therefore, by adopting the large-kernel attention mechanism and decomposing the large-kernel convolution, the target super-resolution model can capture long-range relationships with less computational cost and fewer parameters, thereby enhancing the model's detail reconstruction ability.
[0078] In a possible implementation, the spatial attention mechanism is:
[0079] Step S401, performing a channel segmentation operation on the third input feature to obtain four partial features.
[0080] In this embodiment, a more lightweight spatial attention mechanism is used to obtain a multi-scale feature representation different from the large core attention mechanism, so as to better adaptively explore more useful features for image super-resolution reconstruction. Figure 5 , Figure 5 A schematic diagram of the process of a spatial attention mechanism (SA) is shown, Figure 5 As shown, the normalized input feature (i.e., the third input feature) is first subjected to a channel segmentation operation (such as Figure 5 The split module in the example above is used to divide the feature map into four parts, and generate feature representation in a pyramidal manner to obtain the attention map for spatial adaptive feature modulation and make the model more lightweight. As shown in the following formula: ;in, represents the channel split operation, X represents the third input feature, Represents the four partial features obtained by segmentation.
[0081] Step S402, the first partial feature is processed by snake convolution to obtain the first intermediate feature. As shown in the following formula:
[0082] ;
[0083] in, represents the first partial feature, represents the snake-shaped dynamic convolution, In this embodiment, snake convolution is introduced into the spatial attention mechanism to maximize the adjustment and utilization of the receptive field of the model.
[0084] Step S403: input the second partial feature, the third partial feature and the fourth partial feature into a multi-scale feature generation unit (such as Figure 5The MaxPool module, DSConv module and Nearest module in the above example are used to obtain the second intermediate feature, the third intermediate feature and the fourth intermediate feature.
[0085] In a possible implementation manner, the multi-scale feature generation unit performs feature processing according to the following formula:
[0086] ;
[0087] in, represents the i-th partial feature, represents the i-th intermediate feature, represents the snake-shaped dynamic convolution, p represents the original resolution of the original image, represents the upsampling operation, Indicates that the input features are downsampled to size.
[0088] Step S404: fusing the first intermediate feature, the second intermediate feature, the third intermediate feature and the fourth intermediate feature to obtain a fused intermediate feature.
[0089] Step S405, aggregate the fused intermediate features through a 1×1 convolution layer, normalize them through a GELU function, and obtain an attention map.
[0090] Step S406: adjust the third input feature according to the attention map to obtain a third output feature.
[0091] Specifically, as shown in the following formula:
[0092] ;
[0093] in, Represents the first intermediate feature, Represents the second intermediate feature, Indicates the third intermediate feature, Represents the fourth intermediate feature. After the above features are connected through the Concat function, they are passed through a 1×1 convolution layer (such as Figure 5 In Module) Convolution aggregates local and global relationships to obtain fused intermediate features . It is then normalized nonlinearly by the GELU function to estimate the attention map, and the features are adaptively adjusted at the element level according to the estimated attention map. As shown in the formula: ;in, represents the intermediate features after fusion, represents the given input feature (the third input feature), represents the GELU function, represents element-wise multiplication, is the third output feature, that is, for a given input feature (the third input feature, that is Figure 5 The features of the input SA module in the spatial attention mechanism are processed and the output features (i.e. Figure 5 The final output features of the SA module).
[0094] In summary, the feature distillation blocks in the feature distillation module of the target super-resolution model proposed in the embodiment of the present application alternately adopt the following attention mechanisms in a serial order: a large core attention mechanism, a spatial attention mechanism, and a multi-branch attention mechanism. A spatial attention mechanism that focuses on the local features of the image and a large core attention mechanism that has a stronger understanding of global information are adopted, and a multi-branch attention mechanism is further designed. When extracting deep features, different attention mechanisms are used to alternately extract features to achieve efficient extraction of image features, maximize the use of multi-scale information, make the final reconstructed image more accurate, and improve the image reconstruction performance of the model.
[0095] After the target super-resolution model 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 target super-resolution model, and the output result of the model is used as the reconstructed super-resolution image. The specific process is shown in steps S102 to S105.
[0096] Step S102, after copying the original image n times, input the shallow feature extraction module to obtain shallow features, where n is a positive integer greater than 1.
[0097] Based on the created target super-resolution model, in actual application, unlike the general super-resolution model, it is necessary to copy the input image (i.e. the original image) n times as input in the preprocessing stage , this process can be expressed as:
[0098] ;
[0099] in, Represents the channel concatenation operation, n is the original image to be copied The number of, n is a positive integer greater than 1, the value of n can be set according to actual needs, and is not specifically limited in the embodiments of the present application. The embodiments of the present application copy the original image n times as input, which is conducive to the model obtaining more information in the image, thereby extracting more accurate shallow features.
[0100] In a possible implementation, the shallow feature extraction module includes a 3×3 convolution layer. After the original image is copied n times, a convolution calculation is performed through a 3×3 convolution layer to achieve initial feature extraction, and shallow features are generated according to the input original image: ,in represents the shallow feature extraction module, Represents shallow features.
[0101] Step S103: input the shallow features into the feature distillation module for feature extraction to obtain deep features of different scales.
[0102] Specifically, after extracting shallow features, the target super-resolution model extracts deep features of different scales through a series of feature distillation blocks (alternating LSB, LB and SB) in the feature distillation module. As shown in the formula:
[0103] ;
[0104] in, Indicates k LSB modules, m Indicates the total number of LSB, LB, and SB modules used. represents the k-th output feature (i.e., the deep feature extracted by the k-th feature distillation block).
[0105] like Figure 2 As shown in the figure, let the feature distillation block using the multi-branch attention mechanism be LSB, the feature distillation block using the large core attention mechanism be LS, and the feature distillation block using the spatial attention mechanism be SB. The feature distillation module in the target super-resolution model is composed of a series of feature distillation blocks (LSB, LS, SB) connected alternately in series. Specifically, according to Figure 2The series order of the feature distillation blocks shown is: LSB, LS, SB, LSB, LS...SB, LSB, LS, SB. The first feature distillation block LSB uses a multi-branch attention mechanism to process the shallow features and extract the first deep feature. The deep feature is then input into the second feature distillation block LS, which is processed by a large core attention mechanism to extract the second deep feature. The deep feature is then input into the third feature distillation block SB, which is processed by a spatial attention mechanism to extract the third deep feature... until the last feature distillation block outputs the corresponding extracted deep features, thereby obtaining the deep features (multi-scale deep features) output by all feature distillation blocks. Thus, the present application extracts the multi-scale deep features through the feature distillation module in the target super-resolution model, and fuses the multi-scale deep features through a multi-layer feature fusion module. As a lightweight model (the feature distillation module is composed of multiple feature distillation blocks connected in series), the target super-resolution model solves the problem that the number of convolutional layers contained in the lightweight model is too small and the image features cannot be fully extracted.
[0106] In a possible implementation, the feature distillation block includes: a feature distillation unit, a feature fusion unit, a feature enhancement unit and a feature conversion unit.
[0107] The process of feature extraction of each feature distillation block for a given input feature is as follows:
[0108] Step S501: for a given input feature, input it into the feature distillation unit, perform feature distillation through multiple distillation layers of the feature distillation unit, and obtain multiple distillation features.
[0109] Since the feature distillation module is composed of a series of feature distillation blocks connected in series, except for the first feature distillation block whose input features are the shallow features extracted in step S102, the input features of the remaining feature distillation blocks are the output features of the previous feature distillation block. Figure 6 , Figure 6 A schematic diagram of the processing flow of a feature distillation block is shown. For a given input feature , first input the feature distillation unit and perform the feature distillation operation, which can be described as the following formula:
[0110] ;
[0111] ;
[0112] ;
[0113] ;
[0114] in, represents the i-th distillation layer ( , and Corresponding to Figure 6 In Modules, Corresponds to Figure 6 BS Conv module in represents the i-th refinement layer (corresponding to Figure 6 RBSB module in represents the i-th distillation feature, represents the i-th refined feature.
[0115] Step S502: input the multiple distilled features into the feature fusion unit, connect the multiple distilled features, and fuse them through a 1×1 convolution layer to obtain fused distilled features.
[0116] In the feature fusion stage, all distillation features generated by each previous distillation step are connected together (corresponding to Figure 6 The Concat module in ), and then fused through a 1×1 convolution layer (such as Figure 6 shown module), as shown in the formula:
[0117] ;
[0118] in, represents a 1×1 convolutional layer, and Identify post-fusion distillation features.
[0119] Step S503: input the fused distilled features into the feature enhancement unit, and process them using the large core attention mechanism, the spatial attention mechanism, or the multi-branch attention mechanism to obtain enhanced features.
[0120] Specifically, in the feature enhancement stage, the feature enhancement unit uses the corresponding attention mechanism to process the input features (taking the fused distilled features obtained in step S502 as given input features). As shown in the formula:
[0121] ;
[0122] ;
[0123] ;
[0124] in, Represents a multi-branch attention mechanism. If the feature distillation block is LSB, the feature enhancement unit in it will fuse the distilled features. As the first input feature, a multi-branch attention mechanism is used for processing (such as steps S201-S206 above) to obtain the first output feature as the enhanced feature . Represents the large core attention mechanism. If the feature distillation block is LB, the feature enhancement unit in it will fuse the distilled features. As the second input feature, the large core attention mechanism is used for processing (such as steps S301-S304 above) to obtain the second output feature as the enhanced feature . Represents the spatial attention mechanism. If the feature distillation block is SB, the feature enhancement unit in it will fuse the distilled features. As the third input feature, the spatial attention mechanism is used for processing (such as steps S401-S406 above) to obtain the third output feature as the enhanced feature .
[0125] Step S504: input the enhanced features into the feature conversion unit, pass through the 1×1 convolution layer of the feature conversion unit, and then pass through a pixel normalization module to obtain converted features.
[0126] In order to improve the performance of the model, a 1×1 convolutional layer (such as Figure 6 In module), introduces a pixel normalization module (such as Figure 6 ) to improve the stability of model training. As shown in the following formula:
[0127] ;
[0128] in, represents a 1×1 convolutional layer for feature transformation, represents the transformed features, Represents a pixel normalization operation.
[0129] Step S505, using a long skip connection operation, adding the converted features to the input features to obtain the deep features extracted by the feature distillation block.
[0130] In this embodiment, after feature conversion, long skip connections are used to enhance the residual learning ability of the target super-resolution model, as shown in the formula:
[0131] ;
[0132] in, represents the transformed features, represents the input feature (i.e., the input feature given in step S501), Represents the deep features (i.e., the features output by the feature distillation block).
[0133] Step S104: input the depth features of different scales into the multi-layer feature fusion module to obtain fused features.
[0134] In a possible implementation, the multi-layer feature fusion module includes at least: a 1×1 convolutional layer, a GELU function and a 3×3 convolutional layer. For the depth features of different scales, feature fusion is performed through a 1×1 convolutional layer, a GELU function activation and a 3×3 convolutional layer to obtain the fused features.
[0135] like Figure 2 As shown in FIG. 1 , the deep features (i.e., deep features of different scales) output by each feature distillation block in step S103 are input into the multi-layer feature fusion module. Specifically, the deep features of different scales are connected through the Concat module, and then the features are fused and compressed through the 1×1 convolution layer, activated through the GELU function, and finally through the 3×3 convolution layer (e.g. Figure 2 The BSConv module in the above formula shows the smooth fusion process of the above multi-layer feature fusion:
[0136] ;
[0137] in, represents a multi-layer feature fusion module, It is the fusion feature.
[0138] Step S105: the image reconstruction module adopts a skip connection method to obtain a reconstructed super-resolution image according to the fused features and the shallow features.
[0139] In a possible implementation, the image reconstruction module includes at least: a 3×3 convolution layer and a pixel reorganization layer, the fused features and the shallow features are added, passed through a 3×3 convolution layer, and then a pixel reorganization operation is performed to obtain the reconstructed super-resolution image.
[0140] This embodiment uses a skip connection method in the target super-resolution model to enhance the network residual learning capability to reconstruct a more accurate super-resolution image. As shown in the formula:
[0141] ;
[0142] in, represents the image reconstruction module, is the output of the target super-resolution model. The reconstruction process only includes a 3×3 convolution and pixel reassembly operation (such as Figure 2Upsample module in .
[0143] In summary, the embodiment of the present application realizes an effective and ultra-light new deep network structure for image super-resolution through the above-mentioned image super-resolution method. Specifically, the embodiment of the present application realizes the interaction of different attention information, proposes a feature fusion mechanism for ultra-lightweight super-resolution, and introduces snake convolution to maximize the adjustment and utilization of the receptive field of the network model to improve the performance of the algorithm. At the same time, the embodiment of the present application designs two attention mechanisms of different scales: a spatial attention mechanism that focuses on local features of the image and a large core attention mechanism with a stronger understanding of global information. It further designs a multi-branch attention mechanism and its channel interaction method to achieve efficient extraction of image features and maximize the use of multi-scale information. For the situation where existing models consume too much computing resources, a solution with smaller parameters and calculations and faster inference speed is implemented.
[0144] In order to evaluate the image reconstruction performance of the above target super-resolution model, it is compared with the most advanced lightweight and ultra-lightweight super-resolution algorithms, including SAFMN, VapSR, BSRN, HNCT, ShuffleMixe, HPUN, SPIN, ELAN, ESRT, FMEN, LatticeNet, SwinIR, DiVANet, SMSR and NGswin. Quantitative comparisons are performed on ×2, ×3 and ×4 benchmark datasets. Based on the PSNR and SSIM indicators for evaluating super-resolution quality, as well as the number of parameters and the amount of calculation used to measure the lightweight model, the target super-resolution model proposed in the embodiment of the present application has a simple and efficient structure, so it achieves quite good performance while reducing parameters and computing resources. Taking the ×4 super-resolution on the Manga109 dataset as an example, the number of parameters of the target super-resolution model proposed in the embodiment of the present application is about 61% less than that of NGswin, about 57% less than that of DiVANet, and about 22% less than that of HPUN-M. As for the amount of calculation, it is 40%, 61% and 21% less than them respectively. The target super-resolution model proposed in the embodiment of the present application not only uses a smaller number of parameters and calculations, but also achieves better performance than these methods. In addition, this embodiment also compares the reconstruction accuracy, calculation amount and parameter amount on the Manga109 dataset at ×4. The target super-resolution model proposed in the embodiment of the present application achieves a good trade-off between model complexity and reconstruction performance. At the same time, by comparing the local attribution graphs of the algorithms, the local attribution graph results show that the target super-resolution model proposed in the embodiment of the present application can use a wider range of information to obtain better super-resolution results, proving the effectiveness of the target super-resolution model proposed in the embodiment of the present application in multi-scale feature extraction and fusion. In addition to the quantitative evaluation of the model, a qualitative comparison of the image super-resolution method proposed in the embodiment of the present application is also provided (visual effect comparison of ×4 super-resolution on the Urban100 dataset). The image super-resolution method proposed in the embodiment of the present application generates parallel straight lines and grid patterns more accurately than other methods (such as BSRN, NGswin, DiVANet, etc.). These results also prove that the image super-resolution method proposed in the embodiment of the present application effectively achieves efficient fusion of multi-scale information by utilizing a multi-branch attention mechanism for channel interaction.
[0145] The second aspect of the embodiment of the present application further provides an image super-resolution device based on multi-scale feature fusion, which is used to execute the image super-resolution method based on multi-scale feature fusion described in the first aspect, referring to Figure 7 , Figure 7 A schematic diagram of the structure of an image super-resolution device is shown. Figure 7 As shown, the device comprises:
[0146] A model creation module, used to create a target super-resolution model, the target super-resolution model includes: a shallow feature extraction module, a feature distillation module, a multi-layer feature fusion module and an image reconstruction module; wherein the feature distillation module is composed of a plurality of feature distillation blocks connected in series, and the feature distillation blocks alternately use the following attention mechanisms in the order of series connection: a large core attention mechanism, a spatial attention mechanism and a multi-branch attention mechanism;
[0147] A first processing module is used to copy the original image n times and input the result into the shallow feature extraction module to obtain shallow features, where n is a positive integer greater than 1;
[0148] A second processing module is used to input the shallow features into the feature distillation module for feature extraction to obtain deep features of different scales;
[0149] A third processing module is used to input the depth features of different scales into the multi-layer feature fusion module to obtain fused features;
[0150] The fourth processing module is used to obtain a reconstructed super-resolution image according to the fused features and the shallow features by using a skip connection method through the image reconstruction module.
[0151] In a possible implementation, the multi-branch attention mechanism is:
[0152] Perform channel segmentation on the first input feature to obtain four partial features;
[0153] The first partial feature and the third partial feature are processed by the large core attention mechanism to obtain the first candidate feature and the third candidate feature;
[0154] The second partial feature and the fourth partial feature are processed by the spatial attention mechanism to obtain a second candidate feature and a fourth candidate feature;
[0155] Input the first candidate feature, the second candidate feature, the third candidate feature and the fourth candidate feature into the attention mechanism channel interaction unit to obtain a first interaction feature, a second interaction feature, a third interaction feature and a fourth interaction feature;
[0156] The first interaction feature, the second interaction feature, the third interaction feature and the fourth interaction feature are fused through a 1×1 convolution layer to obtain a fused interaction feature;
[0157] A long skip connection operation is adopted to multiply the fused interactive feature with the result of the point-by-point convolution of the first input feature, and feature fusion is performed through a 1×1 point-by-point convolution layer to obtain a first output feature.
[0158] In a possible implementation, the step of inputting the first candidate feature, the second candidate feature, the third candidate feature, and the fourth candidate feature into an attention mechanism channel interaction unit to obtain a first interaction feature, a second interaction feature, a third interaction feature, and a fourth interaction feature includes:
[0159] Using the attention mechanism channel interaction unit, multiplying the first candidate feature and the second partial feature, performing channel interaction through a convolution operation, and obtaining the first interaction feature;
[0160] Using the attention mechanism channel interaction unit, multiplying the second candidate feature and the third partial feature, performing channel interaction through a convolution operation, and obtaining the second interaction feature;
[0161] The attention mechanism channel interaction unit multiplies the third candidate feature and the fourth partial feature, performs channel interaction through a convolution operation, and obtains the third interaction feature;
[0162] The attention mechanism channel interaction unit multiplies the fourth candidate feature and the first partial feature, performs channel interaction through a convolution operation, and obtains the fourth interaction feature.
[0163] In a possible implementation, the large core attention mechanism is:
[0164] Pass the second input feature through a 1×1 point-by-point convolution layer to obtain a point-by-point convolution output feature;
[0165] Passing the point-by-point convolution output feature through a (2d-1)×(2d-1) depth convolution layer to obtain a depth convolution output feature;
[0166] Passing the deep convolution output features through a deep dilation convolution layer with a dilation rate of d to obtain an intermediate feature map;
[0167] The intermediate feature map is multiplied by the second input feature to obtain a second output feature.
[0168] In a possible implementation, the spatial attention mechanism is:
[0169] Perform channel segmentation on the third input feature to obtain four partial features;
[0170] The first partial feature is processed by snake convolution to obtain the first intermediate feature;
[0171] The second partial feature, the third partial feature and the fourth partial feature are respectively input into the multi-scale feature generation unit to obtain the second intermediate feature, the third intermediate feature and the fourth intermediate feature;
[0172] fusing the first intermediate feature, the second intermediate feature, the third intermediate feature, and the fourth intermediate feature to obtain a fused intermediate feature;
[0173] Aggregate the fused intermediate features through a 1×1 convolution layer and normalize them through a GELU function to obtain an attention map;
[0174] The third input feature is adjusted according to the attention map to obtain a third output feature.
[0175] In a possible implementation manner, the multi-scale feature generation unit performs feature processing according to the following formula:
[0176] ;
[0177] in, represents the i-th partial feature, represents the i-th intermediate feature, represents the snake-shaped dynamic convolution, p represents the original resolution of the original image, represents the upsampling operation, Indicates that the input features are downsampled to size.
[0178] In a possible implementation, the feature distillation block includes: a feature distillation unit, a feature fusion unit, a feature enhancement unit, and a feature conversion unit;
[0179] The process of feature extraction of each feature distillation block for a given input feature is as follows:
[0180] For a given input feature, input it into the feature distillation unit, perform feature distillation through multiple distillation layers of the feature distillation unit, and obtain multiple distillation features;
[0181] Input the multiple distilled features into the feature fusion unit, connect the multiple distilled features, and fuse them through a 1×1 convolution layer to obtain fused distilled features;
[0182] Inputting the fused distilled features into the feature enhancement unit, and processing them using the large core attention mechanism, the spatial attention mechanism, or the multi-branch attention mechanism to obtain enhanced features;
[0183] Inputting the enhanced features into the feature conversion unit, passing through a 1×1 convolution layer of the feature conversion unit, and then passing through a pixel normalization module to obtain converted features;
[0184] The converted features and the input features are added by a long skip connection operation to obtain the deep features extracted by the feature distillation block.
[0185] In a possible implementation, the shallow feature extraction module includes a 3×3 convolutional layer;
[0186] The multi-layer feature fusion module at least includes: a 1×1 convolution layer, a GELU function and a 3×3 convolution layer. For the depth features of different scales, feature fusion is performed through the 1×1 convolution layer, the GELU function and the 3×3 convolution layer to obtain the fused features;
[0187] The image reconstruction module at least includes: a 3×3 convolution layer and a pixel reorganization layer, which adds the fused features and the shallow features, passes through a 3×3 convolution layer, and then performs a pixel reorganization operation to obtain the reconstructed super-resolution image.
[0188] The present application also provides an electronic device, referring to Figure 8 , Figure 8 Schematic diagram of an electronic device proposed in an embodiment of the present application. Figure 8 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 multi-scale feature fusion disclosed in the embodiment of the present application.
[0189] 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 in the image super-resolution method based on multi-scale feature fusion as disclosed in the embodiment of the present application are implemented.
[0190] The embodiment 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 of the image super-resolution method based on multi-scale feature fusion as disclosed in the embodiment of the present application.
[0191] 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.
[0192] 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.
[0193] 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.
[0194] 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.
[0195] 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.
[0196] 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.
[0197] The above is a detailed introduction to the image super-resolution method, device and equipment based on multi-scale feature fusion 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 multi-scale feature fusion, It is characterized in that The method comprises: Creating a target super-resolution model, the target super-resolution model includes: a shallow feature extraction module, a feature distillation module, a multi-layer feature fusion module and an image reconstruction module; wherein the feature distillation module is composed of a plurality of feature distillation blocks connected in series, and the feature distillation blocks alternately use the following attention mechanisms in the order of series connection: a large core attention mechanism, a spatial attention mechanism and a multi-branch attention mechanism; After copying the original image n times, input the shallow feature extraction module to obtain shallow features, where n is a positive integer greater than 1; Inputting the shallow features into the feature distillation module for feature extraction to obtain deep features of different scales; Inputting the depth features of different scales into the multi-layer feature fusion module to obtain fused features; The image reconstruction module adopts a skip connection method to obtain a reconstructed super-resolution image according to the fused features and the shallow features; The multi-branch attention mechanism is: Perform channel segmentation on the first input feature to obtain four partial features; The first partial feature and the third partial feature are processed by the large core attention mechanism to obtain the first candidate feature and the third candidate feature; The second partial feature and the fourth partial feature are processed by the spatial attention mechanism to obtain a second candidate feature and a fourth candidate feature; Input the first candidate feature, the second candidate feature, the third candidate feature and the fourth candidate feature into the attention mechanism channel interaction unit to obtain a first interaction feature, a second interaction feature, a third interaction feature and a fourth interaction feature; The first interaction feature, the second interaction feature, the third interaction feature and the fourth interaction feature are fused through a 1×1 convolution layer to obtain a fused interaction feature; A long skip connection operation is adopted to multiply the fused interactive feature with the result of the point-by-point convolution of the first input feature, and feature fusion is performed through a 1×1 point-by-point convolution layer to obtain a first output feature; The step of inputting the first candidate feature, the second candidate feature, the third candidate feature and the fourth candidate feature into the attention mechanism channel interaction unit to obtain a first interaction feature, a second interaction feature, a third interaction feature and a fourth interaction feature includes: Using the attention mechanism channel interaction unit, multiplying the first candidate feature and the second partial feature, performing channel interaction through a convolution operation, and obtaining the first interaction feature; Using the attention mechanism channel interaction unit, multiplying the second candidate feature and the third partial feature, performing channel interaction through a convolution operation, and obtaining the second interaction feature; The attention mechanism channel interaction unit multiplies the third candidate feature and the fourth partial feature, performs channel interaction through a convolution operation, and obtains the third interaction feature; The attention mechanism channel interaction unit multiplies the fourth candidate feature and the first partial feature, performs channel interaction through a convolution operation, and obtains the fourth interaction feature; The large core attention mechanism is: Pass the second input feature through a 1×1 point-by-point convolution layer to obtain a point-by-point convolution output feature; Passing the point-by-point convolution output feature through a (2d-1)×(2d-1) depth convolution layer to obtain a depth convolution output feature; Passing the deep convolution output features through a deep dilation convolution layer with a dilation rate of d to obtain an intermediate feature map; Multiplying the intermediate feature map by the second input feature to obtain a second output feature; The spatial attention mechanism is: Perform channel segmentation on the third input feature to obtain four partial features; The first partial feature is processed by snake convolution to obtain the first intermediate feature; The second partial feature, the third partial feature and the fourth partial feature are respectively input into the multi-scale feature generation unit to obtain the second intermediate feature, the third intermediate feature and the fourth intermediate feature; fusing the first intermediate feature, the second intermediate feature, the third intermediate feature, and the fourth intermediate feature to obtain a fused intermediate feature; Aggregate the fused intermediate features through a 1×1 convolution layer and normalize them through a GELU function to obtain an attention map; The third input feature is adjusted according to the attention map to obtain a third output feature.
2. The image super-resolution method based on multi-scale feature fusion according to claim 1, It is characterized in that The multi-scale feature generation unit performs feature processing according to the following formula: ; in, represents the i-th partial feature, represents the i-th intermediate feature, represents the snake-shaped dynamic convolution, p represents the original resolution of the original image, represents the upsampling operation, It means that the input features are downsampled to size.
3. The image super-resolution method based on multi-scale feature fusion according to claim 1, It is characterized in that The feature distillation block includes: a feature distillation unit, a feature fusion unit, a feature enhancement unit and a feature conversion unit; The process of feature extraction of each feature distillation block for a given input feature is as follows: For a given input feature, input it into the feature distillation unit, perform feature distillation through multiple distillation layers of the feature distillation unit, and obtain multiple distillation features; Inputting the multiple distilled features into the feature fusion unit, connecting the multiple distilled features, and fusing them through a 1×1 convolution layer to obtain fused distilled features; Inputting the fused distilled features into the feature enhancement unit, and processing them using the large core attention mechanism, the spatial attention mechanism, or the multi-branch attention mechanism to obtain enhanced features; Inputting the enhanced features into the feature conversion unit, passing through a 1×1 convolution layer of the feature conversion unit, and then passing through a pixel normalization module to obtain converted features; The converted features and the input features are added by a long skip connection operation to obtain the deep features extracted by the feature distillation block.
4. The image super-resolution method based on multi-scale feature fusion according to claim 1, It is characterized in that The shallow feature extraction module includes a 3×3 convolutional layer; The multi-layer feature fusion module at least includes: a 1×1 convolution layer, a GELU function and a 3×3 convolution layer. For the depth features of different scales, the fused features are obtained by performing feature fusion through the 1×1 convolution layer, the GELU function and the 3×3 convolution layer; The image reconstruction module at least includes: a 3×3 convolution layer and a pixel reorganization layer, which adds the fused features and the shallow features, passes through a 3×3 convolution layer, and then performs a pixel reorganization operation to obtain the reconstructed super-resolution image.
5. An image super-resolution device based on multi-scale feature fusion, It is characterized in that The device for executing the image super-resolution method based on multi-scale feature fusion according to any one of claims 1 to 4 comprises: A model creation module, used to create a target super-resolution model, the target super-resolution model includes: a shallow feature extraction module, a feature distillation module, a multi-layer feature fusion module and an image reconstruction module; wherein the feature distillation module is composed of a plurality of feature distillation blocks connected in series, and the feature distillation blocks alternately use the following attention mechanisms in the order of series connection: a large core attention mechanism, a spatial attention mechanism and a multi-branch attention mechanism; A first processing module is used to copy the original image n times and input the result into the shallow feature extraction module to obtain shallow features, where n is a positive integer greater than 1; A second processing module is used to input the shallow features into the feature distillation module for feature extraction to obtain deep features of different scales; A third processing module is used to input the depth features of different scales into the multi-layer feature fusion module to obtain fused features; The fourth processing module is used to obtain a reconstructed super-resolution image according to the fused features and the shallow features by using a skip connection method through the image reconstruction module.
6. An electronic device, It is 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 multi-scale feature fusion according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Mine image super-resolution reconstruction method and system based on multi-scale residual network
CN113592718A
Lightweight image super-resolution reconstruction system and method for edge mobile device
CN117237190A
