Low illumination image enhancement method and related equipment based on dual-channel network

The reflection component and illumination component of low-light images are decomposed and enhanced through a dual-channel network, combined with the hybrid attention mechanism and loss function, to solve the exposure and noise problems in low-light image enhancement in the existing technology, and achieve a more natural and High quality image enhancement effects.

CN118279180BActive Publication Date: 2024-09-20TIANJIN POLYTECHNIC UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410695327.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-20
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

Existing low-light image enhancement algorithms are prone to over-enhancement problems such as exposure, noise, artifacts, and chromatic aberration, and rely on a priori image models and environmental assumptions, requiring manual parameter adjustment, resulting in distortion and halo phenomena.

Method used

A low-light image enhancement method based on a dual-channel network is used to decompose normal light images and low-light images, extract reflection components and illumination components respectively, use a hybrid attention mechanism for denoising and illumination enhancement, and constrain through a hybrid loss function Optimize model training and generate target images.

Benefits of technology

Effectively suppress noise and chromatic aberration, control exposure, improve the brightness and clarity of images, reduce the feeling of oil painting, and improve the overall quality of images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118279180B
    Figure CN118279180B
Patent Text Reader

Abstract

The present application provides a low-illumination image enhancement method based on a dual-channel network and related equipment; the method comprises: decomposing a normal light image and a low-illumination image respectively to obtain a normal light reflection image and a low-illumination illumination image; performing a bright channel transformation on the normal light reflection image to obtain a bright channel image, fusing and extracting features after wavelet transformation to obtain a first fused image feature, denoising the first fused image feature by a hybrid attention mechanism to obtain a denoised image, determining a corresponding dark channel image by using the low-illumination illumination image, fusing after wavelet transformation to obtain a second wavelet fused image and extracting features to obtain a second fused image feature, performing illumination enhancement on the second fused image feature by a hybrid attention mechanism to obtain an enhanced feature, determining an enhanced image by using the enhanced image feature, generating a target image by using the denoised image and the enhanced image, and completing the training of an optimization model by using a hybrid loss function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of image processing, and in particular to a low-illumination image enhancement method based on a dual-channel network and related equipment. Background Art

[0002] The enhancement algorithm of low-light images may have exposure phenomenon, that is, in some cases, while enhancing the image brightness, over-enhancement problem may occur. In addition, the optimization of related low-light images often relies on image prior models and environmental assumptions, and requires manual parameter adjustment. Distortion and halo are prone to occur while enhancing the image.

[0003] In other cases, when optimizing low-light images, the effect of image enhancement is limited to the improvement of brightness, and over-enhancement problems such as noise, artifacts and chromatic aberration are prone to occur. The enhanced image has oil painting effect and over-enhancement problems. Through prior model optimization, while suppressing image noise, exposure problems will also occur, for example, the RetinexNet model. Summary of the invention

[0004] In view of this, the purpose of the present application is to propose a low-illumination image enhancement method and related equipment based on a dual-channel network.

[0005] Based on the above objectives, the present application provides a low-light image enhancement method based on a dual-channel network, comprising:

[0006] Inputting a preset normal light image and a low illumination image into the optimization model to be trained, decomposing the normal light image and the low illumination image respectively, and obtaining a normal light reflection map corresponding to the normal light image and a low illumination illumination map corresponding to the low illumination image;

[0007] Performing a bright channel transformation on the normal light reflection image to obtain a bright channel image, performing a wavelet transformation on the normal light reflection image and the bright channel image and fusing them to obtain a first wavelet fused image and extracting features to obtain first fused image features, and denoising the first fused image features using a hybrid attention mechanism to obtain a denoised image, wherein the hybrid attention mechanism is composed of multiple attention mechanisms;

[0008] Using the low-illuminance illumination map to determine a corresponding dark channel map, performing wavelet transformation on the low-illuminance illumination map and the dark channel map and fusing them to obtain a second wavelet fused image and extract features to obtain second fused image features, using the hybrid attention mechanism to perform illumination enhancement on the second fused image features to obtain enhanced features, using the enhanced features and the dark channel map to determine a refractive index, and performing a convolution operation on the refractive index and the enhanced features to obtain an enhanced image;

[0009] A target image is generated using the denoised image and the enhanced image, and the training of the optimization model is constrained using a mixed loss function. In response to the completion of the training of the optimization model, the image to be optimized is input into the trained optimization model, and the optimized target image is output.

[0010] Furthermore, the normal light image and the low illumination image are respectively decomposed to obtain a normal light reflection map corresponding to the normal light image and a low illumination illumination map corresponding to the low illumination image, including:

[0011] Extracting features from the normal light image to obtain normal light shallow features;

[0012] Inputting the normal light shallow layer feature into the reflection component network for decomposition to obtain the normal light reflection component feature, normalizing the normal light reflection component feature to obtain the normal light reflection map, wherein the reflection component network includes multiple convolution layers and multiple deconvolution layers;

[0013] Extracting features from the low-light image to obtain low-light shallow features;

[0014] Inputting the low-illuminance shallow layer features into the reflection component network for decomposition to obtain low-illuminance reflection component features;

[0015] The low-illuminance reflection component feature is input into an illumination component network for decomposition to obtain the low-illuminance illumination map, and the illumination component network includes multiple convolutional layers.

[0016] Furthermore, among the multiple attention mechanisms, a channel attention mechanism, a spatial attention mechanism, and a pixel attention mechanism are sequentially set;

[0017] The step of denoising the first fused image features by using a hybrid attention mechanism to obtain a denoised image includes:

[0018] Performing a convolution operation on the first fused image, and inputting the features after the convolution operation into the hybrid attention mechanism;

[0019] The channel attention mechanism is used to perform the following maximum pooling and average pooling operations on the features after the convolution operation to obtain the channel dimension weight:

[0020]

[0021] Among them, F represents the feature after the convolution operation, AvgPool represents the average pooling operation, MaxPool represents the maximum pooling operation, MLP represents the multi-layer perception mechanism operation, represents the first MLP weight, represents the second MLP weight, M c(F) represents the channel dimension weight,

[0022] According to the formula shown below, the channel dimension weights are used to determine the spatial attention input map for inputting the spatial attention mechanism.

[0023]

[0024] Among them, F 1 represents the spatial attention input map;

[0025] The spatial attention mechanism is used to perform the following maximum pooling and average pooling operations on the spatial attention input map to obtain the spatial dimension weights:

[0026]

[0027] Among them, M s (F) represents the spatial dimension weight;

[0028] According to the formula shown below, the pixel attention input map for inputting the pixel attention mechanism is determined using the spatial dimension weights:

[0029]

[0030] Among them, F 2 represents the pixel attention input map;

[0031] Performing the pixel attention mechanism operation on the pixel attention input map to obtain pixel dimension weights;

[0032] The denoised image is determined according to the channel dimension weight, the spatial dimension weight and the pixel dimension weight.

[0033] Further, using the low-illuminance illumination map to determine a corresponding dark channel map includes:

[0034] The dark channel prior algorithm is used to calculate the low illumination light map according to the following formula to obtain the dark channel map:

[0035]

[0036] in, represents the hyperparameter, A represents the atmospheric light value, I c (X) represents a pixel in the low-illuminance illumination map, and c represents a color parameter.

[0037] Furthermore, the hybrid attention mechanism is used to perform illumination enhancement on the second fused image feature to obtain an enhanced feature, including:

[0038] Down-sampling the second fused image feature to obtain a down-sampled image;

[0039] The downsampled image is sequentially subjected to channel attention mechanism, spatial attention mechanism and pixel attention mechanism operations, and the operation results are upsampled to obtain an upsampled image;

[0040] The refractive index is calculated using the up-sampled image to determine an enhanced image.

[0041] Further, the training of the optimization model is constrained using a hybrid loss function, including:

[0042] The target image is used to calculate the following hybrid loss function:

[0043]

[0044] Among them, L total Denotes the hybrid loss function, L e represents the exposure loss function, L i represents the image smoothness loss function, L d represents the contrast loss function, L c represents the color loss function, L n represents the noise function, L s represents the reflection component similarity loss function, represents the first coefficient, represents the second coefficient, represents the third coefficient;

[0045] In the training of the optimization model, the peak signal-to-noise ratio of the target image is constrained by using the hybrid loss function so that the difference between the peak signal-to-noise ratio of the target image and that of a preset standard image reaches a predetermined error range.

[0046] Furthermore, the hybrid loss function is used to constrain the gap between the target image and the preset standard image during back propagation, including:

[0047] In response to determining that the difference between the target image and the preset standard image is within a predetermined error range, determining that the training of the optimization model is completed;

[0048] In response to determining that the difference between the target image and the standard image exceeds the error range, the optimization model is trained again.

[0049] Based on the same inventive concept, the present application also provides a low-illumination image enhancement system based on a dual-channel network, including: a decomposition module, a denoising module, an enhancement module and an output module;

[0050] The decomposition module is configured to input a preset normal light image and a low illumination image into the optimization model to be trained, decompose the normal light image and the low illumination image respectively, and obtain a normal light reflection image corresponding to the normal light image and a low illumination illumination image corresponding to the low illumination image;

[0051] The denoising module is configured to perform a bright channel transform on the normal light reflection image to obtain a bright channel image, perform a wavelet transform on the normal light reflection image and the bright channel image and fuse them to obtain a first wavelet fused image and extract features to obtain first fused image features, and perform denoising on the first fused image features using a hybrid attention mechanism to obtain a denoised image, wherein the hybrid attention mechanism is composed of multiple attention mechanisms;

[0052] an enhancement module configured to determine a corresponding dark channel image using the low illumination illumination image, perform wavelet transformation on the low illumination illumination image and the dark channel image and fuse them to obtain a second wavelet fused image and extract features to obtain second fused image features, perform illumination enhancement on the second fused image features using the hybrid attention mechanism to obtain enhanced features, determine a refractive index using the enhanced features and the dark channel image, and perform a convolution operation on the refractive index and the enhanced features to obtain an enhanced image;

[0053] The output module is configured to generate a target image using the denoised image and the enhanced image, constrain the training of the optimization model using a mixed loss function, input the image to be optimized into the trained optimization model in response to completing the training of the optimization model, and output the optimized target image.

[0054] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the low-light image enhancement method based on a dual-channel network as described in any one of the above items is implemented.

[0055] Based on the same inventive concept, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the low-light image enhancement method based on the dual-channel network as described above.

[0056] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes the low-light image enhancement method based on a dual-channel network as described in any of the above items.

[0057] As can be seen from the above, the low-light image enhancement method and related equipment based on the dual-channel network provided by the present application are based on the decomposition of the reflection component and the illumination component of the normal light image and the low-light image, thereby obtaining the normal light reflection map and the low-light illumination map, and based on the two channels of the bright channel and the dark channel set in the optimization model, to train the optimization model. During the training, the bright channel change is used to obtain the bright channel map corresponding to the normal light reflection map, and the hybrid attention mechanism is used to denoise the first fused image feature after the fusion of the bright channel map and the normal light reflection map, thereby obtaining the denoised image; at the same time, the convolution operation is used to determine the dark channel map, and the hybrid attention mechanism is used to enhance the second fused image feature after the fusion of the dark channel map and the low-light illumination map, thereby obtaining the enhanced image; based on this, the loss value of the target image generated by the enhanced image and the denoised image is calculated by setting the hybrid loss function, so as to realize the training of the optimization model according to the loss value. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0059] Figure 1 This is a first framework diagram based on a dual-channel network according to an embodiment of the present application;

[0060] Figure 2 This is a flow chart of a low-light image enhancement method based on a dual-channel network according to an embodiment of the present application;

[0061] Figure 3 A second framework diagram based on a dual-channel network according to an embodiment of the present application;

[0062] Figure 4 A third framework diagram based on a dual-channel network according to an embodiment of the present application;

[0063] Figure 5 This is a fourth framework diagram based on a dual-channel network according to an embodiment of the present application;

[0064] Figure 6 This is a frameless diagram based on a dual-channel network according to an embodiment of the present application;

[0065] Figure 7 This is a schematic diagram of the structure of a low-light image enhancement system based on a dual-channel network according to an embodiment of the present application;

[0066] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0067] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0068] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0069] As described in the background technology section, the related low-light image enhancement method based on a dual-channel network is still difficult to meet the actual needs of image optimization.

[0070] In the process of implementing the present application, the applicant discovered that the main problems with the related image optimization methods are: the low-light image enhancement algorithm will have an exposure phenomenon, that is, in some cases, while enhancing the image brightness, there will be an over-enhancement problem, and the optimization of related low-light images often relies on image prior models and environmental assumptions, and requires manual parameter adjustment, which is prone to distortion and halo phenomena while enhancing the image.

[0071] In other cases, when optimizing low-light images, the effect of image enhancement is limited to the improvement of brightness, and over-enhancement problems such as noise, artifacts and chromatic aberration are prone to occur. The enhanced image has oil painting effect and over-enhancement problems. Through prior model optimization, while suppressing image noise, exposure problems will also occur, for example, the RetinexNet model.

[0072] Based on this, one or more embodiments of the present application provide a low-illumination image enhancement method based on a dual-channel network.

[0073] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0074] In an embodiment of the present application, an optimization model for optimizing low-light images is constructed. The optimization model may be as follows: Figure 1The DBCRNet (Dual Branch Channel Illumination Enhancement Network) shown in the figure includes a decomposition module, a denoising module and an enhancement module.

[0075] The decomposition module is used to decompose the image, thereby outputting the reflection component and the illumination component corresponding to the image.

[0076] Furthermore, the denoising module is used to denoise the decomposed reflection component, thereby outputting a denoised image, and the enhancement module is used to enhance the illumination of the decomposed illumination component, thereby outputting an enhanced image.

[0077] Furthermore, an optimized target image can be obtained by combining the denoised image and the enhanced image.

[0078] In this embodiment, before using the above-mentioned optimization model to optimize the image, the optimization model needs to be trained, and after the training is completed, the trained optimization model is used to optimize the image.

[0079] When training the DBCRNet, normal light images and low illumination images are used to construct a training data set to complete the training.

[0080] refer to Figure 2 A low-light image enhancement method based on a dual-channel network according to an embodiment of the present application comprises the following steps:

[0081] Step S201: input a preset normal light image and a low illumination image into an optimization model to be trained, decompose the normal light image and the low illumination image respectively, and obtain a normal light reflection map corresponding to the normal light image and a low illumination illumination map corresponding to the low illumination image.

[0082] In the embodiments of the present application, Figure 1 As shown, the normal light image and the low illumination image in the training set are respectively input into the decomposition module, and the corresponding reflection component and illumination component are obtained by decomposition.

[0083] The decomposition modules are as follows: Figure 3 As shown, it includes a reflection component network and an illumination component network.

[0084] Taking the normal light image as an example, the normal light image is first input into the ConvBlock in the decomposition module, that is, the convolution block. The convolution block can be used to extract shallow features such as color and texture of the normal light image to obtain the normal light shallow features.

[0085] Furthermore, if Figure 3 As shown, the normal light shallow layer features are input into the reflection component network, where Figure 3As shown, the reflection component network includes 5 layers of U-Net (convolutional neural network for image segmentation) and 1 NormBlock (normalization sub-block).

[0086] Among them, Figure 3 As shown, the convolution block includes three 3×3 convolution layers, and the normalization sub-block includes a convolution layer, a normalization layer, a convolution layer, and a normalization layer.

[0087] Specifically, Figure 3 As shown in the figure, the structure of the 5-layer U-Net is composed of Conv&ReLU (convolutional layer with activation function), MaxPooling (maximum pooling layer), convolutional layer, maximum pooling layer, convolutional layer, Deconv (deconvolution layer), Contact (fully connected layer), convolutional layer, deconvolution layer, fully connected layer and convolutional layer.

[0088] Among them, a 5-layer U-Net is used to generate normal light reflection component features from normal light shallow features.

[0089] Furthermore, the normal light reflection component feature is input into the normalization sub-block, and the normalization sub-block is used to constrain the normal light reflection component feature between 0 and 1 so that fitting does not occur during the training process and the computational burden is reduced. Accordingly, the normalization sub-block outputs the normal light reflection component, that is, the normal light reflection map.

[0090] Furthermore, if Figure 3 As shown, after the normal light image is input into the decomposition module, the normal light shallow feature is input into the illumination component network at the same time as the reflection component of the normal light shallow feature.

[0091] Specifically, Figure 3 As shown, five convolutional layers and one normalization sub-block are sequentially arranged in the illumination component network, wherein the fifth convolutional layer is connected to the reflection component network to obtain the normal light reflection component features from the reflection component network.

[0092] Furthermore, after the normal light shallow features are input into the illumination component network, after being operated in four convolutional layers in sequence, the normal light reflection component features obtained from the reflection component network are used in the fifth convolutional layer to extract the normal light illumination component, that is, the normal light illumination map.

[0093] Based on this, the texture features of the illumination component in the image can be removed while retaining the relevant information of the image brightness, and the reflection component and illumination component of the image can be extracted by using the similarity loss of the reflection component of the image and the image smoothness loss.

[0094] Furthermore, if Figure 1As shown, when the decomposition module is used to decompose the low-illuminance image, the same decomposition module weights as the normal light image used for decomposition are adopted. After the low-illuminance image is input into the decomposition module, the low-illuminance reflection component and the low-illuminance illumination component of the corresponding low-illuminance image, that is, the low-illuminance reflection map and the low-illuminance illumination map, are decomposed in the same manner as the aforementioned embodiment.

[0095] Step S202: perform a bright channel transform on the normal light reflection image to obtain a bright channel image; perform a wavelet transform on the normal light reflection image and the bright channel image and fuse them to obtain a first wavelet fused image and extract features to obtain first fused image features; perform denoising on the first fused image features using a hybrid attention mechanism to obtain a denoised image, wherein the hybrid attention mechanism is composed of multiple attention mechanisms.

[0096] In the embodiment of the present application, based on the normal light reflection map obtained in the above steps, Figure 4 The structure of the denoising module is shown, and the denoising module is used to perform denoising.

[0097] Specifically, the normal light reflection image is subjected to wavelet transform to obtain the bright channel image I bright .

[0098] Furthermore, the bright channel image is fused with the normal light reflection image to obtain the first wavelet fusion image.

[0099] Furthermore, the first wavelet fusion image is sequentially passed through three 3×3 convolutional layers, and then through three BCPF (bright channel prior feature submodules) in sequence, and then through the normalization subblock operation to obtain the denoised image.

[0100] Among them, Figure 4 As shown in Figure 1, each of the three convolutional layers in the denoising module corresponds to a BCPF.

[0101] Furthermore, two 3×3 convolutional layers, one PBAM (hybrid attention mechanism submodule) and one 3×3 convolutional layer are set in sequence in BCPF.

[0102] In this embodiment, the second wavelet fusion image is first processed through the three 3×3 convolutional layers, and then three BCPF operations are performed in sequence. The BCPF operation results are input into the normalization submodule for normalization, thereby obtaining a denoised image.

[0103] Among them, the 3×3 convolution is used to extract the features of the first wavelet fusion image, and the features are added to the symmetrical BCPF module to enrich the image features; the BCPF module is used to eliminate image noise, so that the network learning focus of the entire denoising module is concentrated on the high brightness area, that is, the noise area and exposure area of ​​the image, to perform image denoising.

[0104] In this embodiment, the structure of PBAM is as follows: Figure 5 As shown, it includes CAM (channel attention mechanism), SAM (spatial attention mechanism) and PAM (pixel attention mechanism).

[0105] In each BCPF, the results of two 3×3 convolutional layers are input to the CAM. Through average pooling, maximum pooling and multi-layer perception operations, and using the following Sigmoid activation function, the channel dimension weight can be determined, thereby focusing the network's attention on the most important channels.

[0106] Specifically, CAM calculates the channel dimension weight according to the following formula:

[0107]

[0108] Among them, F represents the features after the input convolution operation, AvgPool represents the average pooling operation, MaxPool represents the maximum pooling operation, and MLP represents the multi-layer perception mechanism operation. represents the first MLP weight, Represents the second MLP weight, Mc(F) represents the channel dimension weight. Through the CAM operation, the network can determine the meaningful part of the results of the two 3×3 convolutional layer operations based on the channel dimension weight.

[0109] Furthermore, if Figure 5 As shown, CAM and SAM are connected, and the connection formula is as follows:

[0110]

[0111] Among them, F 1 Represents the spatial attention input map.

[0112] Accordingly, the channel dimension weights may be used to determine a spatial attention input map for inputting a spatial attention mechanism.

[0113] Furthermore, the spatial attention mechanism is used to perform the maximum pooling and average pooling operations on the spatial attention input map as shown below, and the following Sigmoid activation function is used to obtain the spatial dimension weights to obtain the spatial information with the highest attention in the network:

[0114]

[0115] Among them, M s (F) represents the spatial dimension weight.

[0116] Furthermore, if Figure 5As shown, SAM and PAM are connected, and the connection formula is as follows:

[0117]

[0118] Among them, F 2 Represents the pixel attention input map.

[0119] Furthermore, F 2 The input is sent to PAM to determine the pixel dimension weights so that the network can focus on the features in the area of ​​interest when learning.

[0120] It can be seen that PBAM enables the network to adaptively increase the weights of important areas, quickly find the channels and spaces that need the most attention, and then locate the pixel areas that need the most attention, thereby improving the image brightness and clarity, and serving as the basis for the denoising process of the reflection component and the enhancement process of the illumination component.

[0121] Step S203, using the low-illuminance illumination map to determine the corresponding dark channel map, performing wavelet transform on the low-illuminance illumination map and the dark channel map and then fusing them to obtain a second wavelet fused image and extract features to obtain second fused image features, using the hybrid attention mechanism to perform illumination enhancement on the second fused image features to obtain enhanced features, using the enhanced features and the dark channel map to determine the refractive index, and performing a convolution operation on the refractive index and the enhanced features to obtain an enhanced image.

[0122] In an embodiment of the present application, based on the low-illuminance illumination map obtained in the above steps, Figure 6 The structure of the enhancement module is shown, and the enhancement module is used to enhance it.

[0123] Specifically, the structure of the first half of the enhancement module is similar to that of the denoising module. First, the dark channel image I is determined by performing a convolution operation on the low-light illumination image. dark .

[0124] Among them, the convolution operation of the dark channel image is as follows:

[0125]

[0126] Among them, g represents the convolution kernel, d represents the input feature, G represents the convolution kernel transformation matrix, B T represents the input transformation matrix, A T Represents the output transformation matrix.

[0127] Furthermore, the dark channel image Idark is fused with the low illumination image by wavelet fusion to obtain a second wavelet fusion image.

[0128] Furthermore, the second wavelet fusion image is passed through one 3×3 convolution and one Down submodule (downsampling submodule) to change the second wavelet fusion image to half the size of the original size and increase the receptive field of the convolution kernel at the same time, wherein the Down submodule includes two 3×3 convolutions.

[0129] Furthermore, after downsampling, a symmetric convolution consisting of three 3×3 convolutions and DCPF (dark channel prior feature submodule) is performed.

[0130] Among them, DCPF is similar to BCPF. DCPF includes the same BPAM as in the previous steps. The PBAM is used to guide the network to specifically find areas with uneven lighting in the image. After 3 DCPFs, the overall brightness of the image is improved.

[0131] Furthermore, considering that the overall contrast and brightness of the low-illuminance illumination image are low, it is easy to cause local uneven illumination and loss of details. Therefore, in order to further refine and enhance the features of the image, the features obtained in the first half can be restored to their scale through the UP submodule (upsampling submodule).

[0132] Among them, in the UP submodule, a deconvolution layer is first performed for upsampling, and then a 1×1 convolution layer is performed. After the 1×1 convolution layer, the normalization operation of the normalization submodule is performed to perform feature integration.

[0133] Furthermore, after the last DCPF, a DT submodule (dark channel prior refraction submodule) is set to estimate I dark The refractive index T is obtained by dividing the refractive index T with the F1 feature output by the UP submodule. After the division, the features of the remaining dark light area after image enhancement can be amplified several times, and the local features can be amplified after the brightness of the dark light area is increased.

[0134] The calculation formula of T is:

[0135]

[0136] in, represents the hyperparameter, A represents the atmospheric light value, I c (X) represents a pixel in the low-light illumination map, and c represents a color parameter.

[0137] In this embodiment, a dark channel priori algorithm is used to determine the dark channel map.

[0138] Specifically, the aforementioned calculation dark channel map I dark When , the second half of the above formula can be estimated as the minimum value of the three channels in the image RGB and used as the following I dark The formula is:

[0139]

[0140] Furthermore, if Figure 6 As shown in the DT submodule structure in dark With hyperparameters Multiply and take the negative number and add 1. Based on this, the T calculation formula changes to the following:

[0141]

[0142] Based on this, T can be further determined as: T≈1-Wingrad_Conv3×3(Idark), where Wingrad_Conv represents a convolution acceleration algorithm.

[0143] Furthermore, in the DT submodule, the value of the refractive index T is finally constrained within the range of (0,1) through the Sigmoid function.

[0144] Therefore, after symmetric convolution enhancement, the feature F1 obtained by dividing it by the refractive index T can achieve the effect of increasing the overall brightness of the image, thereby amplifying the detailed features of the image after enhancement.

[0145] Among them, after the DT submodule, in order to retain the local features of the image, a 3×3 convolution is performed and then added to the features of F1 to retain the features at the edge of the image. Based on this, the enhanced image is output, where the formula of the feature F of the enhanced image is as follows:

[0146]

[0147] Step S204, using the denoised image and the enhanced image to generate a target image, using a mixed loss function to constrain the training of the optimization model, in response to completing the training of the optimization model, inputting the image to be optimized into the trained optimization model, and outputting the optimized target image.

[0148] In the embodiments of the present application, Figure 1 As shown, the denoised image and enhanced image obtained in the previous steps are fused to obtain the target image.

[0149] Based on this, in order to better restore image brightness, eliminate noise and chromatic aberration, and control exposure, it is possible to determine whether the target image satisfies the pre-set hybrid loss function and adjust the parameters accordingly.

[0150] Specifically, the mixed loss function is composed of the color loss function L c , image smoothness loss function L i , contrast loss function L d , exposure loss function L e , noise loss function Ln and the reflection component similarity loss function L s The loss is mixed.

[0151] Among them, the color loss function can avoid the imbalance and loss of color features after image enhancement; the image smoothness loss smoothness loss function and the contrast loss smoothness loss function can make the brightness value of the enhanced image after enhancement more balanced; the noise loss function can constrain the distance difference between the noise value of the enhanced image after enhancement and the ideal noise value of the image; the exposure loss function can constrain the distance difference between the exposure value of the enhanced image after enhancement and the ideal exposure value of the image; the reflection component similarity loss function can constrain the consistency of brightness information, contour information and semantic information before and after image enhancement.

[0152] Based on this, the total loss function is set as follows:

[0153]

[0154] in, represents the first coefficient, represents the second coefficient, Represents the third coefficient.

[0155] In this embodiment, the reflection components of images based on the same scene are the same under different lighting conditions and are independent of the lighting environment. Therefore, the reflection component similarity loss function can be expressed as follows:

[0156]

[0157] Among them, R l Represents the reflective component of the low-light image after decomposition, R h Represents the reflective component of the normal lighting image after decomposition.

[0158] Furthermore, based on the illumination component, only illumination information is reflected as much as possible. Therefore, the image smoothness loss function can be expressed as follows:

[0159]

[0160] in, Indicates the edge area loss of low-light images. They represent the edge area loss of the normal light image respectively.

[0161] In this embodiment, based on the hybrid loss function constructed as described above, when each round of training is performed on the optimization model, the denoised image and the enhanced image are used to generate the target image of this round of training, and back propagation is performed. In the back propagation, the loss function of this round calculated as described above is used to constrain the gap between the target image and the preset standard image.

[0162] The difference between the target image and the preset standard image may be, for example, a difference in PSNR (peak signal-to-noise ratio).

[0163] Furthermore, when the PSNR difference is within a predetermined error range, the parameters in the optimization model are fixed and the training of the optimization model is determined to be completed; when the PSNR difference exceeds the error range, the parameters in the optimization model are adjusted and the optimization model is trained again.

[0164] It can be seen that in the training of the optimization model, the PSNR of the target image is constrained by using the loss function, thereby improving the PSNR of the target image and obtaining a high-quality target image close to the preset standard image.

[0165] Furthermore, after the training of the optimization model is completed, the low-light image to be enhanced may be input into the optimization module to optimize the low-light image.

[0166] It can be seen that the low-light image enhancement method based on a dual-channel network in an embodiment of the present application is based on the decomposition of the reflection component and the illumination component of the normal light image and the low-light image respectively, so as to obtain a normal light reflection map and a low-light illumination map, and the optimization model is trained based on the two channels of the bright channel and the dark channel set in the optimization model. During the training, the bright channel change is used to obtain a bright channel map corresponding to the normal light reflection map, and the hybrid attention mechanism is used to denoise the first fused image feature after the bright channel map and the normal light reflection map are fused, so as to obtain a denoised image; at the same time, the dark channel map is determined by a convolution operation, and the hybrid attention mechanism is used to enhance the second fused image feature after the dark channel map and the low-light illumination map are fused, so as to obtain an enhanced image; based on this, the loss value of the target image generated by the enhanced image and the denoised image is calculated by setting the hybrid loss function, so as to realize the training of the optimization model according to the loss value.

[0167] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.

[0168] It should be noted that some embodiments of the present application are described above. Other embodiments are within the scope required by the present application. In some cases, the actions or steps recorded in the present application can be performed in an order different from that in the above-described embodiments and still achieve the desired result. In addition, the process depicted in the accompanying drawings does not necessarily require the specific order or continuous order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0169] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, an embodiment of the present application further provides a low-illumination image enhancement system based on a dual-channel network.

[0170] refer to Figure 7 The low illumination image enhancement system based on the dual-channel network includes: a decomposition module 701, a denoising module 702, an enhancement module 703 and an output module 704;

[0171] The decomposition module 701 is configured to input a preset normal light image and a low illumination image into the optimization model to be trained, decompose the normal light image and the low illumination image respectively, and obtain a normal light reflection image corresponding to the normal light image and a low illumination illumination image corresponding to the low illumination image;

[0172] The denoising module 702 is configured to perform a bright channel transform on the normal light reflection image to obtain a bright channel image, perform a wavelet transform on the normal light reflection image and the bright channel image and fuse them to obtain a first wavelet fused image and extract features to obtain first fused image features, and perform denoising on the first fused image features using a hybrid attention mechanism to obtain a denoised image, wherein the hybrid attention mechanism is composed of multiple attention mechanisms;

[0173] The enhancement module 703 is configured to determine a corresponding dark channel image using the low illumination illumination image, perform wavelet transformation on the low illumination illumination image and the dark channel image and fuse them to obtain a second wavelet fused image and extract features to obtain second fused image features, perform illumination enhancement on the second fused image features using the hybrid attention mechanism to obtain enhanced features, determine a refractive index using the enhanced features and the dark channel image, and perform a convolution operation on the refractive index and the enhanced features to obtain an enhanced image;

[0174] The output module 704 is configured to generate a target image using the denoised image and the enhanced image, constrain the training of the optimization model using a mixed loss function, input the image to be optimized into the trained optimization model in response to completing the training of the optimization model, and output the optimized target image.

[0175] For the convenience of description, the above devices are described in terms of functions and are divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0176] The device of the above embodiment is used to implement the corresponding low-illumination image enhancement method based on a dual-channel network in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0177] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, an embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the low-illumination image enhancement method based on a dual-channel network as described in any of the above embodiments is implemented.

[0178] Figure 8 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0179] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0180] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solution provided in the embodiment of the present application is implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0181] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0182] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0183] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).

[0184] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiment of the present application, and does not necessarily include all the components shown in the figure.

[0185] The device of the above embodiment is used to implement the corresponding low-illumination image enhancement method based on a dual-channel network in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0186] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the low-illumination image enhancement method based on a dual-channel network as described in any of the above embodiments.

[0187] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0188] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the low-illumination image enhancement method based on a dual-channel network as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0189] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the low-light image enhancement method based on a dual-channel network as described in any of the above embodiments, which has the beneficial effects of the corresponding method embodiments and will not be repeated here.

[0190] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0191] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device may be shown in the form of a block diagram so as to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0192] Although the present application has been described in conjunction with specific embodiments of the present application, many alternatives, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the discussed embodiments.

[0193] The embodiments of the present application are intended to cover all such replacements, modifications and variations that fall within the broad scope required by the present application. Therefore, any omissions, modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.

Claims

1. A low-light image enhancement method based on a dual-channel network, characterized in that: include: Inputting a preset normal light image and a low illumination image into the optimization model to be trained, decomposing the normal light image and the low illumination image respectively, and obtaining a normal light reflection map corresponding to the normal light image and a low illumination illumination map corresponding to the low illumination image; Performing a bright channel transformation on the normal light reflection image to obtain a bright channel image, performing a wavelet transformation on the normal light reflection image and the bright channel image and fusing them to obtain a first wavelet fused image and extracting features to obtain first fused image features, and performing denoising on the first fused image features using a hybrid attention mechanism to obtain a denoised image, wherein a channel attention mechanism, a spatial attention mechanism, and a pixel attention mechanism are sequentially set in the hybrid attention mechanism; Using the low-illuminance illumination map to determine a corresponding dark channel map, performing wavelet transformation on the low-illuminance illumination map and the dark channel map and fusing them to obtain a second wavelet fused image and extract features to obtain second fused image features, using the hybrid attention mechanism to perform illumination enhancement on the second fused image features to obtain enhanced features, using the enhanced features and the dark channel map to determine a refractive index, dividing the enhanced features and the refractive index, performing a convolution operation on the result of the division, and then adding the result to the enhanced features to obtain an enhanced image; A target image is generated using the denoised image and the enhanced image, and the training of the optimization model is constrained using a mixed loss function. In response to the completion of the training of the optimization model, the image to be optimized is input into the trained optimization model, and the optimized target image is output.

2. The method according to claim 1, characterized in that: The decomposing the normal light image and the low illumination image respectively to obtain a normal light reflection map corresponding to the normal light image and a low illumination illumination map corresponding to the low illumination image comprises: Extracting features from the normal light image to obtain normal light shallow features; Inputting the normal light shallow layer feature into the reflection component network for decomposition to obtain the normal light reflection component feature, normalizing the normal light reflection component feature to obtain the normal light reflection map, wherein the reflection component network includes multiple convolution layers and multiple deconvolution layers; Extracting features from the low-light image to obtain low-light shallow features; Inputting the low-illuminance shallow layer features into the reflection component network for decomposition to obtain low-illuminance reflection component features; The low-illuminance reflection component feature is input into an illumination component network for decomposition to obtain the low-illuminance illumination map, and the illumination component network includes multiple convolutional layers.

3. The method according to claim 1, characterized in that The step of denoising the first fused image features by using a hybrid attention mechanism to obtain a denoised image includes: Performing a convolution operation on the first fused image, and inputting the features after the convolution operation into the hybrid attention mechanism; The channel attention mechanism is used to perform the following maximum pooling and average pooling operations on the features after the convolution operation to obtain the channel dimension weight: ; Among them, F represents the feature after the convolution operation, AvgPool represents the average pooling operation, MaxPool represents the maximum pooling operation, MLP represents the multi-layer perception mechanism operation, represents the first MLP weight, represents the second MLP weight, M c (F) represents the channel dimension weight; According to the formula shown below, the channel dimension weights are used to determine the spatial attention input map for inputting the spatial attention mechanism. ; Wherein, F1 represents the spatial attention input map; The spatial attention mechanism is used to perform the following maximum pooling and average pooling operations on the spatial attention input map to obtain the spatial dimension weights: ; Among them, M s (F) represents the spatial dimension weight; According to the formula shown below, the pixel attention input map for inputting the pixel attention mechanism is determined using the spatial dimension weights, ; Wherein, F2 represents the pixel attention input map; Performing the pixel attention mechanism operation on the pixel attention input map to obtain pixel dimension weights; The denoised image is determined according to the channel dimension weight, the spatial dimension weight and the pixel dimension weight.

4. The method according to claim 1, characterized in that: The step of using the low illumination light map to determine a corresponding dark channel map includes: The dark channel prior algorithm is used to calculate the low illumination light map according to the following formula to obtain the dark channel map: ; in, represents the hyperparameter, A represents the atmospheric light value, I c (X) represents a pixel in the low-illuminance illumination map, and c represents a color parameter.

5. The method according to claim 3, characterized in that: The step of using the hybrid attention mechanism to perform illumination enhancement on the second fused image feature to obtain an enhanced feature includes: Down-sampling the second fused image feature to obtain a down-sampled image; The downsampled image is sequentially subjected to channel attention mechanism, spatial attention mechanism and pixel attention mechanism operations, and the operation results are upsampled to obtain an upsampled image; The refractive index is calculated using the up-sampled image to determine an enhanced image.

6. The method according to claim 1, characterized in that The training of the optimization model is constrained using a hybrid loss function, including: The target image is used to calculate the following hybrid loss function: ; Among them, L total represents the hybrid loss function, L e represents the exposure loss function, L i represents the image smoothness loss function, L d represents the contrast loss function, L c represents the color loss function, L n represents the noise function, L s represents the reflection component similarity loss function, represents the first coefficient, represents the second coefficient, represents the third coefficient; In the training of the optimization model, the peak signal-to-noise ratio of the target image is constrained by using the hybrid loss function so that the difference between the peak signal-to-noise ratio of the target image and that of a preset standard image reaches a predetermined error range.

7. The method according to claim 6, characterized in that The method of using the mixed loss function to constrain the gap between the target image and the preset standard image during back propagation includes: In response to determining that the difference between the target image and the preset standard image is within a predetermined error range, determining that the training of the optimization model is completed; In response to determining that the difference between the target image and the standard image exceeds the error range, the optimization model is trained again.

8. A low-light image enhancement system based on a dual-channel network, characterized in that: include: Decomposition module, denoising module, enhancement module and output module; The decomposition module is configured to input a preset normal light image and a low illumination image into the optimization model to be trained, decompose the normal light image and the low illumination image respectively, and obtain a normal light reflection image corresponding to the normal light image and a low illumination illumination image corresponding to the low illumination image; The denoising module is configured to perform a bright channel transform on the normal light reflection image to obtain a bright channel image, perform a wavelet transform on the normal light reflection image and the bright channel image and fuse them to obtain a first wavelet fused image and extract features to obtain first fused image features, and perform denoising on the first fused image features using a hybrid attention mechanism to obtain a denoised image, wherein a channel attention mechanism, a spatial attention mechanism and a pixel attention mechanism are sequentially set in the hybrid attention mechanism; an enhancement module configured to determine a corresponding dark channel image using the low illumination illumination image, perform wavelet transformation on the low illumination illumination image and the dark channel image, fuse the two images, obtain a second wavelet fused image, extract features, obtain features of a second fused image, perform illumination enhancement on the features of the second fused image using the hybrid attention mechanism, obtain enhanced features, determine a refractive index using the enhanced features and the dark channel image, divide the enhanced features and the refractive index, and then perform a convolution operation on the result of the division to obtain an enhanced image; The output module is configured to generate a target image using the denoised image and the enhanced image, constrain the training of the optimization model using a mixed loss function, input the image to be optimized into the trained optimization model in response to completing the training of the optimization model, and output the optimized target image.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Low-illumination image enhancement method based on Retinex-Net and wavelet transform fusion

    CN116228595A

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

    CN116645305A

  • Low-illumination image enhancement method based on illumination and scene texture attention map

    CN117196980A

  • Physical model and prior fused low-illumination image enhancement method

    CN117974459A