Transform and multi-scale feature fusion-based image deblurring system and method
By introducing Transformer architecture and multi-scale feature fusion module into image defuzzing technology, the problem of global feature learning and receptive field limitation in the existing technology is solved, and more efficient image defuzzing and robustness of computer vision tasks is achieved.
Patent Information
- Application Number
- CN202411775902.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-29
AI Technical Summary
The existing image defuzzing technology has shortcomings in global feature learning and receptive field limitation, and it is difficult to effectively deal with complex fuzzy patterns and long-distance dependencies.
The image defuzzing system based on Transformer and multi-scale feature fusion is adopted. Through the multi-input multi-output encoder-decoder module, multi-feature multi-scale fusion module, improved Transformer module and attention fusion module, local and global feature information are integrated to enhance the system's learning ability of global features and the capture ability of remote pixels.
It significantly improves the accuracy and robustness of image debuffing, and can more effectively restore image detail features and improve the performance of computer vision tasks.
Smart Images

Figure CN119904386A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an image deblurring system and method based on Transformer and multi-scale feature fusion. Background Art
[0002] Image deblurring technology, as an important branch of image processing, aims to solve the image blur problem caused by camera shake, object movement or other factors, so as to restore a clearer and more detailed image. This technology has broad application prospects in many fields such as photography, medical imaging, satellite image analysis, etc.
[0003] Traditional image deblurring methods mainly rely on mathematical models, such as inverse filtering, Wiener filtering, etc. These methods try to reverse the blurring effect to restore the original image by constructing a mathematical model of the blurring process. However, when faced with complex blur patterns, especially those caused by non-uniform motion or nonlinear factors, traditional methods often have difficulty in achieving satisfactory deblurring results. This is because complex blur patterns may involve multiple different types of blur kernels, and the specific parameters of the blur kernel (such as size, shape, direction, etc.) may be unknown or difficult to accurately estimate.
[0004] In recent years, with the rapid development of deep learning technology, image deblurring methods based on convolutional neural networks (CNNs) have gradually become mainstream. Compared with traditional methods, CNNs have powerful feature extraction and representation capabilities, and can automatically learn the mapping relationship between blurred images and clear images. More importantly, CNN-based methods can directly restore clear images from blurred images without a clear blur kernel. This feature makes CNN perform well in processing complex blur patterns, greatly improving the accuracy and robustness of image deblurring.
[0005] However, despite the significant progress made in CNN-based image deblurring methods, they still have limitations in capturing global information of images as well as long-distance dependencies. Specifically, CNN performs well in processing local features, but may have difficulties in integrating global contextual information and understanding dependencies between distant pixels. This limits its performance in certain scenarios that require detailed global understanding, such as scene depth estimation, semantic segmentation and other tasks. Summary of the invention
[0006] In view of the shortcomings of existing image deblurring technologies in global feature learning and limited receptive field, the present invention provides an image deblurring system and method based on Transformer and multi-scale feature fusion, thereby addressing the challenges of existing technologies in global feature learning, remote pixel capture, computational efficiency, input content adaptability, and image detail restoration.
[0007] In the first aspect, the present invention provides an image deblurring system based on Transformer and multi-scale feature fusion, and the technical solution adopted to solve the above technical problems is as follows:
[0008] An image deblurring system based on Transformer and multi-scale feature fusion includes an input layer, a processing layer and an output layer. The input layer is responsible for receiving a blurred image as input. The processing layer includes multiple modules. The multiple modules work together to extract features and gradually restore a clear image. The output layer outputs a clear image after deblurring. The processing layer further includes:
[0009] A multi-input multi-output encoder-decoder module is used to extract features from blurred images of different scales through the encoder, and gradually restore clear images based on the extracted features through the decoder;
[0010] Multi-feature and multi-scale fusion module, which is used to integrate local and global feature information and enhance the system's ability to learn global features;
[0011] The improved Transformer module introduces an adaptive window mechanism and a cross-channel attention mechanism, which enables the system to better adapt to different types of blurred images and improves the effects of feature extraction and image restoration.
[0012] The attention fusion module dynamically learns and integrates useful feature information by introducing the channel attention mechanism.
[0013] Optionally, the encoder of the multi-input multi-output encoder-decoder module specifically implements the following steps:
[0014] Downsample the input blurred image to different scales;
[0015] For each scale image, a 3×3 convolution operation is first performed to preliminarily extract the local features of the image and adjust the channel information, and then the convolution result is sent to the encoder;
[0016] The encoder extracts multi-scale features from the received images of different scales, and then calls the attention fusion module, which calculates the importance weights for the feature channels of each scale, thereby dynamically weightedly fusing the global and local information.
[0017] Further optionally, the multi-feature multi-scale fusion module involved specifically includes:
[0018] The Transformer submodule is used to calculate the long-distance dependencies between pixels at different positions in the image based on its self-attention mechanism, so as to extract the global features of the image and capture the semantic information of the entire image;
[0019] Dense residual submodule, used to extract local feature information of images of different scales using convolution kernels of different sizes;
[0020] The dual bypass structure is used to combine local feature information and global feature information to ensure full fusion of information.
[0021] Optionally, the specific implementation process of the multi-feature multi-scale fusion module is as follows:
[0022] Take the fused features obtained by the attention fusion module in the encoder stage as input;
[0023] The Transformer submodule is used to calculate the long-distance dependencies between pixels at different positions in the image to extract the global features of the image and capture the semantic information of the entire image. At the same time, the dense residual submodule with a 3×3 convolution kernel is used to process the same input features to extract local features.
[0024] The global features extracted by the Transformer submodule and the local features extracted by the dense residual submodule are added element by element, and the added features are sent to the dense residual submodule containing convolution kernels of different sizes to further enhance the receptive field of the network and further strengthen and optimize the fused features.
[0025] A 1×1 convolution is used to reduce the number of channels of the feature map after receptive field enhancement to the initial number of channels to maintain the consistency of the feature map in the channel dimension. In this process, a residual connection is added, that is, the currently processed features are added to the features of the previously specified stage, so that the system's neural network can learn and transmit information more stably and effectively during training and feature processing.
[0026] Optionally, the specific implementation process of the improved Transformer module is as follows:
[0027] The feature map processed by the multi-feature multi-scale fusion module is used as input, and the layer normalization operation is performed on it. Then, the feature map is projected through the convolution projection operation to generate three different representations of Queries (Q), Keys (K) and Values (V), so as to spatially map the features from different angles, preparing for the subsequent attention calculation;
[0028] The Queries (Q) and Keys (K) are reshaped and multiplied to generate a transposed attention map, which is then normalized by the Softmax function and then multiplied with Values (V) to obtain the attention result to determine the correlation weights between features at different positions and highlight important feature information;
[0029] A feed-forward network consisting of layer normalization, two 1×1 convolutional layers, and a GELU activation function is used to perform nonlinear mapping on the obtained attention results.
[0030] Optionally, the specific implementation process of the attention fusion module is as follows:
[0031] The input image of the current stage and the features processed by the improved Transformer module are concatenated, and the two are merged together in the channel dimension to form a richer feature representation, preparing for subsequent dynamic learning and integration of useful features;
[0032] Calculate the importance weight of each channel, and dynamically assign weights to the concatenated features based on the calculated weights to highlight important feature information;
[0033] Use 1×1 convolution to refine the features after weight assignment to ensure the consistency of the feature map in structure and dimension and obtain optimized feature information.
[0034] Further optionally, the decoder of the multi-input multi-output encoder-decoder module involved specifically implements the following steps:
[0035] Taking the feature map optimized by the attention fusion module as input, upsampling is performed using the transposed convolution operation to gradually restore the size of the feature map to a resolution close to that of the original image;
[0036] When the feature map is upsampled to the maximum scale close to the original image resolution through transposed convolution, it is processed using a multi-feature multi-scale fusion module to further learn and integrate local and global features at this scale to further improve the details of the image;
[0037] A residual learning scheme is adopted, that is, a residual image is predicted and added to the input blurred image, and finally a deblurred clear image is obtained and output through the output layer.
[0038] In the second aspect, the present invention provides an image deblurring method based on Transformer and multi-scale feature fusion. The technical solution adopted to solve the above technical problems is as follows:
[0039] An image deblurring method based on Transformer and multi-scale feature fusion, based on the system described in the first aspect, comprises the following implementation steps:
[0040] S1, receives the blurred image through the input layer;
[0041] S2. Downsample the received blurred image to different scales through the multi-input multi-output encoder-decoder module. For each scale image, first perform a 3×3 convolution operation to preliminarily extract the local features of the image and adjust the channel information, and then send the convolution result to the encoder; the encoder extracts multi-scale features from the received images of different scales, and then calls the attention fusion module. The attention fusion module calculates the importance weight for the feature channel of each scale, thereby dynamically weighted fusion of global and local information;
[0042] S3, the multi-feature multi-scale fusion module includes a Transformer submodule, a dense residual submodule and a dual bypass structure. The multi-feature multi-scale fusion module takes the fusion features obtained by the attention fusion module in the encoder stage as input, and uses the Transformer submodule to calculate the long-distance dependencies between pixels at different positions in the image to extract the global features of the image and capture the overall semantic information of the image. At the same time, the dense residual submodule with a 3×3 convolution kernel is used to process the same input features to extract local features; the global features extracted by the Transformer submodule and the local features extracted by the dense residual submodule are added element by element, and the added features are sent to the dense residual submodule containing convolution kernels of different sizes to further enhance the network's receptive field, so that the fused features are further enhanced and optimized; 1×1 convolution is used to reduce the number of channels of the feature map after the receptive field enhancement processing to the initial number of channels to maintain the consistency of the feature map in the channel dimension; in this process, residual connections are added, that is, the currently processed features are added to the features of the previously specified stage, so that the network can learn and transmit information more stably and effectively during training and feature processing;
[0043] S4. The improved Transformer module takes the feature map processed by the multi-feature multi-scale fusion module as input, and first performs layer normalization on it; then, the feature map is projected through convolution projection operation to generate three different representations of Queries (Q), Keys (K) and Values (V), so as to spatially map the features from different angles, respectively, in preparation for subsequent attention calculation; then, Queries (Q) and Keys (K) are reshaped and multiplied to generate a transposed attention map, which is then normalized by the Softmax function and then multiplied with Values (V) to obtain the attention result, so as to determine the correlation weight between features at different positions and highlight important feature information; finally, a feedforward network consisting of layer normalization, two 1×1 convolutional layers and GELU activation function is used to perform nonlinear mapping on the obtained attention result;
[0044] S5. Use the attention fusion module to concatenate the input image of the current stage and the features processed by the improved Transformer module, merge the two together in the channel dimension to form a richer feature representation, and prepare for subsequent dynamic learning and integration of useful features; calculate the importance weight of each channel, and dynamically assign weights to the concatenated features according to the calculated weights to highlight important feature information; use 1×1 convolution to refine the features after weight assignment to ensure the consistency of the feature map in structure and dimension, and obtain optimized feature information;
[0045] S6. The decoder of the multi-input multi-output encoder-decoder module takes the feature map optimized by the attention fusion module as input, uses the transposed convolution operation for upsampling, and gradually restores the size of the feature map to a resolution close to the original image; when the feature map is upsampled to the maximum scale close to the original image resolution through the transposed convolution, it is processed by the multi-feature multi-scale fusion module to further learn and integrate the local and global features at this scale to further improve the details of the image; a residual learning scheme is adopted, that is, a residual image is predicted and added to the input blurred image, and finally a deblurred clear image is obtained, and the clear image is output through the output layer.
[0046] Optionally, the Transformer submodule involved calculates the long-distance dependencies between pixels at different positions in the image based on its self-attention mechanism, so as to extract the global features of the image and capture the overall semantic information of the image; the dense residual submodule uses convolution kernels of different sizes to extract local feature information of images of different scales; the dual bypass structure combines local feature information and global feature information to ensure full fusion of information.
[0047] The image deblurring system and method based on Transformer and multi-scale feature fusion of the present invention has the following beneficial effects compared with the prior art:
[0048] 1. The present invention can not only restore image detail features more effectively, but also significantly improve the robustness of subsequent computer vision tasks. It is suitable for a variety of image deblurring application scenarios and has broad application prospects.
[0049] 2. By introducing the Transformer architecture, the present invention can effectively learn the global feature information in the image and improve the system's ability to handle long-distance dependencies, thereby performing better in complex and blurred situations; the multi-feature multi-scale fusion module effectively combines local feature information and global feature information through a dual bypass structure, which can significantly enhance the system's ability to capture remote pixels and improve the quality of image detail restoration; by simplifying the Transformer module and introducing an adaptive window mechanism, the computational complexity is significantly reduced while ensuring performance, thereby improving the system's operating efficiency; through multi-scale feature fusion and improved Transformer modules, the detailed features in the image can be more effectively restored, significantly improving the overall clarity and visual quality of the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Attached Figure 1 is a system architecture diagram of Embodiment 1 of the present invention;
[0051] Attached Figure 2 This is a flowchart of the method implementation of the second embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the technical solution, the technical problem solved and the technical effect of the present invention more clearly understood, the technical solution of the present invention is clearly and completely described below in conjunction with specific embodiments.
[0053] Embodiment 1:
[0054] Combined with Figure 1 This embodiment proposes an image deblurring system based on Transformer and multi-scale feature fusion, which includes an input layer, a processing layer and an output layer. The input layer is responsible for receiving a blurred image as input, the processing layer includes multiple modules, and the multiple modules work together to extract features and gradually restore a clear image. The output layer outputs a clear image after deblurring; wherein the processing layer further includes:
[0055] A multi-input multi-output encoder-decoder module is used to extract features from blurred images of different scales through the encoder, and gradually restore clear images based on the extracted features through the decoder;
[0056] Multi-feature and multi-scale fusion module, which is used to integrate local and global feature information and enhance the system's ability to learn global features;
[0057] The improved Transformer module introduces an adaptive window mechanism and a cross-channel attention mechanism, which enables the system to better adapt to different types of blurred images and improves the effects of feature extraction and image restoration.
[0058] The attention fusion module dynamically learns and integrates useful feature information by introducing the channel attention mechanism.
[0059] In this embodiment, the encoder of the multi-input multi-output encoder-decoder module specifically implements the following steps:
[0060] Downsample the input blurred image to different scales;
[0061] For each scale image, a 3×3 convolution operation is first performed to preliminarily extract the local features of the image and adjust the channel information, and then the convolution result is sent to the encoder;
[0062] The encoder extracts multi-scale features from the received images of different scales, and then calls the attention fusion module, which calculates the importance weights for the feature channels of each scale, thereby dynamically weightedly fusing the global and local information.
[0063] In this embodiment, the multi-feature multi-scale fusion module involved specifically includes:
[0064] The Transformer submodule is used to calculate the long-distance dependencies between pixels at different positions in the image based on its self-attention mechanism, so as to extract the global features of the image and capture the semantic information of the entire image;
[0065] Dense residual submodule, used to extract local feature information of images of different scales using convolution kernels of different sizes;
[0066] The dual bypass structure is used to combine local feature information and global feature information to ensure full fusion of information.
[0067] Based on the above structure of the multi-feature multi-scale fusion module, the specific implementation process is as follows:
[0068] Take the fused features obtained by the attention fusion module in the encoder stage as input;
[0069] The Transformer submodule is used to calculate the long-distance dependencies between pixels at different positions in the image to extract the global features of the image and capture the semantic information of the entire image. At the same time, the dense residual submodule with a 3×3 convolution kernel is used to process the same input features to extract local features.
[0070] The global features extracted by the Transformer submodule and the local features extracted by the dense residual submodule are added element by element, and the added features are sent to the dense residual submodule containing convolution kernels of different sizes to further enhance the receptive field of the network and further strengthen and optimize the fused features.
[0071] Use 1×1 convolution to reduce the number of channels of the feature map after receptive field enhancement to the initial number of channels to maintain the consistency of the feature map in the channel dimension; in this process, add residual connection, that is, add the current processed features to the features of the previous specified stage (such as the original features input to the module or the features after specified processing, depending on the design), so that the system's neural network can learn and transmit information more stably and effectively during training and feature processing.
[0072] In this embodiment, the specific implementation process of the improved Transformer module is as follows:
[0073] The feature map processed by the multi-feature multi-scale fusion module is used as input, and the layer normalization operation is performed on it. Then, the feature map is projected through the convolution projection operation to generate three different representations of Queries (Q), Keys (K) and Values (V), so as to spatially map the features from different angles, preparing for the subsequent attention calculation;
[0074] The Queries (Q) and Keys (K) are reshaped and multiplied to generate a transposed attention map, which is then normalized by the Softmax function and then multiplied with Values (V) to obtain the attention result to determine the correlation weights between features at different positions and highlight important feature information;
[0075] A feed-forward network consisting of layer normalization, two 1×1 convolutional layers, and a GELU activation function is used to perform nonlinear mapping on the obtained attention results.
[0076] In this embodiment, the specific implementation process of the attention fusion module involved is as follows:
[0077] The input image of the current stage and the features processed by the improved Transformer module are concatenated, and the two are merged together in the channel dimension to form a richer feature representation, preparing for subsequent dynamic learning and integration of useful features;
[0078] Calculate the importance weight of each channel, and dynamically assign weights to the concatenated features based on the calculated weights to highlight important feature information;
[0079] Use 1×1 convolution to refine the features after weight assignment to ensure the consistency of the feature map in structure and dimension and obtain optimized feature information.
[0080] In this embodiment, the decoder of the multi-input multi-output encoder-decoder module specifically implements the following steps:
[0081] Taking the feature map optimized by the attention fusion module as input, upsampling is performed using the transposed convolution operation to gradually restore the size of the feature map to a resolution close to that of the original image;
[0082] When the feature map is upsampled to the maximum scale close to the original image resolution through transposed convolution, it is processed using a multi-feature multi-scale fusion module to further learn and integrate local and global features at this scale to further improve the details of the image;
[0083] A residual learning scheme is adopted, that is, a residual image is predicted and added to the input blurred image, and finally a deblurred clear image is obtained and output through the output layer.
[0084] Embodiment 2:
[0085] Combined with Figure 1 , 2 Based on the system described in Example 1, this embodiment further proposes an image deblurring method based on Transformer and multi-scale feature fusion, which includes the following implementation steps:
[0086] S1, receives the blurred image through the input layer;
[0087] S2. Downsample the received blurred image to different scales through the multi-input multi-output encoder-decoder module. For each scale image, first perform a 3×3 convolution operation to preliminarily extract the local features of the image and adjust the channel information, and then send the convolution result to the encoder; the encoder extracts multi-scale features from the received images of different scales, and then calls the attention fusion module. The attention fusion module calculates the importance weight for the feature channel of each scale, thereby dynamically weighted fusion of global and local information;
[0088] S3, the multi-feature multi-scale fusion module includes a Transformer submodule, a dense residual submodule and a double bypass structure. The multi-feature multi-scale fusion module takes the fusion features obtained by the attention fusion module in the encoder stage as input, and uses the Transformer submodule to calculate the long-distance dependencies between pixels at different positions in the image to extract the global features of the image and capture the overall semantic information of the image. At the same time, the dense residual submodule with a 3×3 convolution kernel is used to process the same input features to extract local features; the global features extracted by the Transformer submodule and the local features extracted by the dense residual submodule are combined. The element-by-element addition operation feeds the added features into a dense residual submodule containing convolution kernels of different sizes to further enhance the network's receptive field, so that the fused features are further strengthened and optimized. A 1×1 convolution is used to reduce the number of channels of the feature map after the receptive field enhancement process to the initial number of channels to maintain the consistency of the feature map in the channel dimension. In this process, a residual connection is added, that is, the currently processed features are added to the features of the previous specified stage (such as the original features input to the module or the features after the specified processing, depending on the design), so that the network can learn and transmit information more stably and effectively during training and feature processing.
[0089] S4. The improved Transformer module takes the feature map processed by the multi-feature multi-scale fusion module as input, and first performs layer normalization on it; then, the feature map is projected through convolution projection operation to generate three different representations of Queries (Q), Keys (K) and Values (V), so as to spatially map the features from different angles, respectively, in preparation for subsequent attention calculation; then, Queries (Q) and Keys (K) are reshaped and multiplied to generate a transposed attention map, which is then normalized by the Softmax function and then multiplied with Values (V) to obtain the attention result, so as to determine the correlation weight between features at different positions and highlight important feature information; finally, a feedforward network consisting of layer normalization, two 1×1 convolutional layers and GELU activation function is used to perform nonlinear mapping on the obtained attention result;
[0090] S5. Use the attention fusion module to concatenate the input image of the current stage and the features processed by the improved Transformer module, merge the two together in the channel dimension to form a richer feature representation, and prepare for subsequent dynamic learning and integration of useful features; calculate the importance weight of each channel, and dynamically assign weights to the concatenated features according to the calculated weights to highlight important feature information; use 1×1 convolution to refine the features after weight assignment to ensure the consistency of the feature map in structure and dimension, and obtain optimized feature information;
[0091] S6. The decoder of the multi-input multi-output encoder-decoder module takes the feature map optimized by the attention fusion module as input, uses the transposed convolution operation for upsampling, and gradually restores the size of the feature map to a resolution close to the original image; when the feature map is upsampled to the maximum scale close to the original image resolution through the transposed convolution, it is processed by the multi-feature multi-scale fusion module to further learn and integrate the local and global features at this scale to further improve the details of the image; a residual learning scheme is adopted, that is, a residual image is predicted and added to the input blurred image, and finally a deblurred clear image is obtained, and the clear image is output through the output layer.
[0092] In summary, the image deblurring system and method based on Transformer and multi-scale feature fusion of the present invention can not only more effectively restore image detail features, but also significantly improve the robustness of subsequent computer vision tasks, and is suitable for a variety of image deblurring application scenarios, and has broad application prospects.
[0093] The above specific examples are used to explain the principles and implementation methods of the present invention in detail. These examples are only used to help understand the core technical content of the present invention. Based on the above specific embodiments of the present invention, any improvements and modifications made by technicians in this technical field without departing from the principles of the present invention should fall within the scope of patent protection of the present invention.
Claims
1. An image deblurring system based on Transformer and multi-scale feature fusion, characterized in that: It includes an input layer, a processing layer and an output layer. The input layer is responsible for receiving the blurred image as input. The processing layer contains multiple modules. The multiple modules work together to extract features and gradually restore the clear image. The output layer outputs the deblurred clear image. The processing layer further includes: A multi-input multi-output encoder-decoder module is used to extract features from blurred images of different scales through the encoder, and gradually restore clear images based on the extracted features through the decoder; Multi-feature and multi-scale fusion module, which is used to integrate local and global feature information and enhance the system's ability to learn global features; The improved Transformer module introduces an adaptive window mechanism and a cross-channel attention mechanism, which enables the system to better adapt to different types of blurred images and improves the effects of feature extraction and image restoration. The attention fusion module dynamically learns and integrates useful feature information by introducing the channel attention mechanism.
2. The image deblurring system based on Transformer and multi-scale feature fusion according to claim 1, characterized in that: The encoder of the multi-input multi-output encoder-decoder module specifically implements the following steps: Downsample the input blurred image to different scales; For each scale image, a 3×3 convolution operation is first performed to preliminarily extract the local features of the image and adjust the channel information, and then the convolution result is sent to the encoder; The encoder extracts multi-scale features from the received images of different scales, and then calls the attention fusion module, which calculates the importance weights for the feature channels of each scale, thereby dynamically weightedly fusing the global and local information.
3. The image deblurring system based on Transformer and multi-scale feature fusion according to claim 2, characterized in that: The multi-feature multi-scale fusion module specifically includes: The Transformer submodule is used to calculate the long-distance dependencies between pixels at different positions in the image based on its self-attention mechanism, so as to extract the global features of the image and capture the semantic information of the entire image; Dense residual submodule, used to extract local feature information of images of different scales using convolution kernels of different sizes; The dual bypass structure is used to combine local feature information and global feature information to ensure full fusion of information.
4. The image deblurring system based on Transformer and multi-scale feature fusion according to claim 3, characterized in that: The specific implementation process of the multi-feature multi-scale fusion module is as follows: Take the fused features obtained by the attention fusion module in the encoder stage as input; The Transformer submodule is used to calculate the long-distance dependencies between pixels at different positions in the image to extract the global features of the image and capture the semantic information of the entire image. At the same time, the dense residual submodule with a 3×3 convolution kernel is used to process the same input features to extract local features. The global features extracted by the Transformer submodule and the local features extracted by the dense residual submodule are added element by element, and the added features are sent to the dense residual submodule containing convolution kernels of different sizes to further enhance the receptive field of the network and further strengthen and optimize the fused features. A 1×1 convolution is used to reduce the number of channels of the feature map after receptive field enhancement to the initial number of channels to maintain the consistency of the feature map in the channel dimension. In this process, a residual connection is added, that is, the currently processed features are added to the features of the previously specified stage, so that the system's neural network can learn and transmit information more stably and effectively during training and feature processing.
5. The image deblurring system based on Transformer and multi-scale feature fusion according to claim 4, characterized in that: The specific implementation process of the improved Transformer module is as follows: The feature map processed by the multi-feature multi-scale fusion module is used as input, and the layer normalization operation is performed on it. Then, the feature map is projected through the convolution projection operation to generate three different representations of Queries (Q), Keys (K) and Values (V), so as to spatially map the features from different angles, preparing for the subsequent attention calculation; The Queries (Q) and Keys (K) are reshaped and multiplied to generate a transposed attention map, which is then normalized by the Softmax function and then multiplied with Values (V) to obtain the attention result to determine the correlation weights between features at different positions and highlight important feature information; A feed-forward network consisting of layer normalization, two 1×1 convolutional layers, and a GELU activation function is used to perform nonlinear mapping on the obtained attention results.
6. The image deblurring system based on Transformer and multi-scale feature fusion according to claim 5, characterized in that: The specific implementation process of the attention fusion module is as follows: The input image of the current stage and the features processed by the improved Transformer module are concatenated, and the two are merged together in the channel dimension to form a richer feature representation, preparing for subsequent dynamic learning and integration of useful features; Calculate the importance weight of each channel, and dynamically assign weights to the concatenated features based on the calculated weights to highlight important feature information; Use 1×1 convolution to refine the features after weight assignment to ensure the consistency of the feature map in structure and dimension and obtain optimized feature information.
7. The image deblurring system based on Transformer and multi-scale feature fusion according to claim 6, characterized in that: The decoder of the MIMO encoder-decoder module specifically implements the following steps: Taking the feature map optimized by the attention fusion module as input, upsampling is performed using the transposed convolution operation to gradually restore the size of the feature map to a resolution close to that of the original image; When the feature map is upsampled to the maximum scale close to the original image resolution through transposed convolution, it is processed using a multi-feature multi-scale fusion module to further learn and integrate local and global features at this scale to further improve the details of the image; A residual learning scheme is adopted, that is, a residual image is predicted and added to the input blurred image, and finally a deblurred clear image is obtained and output through the output layer.
8. An image deblurring method based on Transformer and multi-scale feature fusion, characterized in that: Based on the system as claimed in claim 1, it includes the following implementation steps: S1, receives the blurred image through the input layer; S2. Downsample the received blurred image to different scales through the multi-input multi-output encoder-decoder module. For each scale image, first perform a 3×3 convolution operation to preliminarily extract the local features of the image and adjust the channel information, and then send the convolution result to the encoder; the encoder extracts multi-scale features from the received images of different scales, and then calls the attention fusion module. The attention fusion module calculates the importance weight for the feature channel of each scale, thereby dynamically weighted fusion of global and local information; S3, the multi-feature multi-scale fusion module includes a Transformer submodule, a dense residual submodule and a double bypass structure. The multi-feature multi-scale fusion module takes the fusion features obtained by the attention fusion module in the encoder stage as input, and uses the Transformer submodule to calculate the long-distance dependencies between pixels at different positions in the image to extract the global features of the image and capture the semantic information of the entire image. At the same time, the dense residual submodule with a 3×3 convolution kernel is used to process the same input features to extract local features. The global features extracted by the Transformer submodule and the local features extracted by the dense residual submodule are added element by element, and the added features are sent to the dense residual submodule containing convolution kernels of different sizes to further enhance the network's receptive field and further strengthen and optimize the fused features. The number of channels of the feature map after the receptive field enhancement processing is reduced to the initial number of channels using 1×1 convolution to maintain the consistency of the feature map in the channel dimension. In this process, residual connections are added, that is, the currently processed features are added to the features of the previously specified stage, so that the network can learn and transmit information more stably and effectively during training and feature processing. S4. The improved Transformer module takes the feature map processed by the multi-feature multi-scale fusion module as input, and first performs layer normalization on it; then, the feature map is projected through convolution projection operation to generate three different representations of Queries (Q), Keys (K) and Values (V), so as to spatially map the features from different angles, respectively, in preparation for subsequent attention calculation; then, Queries (Q) and Keys (K) are reshaped and multiplied to generate a transposed attention map, which is then normalized by the Softmax function and then multiplied with Values (V) to obtain the attention result, so as to determine the correlation weight between features at different positions and highlight important feature information; finally, a feedforward network consisting of layer normalization, two 1×1 convolutional layers and GELU activation function is used to perform nonlinear mapping on the obtained attention result; S5. Use the attention fusion module to concatenate the input image of the current stage and the features processed by the improved Transformer module, merge the two together in the channel dimension, and form a richer feature representation, in preparation for subsequent dynamic learning and integration of useful features; Calculate the importance weight of each channel, and dynamically assign weights to the concatenated features based on the calculated weights to highlight important feature information; Use 1×1 convolution to refine the features after weight assignment to ensure the consistency of the feature map in structure and dimension and obtain optimized feature information; S6. The decoder of the multi-input multi-output encoder-decoder module takes the feature map optimized by the attention fusion module as input, uses the transposed convolution operation for upsampling, and gradually restores the size of the feature map to a resolution close to the original image; when the feature map is upsampled to the maximum scale close to the original image resolution through the transposed convolution, it is processed by the multi-feature multi-scale fusion module to further learn and integrate the local and global features at this scale to further improve the details of the image; a residual learning scheme is adopted, that is, a residual image is predicted and added to the input blurred image, and finally a deblurred clear image is obtained, and the clear image is output through the output layer.
9. The image deblurring method based on Transformer and multi-scale feature fusion according to claim 8, characterized in that: The Transformer submodule calculates the long-distance dependencies between pixels at different positions in the image based on its self-attention mechanism to extract the global features of the image and capture the overall semantic information of the image; the dense residual submodule uses convolution kernels of different sizes to extract local feature information of images of different scales; the dual bypass structure combines local feature information with global feature information to ensure full fusion of information.
Citation Information
Cited By
Integrated image restoration system and method based on multi-element prompt and multi-scale gating
CN120450984A
Image deblurring method based on improved U-Net
CN120451003A
An image deblurring method based on improved U-Net
CN120451003B
Electron density map generation method and system, electronic equipment and storage medium
CN120833398A
An electron density map generation method, system, electronic device and storage medium
CN120833398B