Zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction
By using technical means of dynamic feature aggregation and color correction in the zero-sample low-light image enhancement method, the problems of poor image enhancement effects and color distortion in extremely dark environments are solved, and better brightness enhancement and color contrast enhancement effects are achieved.
Patent Information
- Application Number
- CN202410911635.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2025-05-20
- Estimated Expiration
- 2044-07-09
AI Technical Summary
The existing zero-sample low-light image enhancement method is not effective in extremely dark environments, and color distortion and low color contrast are prone to problems during the enhancement process.
The zero-sample low-light image enhancement method based on dynamic feature aggregation and color correction is used to apply dynamic feature aggregation into the enhancement curve estimation network, combining jump connection and attention mechanism to adaptively select and learn features, so as to estimate the appropriate enhancement curve, and use the color prior information in the low-light image to correct the enhancement curve.
It effectively improves the brightness enhancement effect of the image in extremely dark environments, prevents color distortion during the enhancement process, improves overall color contrast, and solves the problems of difficulty in obtaining training samples and limited model generalization capabilities.
Smart Images

Figure CN118941483B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer vision and image processing, and particularly relates to a zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction. Background Art
[0002] Low-light image enhancement technology can effectively remove defects such as low brightness, local overexposure or underexposure, and color distortion in images caused by suboptimal lighting conditions, such as dim light, backlighting, and uneven illumination, restore the information in the scene, and improve the aesthetic quality of the image. It has always been an important research direction in image processing.
[0003] With the rapid development of deep learning technology in recent years, it has gradually become the mainstream in the field of low-light image enhancement, and related methods are therefore more accurate and robust. Low-light image enhancement methods based on deep learning can be divided into supervised learning-based methods and unsupervised learning-based methods according to their learning strategies. Although supervised learning-based methods can achieve good visual effects and evaluation metrics on some datasets, they require paired low-light and normal-light images as training data, which is difficult to obtain in many suboptimal lighting scenarios. The limitation of training data also makes the generalization ability of such methods poor and difficult to handle scenarios with complex and variable lighting conditions. Among unsupervised learning-based methods, although unsupervised learning-based methods do not require paired images, they still need to select and classify images as low-light images and normal-light images when constructing the dataset, which still limits the generalization ability of the model to a certain extent.
[0004] Therefore, zero-shot learning-based methods have also emerged. Such methods further completely eliminate the need for paired and unpaired images and set a series of reference-free loss functions that do not rely on labels or ground truth to guide training, avoiding the limitation of the generalization ability of the model caused by the bias of manually selected training data. However, existing zero-shot methods have some limitations. First, suboptimal lighting scenarios themselves are diverse, and the lighting distributions among these scenarios vary greatly. However, the ordinary convolutional neural networks in existing zero-shot methods lack flexibility when facing images under different conditions, so they cannot fully enhance images in some scenarios, especially extremely dark environments. Then, since only the color constancy assumption is used to construct the color loss function in existing zero-shot methods to prevent overall color cast, and there is no constraint on the color preservation of local regions or targets, there are problems of color distortion and low color contrast in the enhanced images. Summary of the Invention
[0005] The object of the present invention is to provide a zero - sample low - light image enhancement method based on dynamic feature aggregation and color correction. The dynamic feature aggregation is applied to the enhancement curve estimation network, giving full play to the ability of skip connections and attention mechanisms to adaptively select and learn features, estimating a suitable enhancement curve from multiple sub - optimal illumination scenarios, especially low - light images in extremely dark environments, to enhance the brightness of the image. At the same time, the color prior information in the low - light image is used to correct the enhancement curve, preventing color distortion during the enhancement process and improving the overall color contrast. In addition, the zero - sample learning method can effectively solve the problems of difficult acquisition of training samples and the limitation of the model generalization ability by training data.
[0006] To solve the above - mentioned technical problems, the technical solution of the present invention is: A zero - sample low - light image enhancement method based on dynamic feature aggregation and color correction, comprising the following steps:
[0007] S1. Scale a preset training image to a size of n×n, calculate color correction factors for its R, G, and B color channels, input the scaled training image and its color correction factors into a preset enhancement curve estimation network, obtain the corresponding enhancement curve for each pixel at each iteration according to a preset curve expression, correct the enhancement curve through the color correction factor, and iterate the scaled training image through the corrected enhancement curve k times to obtain a preliminary enhancement result; where 128 ≤ n ≤ 512, and n is an integer multiple of 16; 2 ≤ k ≤ 10;
[0008] S2. Calculate a reference - free loss for the parameter matrix of the corrected enhancement curve and the preliminary enhancement result, and train the enhancement curve estimation network for a preset number of training rounds according to the backpropagation method.
[0009] S3. Calculate the color correction factor of a preset test image, input the test image and its color correction factor into the trained enhancement curve estimation network to obtain the enhancement curve corresponding to the test image, correct the enhancement curve through the color correction factor of the test image, and iterate the test image through the corrected corresponding enhancement curve k times to obtain the final enhanced image.
[0010] Specifically, S1 is as follows:
[0011] S1a. For each pixel in the R, G, and B color channels of the scaled training image, calculate its corresponding color correction factor based on the maximum and minimum values of the pixel values in its channel.
[0012] S1b. Concatenate the scaled training image and its color correction factors and input them into the enhancement curve estimation network to predict the enhancement curve generated after each iteration.
[0013] S1c. Modify the enhancement curve using the color correction factor, and iteratively apply the modified enhancement curve to the scaled training image k times to obtain a preliminary enhancement result.
[0014] S2 is specifically as follows:
[0015] S2a. Calculate the reference - free loss based on the parameter matrix of the modified enhancement curve and the preliminary enhancement result, and represent the total loss function value through weighted reference - free loss. The reference - free loss specifically includes four types of loss functions, namely neighborhood contrast loss, global color loss, brightness loss, and enhancement smoothness loss;
[0016] S2b. Train the enhancement curve estimation network for a preset number of training rounds using the backpropagation method based on the total loss function value.
[0017] S1a is specifically as follows:
[0018] The definition of the color correction factor is: for the pixel I(i, j) with coordinates (i, j), its corresponding color correction factor is defined as:
[0019]
[0020] where MAX and MIN are respectively the ranges of the normalized pixel values, and φ and respectively represent the maximum and minimum values in the R, G, and B color channels;
[0021] The overall color correction factor ψ(i, j) is calculated and integrated respectively from the R, G, and B color channels as:
[0022]
[0023] where ψ R (i, j), ψ G (i, j), ψ B (i, j) are respectively the color correction factors corresponding to the pixel I(i, j) in the R, G, and B color channels, and the size of ψ is 3×n×n.
[0024] S1b is specifically as follows:
[0025] The scaled training image and its color correction factor are concatenated and then input into the enhancement curve estimation network. The enhancement curve estimation network at least includes: three 3×3 shallow feature extraction convolutional layers, two dynamically feature extraction modules with the same structure, one channel attention block, and one pixel attention block; among them, the dynamically feature extraction block at least includes: three 3×3 convolutional layers, one ReLU activation function layer, one channel attention block, and one pixel attention block; the channel attention block at least includes: two 1×1 convolutional layers, one average pooling layer, one ReLU activation function layer, and one Sigmoid activation function layer; the pixel attention block at least includes: two 3×3 convolutional layers, one ReLU activation function layer, and one Sigmoid activation function layer;
[0026] For the input obtained by concatenating the scaled training image and its color correction factor, first use a 3×3 convolution to extract the shallow feature F. Then, pass F through two dynamically feature extraction modules with the same structure. The output of the first dynamically feature extraction module is used as the input for the second dynamically feature extraction module. In the first dynamically feature extraction module, first perform a residual mapping on F that includes a 3×3 convolutional layer and a ReLU activation function to obtain the feature F r :
[0027]
[0028] Pass F r through a 3×3 convolutional layer, then calculate its channel and pixel attention and perform feature weighting, as well as a skip connection, to obtain the feature F screened by attention att :
[0029]
[0030] where PA and CA are the pixel attention block and the channel attention block respectively;
[0031] In channel attention weighting, for the feature F of the c-th channel c , perform global average pooling, and then pass through two 1×1 convolutional layers, Sigmoid, and ReLU activation functions to obtain its weight which is expressed as:
[0032]
[0033] where GAP is global average pooling and σ is the Sigmoid activation function;
[0034] Multiply the feature of each channel by its corresponding weight to complete the adaptive selection of features of different channels. Among them, for the feature F of the c-th channel c multiply it by its corresponding weight, which is expressed as:
[0035]
[0036] Among them, is the feature weighted by the c-th channel;
[0037] For the feature weighted by channels perform pixel attention weighting and selection: For the feature weighted by channels through two 3×3 convolutional layers, Sigmoid, and ReLU activation functions, obtain the weights of all pixels in the feature map perform a skip connection to obtain the output feature F of the pixel attention block * , which is expressed as:
[0038]
[0039] In the dynamic feature extraction module, the feature F * is the feature F screened by attention att , pass F att through a 3×3 convolutional layer and a skip connection to obtain the output feature F of the n-th dynamic feature extraction module n , which is expressed as:
[0040]
[0041] Dynamically aggregate the features of different depths extracted by the two dynamic feature extraction modules through attention operations to obtain the finally extracted feature F agg , which is expressed as:
[0042]
[0043] Pass F agg through two 3×3 post-processing convolutional layers to predict the parameter matrix of the enhanced curve with a size of 3k×n×n corresponding to the enhanced curve of the k-th iteration process of each pixel in each color channel of the low-light image.
[0044] Specifically, S1c is:
[0045] Correct the enhanced curve through the color correction factor to obtain the final parameter matrix of the enhanced curve which is:
[0046]
[0047] Among them, i represents the i-th iterative enhancement of the image;
[0048] Obtain the corresponding enhancement curve according to the preset curve expression, and iterate the scaled training image through the corrected enhancement curve. The corrected enhancement curve is expressed as:
[0049]
[0050] Among them, Y i represents the image after the i-th iteration of enhancement;
[0051] Each iteration of enhancement takes the output of the previous iteration of enhancement as the input, and the preliminary enhancement result is output after k iterations.
[0052] Specifically, S2a is as follows:
[0053] Calculate the neighborhood contrast loss L between the preliminary enhancement result and the scaled training image nc :
[0054]
[0055] Among them, A is the number of local regions of size 4×4 divided in the image, and N 4 (i) represents the four adjacent regions above, below, left, and right centered on region i, and Y and I respectively represent the average local region intensities of the preliminary enhancement result and the scaled training image;
[0056] Calculate the global color loss L for the preliminary enhancement result respectively rgb and the brightness loss L br ; among them, the calculation method of the global color loss L rgb is expressed as:
[0057]
[0058] Among them, Y m and Y n respectively represent the average brightness of the m and n color channels;
[0059] The brightness loss L br is expressed as:
[0060]
[0061] Among them, M is the number of non-overlapping local regions of size 16×16, and Y k is the average brightness of each local region; E is a constant representing a good visibility brightness level;
[0062] Calculate the enhancement smoothing loss L for the parameter matrix of the corrected enhancement curve TV , expressed as:
[0063]
[0064] Among them, N represents the batch size during training, and represent the gradients in the horizontal and vertical directions respectively, is the parameter matrix of the corrected enhancement curve.
[0065] Finally, the total loss function L total is expressed as the weighted sum of the above four loss functions, expressed as:
[0066] L total = αL nc + L rgb + βL br + γL TV
[0067] Among them, α, β, and γ are all constants that control the weights of the loss terms.
[0068] Specifically, S2b is:
[0069] After obtaining the total loss function value, use the ADAM optimizer to train the enhancement curve estimation network for a preset number of training rounds according to the total loss function value through the backpropagation method with a learning rate of 1e -4 .
[0070] n takes 256.
[0071] k takes 8.
[0072] Compared with the prior art, the beneficial effects of the present invention are:
[0073] The present invention applies dynamic feature aggregation to the enhancement curve estimation network. It gives full play to the ability of skip connections and attention mechanisms to adaptively select and learn features, estimates a suitable enhancement curve from multiple sub-optimal illumination scenarios, especially low-light images in extremely dark environments, to enhance the brightness of the images. At the same time, it uses the color prior information in the low-light images to correct the enhancement curve, preventing color distortion during the enhancement process and improving the overall color contrast. In addition, the zero-shot learning method can effectively solve the problems of difficult acquisition of training samples and limited generalization ability of the model by training data. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 is a schematic flowchart of an embodiment of the present invention;
[0075] Figure 2 is a schematic structural diagram of the overall framework and the enhancement curve estimation network in an embodiment of the present invention;
[0076] Figure 3 is a schematic structural diagram of the dynamic feature extraction module, the channel attention block, and the pixel attention block in an embodiment of the present invention;
[0077] Figure 4 This is the low - light input image tested in the embodiments of the present invention;
[0078] Figure 5 This is the enhanced result image tested in the embodiments of the present invention. Detailed implementation manners
[0079] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0080] Refer to Figures 1 - 5 , the technical solution of the present invention is: a zero - sample low - light image enhancement method based on dynamic feature aggregation and color correction, including the following steps:
[0081] S1. Scale the training image to 256×256 (n = 256 in this embodiment) as the input image. First, calculate the color correction factor, then input the input image and its color correction factor into the enhancement curve estimation network to obtain the corresponding enhancement curve, and then use the color correction factor for correction. Finally, perform eight (k = 8 in this embodiment) iterations on the training image according to the corrected curve to obtain a preliminary enhancement result.
[0082] S1a. First, calculate its color correction factor. For the pixel I(i,j) with coordinates (i,j), its corresponding correction factor is defined as:
[0083]
[0084] where MAX and MIN respectively represent the range of normalized pixel values, and φ and respectively represent the maximum and minimum values in the current color channel. Calculate and integrate the overall color correction factor from the RGB three color channels respectively as:
[0085]
[0086] Its size is 3×256×256. S1b. First, splice the color correction factor and the low - light image in the channel dimension, and then input them into the enhancement curve estimation network to predict the enhancement curve required for iteration.
[0087] First, a 3×3 convolutional layer is used to extract shallow features, which are then sequentially fed into two identical dynamic feature extraction modules. The latter takes the output features of the former as input to extract features of different depths. Each dynamic feature extraction module combines residual mapping, attention mechanism, and skip connections of different lengths. In each feature dynamics, for the input feature F, first, a residual mapping including a 3×3 convolution and ReLU activation is performed to obtain the feature F r :
[0088]
[0089] Subsequently, feature selection is performed on F r using the attention mechanism. F r is passed through a 3×3 convolution, then channel and pixel attention are calculated and feature weighting is performed, along with a skip connection to obtain
[0090]
[0091] where PA and CA represent the pixel attention block and the channel attention block respectively. Specifically, in channel attention weighting, for the feature F c of the c-th channel, first, global average pooling is performed, and then it passes through two 1×1 convolutions, Sigmoid, and ReLU activation to obtain its weight
[0092]
[0093] where GAP represents global average pooling and σ is the Sigmoid activation. The features of each channel are multiplied by their corresponding weights to complete the adaptive selection of features of different channels.
[0094]
[0095] After that, pixel attention weighting and selection are performed on the features weighted by the channel . This process includes two 3×3 convolutions, Sigmoid, and ReLU activation to obtain the weights of all pixels in the feature map Then each pixel is multiplied by its corresponding weight to achieve the adaptive selection of features at different positions. Subsequently, another skip connection is performed to obtain the feature F * extracted through dynamic selection.
[0096]
[0097] Finally, through another 3×3 convolution and skip connection, the output of the feature dynamic extraction block is obtained:
[0098]
[0099] Next, the features of different depths extracted by the two dynamic feature extraction modules are dynamically aggregated through additional attention operations to obtain the finally extracted feature F agg :
[0100]
[0101] Finally, the feature is passed through two 3×3 post-processing convolutional layers to predict the parameter matrix of the enhanced curve with a size of 24×256×256 corresponding to the enhanced curve of eight iterative processes for each pixel in each color channel of the low-light image
[0102] S1c. Use the color correction factor to correct the enhanced curve, and then iterate the input training image eight times according to the corrected curve to obtain the preliminary enhancement result
[0103] First, use the color correction factor to correct the enhanced curve to obtain the parameter matrix of the final enhanced curve as follows
[0104]
[0105] where i represents the i-th iterative enhancement of the image. Subsequently, the following curve is used to adjust the brightness of the input image
[0106]
[0107] where Y i represents the image after the i-th iterative enhancement. Each iterative enhancement uses the output of the previous time as the input, and the preliminary enhancement result is output after eight iterations
[0108] S2. Calculate the reference-free losses for the parameters and the enhancement result of the enhanced curve corrected in step 1 respectively, and then use the backpropagation method to guide the training of the enhanced curve estimation network until the number of training rounds is completed
[0109] S2a. Calculate three loss functions for the obtained enhancement result, namely the neighborhood contrast loss L nc , the global color loss L rgb and the brightness loss L br . The neighborhood contrast loss encourages maintaining the brightness relationship of adjacent local regions during the enhancement process by calculating the change in the brightness magnitude relationship between adjacent regions before and after enhancement
[0110]
[0111] where A is the number of local regions with a size of 4×4 divided in the image, and N 4(i) represents the four adjacent regions above, below, left, and right centered on region i. Y and I respectively represent the local region intensity average values of the preliminary enhancement result and the input image.
[0112] According to the gray world algorithm, for an image with a large number of color variations, the average values of the RGB three components tend to the same gray value. Therefore, a global color loss is constructed between the RGB color channels of the enhancement result to prevent overall color deviation.
[0113]
[0114] Among them, Y m and Y n respectively represent the average brightness of the m and n color channels.
[0115] The brightness loss constrains the local average brightness of the enhancement result to a fixed level, which is used to make the low-light image obtain appropriate brightness after enhancement, and at the same time prevent the occurrence of local overexposure or underexposure.
[0116]
[0117] Among them, M is the number of non-overlapping local regions of size 16×16, and Y k is the average brightness of each local region. E is a constant, representing a good visibility brightness level.
[0118] In addition, the magnitude of the enhancement curve parameter value represents the amount of pixel enhancement. To prevent the enhancement curve difference between adjacent pixels from being too large and generating artifacts, the enhancement smoothness loss L is calculated for the parameter matrix of all corrected enhancement curves TV to guide the smoothness of the enhancement.
[0119]
[0120] Among them, N represents the batch size during training, and respectively represent the gradients in the horizontal and vertical directions, is the parameter matrix of the corrected enhancement curve.
[0121] Finally, the total loss function L total is expressed as the weighted sum of the above four loss functions.
[0122] L total =αL nc +L rgb +βL br +γL TV
[0123] Among them, α, β, and γ are all constants that control the weight values of the loss terms.
[0124] S2b. After obtaining the total loss function value, use the ADAM optimizer to backpropagate and optimize the enhancement curve estimation network at a learning rate of 1e -4 until the specified number of training rounds is completed to obtain a trained model.
[0125] S3. Load the parameters of the trained model into the enhancement curve estimation network, input the test low-light image, first calculate the color correction factor, then input the low-light image and the correction factor into the enhancement curve estimation network together to obtain an enhancement curve, then correct it with the correction factor, and finally perform eight iterations on the low-light image according to the corrected enhancement curve to output the final enhanced image.
[0126] Those skilled in the art can easily understand that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction, characterized in that: The following steps are involved: S1. Scale the preset training image to n×n size, calculate the color correction factor for its R, G, and B color channels, and input the scaled training image and its color correction factor into the preset enhancement curve estimation network. The enhancement curve estimation network includes at least: three 3×3 shallow feature extraction convolution layers, two dynamic feature extraction modules with the same structure, a channel attention block, and a pixel attention block; wherein the dynamic feature extraction block includes at least: three 3×3 convolution layers, a ReLU activation function layer, a channel attention block, and a pixel attention block; the channel attention block includes at least: two 1×1 convolution layer, an average pooling layer, a ReLU activation function layer and a Sigmoid activation function layer; the pixel attention block includes at least: two 3×3 convolution layers, a ReLU activation function layer and a Sigmoid activation function layer; the enhancement curve corresponding to each pixel at each iteration is obtained according to the preset curve expression, the enhancement curve is corrected by the color correction factor, and the scaled training image is iterated k times through the corrected enhancement curve to obtain a preliminary enhancement result; wherein, 128≤n≤512, and n is an integer multiple of 16; 2≤k≤10; S2. Calculate the reference-free loss for the parameter matrix of the modified enhancement curve and the preliminary enhancement result, and train the enhancement curve estimation network for a preset number of training rounds according to the back propagation method; S3. Calculate the color correction factor of the preset test image, and input the test image and its color correction factor into the trained enhancement curve estimation network to obtain the enhancement curve corresponding to the test image, correct the enhancement curve by the color correction factor of the test image, iterate the corresponding enhancement curve of the test image after correction k times, and obtain the final enhanced image.
2. The zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction according to claim 1, characterized in that: S1 is specifically: S1a, for each pixel in the three color channels R, G, and B of the scaled training image, the corresponding color correction factor is calculated according to the maximum and minimum values of the pixel values of the channel in which it is located; S1b, the scaled training image and its color correction factor are spliced and input into the enhancement curve estimation network to predict the enhancement curve generated after each iteration; S1c, the enhancement curve is corrected by the color correction factor, and the scaled training image is iterated k times through the corrected enhancement curve to obtain a preliminary enhancement result.
3. The zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction according to claim 2, characterized in that: S2 is specifically: S2a, calculate the no-reference loss according to the parameter matrix of the modified enhancement curve and the preliminary enhancement result, and use the no-reference loss to weight the total loss function value. The no-reference loss specifically includes four types of loss functions, namely, neighborhood contrast loss, global color loss, brightness loss, and enhanced smoothness loss; S2b. Train the enhanced curve estimation network for a preset number of training rounds using a back propagation method according to the total loss function value.
4. The zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction according to claim 3, characterized in that: S1a is specifically: The color correction factor is defined as follows: For a pixel I(i,j) with coordinates (i,j), the corresponding color correction factor is defined as: Among them, MAX and MIN are the normalized pixel value ranges, φ and Respectively represent the maximum and minimum values in the three color channels of R, G, and B; The overall color correction factor ψ(i,j) is calculated and integrated from the three color channels of R, G, and B: Among them, ψ R (i,j),ψ G (i,j),ψ B (i, j) are the color correction factors corresponding to pixel I(i, j) in the three color channels of R, G, and B respectively, and the size of ψ is 3×n×n.
5. The zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction according to claim 4, characterized in that: S1b is specifically: The scaled training image and its color correction factor are concatenated and input into the enhancement curve estimation network; For the input of the scaled training image and its color correction factor spliced together, a 3×3 convolution is first used to extract the shallow feature F, and F is sequentially passed through two dynamic feature extraction modules with the same structure. The second dynamic feature extraction module takes the output of the first dynamic feature extraction module as input. In the first dynamic feature extraction module, F is first subjected to residual mapping including a 3×3 convolution layer and a ReLU activation function to obtain the feature F r : F r Through a 3×3 convolutional layer, the channel and pixel attention are calculated and feature weighted, and a skip connection is made to obtain the feature F selected by attention. att : Among them, PA and CA are pixel attention block and channel attention block respectively; In the channel attention weighting, for the feature F of the cth channel c , perform global average pooling, and then pass through two 1×1 convolutional layers and Sigmoid and ReLU activation functions to obtain its weight It is expressed as: Among them, GAP is the global average pooling, σ is the Sigmoid activation function; Multiply the features of each channel by its corresponding weight to complete the adaptive selection of features of different channels. For the feature F of the cth channel, c Multiplying it by its corresponding weight is expressed as: in, is the feature weighted by the cth channel; The channel-weighted features Perform pixel attention weighting and selection: features weighted by channels Through two 3×3 convolutional layers and Sigmoid and ReLU activation functions, the weights of all pixels in the feature map are obtained. Make a skip connection to get the output feature F of the pixel attention block * , expressed as: In the dynamic feature extraction module, feature F * That is, the feature F selected by attention att , F att Through a 3×3 convolutional layer and skip connection, the output feature F of the nth dynamic feature extraction module is obtained n , expressed as: The features of different depths extracted by the two dynamic feature extraction modules are dynamically aggregated through attention operation to obtain the final extracted feature F agg , expressed as: F agg Through two 3×3 post-processing convolutional layers, the parameter matrix of the enhancement curve with a size of 3k×n×n is predicted. Enhancement curves corresponding to the k-iterative process for each pixel in each color channel of the low-light image.
6. The zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction according to claim 5, characterized in that: S1c is specifically: The enhancement curve is corrected by the color correction factor to obtain the parameter matrix of the final enhancement curve for: Where i represents the i-th iterative enhancement of the image; The corresponding enhancement curve is obtained according to the preset curve expression, and the scaled training image is iterated through the modified enhancement curve. The modified enhancement curve is expressed as: Among them, Y i represents the image after the i-th iteration enhancement; Each iterative enhancement takes the output of the previous iterative enhancement as input, and outputs the preliminary enhancement result after k iterations.
7. The zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction according to claim 6, characterized in that: S2a is specifically: Calculate the neighborhood contrast loss L between the initial enhancement result and the scaled training image nc : Where A is the number of local regions of size 4×4 divided in the image, N4(i) represents the four adjacent regions above, below, left and right centered on region i, Y and I represent the preliminary enhancement result and the average intensity of the local region of the scaled training image, respectively; Calculate the global color loss L for the preliminary enhancement results rgb And the brightness loss L br ; Among them, the global color loss L rgb The calculation method is expressed as: Among them, Y m and Y n Represents the average brightness of the m and n color channels respectively; Brightness loss L br The calculation method is expressed as: Where M is the number of non-overlapping local regions of size 16×16, and Y k is the average brightness of each local area; E is a constant, representing a brightness level with good visibility; Calculate the enhanced smoothing loss L for the parameter matrix of the modified enhancement curve TV , expressed as: Among them, N represents the batch size during training, and Represent the gradients in the horizontal and vertical directions respectively, is the parameter matrix of the modified enhancement curve; Finally, the total loss function L total It is expressed as the weighted sum of the above four loss functions, expressed as: L total =αL nc +L rgb +βL br +γL TV Among them, α, β, and γ are all constants for controlling the weights of the loss terms.
8. The zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction according to claim 3, characterized in that: S2b is specifically: After obtaining the total loss function value, use the ADAM optimizer with 1e -4 The learning rate is used to train the enhanced curve estimation network for a preset number of training rounds through the back propagation method according to the total loss function value.
9. The zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction according to claim 1, characterized in that: n is 256.
10. The zero-shot low-light image enhancement method based on dynamic feature aggregation and color correction according to claim 1, characterized in that: k is 8.
Citation Information
Patent Citations
No-reference low-illumination image enhancement method based on high-order curve iteration
CN116912114A
HSV and Transform-based unsupervised low-illumination image enhancement method
CN118247192A