Polarization image denoising method based on attention mechanism
By applying the attention mechanism residual dense network and adaptive polarization loss function in polarization images, the problem of difficult information extraction of polarization images in a noisy environment is solved, and the efficient recovery and denoising effect of polarization information is achieved.
Patent Information
- Application Number
- CN202210014114.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-06
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-01-06
AI Technical Summary
Polarized images are easily affected by noise under weak illumination or short exposure time conditions, resulting in reduced accuracy of polarization information reconstruction. Existing denoising methods cannot effectively utilize polarization information, especially for low signal-to-noise ratio images, which have poor denoising effects. .
Using a residual dense network based on the attention mechanism, combined with the adaptive polarization loss function, a method for polarized image denoising is constructed. The attention mechanism is used to allocate attention at the feature level, filter effective features, and dynamically perform training during training. Adjust the weights to recover polarization information.
It improves the quality of image denoising, can effectively restore polarization information under low signal-to-noise ratio conditions, is suitable for different polarization imaging systems and imaging methods, and significantly improves the denoising effect of polarization images.
Smart Images

Figure CN114429428B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of polarization imaging technology, and in particular to a polarization image denoising method based on deep learning. Background Art
[0002] Polarization imaging technology utilizes the polarization properties of light to effectively address challenges in target detection and identification that are unsolvable with traditional optics. This technology compensates for the poor detection performance often associated with environmental constraints, ultimately achieving high contrast and superior detection results. However, polarization images are sensitive to noise. If images are acquired under low light conditions or with short exposure times, excessive noise can significantly affect the accuracy of polarization reconstruction. Therefore, denoising technology for polarization imaging is of great significance and has significant application value.
[0003] Current polarization image denoising methods mainly include data-driven and non-data-driven methods. The most effective non-data-driven denoising method is based on three-dimensional similarity block matching. However, there is a physical correlation between polarization image pixels. If the denoising method of ordinary digital images is directly applied to polarization images, the polarization information will not be fully utilized. In addition, for images with low signal-to-noise ratios, non-data-driven methods cannot effectively denoise them. Moreover, many parameters of such denoising algorithms require prior knowledge to determine, making it difficult to obtain the optimal solution of the algorithm. Data-driven methods based on deep learning have been successfully applied to various denoising tasks, and the results are generally better than traditional methods. However, these methods generally use synthetic images with Gaussian noise artificially added to noise-free images as datasets. However, the distribution of real environmental noise is more complex. Simulating real noise only with Gaussian noise will limit the algorithm in real noisy scenes. Summary of the Invention
[0004] The present invention aims to solve the problem that the polarization information of polarization images is difficult to extract due to the influence of noise. A polarization image denoising method based on the attention mechanism is proposed. The polarization image denoising is realized by using the constructed attention mechanism residual dense network, and the model is constrained by an adaptive polarization loss function to realize the accurate recovery of the target polarization information in the noisy image. The method is particularly suitable for denoising polarization images with low signal-to-noise ratio.
[0005] The present invention is achieved by the following technical solutions:
[0006] A method for denoising split-focal-plane polarization images based on an attention mechanism includes the following steps:
[0007] Step 1: Use a polarization camera to collect polarization images and create a data set; preprocess the data set;
[0008] Step 2: Build an attention mechanism residual dense network and design an adaptive polarization loss function.
[0009] The attention mechanism residual dense network model includes a first convolutional layer, a first convolutional layer, multiple residual-dense connection modules, a concat layer, a 1×1 convolutional layer and a third convolutional layer arranged between an input end and an output end, which are densely connected in sequence. The first convolutional layer, the first convolutional layer, the multiple residual-dense connection modules, and the concat layer are respectively connected to an attention mechanism module; the first convolutional layer, the first convolutional layer, the multiple residual-dense connection modules, the concat layer, the 1×1 convolutional layer, the third convolutional layer and the multiple attention mechanism modules are respectively shuffled through channels to form a shallow feature extraction module, an attention mechanism residual-dense module and a feature fusion module; and a global residual learning module with a short-circuit connection is set between the first convolutional layer of the shallow feature extraction module and the feature fusion Concat layer;
[0010] Step 3: Input the dataset into the attention mechanism residual dense network for network training: First, use the shallow feature extraction module to preliminarily fuse the polarization components, and use the attention mechanism to weight the shallow features; then use the attention mechanism residual dense connection module to fully fuse the different features of the image, and filter the feature maps of different depths. Finally, the global residual module outputs the residual image;
[0011] Step 4: Use the input noise image and residual image to obtain the predicted noise-free image.
[0012] Compared with the existing technology, the present invention discloses a polarization image denoising method based on a deep neural network with an attention mechanism, which can achieve the following beneficial technical effects:
[0013] 1. Innovatively implements a residual dense network structure based on the attention mechanism. The attention mechanism is used to allocate the attention of the neural network to more effective feature levels, thereby improving network efficiency. The attention mechanism is used to screen the large number of feature maps obtained during training, filter out invalid features, and improve image denoising quality.
[0014] 2. By designing an adaptive polarization loss function for deep learning convolutional neural networks, the weights are adaptively and dynamically adjusted during training. By incorporating polarization loss, the polarization correlation in polarization images is effectively utilized, thereby recovering polarization information while denoising.
[0015] 3. The present invention is applicable to different polarization imaging systems (amplitude-based, focal plane-based, etc.) and different types of polarization information imaging methods (Stokes, Mueller, etc.). BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is the overall flow chart of the polarization image denoising method based on the attention mechanism of the present invention;
[0017] Figure 2 This is a process diagram of a specific embodiment of the polarization image denoising method based on the attention mechanism of the present invention;
[0018] Figure 3 Schematic diagram of the residual dense network structure of the attention mechanism;
[0019] Figure 4 Schematic diagram of the working process of the attention mechanism module;
[0020] Figure 5 Schematic diagram of denoising effect and polarization information recovery effect. DETAILED DESCRIPTION
[0021] The technical solution of the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] like Figure 1 The figure shows the overall flow chart of the present invention's method for denoising a focal plane polarization image based on an attention mechanism. Specifically, it includes the following steps:
[0023] Step 1: Use a polarization camera to capture polarization images and create a data set; preprocess the data set and divide it into a training set, a test set, and a validation set in proportion for network training;
[0024] Step 2: Build an attention mechanism residual dense network and design a polarization loss function with adaptive parameter adjustment. The polarization loss function plays a role in strengthening the guidance of polarization information in training and strengthening the network's recovery of polarization information.
[0025] Step 3: Input the dataset into the attention mechanism residual dense network for network training: First, use the shallow feature extraction module to preliminarily fuse the polarization components, and use the attention mechanism to weight the shallow features; then use the attention mechanism residual dense connection module to fully fuse the different features of the image, and filter the feature maps of different depths. Finally, the global residual module outputs the residual image;
[0026] Step 4: Use the input noise image and residual image to obtain the predicted noise-free image.
[0027] like Figure 2 As shown in , it is a schematic diagram of the residual dense network structure of the attention mechanism. Figure 3 The following is a schematic diagram of the working process of the attention mechanism module. Figure 2 、 Figure 3 The specific embodiments of the present invention are described in detail as follows:
[0028] Step 1: Create a polarization image dataset:
[0029] Step 1.1, build the image dataset: Use a polarization camera for image acquisition, adjust the sensitivity and exposure time of the focal plane camera, and use images acquired at high sensitivity and short exposure time as high-noise images for input. Average multiple images acquired at low sensitivity and long exposure time as low-noise images, which serve as labels. In particular, when acquiring noisy and noise-free image pairs, adjust the sensitivity and exposure time simultaneously to ensure that the light intensity values of the noisy and label images are roughly consistent.
[0030] The images that make up the above image dataset are all taken in real environments, and images with different signal-to-noise ratios are obtained by setting different camera gains and exposure times;
[0031] Step 1.2: Data preprocessing: First, the high-noise image and low-noise image collected are calibrated for brightness. The average brightness of each image in the data set is made consistent by calculating the average grayscale value of the image. Then, the pixel value of the image is normalized. Polarization image The images (including high-noise and noise-free) are converted into four-channel images in four polarization directions. Finally, both the noisy and noise-free images are cropped into image blocks of 64×64 size as the input of the neural network.
[0032] Taking the Stokes vector based on the focal plane polarization image as an example, it is assumed that in each channel of the input image, the noise image Noise-free image I θ and noise n θ The three satisfy the following formula:
[0033]
[0034] Wherein, polarization angle θ = 0°, 45°, 90°, 135°;
[0035] Finally, the dataset is split into training set, validation set, and test set in a ratio of 6:2:2;
[0036] Step 2: Build an attention mechanism residual dense network model, such as Figure 3The figure shows a schematic diagram of the structure of the attention mechanism residual dense network of the present invention. The attention mechanism residual dense network consists of a shallow feature extraction module 10 (composed of a first convolutional layer 100 and a second convolutional layer 200) connected to the network input, multiple residual-dense connection blocks 300, multiple attention mechanism modules 400, a concat layer 500, a 1×1 convolutional layer 600, and a third convolutional layer 700 connected to the network output. The input, the first convolutional layer 100, the first convolutional layer 200, the multiple residual-dense connection modules 300, and the concat layer 500 are each configured with an attention mechanism module, and then connected to the 1×1 convolutional layer 600 and the third convolutional layer 700 in sequence.
[0037] Step 2.1, configure the attention mechanism module; Figure 4 The figure below is a schematic diagram of the working process of the attention mechanism module. The attention mechanism module consists of an average pooling layer and a fully connected network. Specifically, the average pooling layer performs global average pooling on the feature map of the input noise image, flattening the feature map into a one-dimensional vector. This is then input into the fully connected network and trained to obtain a set of corresponding weights. Finally, the weights are multiplied by the input feature map to obtain the output feature map.
[0038] Step 2.2, configure the shallow feature extraction module; specifically, the shallow feature extraction module includes two convolutional layers, namely the first convolutional layer 100 and the second convolutional layer 200, and three corresponding attention mechanism modules. The convolution kernel size of the first convolutional layer 100 (the first shallow feature extraction layer) is 3×3, and the number of convolution kernels is 64. The convolution kernel size of the second convolutional layer 200 (the first shallow feature extraction layer) is 3×3, and the number of convolution kernels is 32. Each layer is followed by an attention mechanism for feature screening.
[0039] Step 3.3: Configure the attention mechanism residual-dense module. Specifically, the attention mechanism residual-dense module consists of a convolutional layer, configured with 16 residual-dense connection blocks, a linear rectification unit Leak-ReLU function as an activation function, 16 attention mechanism modules 400, a feature fusion Concat layer 500, a 1×1 convolution layer 600, and a local residual image 800. The layers in each module are densely connected to combine features. In this embodiment, each attention mechanism residual-dense module contains 6 convolutional layers, a convolution kernel size of 3×3, a number of convolution kernels of 32, an activation function of Leak-ReLU, and an attention mechanism module.
[0040] Step 3.4: Configure the feature fusion module. Specifically, the feature fusion module includes a feature fusion Concat layer, a 1×1 convolution layer, and a third convolution layer (3×3 convolution layer). The feature fusion Concat layer and the 1×1 convolution layer fuse all features output from the attention mechanism residual dense module. The 3×3 convolution layer further extracts features from the fused results and configures the corresponding attention mechanism module.
[0041] Step 3.5: Configure a global residual learning module. The global residual learning module uses a short-circuit connection between the first convolutional layer and the feature fusion Concat layer of the shallow feature extraction module to implement global residual learning. This strategy can speed up training and improve network performance.
[0042] Step 4: Design an adaptive polarization loss function to restore light intensity information through pixel loss and restore polarization information through polarization degree and polarization angle loss.
[0043] The loss function consists of two parts. One part uses the mean square error between the network output residual image and the true residual image as the pixel loss function, and the other part uses the mean square error between the polarization degree image and the polarization angle image as the polarization loss. At the same time, the two parts of the loss function are combined together through weights that are dynamically adjusted during training.
[0044] Specifically, the pixel loss function L pixel The definition is as follows:
[0045]
[0046] Where N represents the number of training samples, represents a training pair of noisy and noise-free images, polarization angles θ = 0°, 45°, 90°, 135°, Θ represents a hyperparameter of the network, R represents a residual map obtained from the noisy image training, and F represents a norm, which is F = 2 in this embodiment.
[0047] Furthermore, the polarization image is used to reconstruct polarization information, including light intensity (S0), degree of linear polarization (DoLP), and angle of polarization (AoP). The Stokes vector can be used to represent polarization information. S0, S1, and S2 represent the first three components of the Stokes vector, respectively. S0, DoLP, and AoP are calculated using the following formulas:
[0048]
[0049]
[0050]
[0051] Among them, I θIndicates the light intensity value of different polarization components imaging.
[0052] Furthermore, in an embodiment of the present invention, the polarization loss function L polarization The polarization loss L DoLP and polarization angle loss L AoP Composition, defined as follows:
[0053]
[0054] Among them, DoLP gt ,AoP gt They represent the polarization degree label and polarization angle label calculated from the noise-free image, and φ is the polarization angle adjustment parameter;
[0055] Furthermore, the loss function L of the polarization enhancement is:
[0056] L=ω pixel ×L pixel +ω polarization ×L polarization (7)
[0057] It should be noted that the weight ω changes with the loss function. The contribution of each sub-loss can be evaluated through the loss of adaptive weights, and a higher weight is given to the sub-loss with a larger contribution, thereby obtaining a better denoising effect.
[0058] In step 5, the model parameters are adjusted according to the denoising quality requirements, including the initial learning rate, batch size, loss function constraints, the number of attention mechanism residual dense modules, and the number of convolution kernels. The neural network is trained, and the input image is flipped and rotated during training to achieve data augmentation. Specifically, in this embodiment, the minimum batch size is 32, the learning rate is initialized to 0.0001, an exponentially decaying learning rate method is used with a decay rate of 0.9, a training period of 70, and the Adam algorithm is used to optimize the loss function.
[0059] In an embodiment of the present invention, the attention mechanism residual dense network is used for denoising, and the light intensity map reconstructed according to the polarization information is obtained, such as Figure 5As shown in the figure, it is a schematic diagram of the denoising effect and the polarization information recovery effect. Among them, (5A) is the noise intensity map, (5B) is the noise linear polarization map, (5C) is the noise polarization angle map, (5D), (5E), and (5F) are respectively the intensity map, polarization map, and polarization angle map reconstructed after denoising using the embodiment of the present invention, and Figures (5G), (5H), and (5I) are respectively the intensity map, polarization map, and polarization angle map reconstructed based on the label image. It can be seen from the figure that the polarization image denoising algorithm based on the attention mechanism proposed by the present invention can effectively remove the noise of the image collected by the focal plane camera, and for the noise-sensitive polarization image and polarization angle image, it can well restore its polarization information.
[0060] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A method for denoising a focal plane polarization image based on an attention mechanism, characterized in that: The method includes the following steps: Step 1: Use a polarization camera to collect polarization images and create a data set; pre-process the data set; Step 2: Build an attention mechanism residual dense network and design an adaptive polarization loss function. The attention mechanism residual dense network model includes a first convolution layer, a first convolution layer, a plurality of residual-dense connection modules, a feature fusion concat layer, a 1×1 convolution layer and a third convolution layer which are densely connected in sequence and arranged between an input end and an output end, wherein the first convolution layer, the first convolution layer, the plurality of residual-dense connection modules and the feature fusion concat layer are respectively connected to an attention mechanism module; the first convolution layer, the first convolution layer, the plurality of residual-dense connection modules, the feature fusion concat layer, the 1×1 convolution layer, the third convolution layer and the plurality of attention mechanism modules are respectively shuffled through channels to be configured into a shallow feature extraction module, an attention mechanism residual-dense module and a feature fusion module; and a global residual learning module with a short-circuit connection is arranged between the first convolution layer and the feature fusion concat layer of the shallow feature extraction module; Step 3: Input the data set into the attention mechanism residual dense network for network training: First, use the shallow feature extraction module to preliminarily fuse the polarization components, and use the attention mechanism to weight the shallow features; then use the attention mechanism residual dense connection module to fully fuse the different features of the image, and filter the feature maps of different depths, and finally output the residual image through the global residual module; Step 4: Use the input noisy image and the residual image to obtain the predicted noise-free image.
2. The method for denoising a focal plane polarization image based on an attention mechanism as claimed in claim 1, characterized in that: The step 1 of preparing a data set specifically includes the following processing: The polarization camera is used to collect images, and the sensitivity and exposure time of the focal plane camera are adjusted. The images collected under the conditions of high sensitivity and short exposure time are used as high-noise images as input; The average of multiple images collected under low sensitivity and long exposure time conditions is used as a low-noise image and used as a label.
3. The method for denoising a focal plane polarization image based on an attention mechanism as claimed in claim 1, characterized in that: The data set is preprocessed in step 1. This includes the following processing: First, the brightness of the collected high-noise and low-noise images is calibrated. The average brightness of each image in the data set is made consistent by calculating the average grayscale value of the image. Then the pixel values of the image are normalized. Each polarization image is converted into a four-channel image in four polarization directions. Finally, both the noisy and noise-free images are cropped into image blocks of 64×64 size as the input of the neural network. Finally, the dataset is split into training set, validation set, and test set in a ratio of 6:2:
2.
4. The method for denoising a focal plane polarization image based on an attention mechanism as claimed in claim 1, characterized in that: A shallow feature extraction module is configured; specifically, the shallow feature extraction module includes two convolutional layers, namely a first convolutional layer, a second convolutional layer, and three corresponding attention mechanism modules. The convolution kernel size of the first convolutional layer is 3×3, and the number of convolution kernels is 64. The convolution kernel size of the second convolutional layer is 3×3, and the number of convolution kernels is 32. An attention mechanism is set after each layer for feature screening.
5. The method for denoising a focal plane polarization image based on an attention mechanism as claimed in claim 1, characterized in that: Configure the attention mechanism module: The attention mechanism module consists of an average pooling layer and a fully connected network. Specifically, the average pooling layer performs global average pooling on the feature map of the input noise image and flattens the feature map into a one-dimensional vector; then the feature map is input into the fully connected network and trained to obtain a set of corresponding weights. Finally, the weights are multiplied by the input feature map to obtain the output feature map.
6. The method for denoising a focal plane polarization image based on an attention mechanism as claimed in claim 1, characterized in that: Configure the attention mechanism residual-dense module: Specifically, the attention mechanism residual-dense module consists of a convolutional layer and its corresponding Leak-ReLU function, configured with 16 residual-dense connection blocks, multiple attention mechanism modules, feature fusion Concat layer, 1×1 convolution layer and local residual image connection. The layers in each module use dense connections to combine features.
7. The method for denoising a focal plane polarization image based on an attention mechanism as claimed in claim 1, characterized in that: Configure the feature fusion module: Specifically, the feature fusion module includes a feature fusion Concat layer, a 1×1 convolution layer and a third convolution layer. The Concat layer and the 1×1 convolution layer fuse all the features output from the attention mechanism residual dense module. The 3×3 convolution layer further extracts features from the fused results, and the corresponding attention mechanism module is configured.
8. The method for denoising a focal plane polarization image based on an attention mechanism as claimed in claim 1, characterized in that: The design process of the adaptively adjusted polarization loss function is as follows: Pixel loss function L pixel The definition is as follows: Where N represents the number of training samples. represents a noisy image and a noise-free image training pair, polarization angle θ = 0°, 45°, 90°, 135°, Θ represents the hyperparameters of the network, R represents the residual mapping obtained from the noisy image training, and F represents the norm; Furthermore, the polarization information is reconstructed using the polarization image, including the light intensity S0, the degree of linear polarization DoLP and the polarization angle AoP. S0, S1 and S2 represent the first three components of the Stokes vector, respectively. S0, DoLP and AoP are calculated using the following formulas: Among them, I θ Indicates the light intensity value of different polarization components imaging; Furthermore, the polarization loss function L polarization The polarization loss L DoLP and polarization angle loss L AoP Composition, defined as follows: Among them, DoLP gt ,AoP gt They represent the polarization degree label and polarization angle label calculated from the noise-free image, and φ is the polarization angle adjustment parameter; Furthermore, the loss function L of polarization enhancement is designed as: L=ω pixel ×L pixel +oh polarization ×L polarization (7) Among them, ω pixel represents the pixel weight parameter, L pixel represents the pixel loss function, ω polarization represents the polarization weight parameter, L polarization represents the polarization loss function.
