Low-light image enhancement method based on multi-attention mechanism and Retinex

Through a method based on multi-attention mechanism and Retinex, CBAM and GAM modules are used to process low-light images, which solves the problems of poor image reality and serious noise and distortion in the prior art, and achieves a smoother and stronger sense of reality low-light image enhancement effect.

CN116645305BActive Publication Date: 2025-08-26XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310573810.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-19
Publication Date
2025-08-26
Estimated Expiration
2043-05-19

AI Technical Summary

Technical Problem

The existing low-light image enhancement methods have problems such as poor image realism, serious noise and distortion, local inadequate exposure and excessive exposure.

Method used

Using a multi-attention mechanism and Retinex method, the images are decomposed and enhanced through the CBAM and GAM attention modules, and the lighting and reflection components are processed respectively. The network is trained using the decomposition loss and enhancement loss functions to accurately remove noise and amplify the global brightness.

Benefits of technology

It realizes a smoother and more realistic low-light image enhancement effect, effectively solving noise and distortion problems, and improving the global brightness and enhancement effect of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116645305B_ABST
    Figure CN116645305B_ABST
Patent Text Reader

Abstract

The present invention discloses a low-light image enhancement method based on a multi-attention mechanism and Retinex, relating to the field of image processing technology, and solving the problems in the prior art of low-realism, severe noise and distortion, and local underexposure and overexposure of enhanced images. The method comprises: inputting a low-light image into a trained decomposition module to determine an illumination map component and a reflectance map component; inputting the illumination map component into a trained enhancement module to determine an enhanced illumination map component; and fusing the reflectance map component with the enhanced illumination map component to determine a processed low-light image, thereby achieving accurate noise removal, amplifying the global brightness of features, improving the enhancement effect, and making the output fused image smoother.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a low-light image enhancement method based on a multi-attention mechanism and Retinex. Background Art

[0002] Low-light image enhancement is an end-to-end RGB color image restoration technique that enhances images by analyzing information such as brightness and contrast. Existing image enhancement methods are primarily categorized as traditional, retina-based, and deep learning-based. Histogram equalization is a typical example of traditional image processing methods. Histogram equalization, based on the cumulative distribution function, adjusts the image histogram to a uniform distribution to stretch the image's dynamic range and improve contrast. While this method is simple and efficient, the resulting images are susceptible to artifacts and lack a strong sense of realism. Retinex-based low-light enhancement methods simulate the human eye's visual mechanism to decompose images into illumination and reflection components, then adjust the illumination component to enhance image brightness. However, these methods require manual parameter setting, are unable to adapt to diverse image types, and can suffer from localized underexposure and overexposure. Deep learning-based low-light enhancement methods rely on large-scale datasets to learn optimal network models and establish complex mappings between low-light and normal-light images.

[0003] The rapid development of deep learning has significantly impacted many low-level visual tasks. RetinexNet is a typical deep learning-based low-light enhancement model. Its architecture primarily consists of a decomposition network and an enhancement network. The decomposition network consists of five convolutional layers with Reluctant Units (ReLUs), while the enhancement network uses an encoder-decoder structure. However, the enhanced images suffer from poor smoothness and excessive noise, resulting in severe image distortion. Summary of the Invention

[0004] The present invention provides a low-light image enhancement method based on a multi-attention mechanism and Retinex, which solves the problems of low realism, severe noise and distortion, and local underexposure and overexposure in the existing technology. It then achieves precise noise removal, amplifies the global brightness of features, improves the enhancement effect, and makes the output fused image smoother.

[0005] The present invention provides a low-light image enhancement method based on a multi-attention mechanism and Retinex, the method comprising:

[0006] Inputting the low-light image into a trained decomposition module to determine an illumination map component and a reflectance map component, wherein the decomposition module includes: a CBAM, a first channel attention module of the CBAM to reduce irrelevant feature responses and activate useful feature responses by focusing on different feature weights, and a first spatial attention module of the CBAM to reduce irrelevant spatial information;

[0007] Inputting the illumination map component into a trained enhancement module to determine an enhanced illumination map component; wherein the enhancement module includes: a global attention module, a second channel attention module of the global attention module to filter feature information and retain valid feature information, and a second spatial attention module of the global attention module to fuse feature information and amplify the global brightness of the illumination map component;

[0008] The reflection map component is fused with the enhanced illumination map component to determine a processed low-light image.

[0009] In one possible implementation, the first channel attention module of the CBAM reduces irrelevant feature responses and activates useful feature responses by focusing on different feature weights, and reduces irrelevant spatial information through the first spatial attention module of the CBAM, including:

[0010] Performing feature extraction on the low-light image using convolution and activation function ReLu to determine an intermediate feature map;

[0011] The first channel attention module and the first spatial attention module inject attention into the intermediate feature map, and then multiply the attention by the intermediate feature map to determine a refined feature map;

[0012] Processing the refined feature map using a multi-layer convolution operation, and activating the processing result using the activation function ReLu to determine a multi-layer convolution feature map;

[0013] Perform channel splicing on the intermediate feature map and the multi-layer convolution feature map to determine a spliced ​​feature map;

[0014] The spliced ​​feature map is normalized to determine the reflection map component of 3 channels and the illumination map component of 1 channel.

[0015] In a possible implementation, determining the refined feature map includes:

[0016] Performing global maximum pooling and mean pooling on the intermediate feature map by channel to obtain two one-dimensional vectors after pooling, and inputting the two one-dimensional vectors after pooling into a fully connected layer for addition operation to determine the one-dimensional channel attention;

[0017] Multiplying the one-dimensional channel attention by the intermediate feature map element-wise to determine an adjusted feature map;

[0018] Performing global maximum pooling and mean pooling on the adjusted feature map according to space to obtain two two-dimensional vectors after pooling, and performing splicing and convolution operations on the two two-dimensional vectors after pooling to determine the two-dimensional spatial attention;

[0019] The two-dimensional spatial attention is element-wise multiplied by the adjusted feature map to determine the refined feature map.

[0020] In a possible implementation, the training method of the decomposition module includes: training the decomposition module according to a decomposition loss function;

[0021] The decomposition loss function is expressed as:

[0022]

[0023] in, represents the consistency loss coefficient of the reflected component, λ lap represents the Laplace loss coefficient, λ ssim represents the structural similarity loss coefficient;

[0024] Denotes the reconstruction loss function, which is expressed as:

[0025]

[0026] represents the reflection component consistency loss, which is expressed as:

[0027]

[0028] represents the structural similarity loss, which is expressed as:

[0029]

[0030] Denotes the Laplace loss, which is expressed as:

[0031]

[0032] Wherein, S represents the low-light image, R represents the reflection map component, I represents the illumination map component, low represents low light, hight represents high light, λ ij represents the reconstruction loss coefficient, R high Represents the high light reflection map component, R lowRepresents the low-light reflection map component, i represents the result of the i-th layer of the Laplacian pyramid, L j (R high ) represents the Laplacian pyramid of the high-intensity reflection map component, L j (R low ) represents the Laplacian pyramid of the low-light reflectance map component.

[0033] In a possible implementation, the second channel attention module of the global attention module filters the feature information and retains valid feature information, and the second spatial attention module of the global attention module fuses the feature information and amplifies the global brightness of the illumination map component, including:

[0034] Performing a convolution operation on the illumination map component to generate a feature map, where the convolution kernel size is 3×3, and performing a nonlinear activation on the generated feature map using an activation function ReLu to determine a feature map F1;

[0035] Processing the feature map F1 using the global attention module and the activation function SIGMOD to determine a feature map M(F2);

[0036] The feature map M(F2) is processed multiple times using convolution, activation function ReLU and BN layers in a cascade form to determine a feature map F3;

[0037] Processing the feature map F3 using convolution and activation function SIGMOD to determine a feature map F4;

[0038] The feature map F4 is processed using convolution, and then reconstructed using convolution to determine the enhanced illumination map component.

[0039] In one possible implementation, processing the feature map F1 using the global attention module and the activation function SIGMOD to determine the feature map M(F2) includes:

[0040] Performing dimension conversion on the feature map F1 using the global attention module to determine a transformed dimension feature map F1';

[0041] Processing the transformed dimensional feature map F1' using a multi-layer perceptron to determine a dimensional feature map F1' having the same dimension as the feature map F1, and activating the dimensional feature map F1' using an activation function SIGMOD to determine a feature map F2;

[0042] Performing a convolution operation on the feature map F2 using a convolution kernel of 7 to reduce the number of channels of the feature map F2 and determine a feature map F2';

[0043] Then, a convolution operation is performed on the feature map F2' using a convolution kernel of 7 to increase the number of channels of the feature map F2' and determine the feature map M(F2). The feature map M(F2) has the same number of channels as the feature map F1.

[0044] In one possible implementation, the multiple processing of the feature map M(F2) using a cascaded convolution, an activation function ReLU, and a BN layer to determine the feature map F3 includes:

[0045] Performing a convolution operation on the feature map M(F2) using convolution, and adding a BN layer so that the feature maps after the convolution operation have similar distributions;

[0046] Activate the feature map M(F2) using the activation function ReLU;

[0047] The above steps are repeated multiple times to determine the characteristic graph F3.

[0048] In a possible implementation, reconstructing the feature map F4 using convolution includes:

[0049] A 3×3 convolution kernel is used to reconstruct the feature map F4.

[0050] In a possible implementation, the training method of the enhancement module includes: training the enhancement module according to an enhancement loss function;

[0051] The enhanced loss function is expressed as:

[0052]

[0053] Among them, λ lap represents the Laplace loss coefficient;

[0054] Represents the reconstruction loss function, which is expressed as:

[0055]

[0056] Among them, λ represents the coefficient of reconstruction loss, R low Represents the low light reflection map component, Represents the enhanced illumination map component, S high represents the input image with specular lighting.

[0057] Denotes the Laplace loss, which is expressed as:

[0058]

[0059] in, Represents the Laplacian pyramid of the enhanced image, L i (S low ) represents the low-light image Laplacian pyramid.

[0060] In a possible implementation, fusing the reflection map component with the enhanced illumination map component includes:

[0061] The reflectance map component is multiplied element-by-element by the enhanced illumination map component, and the processed low-light image is output.

[0062] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:

[0063] The present invention adopts a low-light image enhancement method based on a multi-attention mechanism and Retinex, which includes: inputting a low-light image into a trained decomposition module to determine an illumination map component and a reflectance map component, wherein the decomposition module includes: CBAM, the first channel attention module of CBAM reduces irrelevant feature responses and activates useful feature responses according to focusing on different feature weights, and reduces irrelevant spatial information through the first spatial attention module of CBAM, the decomposition module improves the sensitivity of the decomposition network to noise, and accurately removes noise of different degrees; inputting the illumination map component into the trained enhancement module to determine the enhanced illumination map component; wherein the enhancement module includes: full The local attention module and the second channel attention module of the global attention module screen the feature information and retain the effective feature information. The second spatial attention module of the global attention module fuses the feature information and amplifies the global brightness of the illumination map component. The enhancement module effectively amplifies the global brightness of the feature and improves the enhancement effect of the enhancement module. The reflection map component is fused with the enhanced illumination map component to determine the processed low-light image. This effectively solves the problems of the existing technology in which the enhanced image is not realistic, has serious noise and distortion, and is under- and over-exposed locally, thereby achieving accurate noise removal, amplifying the global brightness of the feature, improving the enhancement effect, and making the output fused image smoother. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments of the present invention or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0065] Figure 1A flowchart of the steps of a low-light image enhancement method based on a multi-attention mechanism and Retinex provided by an embodiment of the present invention;

[0066] Figure 2 A flowchart showing the steps of decomposing a low-light image by a decomposition module provided in an embodiment of the present invention;

[0067] Figure 3 An input low-light image provided by an embodiment of the present invention;

[0068] Figure 4 The image enhanced by RetinexNet in the prior art provided by the embodiment of the present invention;

[0069] Figure 5 The image after BIMEF enhancement in the prior art provided by the embodiment of the present invention;

[0070] Figure 6 An image enhanced by LIME in the prior art provided by an embodiment of the present invention;

[0071] Figure 7 The processed low-light image outputted according to the method provided by the embodiment of the present invention is provided. DETAILED DESCRIPTION

[0072] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present invention.

[0073] Although the traditional image processing method is simple and efficient, the generated images are easily affected by artifacts and lack a strong sense of reality; the parameters of the retina (Retinex) enhancement method need to be set manually, and it cannot adaptively process a variety of images, and there are local underexposure and overexposure; the RetinexNet method has serious noise, low smoothness, and serious image distortion; the NPE model based on deep learning maintains the naturalness of lighting while enhancing, but does not have the relationship between lighting in different scenes; the BIMEF model proposes a multi-exposure fusion framework for low-light image enhancement, which uses dual Exposure fusion algorithm is used to provide accurate contrast and lighting intensity, but the brightness of the enhanced result is low; based on the LIME model proposed by Retinex, the maximum value of each pixel channel of the input image is selected to process the illumination image, and then the illumination map is processed with structured prior knowledge, and the output of the reflection map is used as the enhancement result, but this method is prone to over-enhancement; GLADNet proposes a global perception and detail preservation network, which estimates the illumination image through global illumination estimation of low-light images, and then reconstructs the module through the detail module to enhance the low-light image, but there is no denoising module and the impact on the image is not considered.

[0074] The embodiment of the present invention provides a low-light image enhancement method based on multi-attention mechanism and Retinex, such as Figure 1 The method shown includes the following steps S101 to S103.

[0075] S101: Input the low-light image into a trained decomposition module to determine the illumination map component and the reflectance map component. The decomposition module includes a convolutional attention module (full name: Convolutional Block Attention Module, abbreviated as: CBAM). The first channel attention module of the CBAM reduces irrelevant feature responses and activates useful feature responses by focusing on different feature weights, and reduces irrelevant spatial information through the first spatial attention module of the CBAM. The present invention adds CBAM to the decomposition network to improve the network. The CBAM can calculate the attention weights corresponding to the decomposition module feature map, use the channel attention module to focus on the feature weights of different channels to reduce irrelevant feature responses and activate useful feature responses, and use the spatial attention module to reduce irrelevant spatial information, thereby improving the decomposition module's sensitivity to noise and accurately removing noise of varying degrees.

[0076] In one possible implementation, the first channel attention module of CBAM reduces irrelevant feature responses and activates useful feature responses by focusing on different feature weights, and reduces irrelevant spatial information through the first spatial attention module of CBAM, such as Figure 2 The process shown specifically includes the following steps S201 to S205.

[0077] S201, use convolution and activation function ReLu to extract features of low-light images and determine the intermediate feature map F∈R C×H×W .

[0078] In S202, the first channel attention module and the first spatial attention module inject attention into the intermediate feature map, and then multiply the attention by the intermediate feature map to determine the refined feature map. CBAM is a simple and effective convolutional neural network attention module. Given any intermediate feature map in the convolutional neural network, CBAM injects the attention map along the two independent dimensions of the channel and space of the feature map, and then multiplies the attention by the input feature map to perform adaptive feature refinement on the input feature map. Because CBAM is an end-to-end universal module, it can be seamlessly integrated into any CNNs architecture and can be trained end-to-end with basic CNNs.

[0079] Determine the refined feature map, specifically including the following steps ① to ④. ① For the intermediate feature map F∈R C×H×W Perform global maximum pooling and mean pooling by channel to obtain two one-dimensional vectors after pooling, and input the two one-dimensional vectors after pooling into the fully connected layer for addition operation to determine the one-dimensional channel attention M C ∈R C×1×1 ② The one-dimensional channel attention M C ∈R C ×1×1 With the intermediate feature map F∈R C×H×W Multiply by elements to determine the adjusted feature map F'. ③ Perform global maximum pooling and mean pooling on the adjusted feature map F' according to the space to obtain two two-dimensional vectors after pooling, and perform splicing and convolution operations on the two two-dimensional vectors after pooling to determine the two-dimensional spatial attention M s ∈R 1×H×W ④ Multiply the two-dimensional spatial attention and the adjusted feature map F' element-wise to determine the refined feature map.

[0080] S203: Refine the feature map using a multi-layer convolution operation and activate the processing result using an activation function ReLu to determine a 64-channel multi-layer convolution feature map F".

[0081] S204: perform channel splicing on the intermediate feature map F and the multi-layer convolution feature map F″ to determine a 128-channel spliced ​​feature map.

[0082] S205 , normalizing the spliced ​​feature map to determine the three-channel reflection map component and the one-channel illumination map component.

[0083] The training method of the decomposition module provided by the present invention includes: training the decomposition module according to the decomposition loss function.

[0084] The decomposition loss function is expressed as:

[0085]

[0086] Among them, λ ir represents the consistency loss coefficient of the reflected component, λ lap represents the Laplace loss coefficient, λ ssim represents the structural similarity loss coefficient;

[0087] Represents the reconstruction loss function, which is expressed as:

[0088]

[0089] Represents the reflection component consistency loss, which is expressed as:

[0090]

[0091] Denotes the structural similarity loss, which is expressed as:

[0092]

[0093] Denotes the Laplace loss, which is expressed as:

[0094]

[0095] Among them, S represents the low-light image, R represents the reflection map component, I represents the illumination map component, low represents low light, high represents high light, and λ ij represents the reconstruction loss coefficient, R high Represents the high light reflection map component, R low Represents the low-light reflection map component, i represents the result of the i-th layer of the Laplacian pyramid, L j (R high ) represents the Laplacian pyramid of the high-intensity reflection map component, L j (R low ) represents the Laplacian pyramid of the low-light reflectance map component. It can capture the global and local information of features and estimate the anti-highlight reflection component R high and low light component R low The color difference between the two, where L j (R high) is the Laplace pyramid of the high-intensity reflection image component, L j (R low ) is the Laplacian pyramid of the low-light reflection map component.

[0096] S102: Input the light map components into a trained enhancement module to determine an enhanced light map component. The enhancement module includes a global attention module, a second channel attention module of the global attention module that filters feature information and retains valid feature information, and a second spatial attention module of the global attention module that fuses feature information and amplifies the global brightness of the light map components. The present invention incorporates a global attention module (GAM) attention mechanism to improve the network, focusing on global brightness information and enabling better enhancement of the light map components.

[0097] In S102, the second channel attention module of the global attention module filters the feature information and retains the valid feature information, and the second spatial attention module of the global attention module fuses the feature information and amplifies the global brightness of the illumination map component, including the following steps (1) to (5).

[0098] (1) Convolution is performed on the illumination map components to generate a feature map. The size of the convolution kernel is 3×3. In step S205, the illumination map components obtained in the decomposition module are used as input, and a feature map is generated through convolution operation. The generated feature map is nonlinearly activated using the activation function ReLu to determine the feature map F1.

[0099] (2) Use the global attention module and activation function SIGMOD to process the feature map F1 and determine the feature map M(F2). Specifically, the following steps are included: ① to ④.

[0100] ① Use the global attention module to transform the dimension of the feature map F1 and determine the transformed dimension feature map F1'.

[0101] ② Use a multi-layer perceptron to process the transformed dimension feature map F1', determine the dimension feature map F1" with the same dimension as the feature map F1, use the activation function SIGMOD to activate the dimension feature map F1" to determine the feature map F2.

[0102] ③ Perform a convolution operation on the feature map F2 using a convolution kernel of 7 to reduce the number of channels of the feature map F2 and determine the feature map F2'.

[0103] ④ Then use the convolution kernel of 7 to perform a convolution operation on the feature map F2', increase the number of channels of the feature map F2', and determine the feature map M(F2). The number of channels of the feature map M(F2) is the same as that of the feature map F1.

[0104] (3) The feature map M(F2) is processed multiple times using cascaded convolution, activation function ReLU, and BN layer to determine the feature map F3. Specifically, the following steps are included: ① Perform convolution operation on the feature map M(F2), the number of convolution kernels for the feature map M(F2) is 64, the convolution kernel size is 3×3, and a BN layer is added so that the feature maps after the convolution operation have similar distributions. ② Use the activation function ReLU to activate the feature map M(F2). ③ Repeat the above steps multiple times to determine the feature map F3.

[0105] (4) The feature map F3 is processed using convolution and activation function SIGMOD, with a convolution kernel size of 3×3, to determine the feature map F4.

[0106] (5) Processing the feature map F4 using convolution, and then reconstructing the feature map F4 using convolution to determine the enhanced illumination map component. Reconstructing the feature map F4 using convolution includes: reconstructing the feature map F4 using a convolution operation with a convolution kernel size of 3×3.

[0107] In S102, the training method of the enhancement module includes: training the enhancement module according to the enhancement loss function; the enhancement loss function is expressed as:

[0108]

[0109] Among them, λ lap represents the Laplace loss coefficient.

[0110] Represents the reconstruction loss function, which is expressed as:

[0111]

[0112] Among them, λ represents the coefficient of reconstruction loss, R low Represents the low light reflection map component, Represents the enhanced illumination map component, S high represents the input image with specular lighting.

[0113] Denotes the Laplace loss, which is expressed as:

[0114]

[0115] in, Represents the Laplacian pyramid of the enhanced image, L i (S low ) represents the low-light image Laplacian pyramid.

[0116] In the enhancement module, the Laplace loss function is introduced to constrain the entire network, making the output smoother.

[0117] S103: Multiply the reflection map component and the enhanced illumination map component element by element to fuse them and determine a processed low-light image.

[0118] Compared with the existing Retinex-based low-light enhancement method: the present invention adds the CBAM attention mechanism to the decomposition module, which improves the denoising ability of the decomposition module and reduces the noise of the reflection map component and the illumination map component generated by the decomposition module.

[0119] The present invention uses a deep convolutional neural network (DNCNN) in the enhancement module and adds a GAM attention mechanism. The DNCNN network structure is used to enhance the denoising ability of the enhancement module, and GAM is used to focus on the global brightness of the network, thereby improving the enhancement effect of the network.

[0120] This paper uses peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) as evaluation metrics and compares them with 11 mainstream algorithm models, including RetienxNet, BIMEF, LIME, MF, Dong, NPE, SRIE, CRM, MSR, RRM, and GLAD. The results obtained are superior to these 11 mainstream methods, as shown in Table 1.

[0121] Table 1 Comparison of quantitative tests on the LOL dataset

[0122]

[0123]

[0124] In terms of enhancement effect, the present invention uses the LOL dataset to compare the enhancement results of the embodiment with those of other methods. It can be seen that the results of the method of the present invention are superior to those of other methods in terms of details, results, colors, etc., and the visual effect is more natural. In the present invention, a specific embodiment is provided, such as Figure 3 The input low-light image is shown as Figure 4 The image shown is enhanced by RetinexNet. Figure 5 The image shown is the BIMEF enhanced image. Figure 6 The image shown is the LIME enhanced image. Figure 7 Shown is the image finally output by the method provided by the present invention.

[0125] The various embodiments in this specification are described in a progressive manner. References to the same or similar parts between the various embodiments are sufficient. Each embodiment focuses on the differences from other embodiments. All or part of the present invention can be used in a variety of general or specialized computer system environments or configurations. For example, personal computers, server computers, handheld or portable devices, tablet devices, mobile communication terminals, multiprocessor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.

[0126] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the present invention.

Claims

1. A low-light image enhancement method based on multi-attention mechanism and Retinex, characterized by: include: The low-light image is input into a trained decomposition module to determine an illumination map component and a reflectance map component, wherein the decomposition module includes: a CBAM, a first channel attention module of the CBAM reduces irrelevant feature responses and activates useful feature responses according to different feature weights, and reduces irrelevant spatial information through the first spatial attention module of the CBAM; wherein the first channel attention module of the CBAM reduces irrelevant feature responses and activates useful feature responses according to different feature weights, and reduces irrelevant spatial information through the first spatial attention module of the CBAM, including: using convolution and activation The ReLu function performs feature extraction on the low-light image to determine an intermediate feature map; the first channel attention module and the first spatial attention module inject attention into the intermediate feature map, and then multiply the attention by the intermediate feature map to determine a refined feature map; the refined feature map is processed using a multi-layer convolution operation, and the processing result is activated using the activation function ReLu to determine a multi-layer convolution feature map; the intermediate feature map and the multi-layer convolution feature map are channel-spliced ​​to determine a spliced ​​feature map; the spliced ​​feature map is normalized to determine the three-channel reflectance map component and the one-channel illumination map component; The illumination map component is input into the trained enhancement module to determine the enhanced illumination map component; wherein, the enhancement module includes: a global attention module, a second channel attention module of the global attention module screens the feature information and retains the valid feature information, and a second spatial attention module of the global attention module fuses the feature information and amplifies the global brightness of the illumination map component; wherein, the second channel attention module of the global attention module screens the feature information and retains the valid feature information, and the second spatial attention module of the global attention module fuses the feature information and amplifies the global brightness of the illumination map component, including: using convolution to perform A convolution operation generates a feature map, the size of the convolution kernel is 3×3, and the generated feature map is nonlinearly activated using the activation function ReLu to determine a feature map F1; the feature map F1 is processed using the global attention module and the activation function SIGMOD to determine a feature map M(F2); the feature map M(F2) is processed multiple times using a cascade of convolutions, activation functions ReLU, and BN layers to determine a feature map F3; the feature map F3 is processed using convolution and the activation function SIGMOD to determine a feature map F4; the feature map F4 is processed using convolution, and then reconstructed using convolution to determine the enhanced illumination map component; The reflection map component is fused with the enhanced illumination map component to determine a processed low-light image.

2. The method according to claim 1, characterized in that The determining of the refined feature map includes: Performing global maximum pooling and mean pooling on the intermediate feature map by channel to obtain two one-dimensional vectors after pooling, and inputting the two one-dimensional vectors after pooling into a fully connected layer for addition operation to determine the one-dimensional channel attention; Multiplying the one-dimensional channel attention by the intermediate feature map element-wise to determine an adjusted feature map; Performing global maximum pooling and mean pooling on the adjusted feature map according to space to obtain two two-dimensional vectors after pooling, and performing splicing and convolution operations on the two two-dimensional vectors after pooling to determine the two-dimensional spatial attention; The two-dimensional spatial attention is element-wise multiplied by the adjusted feature map to determine the refined feature map.

3. The method according to claim 1, characterized in that The training method of the decomposition module includes: training the decomposition module according to a decomposition loss function; The decomposition loss function is expressed as: Among them, λ ir represents the consistency loss coefficient of the reflected component, λ lap represents the Laplace loss coefficient, λ ssim represents the structural similarity loss coefficient; Denotes the reconstruction loss function, which is expressed as: represents the reflection component consistency loss, which is expressed as: represents the structural similarity loss, which is expressed as: Denotes the Laplace loss, which is expressed as: Wherein, S represents the low-light image, R represents the reflection map component, I represents the illumination map component, low represents low light, hight represents high light, λ ij represents the reconstruction loss coefficient, R high Represents the high light reflection map component, R low Represents the low-light reflection map component, i represents the result of the i-th layer of the Laplacian pyramid, L j (R high ) represents the Laplacian pyramid of the high-intensity reflection map component, L j (R low ) represents the Laplacian pyramid of the low-light reflectance map component.

4. The method according to claim 1, wherein The process of processing the feature map F1 using the global attention module and the activation function SIGMOD to determine the feature map M(F2) includes: Performing dimension conversion on the feature map F1 using the global attention module to determine a transformed dimension feature map F1'; Processing the transformed dimensional feature map F1' using a multi-layer perceptron to determine a dimensional feature map F1' having the same dimension as the feature map F1, and activating the dimensional feature map F1' using an activation function SIGMOD to determine a feature map F2; Performing a convolution operation on the feature map F2 using a convolution kernel of 7 to reduce the number of channels of the feature map F2 and determine a feature map F2'; Then, a convolution operation is performed on the feature map F2' using a convolution kernel of 7 to increase the number of channels of the feature map F2' and determine the feature map M(F2). The feature map M(F2) has the same number of channels as the feature map F1.

5. The method according to claim 1, wherein The multiple processing of the feature map M(F2) using convolution, activation function ReLU and BN layer in cascade form to determine the feature map F3 includes: Performing a convolution operation on the feature map M(F2) using convolution, and adding a BN layer so that the feature maps after the convolution operation have similar distributions; Activate the feature map M(F2) using the activation function ReLU; The above steps are repeated multiple times to determine the characteristic graph F3.

6. The method according to claim 1, characterized in that The reconstructing the feature map F4 by using convolution includes: A 3×3 convolution kernel is used to reconstruct the feature map F4.

7. The method according to claim 1, characterized in that The training method of the enhancement module includes: training the enhancement module according to an enhancement loss function; The enhanced loss function is expressed as: Among them, λ lap represents the Laplace loss coefficient; Represents the reconstruction loss function, which is expressed as: Among them, λ represents the coefficient of reconstruction loss, R low Represents the low light reflection map component, Represents the enhanced illumination map component, S high represents the input image with highlights; Denotes the Laplace loss, which is expressed as: in, Represents the Laplacian pyramid of the enhanced image, L i (S low ) represents the low-light image Laplacian pyramid.

8. The method according to claim 1, characterized in that The fusing of the reflection map component and the enhanced illumination map component comprises: The reflectance map component is multiplied element-by-element by the enhanced illumination map component, and the processed low-light image is output.