An image deblurring method based on direction perception transformer

By using polar coordinate embedding and attention modules based on orientation-aware Transformers, the problem of the inability to effectively handle non-uniformly blurred images in existing technologies is solved, resulting in better image deblurring effects and restoration of clear images.

CN118333897BActive Publication Date: 2026-07-03NANKAI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANKAI UNIV
Filing Date
2024-03-20
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing deep learning methods cannot effectively utilize the inconsistency between global and local blur forms when processing non-uniformly blurred images, leading to performance degradation. In particular, they ignore prior information about the direction of object motion and dynamic scenes, resulting in poor blur recovery.

Method used

An image deblurring method based on orientation-aware Transformer is adopted. Through polar coordinate embedding module and polar coordinate attention module, shallow features of the image are extracted and attention is calculated in polar coordinates. Image reconstruction is performed using the relative positional relationship in polar coordinate system.

Benefits of technology

It achieves adaptive learning of image features, which can better recover clear images, eliminate noise information, adapt to blurring modes in different directions, and improve the effect of image deblurring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118333897B_ABST
    Figure CN118333897B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image processing technology, and provides an image deblurring method based on direction-aware Transformer. The method involves inputting the original image into a polar coordinate embedding module within an encoder-decoder neural network; extracting shallow features from the original image through the polar coordinate embedding module; extracting the relative positions of pixels in the original image in polar coordinates through a polar coordinate attention module within the encoder-decoder neural network; and obtaining polar coordinate attention module features by performing attention calculations on the relative positional relationships between pixels; finally, inputting these polar coordinate attention module features into an image reconstruction module to generate a high-quality, clear reconstructed image. This invention extracts shallow features from the image through the polar coordinate embedding module, aggregating features in each direction. The polar coordinate attention module, during attention calculations, can better utilize the extracted shallow features, learning features in each direction to achieve better image restoration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to an image deblurring method based on orientation-aware Transformer. Background Technology

[0002] Blur typically occurs when there is camera shake or rapid object movement. This phenomenon not only degrades image quality but also leads to information loss. Motion deblurring, which involves reconstructing a sharp image from a blurred one, is an effective solution for applications such as moving object segmentation, object detection, and text recognition, which are affected by blurred scenes. However, in real-world scenarios, because global and local blur forms may not be uniform, the blur directions of rapidly moving foreground objects and relatively stationary backgrounds are inconsistent when capturing moving objects. Describing a uniform kernel as a fixed function is inappropriate.

[0003] Currently, deep learning methods have become a popular approach for solving blur issues. Some works have utilized convolutional neural networks (CNNs) to achieve better deblurring performance. However, due to the spatial invariance of the convolutional kernel, it cannot adapt to the problem of uneven blurring in different parts of an image. Restoring non-uniform blur requires broader contextual information, but CNNs have a limited receptive field. The causes of blurring in the real world are complex, making it extremely difficult to estimate the blur of the entire image using a uniform blur kernel. Different parts of a real scene have completely different blurring causes, leading to unavoidable uncertainties in kernel estimation. Therefore, a poorly designed window for blur estimation can degrade performance in real-world deblurring. Furthermore, Transformer methods utilize an attention mechanism to recover blurred images by directly associating one pixel with all other pixels. The attention architectures of the aforementioned works ignore the direction of object motion and dynamic scenes, causing them to lose a significant amount of prior information about the blurred scene. Since blur patterns are often region- and directionally specific, a square window shape is often incompatible with blur removal.

[0004] In some scenarios, although the direction of object motion is horizontal, the blurred pattern may have a tilted direction due to the combined effects of object motion and dynamic scene. Some works use horizontal and vertical windows to utilize prior information about the direction of the blurred pattern. However, most directions of the blurred pattern are non-orthogonal, and the shapes of horizontal and vertical windows are not suitable for recovering blurred patterns in arbitrary directions in the real world. Summary of the Invention

[0005] This invention aims to at least solve one of the technical problems existing in related technologies. To this end, this invention provides an image deblurring method based on a direction-aware Transformer.

[0006] This invention provides an image deblurring method based on orientation-aware Transformer, comprising the following steps:

[0007] S1: Input the original image into the polar coordinate embedding module in the encoder-decoder neural network;

[0008] S2: Extract shallow features of the original image through the polar coordinate embedding module;

[0009] S3: Based on the shallow features, the relative positions of pixels in the original image in polar coordinates are extracted by the polar coordinate attention module in the encoder-decoder neural network. The polar coordinate attention module features are obtained by performing attention calculation on the relative positional relationship between pixels in the original image in polar coordinates.

[0010] S4: Input the features from the polar coordinate attention module into the image reconstruction module to generate a high-quality, clear reconstructed image.

[0011] According to the present invention, an image deblurring method based on orientation-aware Transformer is provided, which further includes a polar coordinate embedding module in step S1, comprising a polar coordinate mask layer, a convolutional layer and a deformable convolutional layer. The polar coordinate mask layer uses the polarity of polar coordinates to divide the image and obtain a mask matrix. The mask matrix and the convolutional layer are combined to generate the offset matrix of the deformable convolutional layer.

[0012] The image deblurring method based on direction-aware Transformer provided by the present invention further includes step S2, which comprises:

[0013] S21: The polar coordinate mask layer uses the polarity of polar coordinates to divide the image and obtain a mask matrix. The mask matrix is ​​combined with the convolutional layer to generate the offset matrix of the deformable convolutional layer.

[0014] S22: Generate a distribution matrix based on the offset matrix. Based on the size of the original image, display the position of each pixel in Cartesian coordinates within the distribution matrix. Apply the conversion rules between Cartesian and polar coordinates to obtain a polar coordinate distribution matrix. The expression for the polar coordinate distribution matrix is:

[0015]

[0016] in, The distribution matrix is ​​in polar coordinates. , Let H be a matrix set, W be the channel height, and N be the number of pixels. This is the position matrix along the x-axis based on Cartesian coordinates. This is the position matrix based on the y-axis in Cartesian coordinates. ;

[0017] S23: Divide the image using the polarity of polar coordinates to obtain a mask, and extract features corresponding to each direction of the mask through deformable convolutional layers:

[0018] Given N1 as the number of azimuth angles in the polar coordinate system, the image is divided into N1 parts. The corresponding mask matrix is ​​generated according to the distribution matrix. The mask matrix is ​​combined with a deformable convolutional layer to capture the offset features from the direction of each azimuth angle.

[0019] S24: The final offset tensor is generated by adding pixel by pixel to each mask convolution tensor. The final offset tensor expression is:

[0020]

[0021] in, For the offset tensor, , It is a 3×3 convolutional layer. For the original image, A polar coordinate partition mask for the image. ;

[0022] S25: Deformable convolution is used to compute shallow features of the input image. Dilated convolution is used to capture shallow features in the receptive field. Deformable convolution is used as the embedding layer for the features. The offset tensor and the original image are used as inputs to the deformable convolution to generate the output shallow features. The expression for the output shallow features is:

[0023]

[0024] in, These are the shallow features output by the polar coordinate embedding module. It is a deformable convolutional layer.

[0025] The image deblurring method based on direction-aware Transformer provided by the present invention further includes a polar coordinate embedding module in step S2, which extracts shallow features of the image under the action of polar coordinate masking and aggregates shallow features in each direction.

[0026] The image deblurring method based on direction-aware Transformer provided by the present invention further includes the polar coordinate embedding module in step S2, which uses a deformable convolutional network with a custom offset matrix to restrict the offset matrix by a polar coordinate mask, so that the deformable convolutional network can extract shallow features in each direction.

[0027] According to the present invention, an image deblurring method based on direction-aware Transformer is provided, which further includes a polar coordinate attention module in step S3, comprising a polar coordinate position encoding submodule and a polar coordinate azimuth angle merging submodule. The polar coordinate position encoding submodule uses the incident angle and azimuth angle to capture the relative position between pixels, and the polar coordinate azimuth angle merging submodule merges adjacent blocks according to the encoding obtained by the polar coordinate position encoding submodule.

[0028] The image deblurring method based on direction-aware Transformer provided by the present invention further includes step S3, which comprises:

[0029] S31: Based on the polar coordinate system segmentation window, the input image is segmented into image patches;

[0030] S32: Encode the image patch using the polar coordinate position encoding submodule:

[0031] The relative positions between pixels are captured using the incident angle and azimuth angle. The pixel position expression in polar coordinates is:

[0032]

[0033]

[0034] Where i is the i-th pixel. Let be the incident angle of the i-th pixel. Let be the orientation angle of the i-th pixel. The field of view is half the size of the input features. This represents the number of pixels along the radius. This represents the number of pixels along the azimuth angle.

[0035] The relative positional relationship between the i-th pixel and the j-th pixel The expression is:

[0036]

[0037]

[0038] Where j is the j-th pixel, Let be the difference in incident angles between the i-th pixel and the j-th pixel. for Let be the azimuth angle difference between the i-th pixel and the j-th pixel. This represents the number of pixels along the angle of incidence.

[0039] The expression for the incident angle position offset tensor is:

[0040]

[0041] in, Let the incident angle position bias tensor be... The relative position parameters along the azimuth angle. This represents the relative position parameter along the radius;

[0042] The expression for the azimuth position offset tensor is:

[0043]

[0044] in, This is the azimuth position offset tensor. The relative position parameters along the incident angle, This represents the relative position parameter along the radius;

[0045] The expression for calculating the features of the polar coordinate attention module is:

[0046]

[0047] in, The key matrix, For value matrices, For querying the matrix, It is the transpose matrix. For the dimensions of value and key, The softmax activation function is used. Features of the polar coordinate attention module;

[0048] S33: Using the polar coordinate azimuth merging submodule, adjacent image blocks are merged based on the encoding obtained from the polar coordinate position encoding submodule.

[0049] The image deblurring method based on direction-aware Transformer provided by the present invention further includes step S4, which comprises:

[0050] S41: Using the polar coordinate attention module, the shallow features are extracted from different angles to obtain the output features of the decoder;

[0051] S42: Using a frequency-domain-based feedforward network, the shallow layer features are output as the encoder's output features. The encoder's output feature expression is:

[0052]

[0053] in, For the output characteristics of the encoder, H is the channel height, W is the channel width, and C is the number of channels. These are shallow features. , For Fast Fourier Transform, Indicates inverse transformation, It is a feedforward network;

[0054] S43: The output features of the encoder and the output features of the decoder are fused through skip connections to obtain the recovered features.

[0055] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects:

[0056] This invention designs a feature extraction method for blurred images based on a direction-aware Transformer network. This method can recover a sharp image from a blurred image by adaptively learning the most information-rich representation and eliminating noise in the features. The invention also designs a polar coordinate embedding module, which extracts shallow features of the image under the action of a polar coordinate mask and aggregates features in each direction. Furthermore, this invention proposes a polar coordinate position encoding module, converting the window relationships from Cartesian coordinates to polar coordinates. This allows for better utilization of shallowly extracted features during attention calculations and enables direct learning of features in each direction, achieving better potential sharp image recovery.

[0057] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0059] Figure 1 This is a flowchart illustrating an image deblurring method based on direction-aware Transformer provided by the present invention.

[0060] Figure 2 This invention demonstrates the effect of a direction-aware Transformer-based image deblurring method on restoring pedestrian walking images.

[0061] Figure 3 This invention demonstrates the effect of a direction-aware Transformer-based image deblurring method on restoring images of moving vehicles. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but should not be used to limit the scope of this invention.

[0063] like Figure 1 As shown, an image deblurring method based on orientation-aware Transformer estimates the blur pattern from any azimuth angle using a polar coordinate system. Based on the asymmetric encoder-decoder architecture of Transformer network, it reconstructs high-quality clear images using a polar coordinate embedding module based on polar coordinate system and a polar coordinate attention module with angular relative position encoding.

[0064] Specifically, the steps include the following:

[0065] S1: Input the original image into the polar coordinate embedding module in the encoder-decoder neural network;

[0066] The encoder-decoder neural network includes a polar coordinate embedding module and a polar coordinate attention module. The polar coordinate embedding module includes a polar coordinate mask layer, a convolutional layer, and a deformable convolutional layer, which inputs a degraded image into the encoder-decoder neural network.

[0067] Furthermore, the encoder-decoder neural network includes an L-level encoder and an L-level decoder.

[0068] S2: Extract shallow features of the image using the polar coordinate embedding module in the encoder-decoder neural network, specifically including the following steps:

[0069] S21: Direction-Aware Transformer (DAT) image deblurring model uses polar coordinate masking layers and convolutional layers to generate a hand-designed offset matrix;

[0070] S22: Generate a distribution matrix based on the offset matrix. Based on the size of the original image, display the position of each pixel in Cartesian coordinates within the distribution matrix. Apply the conversion rules between Cartesian and polar coordinates to obtain a polar coordinate distribution matrix. The expression for the polar coordinate distribution matrix is:

[0071]

[0072] in, The distribution matrix is ​​in polar coordinates. , Let H be a matrix set, W be the channel height, and N be the number of pixels. This is the position matrix along the x-axis based on Cartesian coordinates. This is the position matrix based on the y-axis in Cartesian coordinates. ;

[0073] S23: Divide the image using the polarity of polar coordinates to obtain a mask, and extract features corresponding to each direction of the mask through deformable convolutional layers:

[0074] Given N1 as the number of azimuth angles in the polar coordinate system, the image is divided into N1 parts and a corresponding mask matrix is ​​generated. The mask matrix is ​​combined with a convolutional layer to capture the offset features from the direction of each azimuth angle.

[0075] S24: After N1 feature captures in different polarity directions, the final offset tensor is generated by adding a mask convolution tensor to each pixel. The expression for the final offset tensor is:

[0076]

[0077] in, For the offset tensor, , It is a 3×3 convolutional layer. For the original image, A polar coordinate partition mask for the image. ;

[0078] S25: Deformable convolution is used to compute shallow features of the input image. Dilated convolution is used to capture shallow features in the receptive field. Deformable convolution is used as the embedding layer for the features. The offset tensor and the degraded image are used as inputs to the deformable convolution to generate the output shallow features. The expression for the output shallow features is:

[0079]

[0080] in, These are the shallow features output by the polar coordinate embedding module. It is a deformable convolutional layer;

[0081] The polar coordinate embedding module uses a deformable convolutional network with a custom offset matrix and restricts the offset matrix using a polar coordinate mask. This enables the deformable convolutional network to extract shallow features in each direction. The deformable convolutional layer reshapes the convolutional kernel according to the polar coordinate direction, and then aggregates the extracted shallow features in each direction.

[0082] S3: Based on shallow features, the relative positions of pixels in the original image in polar coordinates are extracted by the polar coordinate attention module in the encoder-decoder neural network. Attention is then calculated on the relative positional relationships of pixels in the original image in polar coordinates to obtain the polar coordinate attention module features. The polar coordinate attention module includes a polar coordinate position encoding submodule and a polar coordinate azimuth merging submodule. The polar coordinate position encoding submodule uses the incident angle and azimuth angle to capture the relative positions of pixels, and the polar coordinate azimuth merging submodule merges adjacent blocks based on the encoding obtained from the polar coordinate position encoding submodule. The specific steps are as follows:

[0083] S31: Based on the polar coordinate system segmentation window, the shallow feature image is segmented into image patches;

[0084] In polar coordinates, using To represent a block along the azimuth angle, use Representing a block along a radius, DAT performs a novel window-based self-attention mechanism with a strip of tensor window shape from the center to the edge. This invention provides two types of window shapes: DAT-RA and DAT-A. The DAT-RA window shape has a size of... The window, DAT-A, is a stripe window with the same width and radius; it segments the shallow feature image into... After splitting the window into large and small windows, the attention characteristics of the window are as follows:

[0085]

[0086] in, For the attention features of the window, Let H be a matrix set, where H is the height of the channel, W is the width of the channel, and C is the number of channels. For blocks along the azimuth angle, For blocks along the radius;

[0087] S32: Encode the image patch using the polar coordinate position encoding submodule:

[0088] The relative positions between pixels are captured using the incident angle and azimuth angle. The pixel position expression in polar coordinates is:

[0089]

[0090]

[0091] Where i is the i-th pixel. Let be the incident angle of the i-th pixel. Let be the orientation angle of the i-th pixel. The field of view is half the size of the input features. This represents the number of pixels along the radius. This represents the number of pixels along the azimuth angle.

[0092] The relative positional relationship between the i-th pixel and the j-th pixel The expression is:

[0093]

[0094]

[0095] Where j is the j-th pixel, Let be the difference in incident angles between the i-th pixel and the j-th pixel. for Let be the azimuth angle difference between the i-th pixel and the j-th pixel. This represents the number of pixels along the angle of incidence.

[0096] The expression for the incident angle position offset tensor is:

[0097]

[0098] in, Let the incident angle position bias tensor be... The relative position parameters along the azimuth angle. This represents the relative position parameter along the radius;

[0099] The expression for the azimuth position offset tensor is:

[0100]

[0101] in, This is the azimuth position offset tensor. The relative position parameters along the incident angle, This represents the relative position parameter along the radius;

[0102] The expression for calculating the features of the polar coordinate attention module is:

[0103]

[0104] in, The key matrix, For value matrices, For querying the matrix, It is the transpose matrix. For the dimensions of value and key, The softmax activation function is used. Features of the polar coordinate attention module;

[0105] S33: Using the polar coordinate azimuth merging submodule, adjacent image blocks are merged according to the encoding obtained by the polar coordinate position encoding submodule. For the polar coordinate embedding module and the polar coordinate attention module, due to the different window-based self-attention strategies, adjacent blocks are merged according to the encoding obtained by the position encoding submodule to suit the two types of window shapes, DAT-RA and DAT-A.

[0106] S4: Input the attention module features into the image reconstruction module to generate a high-quality, clear reconstructed image. This includes the following steps:

[0107] S41: Using the polar coordinate attention module, the shallow features are extracted from different angles to obtain the output features of the decoder;

[0108] S42: Using a frequency-domain-based feedforward network, the shallow layer features are output as the encoder's output features. The encoder's output feature expression is:

[0109]

[0110] in, For the output characteristics of the encoder, H is the channel height, W is the channel width, and C is the number of channels. These are shallow features. , For Fast Fourier Transform, Indicates inverse transformation, It is a feedforward network;

[0111] S43: The output features of the encoder and the output features of the decoder are fused through skip connections to obtain the image restoration features.

[0112] like Figure 2 The image shown illustrates the image deblurring effect of this invention on a pedestrian walking deblurring dataset, as follows: Figure 3 The image shown demonstrates the image deblurring effect of this invention on a dataset of moving cars. As can be seen, by comparing the global image with magnified local details, a good restoration effect is achieved without causing loss of the original image texture, demonstrating the effectiveness of this invention.

[0113] The beneficial effects of this invention are as follows: This invention designs a feature extraction method for blurred images based on a direction-aware Transformer network. This method can recover a clear image from a blurred image by adaptively learning the most information-rich representation and eliminating noise information in the features. This invention also designs a polar coordinate embedding module, which extracts shallow features of the image under the action of a polar coordinate mask and aggregates features in each direction. Furthermore, this invention proposes a polar coordinate-based position encoding module, converting the window relationships from Cartesian coordinates to polar coordinates. This allows for better utilization of shallowly extracted features during attention calculation and enables direct learning of features in each direction, achieving better potential clear image recovery.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image deblurring method based on direction-aware Transformer, characterized in that, Includes the following steps: S1: Input the original image into the polar coordinate embedding module in the encoder-decoder neural network; The polar coordinate embedding module includes a polar coordinate mask layer, a convolutional layer, and a deformable convolutional layer. The polar coordinate mask layer uses the polarity of polar coordinates to divide the image and obtain a mask matrix. The mask matrix is ​​combined with the convolutional layer to generate the offset matrix of the deformable convolutional layer. S2: Extract shallow features of the original image through the polar coordinate embedding module; S3: Based on the shallow features, the polar coordinate attention module in the encoder-decoder neural network extracts the relative positions between pixels in the original image in polar coordinates. By performing attention calculation on the relative positional relationship between pixels in the original image in polar coordinates, the polar coordinate attention module features are obtained. The polar coordinate attention module includes a polar coordinate position encoding submodule and a polar coordinate azimuth merging submodule. The polar coordinate position encoding submodule uses the incident angle and azimuth angle to capture the relative position between pixels, and the polar coordinate azimuth merging submodule merges adjacent blocks according to the encoding obtained by the polar coordinate position encoding submodule. S4: Input the features from the polar coordinate attention module into the image reconstruction module to generate a high-quality, clear reconstructed image.

2. The image deblurring method based on direction-aware Transformer according to claim 1, characterized in that, Step S2 includes: S21: The polar coordinate mask layer uses the polarity of polar coordinates to divide the image and obtain a mask matrix. The mask matrix is ​​combined with the convolutional layer to generate the offset matrix of the deformable convolutional layer. S22: Generate a distribution matrix based on the offset matrix. Based on the size of the original image, display the position of each pixel in Cartesian coordinates within the distribution matrix. Apply the conversion rules between Cartesian and polar coordinates to obtain a polar coordinate distribution matrix. The expression for the polar coordinate distribution matrix is: in, The distribution matrix is ​​in polar coordinates. , Let H be a matrix set, where H is the height of the channel, W is the width of the channel, and N is the number of pixels. For Cartesian coordinates The position matrix of the axes, For Cartesian coordinates The position matrix of the axes, ; S23: Divide the image using the polarity of polar coordinates to obtain a mask, and extract features corresponding to each direction of the mask through deformable convolutional layers: Given N1 as the number of azimuth angles in the polar coordinate system, the image is divided into N1 parts. The corresponding mask matrix is ​​generated according to the distribution matrix. The mask matrix is ​​combined with a deformable convolutional layer to capture the offset features from the direction of each azimuth angle. S24: The final offset tensor is generated by adding pixel by pixel to each mask convolution tensor. The final offset tensor expression is: in, For the offset tensor, , It is a 3×3 convolutional layer. For the original image, A polar coordinate partition mask for the image. ; S25: Deformable convolution is used to compute shallow features of the input image. Dilated convolution is used to capture shallow features in the receptive field. Deformable convolution is used as the embedding layer for the features. The offset tensor and the original image are used as inputs to the deformable convolution to generate the output shallow features. The expression for the output shallow features is: in, These are the shallow features output by the polar coordinate embedding module. It is a deformable convolutional layer.

3. The image deblurring method based on direction-aware Transformer according to claim 2, characterized in that, In step S2, under the action of the polar coordinate mask, the polar coordinate embedding module extracts the shallow features of the image and aggregates the shallow features in each direction.

4. The image deblurring method based on direction-aware Transformer according to claim 2, characterized in that, In step S2, the polar coordinate embedding module uses a deformable convolutional network with a custom offset matrix and a polar coordinate mask to restrict the offset matrix, enabling the deformable convolutional network to extract shallow features of the image in each direction.

5. The image deblurring method based on direction-aware Transformer according to claim 1, characterized in that, Step S3 includes: S31: Based on the polar coordinate system segmentation window, the input image is segmented into image patches; S32: Encode the image patch using the polar coordinate position encoding submodule: The relative positions between pixels are captured using the incident angle and azimuth angle. The pixel position expression in polar coordinates is: Where i is the i-th pixel. Let be the incident angle of the i-th pixel. Let be the orientation angle of the i-th pixel. The field of view is half the size of the input features. This represents the number of pixels along the radius. This represents the number of pixels along the azimuth angle. The relative positional relationship between the i-th pixel and the j-th pixel The expression is: Where j is the j-th pixel, Let be the difference in incident angles between the i-th pixel and the j-th pixel. for Let be the azimuth angle difference between the i-th pixel and the j-th pixel. This represents the number of pixels along the angle of incidence. The expression for the incident angle position offset tensor is: in, Let the incident angle position offset tensor be... The relative position parameters along the azimuth angle. This represents the relative position parameter along the radius; The expression for the azimuth position offset tensor is: in, This is the azimuth position offset tensor. The relative position parameters along the incident angle, This represents the relative position parameter along the radius; The expression for calculating the features of the polar coordinate attention module is: in, The key matrix, For value matrices, For querying the matrix, It is the transpose matrix. For the dimensions of value and key, The softmax activation function is used. Features of the polar coordinate attention module; S33: Using the polar coordinate azimuth merging submodule, adjacent image blocks are merged based on the encoding obtained from the polar coordinate position encoding submodule.

6. The image deblurring method based on direction-aware Transformer according to claim 1, characterized in that, The S4 step includes: S41: Using the polar coordinate attention module, the shallow features are extracted from different angles to obtain the output features of the decoder; S42: Using a frequency-domain-based feedforward network, the shallow layer features are output as the encoder's output features. The encoder's output feature expression is: in, For the output characteristics of the encoder, H is the channel height, W is the channel width, and C is the number of channels. These are shallow features. , For Fast Fourier Transform, Indicates inverse transformation, It is a feedforward network; S43: The output features of the encoder and the output features of the decoder are fused through skip connections to obtain the recovered features.