Image denoising method and device, computer equipment and storage medium
By using hollow convolution and attention mechanisms in the U-Net module, the problem of lack of global context information of the U-Net module is solved, the quality of image denoising processing and model performance are improved, and more efficient image denoising effect is achieved .
Patent Information
- Application Number
- CN202411350320.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-26
AI Technical Summary
The U-Net module lacks global context information in the AI drawing tool Stable Diffusion, resulting in the loss of detailed information of generated images and poor image quality.
The image denoising method based on the U-Net network architecture is adopted, and hollow convolution is used instead of ordinary convolution, and an attention mechanism is introduced to improve the model's receptive field range through feature weighting and obtain more comprehensive global context information.
It improves the quality of image denoising processing, reduces operation and training costs, improves the cost-effectiveness and performance of the model, and improves the accuracy and naturalness of image processing results.
Smart Images

Figure CN119205554A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to an image denoising method, apparatus, computer equipment and storage medium. Background Art
[0002] In the AI drawing tool Stable Diffusion, the U-Net module is used as a key module for image denoising. U-Net receives a noisy image as input and outputs a denoised image. The U-Net module includes a contraction path and an expansion path. The contraction path consists of a series of convolutional layers and pooling layers, which are used to gradually reduce the spatial resolution of the image and extract important features about the image structure. Then, the expansion path gradually restores these features to the size of the original image through upsampling and the reverse operation of the convolutional layer, and generates the final denoising result. The key to the U-Net module is the design of skip connections, which are direct connections established between earlier layers and later layers for transmitting information. This connection breaks the limitation that information can only be transmitted layer by layer in traditional neural networks, allowing information to flow directly between different layers of the network.
[0003] In general, the U-Net module is used in Stable Diffusion to extract image features and perform image denoising. It extracts high-level features through contraction paths, reconstructs through expansion paths, and uses jump connections to provide better information transfer. However, the U-Net module also has some shortcomings, such as the lack of global context information, which leads to the loss of detailed information of the generated images, resulting in poor quality of lower-resolution images when using Stable Diffusion to generate images required for business. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose an image denoising method, apparatus, computer device and storage medium to solve the technical problem that the U-Net module lacks global context information, resulting in the loss of detail information of the generated image.
[0005] In order to solve the above technical problems, the present application embodiment provides an image denoising method, which adopts the following technical solution:
[0006] An image denoising method is applied to an image processing platform. The image processing platform is built based on a U-Net network architecture. The image processing platform includes an encoder and a decoder. The network layer structure of the encoder is a plurality of hole convolution layers of different specifications, and an attention layer is arranged between two adjacent hole convolution layers. The network layer structure of the decoder is a deconvolution layer corresponding to the plurality of hole convolution layers of different specifications. The image denoising method includes:
[0007] Obtain the image to be denoised, perform downsampling on the image to be denoised, and obtain several input images, where each input image corresponds to the input of a dilated convolutional layer;
[0008] Input each input image into the corresponding hole convolution layer, obtain the feature map output by each hole convolution layer, and obtain several first feature maps;
[0009] Calculate the attention weight of the first feature map based on the attention layer;
[0010] Use the attention weight to perform feature weighting on the first feature map to obtain several weighted feature maps;
[0011] Input each weighted feature map into the corresponding deconvolution layer to obtain several second feature maps;
[0012] Perform feature fusion on several second feature maps to obtain a denoised image.
[0013] Further, the step of obtaining the image to be denoised and performing a downsampling operation on the image to be denoised to obtain a plurality of input images specifically includes:
[0014] Traverse the encoder and identify the input image specifications of each dilated convolutional layer;
[0015] Obtain the image to be denoised and preprocess the image to be denoised;
[0016] Based on the input image specifications of each dilated convolutional layer, the preprocessed denoised images are downsampled in sequence to obtain several input images, where the resolution of each input image matches the input image specifications of a dilated convolutional layer.
[0017] Furthermore, each hole convolution layer is connected to a fully connected layer, each input image is input into the corresponding hole convolution layer, and the feature map output by each hole convolution layer is obtained to obtain a plurality of first feature maps, which specifically includes:
[0018] Traverse the encoder and identify the dilated convolution kernels of each dilated convolution layer;
[0019] In each dilated convolution layer, the dilated convolution kernel is used to perform convolution operations on the input image to obtain the image convolution features;
[0020] Input the image convolution features into the corresponding fully connected layer to obtain the feature map;
[0021] The feature maps output by each fully connected layer are obtained to obtain several first feature maps.
[0022] Furthermore, each fully connected layer is connected to a corresponding pooling layer, the attention layer includes a channel attention unit, and the step of calculating the attention weight of the first feature map based on the attention layer specifically includes:
[0023] Configuring a corresponding first initial weight for each first feature map;
[0024] Use the pooling layer to perform an average pooling operation on each first feature map to obtain the average signal strength of each hole convolution layer channel;
[0025] According to the average signal strength of each hole convolution layer channel, the first initial weight of each first feature map is updated to obtain the first attention weight of each first feature map.
[0026] Furthermore, the attention layer includes a spatial attention unit, and the step of calculating the attention weight of the first feature map based on the attention layer specifically includes:
[0027] Configuring a corresponding second initial weight for each first feature map;
[0028] Obtain the spatial position coordinates of each hole convolution layer channel and identify the spatial features between each hole convolution layer channel;
[0029] Based on the spatial features between the channels of each dilated convolution layer, the search path of each dilated convolution kernel is determined;
[0030] Based on the search path of each dilated convolution kernel, the second initial weight of each first feature map is updated to obtain the second attention weight of each first feature map.
[0031] Furthermore, the step of weighting the first feature map using the attention weight to obtain a plurality of weighted feature maps specifically includes:
[0032] Multiply the first attention weight of each first feature map by the second attention weight of each first feature map to obtain the attention weight of each first feature map;
[0033] The attention weight of each first feature map is used to perform feature weighting on the corresponding first feature map to obtain several weighted feature maps.
[0034] Furthermore, each weighted feature map is input into a corresponding deconvolution layer to obtain a plurality of second feature maps, specifically including:
[0035] Get the required resolution for denoising, and set the size of the transposed convolution kernel and the step size of the deconvolution operation in the deconvolution layer according to the required resolution for denoising;
[0036] In the deconvolution layer, the transposed convolution kernel is used to perform a deconvolution operation on the weighted feature map according to the deconvolution operation step size to obtain the feature map output by the deconvolution layer;
[0037] Get the feature map output by each deconvolution layer and obtain several second feature maps.
[0038] In order to solve the above technical problems, the embodiment of the present application further provides an image denoising device, which adopts the following technical solution:
[0039] An image denoising device, the image denoising device is used to run an image processing platform, the image processing platform is built based on a U-Net network architecture, the image processing platform includes an encoder and a decoder, the network layer structure of the encoder is a plurality of hole convolution layers of different specifications, and an attention layer is arranged between two adjacent hole convolution layers, the network layer structure of the decoder is a deconvolution layer corresponding to the plurality of hole convolution layers of different specifications, the image denoising device includes:
[0040] A downsampling operation module is used to obtain the image to be denoised, and perform a downsampling operation on the image to be denoised to obtain a number of input images, where each input image corresponds to an input of a hole convolution layer;
[0041] A dilated convolution module is used to input each input image into the corresponding dilated convolution layer, obtain the feature map output by each dilated convolution layer, and obtain several first feature maps;
[0042] An attention weight module, configured to calculate an attention weight of the first feature map based on the attention layer;
[0043] A feature weighting module, used for performing feature weighting on the first feature map using the attention weight to obtain a plurality of weighted feature maps;
[0044] The deconvolution module is used to input each weighted feature map into the corresponding deconvolution layer to obtain several second feature maps;
[0045] The feature map fusion module is used to perform feature fusion on several second feature maps to obtain a denoised image.
[0046] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0047] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of any one of the above-mentioned image denoising methods when executing the computer-readable instructions.
[0048] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0049] A computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the image denoising method described in any one of the above are implemented.
[0050] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0051] The present application discloses an image denoising method, device, computer equipment and storage medium, belonging to the field of artificial intelligence technology. The present application improves the U-Net network structure, uses a hole convolution to replace the ordinary convolution in the network, and introduces an attention mechanism to expand the feature weighting. By obtaining the image to be denoised, the image to be denoised is downsampled to obtain several input images; each input image is input into the corresponding hole convolution layer to obtain several first feature maps; the attention weight of the first feature map is calculated based on the attention layer; the first feature map is feature weighted using the attention weight to obtain several weighted feature maps; each weighted feature map is input into the corresponding deconvolution layer to obtain several second feature maps; several second feature maps are feature fused to obtain a denoised image. The present application improves the receptive field range of the model by using hole convolution and introducing an attention mechanism, so that the model obtains more comprehensive global context information, improves the quality of image denoising processing, and effectively reduces the operating cost and training cost, improves the cost performance of the model, and improves the model performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are 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 work.
[0053] Figure 1 An exemplary system architecture diagram is shown in which the present application can be applied;
[0054] Figure 2 A flow chart of an embodiment of an image denoising method according to the present application is shown;
[0055] Figure 3 A schematic structural diagram of an embodiment of an image denoising device according to the present application is shown;
[0056] Figure 4 A schematic structural diagram of an embodiment of a computer device according to the present application is shown. DETAILED DESCRIPTION
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0058] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0059] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0060] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0061] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0062] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to a laptop computer 1011, a tablet computer 1012 or a mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.
[0063] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .
[0064] It should be noted that the image denoising method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the image denoising device is generally arranged in the server / terminal device.
[0065] It should be understood that Figure 1 The numbers of terminal devices, networks and servers in the embodiment are merely illustrative. The above system may have any number of terminal devices, networks and servers according to implementation requirements.
[0066] An image denoising method is applied to an image processing platform. The image processing platform is built based on a U-Net network architecture. The image processing platform includes an encoder and a decoder. The network layer structure of the encoder is a plurality of hole convolution layers of different specifications, and an attention layer is arranged between two adjacent hole convolution layers. The network layer structure of the decoder is a deconvolution layer corresponding to the plurality of hole convolution layers of different specifications.
[0067] The U-Net network is a convolutional neural network (CNN) structure widely used in deep learning. The main feature of U-Net is its U-shaped symmetrical structure, which consists of an "encoder" (contracting path) and a "decoder" (expanding path). It is mainly used for image processing tasks. The encoder part is responsible for feature extraction. It gradually reduces the spatial resolution of the image through convolutional layers and maximum pooling layers, while increasing the number of feature channels. Each downsampling increases the number of features while reducing the spatial dimension, which enables the network to learn features from local to global. The decoder part gradually restores the spatial resolution and details of the image through the upsampling process. These upsampling layers are usually implemented by transposed convolutional layers. After each upsampling step, the output feature map is merged with the feature map of the corresponding layer of the encoder (through skip connections) to restore the lost spatial information.
[0068] It should be noted that a key feature of U-Net is its skip connection, which connects the feature map in the encoder to the feature map of the corresponding layer in the decoder. This helps to recover detailed information during upsampling and allows the network to learn more accurate outputs.
[0069] Dilated Convolution, also known as expanded convolution or dilated convolution, is a convolution method that adds spaces (usually zeros) between the elements of the convolution kernel to expand the convolution kernel. Dilated convolution introduces the concept of intervals (or holes) in standard convolution. By inserting interval holes between the convolution kernels, the convolution kernel sees more pixels, thereby expanding the receptive field. In standard convolution, the convolution kernel slides with a stride of 1 during the convolution operation, while in dilated convolution, the convolution kernel can slide in the form of larger intervals or holes. The number of intervals in the dilated convolution determines the dilation rate of the convolution. The higher the dilation rate, the larger the receptive field.
[0070] In a specific embodiment of the present application, spacing holes are inserted between the convolution kernels so that the convolution kernel sees more pixels, effectively expanding the receptive field. Using hole convolution instead of ordinary convolution in the U-Net network can obtain a wider range of image context information and richer semantic information; reduce the number of parameters. At the same time, by replacing ordinary convolution in the U-Net network with hole convolution, the number of parameters of the model can be reduced with the same amount of computation and memory usage, thereby improving the efficiency and generalization ability of the model; improving the cost-effectiveness of the model, using hole convolution to replace ordinary convolution in the U-Net network can effectively reduce the operating cost and training cost while still ensuring the accuracy and stability of the model.
[0071] In addition, this application also uses the CBAM (Convolutional Block Attention Module) attention mechanism to implement feature weighting. CBAM consists of two parts: the Channel Attention Module and the Spatial Attention Module. The CBAM attention mechanism can detect the spatial and channel information in the feature map, enhance the representation ability of useful information in the feature map, and improve the network performance and accuracy; improve the receptive field. Within the U-Net network, the CBAM mechanism can adaptively control the size of the receptive field, so that the network can learn more and broader contextual information and have stronger perception capabilities; improve image quality. CBAM focuses on increasing the correlation between spatial and channel information, which can further improve image quality while ensuring that the accuracy rate does not decrease, making the image processing results more accurate and natural. At the same time, it can also reduce the jaggedness, burrs and other phenomena that appear in the prediction.
[0072] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for image denoising according to the present application. The image denoising method comprises the following steps:
[0073] S201, obtaining a picture to be denoised, performing a downsampling operation on the picture to be denoised, and obtaining a plurality of input pictures, wherein each input picture corresponds to an input of a dilated convolutional layer.
[0074] Specifically, first, the image to be denoised is obtained from an external data source, that is, the image to be denoised. Usually, the image to be denoised contains various forms of noise, such as Gaussian noise, salt and pepper noise, etc., which may come from sensor noise, transmission errors or compression losses. In order to input the image layer by layer into each hole convolution layer in the encoder, it is necessary to downsample the image to be denoised. The purpose of downsampling is to reduce redundant information by reducing the image size, so that subsequent convolution operations can focus on extracting more important features, while reducing computational complexity. Specific downsampling methods can include maximum pooling or average pooling, which can gradually reduce the original image. After downsampling, each reduced image is passed as input to the corresponding hole convolution layer in the encoder part of U-Net.
[0075] S202: Input each input image into the corresponding dilated convolution layer, obtain the feature map output by each dilated convolution layer, and obtain a plurality of first feature maps.
[0076] Specifically, the input images are sent one by one to the encoder part of the U-Net network architecture for feature extraction. The encoder consists of several dilated convolution layers, each of which has a different dilation rate. These convolution layers have different receptive fields and can capture image features at different levels. Dilated convolution expands the receptive field without increasing the amount of computation by inserting holes (i.e. skipping several pixels) in the convolution operation. Dilated convolution can capture global and local features in the image. After dilated convolution processing, the input image will generate a set of feature maps, namely the first feature maps, which retain the key information of the input image and enhance the ability to express multi-scale features.
[0077] S203, calculating the attention weight of the first feature map based on the attention layer.
[0078] Specifically, the attention mechanism in the U-Net architecture is introduced to enhance the focus on important features. The core idea of the attention mechanism is that different features have different degrees of importance in image denoising, so it is necessary to calculate the attention weights of each position on each feature map through the attention layer. These weights reflect the importance of different areas in the feature map. For example, the CBAM attention mechanism can be used. The attention layer automatically weights different parts of the feature map by learning different channel and spatial weights. For example, for edges or texture details in an image, the attention mechanism may assign higher weights because these features are particularly important for denoising and image reconstruction. The weight calculation can be obtained by multiplying the features output by the encoder to obtain the final attention weight.
[0079] S204: Use the attention weight to perform feature weighting on the first feature map to obtain a plurality of weighted feature maps.
[0080] Specifically, the first feature map output by each hole convolution layer is weighted by the attention weight calculated in S203. The specific weighting process is usually to multiply the feature value of each position of each feature map by the corresponding attention weight. The purpose of this operation is to enhance those features that are more important for the denoising task, while suppressing those irrelevant or unimportant features. The weighted feature maps are called weighted feature maps. These feature maps not only contain the structure and detail information in the original image, but also combine the attention mechanism, so that the model can pay more attention to the image areas that are helpful for the denoising process. For example, for noisy images with complex textures, the weighted feature maps may highlight the edge details more, so as to better reconstruct the clean image in the subsequent decoder.
[0081] S205, input each weighted feature map into the corresponding deconvolution layer to obtain several second feature maps.
[0082] Specifically, this step is performed in the decoder stage. Each weighted feature map is input into the corresponding deconvolution layer one by one. The deconvolution layer (also called the transposed convolution layer) is used to perform upsampling operations, the purpose of which is to gradually restore the spatial resolution of the feature map. Corresponding to the downsampling operation in the encoder, deconvolution amplifies the low-resolution weighted feature map, while extracting features through the convolution kernel to help reconstruct image details. Different deconvolution layers can have different convolution kernel sizes and step sizes to ensure that the feature map maintains important feature information while being upsampled layer by layer. After this process, the deconvolution layer outputs several second feature maps, which have higher resolution than the previous weighted feature maps and retain richer spatial detail information.
[0083] S206, performing feature fusion on a plurality of second feature maps to obtain a denoised image.
[0084] Specifically, in this step, the second feature maps from different deconvolution layers will be fused together to generate the final denoised image. There are many ways to fuse features. The most common one is to add or concatenate feature maps of different resolutions and channels element by element to combine the key information in each feature map. The purpose of fusion is to integrate features at different levels to ensure that the denoised image not only restores spatial details but also retains semantic consistency. Through this feature fusion, low-level detail features and high-level semantic features can be effectively combined, and the generated denoised image should be as close to the real, noise-free image as possible. The final denoised image will maintain the original resolution of the image while eliminating noise as much as possible to restore clear visual effects.
[0085] In the above embodiments, the present application improves the receptive field of the model by using hole convolution and introducing the attention mechanism, so that the model obtains more comprehensive global context information, improves the quality of image denoising processing, and effectively reduces the operating cost and training cost, improves the cost performance of the model, and improves the model performance.
[0086] Further, the step of obtaining the image to be denoised and performing a downsampling operation on the image to be denoised to obtain a plurality of input images specifically includes:
[0087] Traverse the encoder and identify the input image specifications of each dilated convolutional layer;
[0088] Obtain the image to be denoised and preprocess the image to be denoised;
[0089] Based on the input image specifications of each dilated convolutional layer, the preprocessed denoised images are downsampled in sequence to obtain several input images, where the resolution of each input image matches the input image specifications of a dilated convolutional layer.
[0090] In this embodiment, first, by traversing the encoder, the input image specifications required for each hole convolution layer are identified. Different hole convolution layers have different receptive fields and convolution kernel sizes, so input images of different resolutions are required. The purpose of this step is to ensure that each convolution layer can receive an image size that matches its configuration. Next, the image to be denoised is obtained and necessary preprocessing is performed on it. These preprocessing steps usually include image normalization, removal of outliers or other data enhancement methods to ensure that the image has a good initial state before entering the network. After that, based on the previously identified hole convolution layer input specifications, the preprocessed image is downsampled layer by layer. The purpose of downsampling is to gradually reduce the resolution of the image to meet the input requirements of each hole convolution layer. The downsampling method can be a maximum pooling, mean pooling or interpolation technique, so that the input image of each layer not only maintains important feature information, but also meets the resolution requirements of the corresponding convolution layer. Finally, after downsampling, the generated multiple input images will be used as the input of each hole convolution layer in turn, ready for further convolution operations.
[0091] Through the above steps, it is possible to ensure that each hole convolution layer in the encoder receives an input image that matches its network configuration, avoiding the problem of inaccurate feature extraction caused by mismatch in input image resolution.
[0092] Furthermore, each hole convolution layer is connected to a fully connected layer, each input image is input into the corresponding hole convolution layer, and the feature map output by each hole convolution layer is obtained to obtain a plurality of first feature maps, which specifically includes:
[0093] Traverse the encoder and identify the dilated convolution kernels of each dilated convolution layer;
[0094] In each dilated convolution layer, the dilated convolution kernel is used to perform convolution operations on the input image to obtain the image convolution features;
[0095] Input the image convolution features into the corresponding fully connected layer to obtain the feature map;
[0096] The feature maps output by each fully connected layer are obtained to obtain several first feature maps.
[0097] In this embodiment, the encoder is first traversed to identify the dilated convolution kernel used in each dilated convolution layer. The characteristic of the dilated convolution kernel is that the dilation rate is introduced in the convolution operation to expand the receptive field of the convolution without increasing the parameters, so that the convolution layer can capture more context information. Different dilated convolution layers may use different dilation rates to facilitate the extraction of image features at multiple scales. After identifying the dilated convolution kernel of each convolution layer, the input image will be convolved. The input image is processed by the dilated convolution kernel to generate convolution features. These convolution features contain important information such as edges and textures in the image, and can capture the details and overall structure of the image at different scales. After the convolution feature extraction is completed, the features of each layer will be input into the corresponding fully connected layer. The role of the fully connected layer is to further compress and integrate the convolution features to make them more compact and have stronger expression capabilities. The fully connected layer generates the feature map of each dilated convolution layer by mapping the convolution features to a specific feature space. Finally, the outputs of each fully connected layer are summarized to obtain multiple first feature maps.
[0098] Through the above steps, the dilated convolution kernel is used to expand the receptive field and improve the network's ability to capture features of different scales, especially with high robustness when dealing with complex noise. At the same time, the feature map is further refined through the fully connected layer, which effectively compresses redundant information and improves the accuracy of denoising.
[0099] Furthermore, each fully connected layer is connected to a corresponding pooling layer, the attention layer includes a channel attention unit, and the step of calculating the attention weight of the first feature map based on the attention layer specifically includes:
[0100] Configuring a corresponding first initial weight for each first feature map;
[0101] Use the pooling layer to perform an average pooling operation on each first feature map to obtain the average signal strength of each hole convolution layer channel;
[0102] According to the average signal strength of each hole convolution layer channel, the first initial weight of each first feature map is updated to obtain the first attention weight of each first feature map.
[0103] In this embodiment, first, each first feature map generated by the hole convolution layer is configured with a corresponding initial weight, i.e., the first initial weight. These first initial weights can be randomly initialized or can be weights obtained based on a pre-trained model. The role of the initial weight is to provide a basis for weight update for subsequent channel attention calculations and determine the importance of each feature map in its channel. Next, the pooling layer is used to perform an average pooling operation on each first feature map. The role of average pooling is to reduce the dimension of the feature map and summarize the information of each feature channel by taking the average value of each channel. Here, average pooling will calculate the average signal strength of each hole convolution layer channel. The average signal strength of the channel reflects the response of the channel in the current input image, i.e., the importance of the channel to the input image. Next, the initial weights of each first feature map are updated according to these average signal strengths. The weight update method can be based on weighting or multiplication, with the purpose of allowing those feature maps with high signal strength to obtain higher weights, while those feature maps with low signal strengths obtain lower weights.
[0104] Through the above steps, the signal strength of each channel can be effectively extracted through the average pooling operation. Combined with the update mechanism of the attention weight, the model pays more attention to the feature areas in the image that are helpful for denoising, thereby improving the accuracy and robustness of the denoising effect.
[0105] Furthermore, the attention layer includes a spatial attention unit, and the step of calculating the attention weight of the first feature map based on the attention layer specifically includes:
[0106] Configuring a corresponding second initial weight for each first feature map;
[0107] Obtain the spatial position coordinates of each hole convolution layer channel and identify the spatial features between each hole convolution layer channel;
[0108] Based on the spatial features between the channels of each dilated convolution layer, the search path of each dilated convolution kernel is determined;
[0109] Based on the search path of each dilated convolution kernel, the second initial weight of each first feature map is updated to obtain the second attention weight of each first feature map.
[0110] In this embodiment, a corresponding second initial weight is first configured for each first feature map. This initial weight is randomly generated based on the spatial position and channel information of the feature map, and may also refer to the existing weight distribution in the pre-trained model. Next, the system obtains the spatial position coordinates of the channel from each hole convolution layer. These coordinates describe the specific position of each channel in the feature map and identify the spatial features between the channels. The recognition process of spatial features is mainly to observe the distribution pattern and mutual relationship of each channel in the feature map to determine which areas or channels have strong correlations. For example, the performance of structured features such as edges and textures in space usually has a strong correlation. Based on these spatial features, the search path of the hole convolution kernel can be determined. The characteristic of the hole convolution is to capture the connection between distant pixels at different scales through a jump convolution operation. Therefore, it is necessary to design the search path of the convolution kernel to maximize the extraction of spatial features. Specifically, the search path guides how the convolution kernel is sampled on the image to ensure that the convolution operation not only covers important local areas, but also captures a wider range of global features. Then, based on the search path of each hole convolution kernel, the second initial weight of the corresponding feature map is updated. This update process is a further weighted operation on the spatial features, so that the convolution kernel has a higher response weight at important spatial positions, and finally the second attention weight of each first feature map is obtained.
[0111] Through the above steps, by optimizing the search path of the dilated convolution kernel, it is possible to more accurately identify and enhance the important spatial areas in the feature map, and by updating the second initial weights, the model can more effectively focus on the valuable image feature areas, thereby improving the globality and accuracy of the denoising effect.
[0112] Furthermore, the step of weighting the first feature map using the attention weight to obtain a plurality of weighted feature maps specifically includes:
[0113] Multiply the first attention weight of each first feature map by the second attention weight of each first feature map to obtain the attention weight of each first feature map;
[0114] The attention weight of each first feature map is used to perform feature weighting on the corresponding first feature map to obtain several weighted feature maps.
[0115] In this embodiment, the first attention weight and the second attention weight of each first feature map are firstly multiplied element by element to generate a comprehensive attention weight. The first attention weight is mainly calculated based on the signal strength of each hole convolution layer channel, reflecting the importance of the contribution of the channel in the entire denoising process; the second attention weight is weighted by the search path of the hole convolution kernel and combined with the spatial features, emphasizing the importance of features at different spatial positions in the image. By multiplying these two weights, the information of the feature map in signal strength and spatial distribution can be comprehensively considered to ensure that when denoising the image, both the key channel information is paid attention to and the local and global features in the image space are not ignored, so as to achieve global interaction and integration of channel and spatial information in the feature map. Then, each first feature map is weighted using the obtained comprehensive attention weight to generate a weighted feature map.
[0116] Through the above steps, the attention mechanisms of channel and spatial dimensions are effectively combined, and the model is able to focus more on the important features in the image through a multiple weighted strategy, thereby improving the accuracy and robustness of denoising and ensuring that the key details of the image are retained.
[0117] Furthermore, each weighted feature map is input into a corresponding deconvolution layer to obtain a plurality of second feature maps, specifically including:
[0118] Get the required resolution for denoising, and set the size of the transposed convolution kernel and the step size of the deconvolution operation in the deconvolution layer according to the required resolution for denoising;
[0119] In the deconvolution layer, the transposed convolution kernel is used to perform a deconvolution operation on the weighted feature map according to the deconvolution operation step size to obtain the feature map output by the deconvolution layer;
[0120] Get the feature map output by each deconvolution layer and obtain several second feature maps.
[0121] In this embodiment, the resolution of the target image is first determined according to the denoising requirements of the user or system. The denoising requirements usually depend on the actual application scenario, such as high-definition image restoration or lower resolution denoising tasks. After determining the required denoising resolution, the key parameters in the deconvolution layer are configured according to the resolution, including the size of the transposed convolution kernel and the step size of the deconvolution operation. The size of the transposed convolution kernel determines the spatial expansion capability of the image when it is restored from low resolution to high resolution, while the step size controls the movement speed of the deconvolution operation in the spatial dimension. A step size that is too large may cause the restored image to be not smooth enough, while a step size that is too small may increase the computational overhead. Therefore, the configuration of these parameters is to enable the decoder to efficiently generate images that meet the required resolution. Next, the deconvolution layer uses the configured transposed convolution kernel to perform deconvolution operations on the weighted feature map. The deconvolution operation is an upsampling process. The low-dimensional feature map is gradually restored to high-dimensional image features through the transposed convolution kernel. In this process, the deconvolution operation is based on the high-weight area in the weighted feature map, focusing on restoring important information in the image while suppressing the influence of noise. Each layer of deconvolution operation outputs a feature map, which will be passed to the next layer in turn, and finally several second feature maps are obtained. These second feature maps carry the key information of the image, and in the process of layer-by-layer restoration, the noise is effectively removed, while the details of the image are retained.
[0122] Through the above steps, the parameters of the deconvolution layer can be flexibly adjusted according to the denoising requirements, making it more suitable for image denoising tasks of different resolutions. Through precise deconvolution operations, the image can be gradually restored and the noise can be removed while maintaining the main features and details of the image, ensuring that the final output denoised image has high quality.
[0123] In the above embodiment, the present application discloses an image denoising method, which belongs to the field of artificial intelligence technology. The present application improves the U-Net network structure, uses a hole convolution to replace the ordinary convolution in the network, and introduces an attention mechanism to expand the feature weighting. By obtaining the picture to be denoised, the picture to be denoised is downsampled to obtain several input pictures; each input picture is input into the corresponding hole convolution layer to obtain several first feature maps; the attention weight of the first feature map is calculated based on the attention layer; the first feature map is feature weighted using the attention weight to obtain several weighted feature maps; each weighted feature map is input into the corresponding deconvolution layer to obtain several second feature maps; several second feature maps are feature fused to obtain a denoised picture. The present application improves the receptive field range of the model by using hole convolution and introducing an attention mechanism, so that the model obtains more comprehensive global context information, improves the quality of image denoising processing, and effectively reduces the operating cost and training cost, improves the cost performance of the model, and improves the model performance.
[0124] In this embodiment, the electronic device (eg, Figure 1 The server shown in the figure) can receive instructions or obtain data through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0125] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned denoised image information, the above-mentioned denoised image information can also be stored in a node of a blockchain.
[0126] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0127] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0128] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0129] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0130] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0131] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of an image denoising device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0132] like Figure 3 As shown, the image denoising device 300 described in this embodiment is used to run an image processing platform. The image processing platform is built based on the U-Net network architecture. The image processing platform includes an encoder and a decoder. The network layer structure of the encoder is a plurality of hole convolution layers of different specifications, and an attention layer is provided between two adjacent hole convolution layers. The network layer structure of the decoder is a deconvolution layer corresponding to the plurality of hole convolution layers of different specifications. The image denoising device 300 includes:
[0133] A downsampling operation module 301 is used to obtain a picture to be denoised, and perform a downsampling operation on the picture to be denoised to obtain a plurality of input pictures, wherein each input picture corresponds to an input of a hole convolution layer;
[0134] A dilated convolution module 302 is used to input each input image into a corresponding dilated convolution layer, obtain a feature map output by each dilated convolution layer, and obtain a plurality of first feature maps;
[0135] An attention weight module 303, configured to calculate an attention weight of the first feature map based on the attention layer;
[0136] A feature weighting module 304 is used to perform feature weighting on the first feature map using the attention weight to obtain a plurality of weighted feature maps;
[0137] A deconvolution module 305 is used to input each weighted feature map into a corresponding deconvolution layer to obtain a plurality of second feature maps;
[0138] The feature map fusion module 306 is used to perform feature fusion on a plurality of second feature maps to obtain a denoised image.
[0139] Further, the downsampling operation module 301 is specifically used for:
[0140] Traverse the encoder to identify the input image specifications of each dilated convolutional layer; obtain the image to be denoised and preprocess it; based on the input image specifications of each dilated convolutional layer, downsample the preprocessed image to be denoised in sequence to obtain several input images, where the resolution of each input image matches the input image specifications of a dilated convolutional layer.
[0141] Furthermore, each dilated convolutional layer is connected to a fully connected layer, and the dilated convolutional module 302 is specifically used for:
[0142] Traverse the encoder and identify the dilated convolution kernels of each dilated convolution layer; in each dilated convolution layer, use the dilated convolution kernel to perform a convolution operation on the input image to obtain image convolution features; input the image convolution features into the corresponding fully connected layer to obtain a feature map; obtain the feature maps output by each fully connected layer to obtain several first feature maps.
[0143] Furthermore, each fully connected layer is connected to a corresponding pooling layer, the attention layer includes a channel attention unit, and the attention weight module 303 is specifically used for:
[0144] Configure a corresponding first initial weight for each first feature map; use a pooling layer to perform an average pooling operation on each first feature map to obtain the average signal strength of each hole convolution layer channel; according to the average signal strength of each hole convolution layer channel, update the first initial weight of each first feature map to obtain the first attention weight of each first feature map.
[0145] Furthermore, the attention layer includes a spatial attention unit, and the attention weight module 303 is further used to:
[0146] Configure a corresponding second initial weight for each first feature map; obtain the spatial position coordinates of each hole convolution layer channel, and identify the spatial features between each hole convolution layer channel; determine the search path of each hole convolution kernel based on the spatial features between each hole convolution layer channel; based on the search path of each hole convolution kernel, update the second initial weight of each first feature map to obtain the second attention weight of each first feature map.
[0147] Furthermore, the feature weighting module 304 is specifically used for:
[0148] The first attention weight of each first feature map is multiplied by the second attention weight of each first feature map to obtain the attention weight of each first feature map; the attention weight of each first feature map is used to perform feature weighting on the corresponding first feature map to obtain several weighted feature maps.
[0149] Furthermore, the deconvolution module 305 is specifically used for:
[0150] Get the required resolution for denoising, and set the size of the transposed convolution kernel and the step size of the deconvolution operation in the deconvolution layer according to the required resolution for denoising;
[0151] In the deconvolution layer, the transposed convolution kernel is used to perform a deconvolution operation on the weighted feature map according to the deconvolution operation step size to obtain the feature map output by the deconvolution layer;
[0152] Get the feature map output by each deconvolution layer and obtain several second feature maps.
[0153] In the above embodiment, the present application discloses an image denoising device, which belongs to the field of artificial intelligence technology. The present application improves the U-Net network structure, uses a hole convolution to replace the ordinary convolution in the network, and introduces an attention mechanism to expand the feature weighting. By obtaining the picture to be denoised, the picture to be denoised is downsampled to obtain several input pictures; each input picture is input into the corresponding hole convolution layer to obtain several first feature maps; the attention weight of the first feature map is calculated based on the attention layer; the first feature map is feature weighted using the attention weight to obtain several weighted feature maps; each weighted feature map is input into the corresponding deconvolution layer to obtain several second feature maps; several second feature maps are feature fused to obtain a denoised picture. The present application improves the receptive field range of the model by using hole convolution and introducing an attention mechanism, so that the model obtains more comprehensive global context information, improves the quality of image denoising processing, and effectively reduces the operating cost and training cost, improves the cost performance of the model, and improves the model performance.
[0154] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0155] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 4 with a memory 41, a processor 42, and a network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0156] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0157] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the image denoising method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0158] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the image denoising method.
[0159] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0160] In the above embodiment, the present application discloses a computer device, which belongs to the field of artificial intelligence technology. The present application improves the U-Net network structure, uses a hole convolution to replace the ordinary convolution in the network, and introduces an attention mechanism to expand the feature weighting. By obtaining the picture to be denoised, the picture to be denoised is downsampled to obtain several input pictures; each input picture is input into the corresponding hole convolution layer to obtain several first feature maps; the attention weight of the first feature map is calculated based on the attention layer; the first feature map is feature weighted using the attention weight to obtain several weighted feature maps; each weighted feature map is input into the corresponding deconvolution layer to obtain several second feature maps; several second feature maps are feature fused to obtain a denoised picture. The present application improves the receptive field range of the model by using hole convolution and introducing an attention mechanism, so that the model obtains more comprehensive global context information, improves the quality of image denoising processing, and effectively reduces the operating cost and training cost, improves the cost performance of the model, and improves the model performance.
[0161] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the image denoising method as described above.
[0162] In the above embodiment, the present application discloses a computer-readable storage medium, which belongs to the field of artificial intelligence technology. The present application improves the U-Net network structure, uses a hole convolution to replace the ordinary convolution in the network, and introduces an attention mechanism to expand the feature weighting. By obtaining the picture to be denoised, the picture to be denoised is downsampled to obtain several input pictures; each input picture is input into the corresponding hole convolution layer to obtain several first feature maps; the attention weight of the first feature map is calculated based on the attention layer; the first feature map is feature weighted using the attention weight to obtain several weighted feature maps; each weighted feature map is input into the corresponding deconvolution layer to obtain several second feature maps; several second feature maps are feature fused to obtain a denoised picture. The present application improves the receptive field range of the model by using hole convolution and introducing an attention mechanism, so that the model obtains more comprehensive global context information, improves the quality of image denoising processing, and effectively reduces the operating cost and training cost, improves the cost performance of the model, and improves the model performance.
[0163] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0164] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0165] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. An image denoising method, characterized in that: The image denoising method is applied to an image processing platform, which is built based on a U-Net network architecture. The image processing platform includes an encoder and a decoder. The network layer structure of the encoder is a plurality of hole convolution layers of different specifications, and an attention layer is provided between two adjacent hole convolution layers. The network layer structure of the decoder is a deconvolution layer corresponding to the plurality of hole convolution layers of different specifications. The image denoising method includes: Acquire a picture to be denoised, and perform a downsampling operation on the picture to be denoised to obtain a plurality of input pictures, wherein each of the input pictures corresponds to an input of the atrous convolution layer; Input each of the input images into the corresponding atrous convolution layer, obtain a feature map output by each atrous convolution layer, and obtain a plurality of first feature maps; Calculate an attention weight of the first feature map based on the attention layer; Using the attention weights to perform feature weighting on the first feature map to obtain a plurality of weighted feature maps; Input each of the weighted feature maps into a corresponding deconvolution layer to obtain a plurality of second feature maps; Feature fusion is performed on a plurality of the second feature maps to obtain a denoised image.
2. The image denoising method according to claim 1, wherein: The step of obtaining the image to be denoised and performing a downsampling operation on the image to be denoised to obtain a plurality of input images specifically includes: Traversing the encoder to identify input image specifications of each of the dilated convolutional layers; Acquire the image to be denoised, and preprocess the image to be denoised; Based on the input image specifications of each of the atrous convolutional layers, the preprocessed images to be denoised are downsampled in sequence to obtain a plurality of input images, wherein the resolution of each of the input images matches the input image specifications of one of the atrous convolutional layers.
3. The image denoising method according to claim 1, wherein: Each of the atrous convolution layers is connected to a fully connected layer, and the step of inputting each of the input images into the corresponding atrous convolution layer, obtaining a feature map output by each atrous convolution layer, and obtaining a plurality of first feature maps specifically includes: Traversing the encoder, identifying the dilated convolution kernels of each of the dilated convolution layers; In each of the dilated convolution layers, the dilated convolution kernel is used to perform a convolution operation on the input image to obtain image convolution features; Input the image convolution features into the corresponding fully connected layer to obtain the feature map; The feature maps output by each of the fully connected layers are obtained to obtain a plurality of the first feature maps.
4. The image denoising method according to claim 3, wherein: Each of the fully connected layers is connected to a corresponding pooling layer, the attention layer includes a channel attention unit, and the step of calculating the attention weight of the first feature map based on the attention layer specifically includes: Configuring a corresponding first initial weight for each of the first feature maps; Use the pooling layer to perform an average pooling operation on each of the first feature maps to obtain an average signal strength of each hole convolution layer channel; According to the average signal strength of each of the hole convolution layer channels, the first initial weight of each of the first feature maps is updated to obtain a first attention weight of each of the first feature maps.
5. The image denoising method according to claim 4, characterized in that: The attention layer includes a spatial attention unit, and the step of calculating the attention weight of the first feature map based on the attention layer specifically includes: Configuring a corresponding second initial weight for each of the first feature maps; Obtaining the spatial position coordinates of each of the dilated convolutional layer channels, and identifying the spatial features between each of the dilated convolutional layer channels; Determining the search path of each of the dilated convolution kernels based on the spatial features between the channels of each of the dilated convolution layers; Based on the search path of each of the dilated convolution kernels, the second initial weight of each of the first feature maps is updated to obtain a second attention weight of each of the first feature maps.
6. The image denoising method according to claim 5, characterized in that: The step of using the attention weight to perform feature weighting on the first feature map to obtain a plurality of weighted feature maps specifically includes: Multiplying the first attention weight of each of the first feature maps by the second attention weight of each of the first feature maps to obtain an attention weight of each of the first feature maps; The attention weight of each of the first feature maps is used to perform feature weighting on the corresponding first feature map to obtain a plurality of weighted feature maps.
7. The image denoising method according to claim 1, wherein: The step of inputting each of the weighted feature maps into a corresponding deconvolution layer to obtain a plurality of second feature maps specifically includes: Obtaining a required denoising resolution, and setting a size of a transposed convolution kernel and a step size of a deconvolution operation in the deconvolution layer according to the required denoising resolution; In the deconvolution layer, the transposed convolution kernel is used to perform a deconvolution operation on the weighted feature map according to a deconvolution operation step size to obtain a feature map output by the deconvolution layer; Obtain a feature map output by each of the deconvolution layers to obtain a plurality of the second feature maps.
8. An image denoising device, characterized in that: The image denoising device is used to run an image processing platform, which is built based on a U-Net network architecture. The image processing platform includes an encoder and a decoder. The network layer structure of the encoder is a plurality of hole convolution layers of different specifications, and an attention layer is provided between two adjacent hole convolution layers. The network layer structure of the decoder is a deconvolution layer corresponding to the plurality of hole convolution layers of different specifications. The image denoising device includes: A downsampling operation module, used to obtain a picture to be denoised, and perform a downsampling operation on the picture to be denoised to obtain a plurality of input pictures, wherein each of the input pictures corresponds to an input of the atrous convolution layer; A dilated convolution module, used to input each of the input images into the corresponding dilated convolution layer, obtain a feature map output by each dilated convolution layer, and obtain a plurality of first feature maps; An attention weight module, configured to calculate an attention weight of the first feature map based on the attention layer; A feature weighting module, used for performing feature weighting on the first feature map using the attention weight to obtain a plurality of weighted feature maps; A deconvolution module, used for inputting each of the weighted feature maps into a corresponding deconvolution layer to obtain a plurality of second feature maps; The feature map fusion module is used to perform feature fusion on a plurality of the second feature maps to obtain a denoised image.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the image denoising method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the image denoising method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Cartilage image segmentation method and device, readable storage medium and terminal equipment
CN110598714A
Color image denoising method based on bit layering and attention fusion mechanism
CN111080541A
License plate image deblurring method based on dilated convolution receptive field expansion
CN115239602A
Unmanned aerial vehicle panoramic image denoising method based on attention mechanism
CN116229081A
Low-illumination image denoising enhancement method based on attention mechanism
CN116433516A
