Image enhancement method and system based on gamma correction prior driven attention mechanism
By introducing a gamma correction prior-driven attention mechanism in low-light image enhancement, combining the channel prior module and the extended gamma correction attention module, the problem that low-light image enhancement methods in the prior art are difficult to efficiently apply on real-world devices, and a lightweight and efficient image enhancement effect is achieved.
Patent Information
- Application Number
- CN202510108178.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-01-23
AI Technical Summary
The prior art is difficult to design lightweight and efficient methods in low-light image enhancement, resulting in limited practical applications on real-world devices.
An image enhancement method based on the gamma correction prior drive attention mechanism is proposed. By constructing a low-light image enhancement neural network, combining the channel prior module and the extended gamma correction attention module, image enhancement is performed.
Achieving powerful efficiency and stable image enhancement performance on devices with limited computing resources provides a lightweight but advanced image enhancement solution.
Smart Images

Figure CN119919331A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optics, and in particular to an image enhancement method and system based on a gamma correction prior-driven attention mechanism. Background Art
[0002] Low-light image enhancement is a key challenge in computer vision. Currently, low-light image enhancement tasks are usually solved using two main methods: histogram equalization and Retinex theory. Histogram equalization enhances contrast by redistributing grayscale values. Retinex theory divides the image into reflectance and illumination components to improve reflectance and overall image quality.
[0003] With the advancement of technology, various deep learning-based methods have been proposed in recent years to improve the quality of low-light images. However, these methods usually require a lot of computing resources, which limits their practical application on real-world devices. Therefore, it is crucial to design lightweight and efficient image enhancement techniques.
[0004] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0005] In response to the problems in the related art, the present invention proposes an image enhancement method and system based on a gamma correction prior-driven attention mechanism to overcome the above-mentioned technical problems existing in the existing related technology.
[0006] To this end, the specific technical solution adopted by the present invention is as follows:
[0007] According to one aspect of the present invention, an image enhancement method based on a gamma correction prior driven attention mechanism is provided, the image enhancement method comprising the following steps:
[0008] S1. Build a low-light image enhancement neural network based on a pre-configured network structure;
[0009] S2, training and evaluating the low-light image enhancement neural network based on the pre-selected loss function, training data set and evaluation index;
[0010] S3. Based on the trained low-light image enhancement neural network, ablation experiments are performed on the number of extended gamma correction attention modules, channel prior modules, and loss functions to obtain enhanced images.
[0011] The low-light image enhancement neural network includes a channel prior module for fusing original RGB channel features and an extended gamma correction attention module for estimating global features.
[0012] Optionally, constructing a low-light image enhancement neural network based on a preconfigured network structure, wherein the low-light image enhancement neural network includes a channel prior module and an extended gamma correction attention module, comprises the following steps:
[0013] S11, channel prior module obtained based on Retinex theory and pre-configured atmospheric scattering model;
[0014] S12. Introduce gamma correction in the attention process, and combine it with the channel prior module to use global features to estimate the optimal gamma correction of the feature channel to obtain the extended gamma correction attention module.
[0015] Optionally, the obtaining of a channel priori module based on Retinex theory and a preconfigured atmospheric scattering model comprises the following steps:
[0016] S111, couple the Retinex theory and the pre-configured atmospheric scattering model and transform it into a parameter learning model;
[0017] S112. Reconstruct the network structure expression of the parameter learning model using the convolutional network layer and the residual network layer to obtain the channel prior module.
[0018] Optionally, the expressions of the channel prior module and the extended gamma correction attention module are:
[0019]
[0020] Where L′ represents the mapped input tensor with matching channels, represents the complement of atmospheric light intensity, t represents atmospheric transmittance, F represents the input feature map, and F CP represents the channel prior characteristics, Represents gamma-corrected features and the original feature R att The attention features established, Represents the gamma-corrected feature, R att Represents the original feature of attention.
[0021] Optionally, the loss function includes L1 loss, perceptual loss, HDR loss and SSIM loss;
[0022] When the low-light image enhancement neural network is trained using matching data, the training data set includes a LOLv1 data set and a LOLv2 data set, the LOLv2 data set includes a real capture subset and a synthetic subset, and the evaluation indicators include peak signal-to-noise ratio, structural similarity, and learnable perceptual image block similarity;
[0023] When the low-light image enhancement neural network is trained using unmatched data, the training data set includes a low-light image data set enhanced by illumination map estimation, an emissive display power-limited contrast enhancement technology data set based on histogram equalization, a naturalness enhancement algorithm data set for non-uniform illumination images, a cracked image enhancement and tone mapping algorithm data set, and a contrast enhancement technology data set based on hierarchical difference representation, and the evaluation index includes a natural image quality evaluator.
[0024] Optionally, the step of performing ablation experiments on the number of extended gamma correction attention modules, channel prior modules, and loss functions based on the trained low-light image enhancement neural network comprises the following steps:
[0025] S41, based on gamma correction and combined with the attention mechanism, an ablation experiment is conducted on the extended gamma correction attention module;
[0026] S42, based on low-light image enhancement neural network, ablation experiments were performed by changing the number of channel prior modules;
[0027] S43. Based on the default settings of the low-light image enhancement neural network, an ablation experiment is performed on the loss function.
[0028] Optionally, the ablation experiment on the extended gamma correction attention module based on the gamma correction combined with the attention mechanism comprises the following steps:
[0029] S411. Establish attention mechanism based on gamma correction;
[0030] S412. Fusion the gamma correction from the global branch to the local branch, and conduct ablation experiments on the extended gamma correction attention module.
[0031] Optionally, the ablation experiment based on the low-light image enhancement neural network by changing the number of channel prior modules includes the following steps:
[0032] S421, based on the low-light image enhancement neural network, gradually changing the number of channel prior modules;
[0033] S422. Evaluate the model performance under each configuration respectively, and record the number of parameters and computational cost.
[0034] Optionally, the ablation experiment on the loss function based on the default setting of the low-light image enhancement neural network includes the following steps:
[0035] S431, based on the default settings of the low-light image enhancement neural network, conduct ablation experiments on the loss function;
[0036] S432. Combine the loss function after the ablation experiment to obtain the best overall monitoring performance.
[0037] According to another aspect of the present invention, an image enhancement system based on a gamma-corrected prior-driven attention mechanism is also provided, the image enhancement system comprising a neural network building module, a neural network training module and an ablation experiment module;
[0038] A neural network building module for building a low-light image enhancement neural network based on a pre-configured network structure;
[0039] A neural network training module is used to train and evaluate the low-light image enhancement neural network based on a pre-selected loss function, training data set, and evaluation index;
[0040] The ablation experiment module is used to perform ablation experiments on the extended gamma correction attention module, the number of channel prior modules and the loss function based on the trained low-light image enhancement neural network to obtain the enhanced image.
[0041] The beneficial effects of the present invention are:
[0042] This paper proposes a new model CPGA-Net+, which is used as an attention mechanism based on a theoretical formula. A stacked and modular attention module is proposed to focus on the details of the image. In addition, gamma correction is integrated into the local branch to create a plug-in attention module for each CP block. This enhancement enables lightweight but advanced performance, maintaining strong efficiency and stable operation on devices with limited computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 is a flowchart of an image enhancement method based on a gamma correction prior driven attention mechanism according to an embodiment of the present invention;
[0045] Figure 2 is a principle block diagram of an image enhancement system based on a gamma correction prior driven attention mechanism according to an embodiment of the present invention;
[0046] Figure 3 It is a schematic diagram of CPGA-Net+ in an image enhancement method based on a gamma correction prior-driven attention mechanism according to an embodiment of the present invention;
[0047] Figure 4It is a design block diagram of a channel prior block (CP block) in an image enhancement method based on a gamma correction prior driven attention mechanism according to an embodiment of the present invention;
[0048] Figure 5 It is a structural schematic diagram of an intersection-aware adaptive fusion module (IAAF) module in an image enhancement method based on a gamma-corrected prior-driven attention mechanism according to an embodiment of the present invention.
[0049] In the figure:
[0050] 1. Neural network construction module; 2. Neural network training module; 3. Ablation experiment module. DETAILED DESCRIPTION
[0051] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in the field should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0052] According to an embodiment of the present invention, an image enhancement method and system based on a gamma correction prior-driven attention mechanism are provided.
[0053] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 , Figure 3-Figure 5 As shown, according to one embodiment of the present invention, an image enhancement method based on a gamma correction prior-driven attention mechanism is provided, and the image enhancement method includes the following steps:
[0054] S1. Based on a preconfigured network structure, a low-light image enhancement neural network is constructed; wherein the low-light image enhancement neural network includes a channel prior module for fusing original RGB channel features and an extended gamma correction attention module for estimating global features.
[0055] In one embodiment, the low-light image enhancement neural network is constructed based on a preconfigured network structure, wherein the low-light image enhancement neural network includes a channel prior module and an extended gamma correction attention module, and comprises the following steps:
[0056] S11. Obtain channel prior module based on Retinex theory and pre-configured atmospheric scattering model.
[0057] In one embodiment, the obtaining of a channel priori module based on Retinex theory and a preconfigured atmospheric scattering model comprises the following steps:
[0058] S111, couple the Retinex theory and the pre-configured atmospheric scattering model and transform it into a parameter learning model;
[0059] S112. Reconstruct the network structure expression of the parameter learning model using the convolutional network layer and the residual network layer to obtain the channel prior module.
[0060] S12. Gamma correction is introduced into the attention process, and combined with the channel prior module, the global features are used to estimate the optimal gamma correction of the feature channel to obtain the extended gamma correction attention module.
[0061] In one embodiment, the expressions of the channel prior module and the extended gamma correction attention module are:
[0062]
[0063]
[0064] Where L′ represents the mapped input tensor with matching channels, represents the complement of atmospheric light intensity, t represents atmospheric transmittance, F represents the input feature map, and F CP represents the channel prior characteristics, Represents gamma-corrected features and the original feature R att The attention features established, Represents the gamma-corrected feature, R att Represents the original feature of attention.
[0065] It should be explained that the present invention uses a theory-based structure and gamma correction priors to extend CPGA-Net by reconstructing the theoretical equations into an attention mechanism and transitioning the gamma estimation module from global processing to local processing. The present invention calls it the CPGA-Net+ network, which achieves state-of-the-art image quality and efficiency performance, making it a lightweight and practical solution for real-world applications.
[0066] The main features of the model are as follows:
[0067] Atmospheric scattering driven attention module: This paper introduces the atmospheric scattering model as attention into the local network, called "channel prior block". It improves the capture of channel prior information to better preserve and refine image structure and details.
[0068] Plugin Attention Module with Gamma Correction: Gamma correction is integrated into the local branch, converting it into a CPGA-Net-like attention module. This maximizes the efficiency of the context factor and improves image quality through the plugin attention mechanism.
[0069] A gamma correction prior driven attention mechanism low-light image enhancement neural network is designed, which mainly includes a channel prior module CP module and an extended gamma correction attention module CPGA module.
[0070] Among them, regarding the channel prior module CP module, an attention mechanism called channel-prior block (CP block) is proposed, which modularizes the relationship between the two equations of Retinex theory and atmospheric scattering model into a system form, and reorganizes the module with convolution and ResBlock, while fusing the features of the original RGB channels at each step to simplify the module into an attention block design, which helps to activate the feature map to align with the original channel.
[0071] The CP module is designed, which is called Channel-Prior Block. It is a module inspired by channel priors and driven by the atmospheric scattering model. This module couples the Retinex theory and the atmospheric scattering model and transforms them into a network model for parameter learning. The convolutional network layer CNNBlock and the residual network layer ResBlock are used to reconstruct the network structure expression that integrates the Retinex and atmospheric scattering models. In addition, the features of the original RGB channels are fused in each step to simplify the module into an attention block design.
[0072] There is a strong relationship between Retinex theory and the atmospheric scattering model (ATSM), and these two equations can be expressed in terms of each other by reformulating them. Retinex theory assumes that the received image can be decomposed into illumination and reflectance components as follows:
[0073] I(i,j)=L(i,j)·R(i,j);
[0074] Where R(i,j) represents the reflectance component of the pixel position (i,j), I(i,j) represents the perceived image of the pixel position (i,j), and L(i,j) represents the illumination component of the pixel position (i,j).
[0075] On the other hand, the atmospheric scattering model is defined as follows:
[0076]
[0077] Where I(x) represents the input image, J(x) represents the haze-free image, t(x) represents the atmospheric transmittance, and A(x) represents the atmospheric light intensity.
[0078] Since the low-light image I(x) can be regarded as 1-L(x), and J(x) can be regarded as 1-R(x), it can be rewritten as follows:
[0079]
[0080] In the formula, R(x) represents the reflectivity component of the image, L(x) represents the illumination component of the image, The complement of the atmospheric light intensity used to adjust the haze or scattering effect.
[0081] in It is worth noting that if This equation is consistent with the Retinex theory.
[0082] The present invention extends this idea and proposes an attention mechanism called Channel-Prior Block (CP Block), which modularizes the relationship between the above two equations into a system form and reorganizes the module with convolution and ResBlock (residual block), while fusing the features of the original RGB channels at each step to simplify the module into an attention block design, which helps to activate the feature map to align with the original channel
[0083] First, three channel priors are selected as the input for t estimation: bright channel prior (BCP), dark channel prior (DCP), and luminance channel (Y component from YCbCr color space). They can be defined as:
[0084] I bright =max(I c );
[0085] I dark =min(I c );
[0086] I luminance =0.299·I r +0.594·I g +0.114*I b ;
[0087] In the formula, I bright represents the bright channel prior, I c Represents the color channel of the input image, I dark represents the dark channel prior, I luminance Represents the brightness channel, I r Represents the red channel in the image, I g Represents the green channel in the image, I b Represents the blue channel in the image.
[0088] Among them, C represents the color channel C of the input image I. These common features represent the brightness changes under different environments, such as Figure 4 As shown, Figure 4In the above formula, Channel-Priors stands for channel prior, Original Channel stands for original channel, concat stands for connection, GELU stands for activation function, and ResBlock stands for residual block. These common features represent the brightness changes under different environments and have been widely used in traditional methods. The combination of channel priors shows sensitivity to brightness, which is an important clue to characterize atmospheric transmittance to guide enhancement.
[0089] Furthermore, in order to convert it into a high-dimensional processing module instead of keeping the original channels, the present invention simplifies the brightness channel into a more basic representation - specifically, the average value of the channel, similar to the concept of intensity (I component in HSI color space), which also represents image brightness. The channel prior is described as:
[0090] F CP (F) = concat(max(F C ),min(F C ),mean(F C ));
[0091] In the formula, max(F C ) represents the maximum value of the input channel, min(F C ) represents the minimum value of the input channel, mean(F C ) represents the average value of the input channel, concat represents the values extracted from the max, min, and mean of the input channel are sequentially connected into a new feature representation, F represents the input feature map, F CP Represents the channel prior characteristics.
[0092] Among them, if C consists of RGB channels, then F is equal to I. In this way, the channel prior is simplified to the max, min and mean of the input channel, making the attention module more responsive to the overall brightness control of the image.
[0093] For capturing detailed features and reconstructing images The present invention redesigns it into a micro-U-Net based architecture, in which the encoder and decoder paths are connected via jump connections. This design effectively captures and preserves multi-scale spatial information, enhancing the model's ability to reconstruct fine details in the image. At the same time, considering lightweight efficiency, the present invention only samples the input once, reducing the computational complexity while maintaining sufficient feature extraction capabilities. This approach ensures that the model remains effective and is suitable for real-time applications or scenarios with limited computing resources without significantly affecting the quality of the reconstructed image.
[0094] After obtaining t and After estimating , the features can be reconstructed using the atmospheric scattering model combined with the low-light image as an attention module that is sensitive to brightness changes in the scene, which leads to the proposed atmospheric scattering driven attention, which is formulated as follows:
[0095]
[0096] Where L' represents the mapped input tensor with matching channels, R att Represents attention features.
[0097] In addition, the CPGA module is designed, which is essentially an extended gamma correction attention module. This module directly incorporates gamma correction into the attention process, adapting this operation to the function within the CP module, so that it can be used as a global feature to estimate the optimal gamma correction for each feature channel.
[0098] The CPGA-Net model not only takes advantage of the characteristics of low-light images, but also combines gamma correction based on IAT. Gamma correction is a simple technique that adjusts all pixels through point-by-point exponential operations as shown below:
[0099] s = rγ;
[0100] Where γ represents the gamma value that controls the degree of correction, r represents the enhanced input image, and s represents the output image.
[0101] Where γ is the gamma value that controls the degree of correction, enhancing the input image r to produce the output image s. These methods combine independent regression branches with enhancement models to better estimate the gamma value. In addition, the complexity of gamma value estimation complicates the training objective and makes the process prone to divergence. Considering these factors, such as Figure 5 As shown in the figure, ResBlock represents the residual block, and an intersection-aware adaptive fusion module (IAAF) is proposed. The expression is as follows:
[0102]
[0103] In the formula, represents the enhanced image after being processed by the intersection-aware adaptive fusion module, IAAF represents the intersection-aware adaptive fusion module, and R∪R γ Indicates that R and R γ All independent information in R∩R is combined. γ Indicates the extraction of R and R γ The common information between γ represents the gamma-corrected image, and R represents the original image.
[0104] Among them, the enhanced image is by combining R and R γ are created by combining them together, removing any overlapping elements, ∩(R,R γ ) represents an estimate of finding the intersection with similar features between the gamma-corrected image and the original image.
[0105] First, downsampling the image resolution in a limited scale does not significantly affect the performance while greatly reducing the computational cost. Therefore, the gamma value estimation process is redesigned, such as Figure 3 As shown, Figure 3 Pre-processing stands for pre-processing module, CP stands for channel-prior module, Fusion Strategy stands for fusion strategy, IAAF stands for intersection-aware adaptive fusion module, and ResCBAM stands for residual convolutional attention block. The feature resolution of the first ResCBAM block (residual convolutional attention block) is reduced by adjusting the stride from 1 to 2. This allows subsequent calculations to operate on half the image size and combines the residuals of the pre-processing layer with downsampled gamma correction. The learnability of gamma correction and local branch fusion strategy is enhanced.
[0106] In addition, considering the standard gamma correction operation, such as the expression of pointwise exponential operation. In the attention mechanism, this operation is adapted to the function within the CP module by incorporating it directly into the attention process, so that it can be used as a global feature to estimate the optimal gamma correction for each feature channel. The modified attention output can be expressed as:
[0107]
[0108] In the formula, Represents gamma-corrected features and the original feature R att The attention features established, Represents the gamma-corrected feature, R att Represents the original feature of attention.
[0109] Furthermore, another residual is added to this attention mechanism to distinguish it from the reconstruction applied in the expression of the intersection-aware adaptive fusion module, making it an auxiliary attention supporting the residual features.
[0110] Adaptive gamma values, as an environmental factor representing the overall lighting conditions, may vary in different scenes. Therefore, this attention mechanism ensures that the network focuses on the areas where gamma correction produces the most significant enhancement in a wider range of images. This is the design principle of the CPGA block.
[0111] S2. Based on the pre-selected loss function, training data set and evaluation index, the low-light image enhancement neural network is trained and evaluated.
[0112] In one embodiment, the loss function includes L1 loss, perceptual loss, HDR loss and SSIM loss;
[0113] When the low-light image enhancement neural network is trained using matching data, the training data set includes a LOLv1 data set and a LOLv2 data set, the LOLv2 data set includes a real capture subset and a synthetic subset, and the evaluation indicators include peak signal-to-noise ratio, structural similarity, and learnable perceptual image block similarity;
[0114] When the low-light image enhancement neural network is trained using unmatched data, the training data set includes a low-light image data set enhanced by illumination map estimation, an emissive display power-limited contrast enhancement technology data set based on histogram equalization, a naturalness enhancement algorithm data set for non-uniform illumination images, a cracked image enhancement and tone mapping algorithm data set, and a contrast enhancement technology data set based on hierarchical difference representation, and the evaluation index includes a natural image quality evaluator.
[0115] It should be explained that the present invention uses four loss functions, including L1 loss, perceptual loss, HDR loss and SSIM loss.
[0116] The L1 loss function is a commonly used loss function with good performance in image enhancement and restoration, and is defined as:
[0117]
[0118] In the formula, Indicates output, Y GT Indicates actual value.
[0119] Perceptual loss is a loss function commonly used in image restoration, style transfer, and image generation. It emphasizes capturing high-level features and structures that are very similar to human perception. The loss can be expressed as:
[0120]
[0121] Where Ψ represents the feature extractor of VGG16.
[0122] HDR L1 loss is calculated in the tone mapping domain, because HDR (high dynamic range) images are usually viewed after tone mapping. To achieve this, the μlaw function is generally used to calculate the loss:
[0123]
[0124] Where sgn(x) represents the sign function, log(1+ux) represents the logarithmic function, log(1+u) represents the value used to normalize the input value, ux represents the product of u and x, u represents the μlaw parameter, T is the tone-mapped HDR image, and x is the input image.
[0125] Among them, log(1+ux) is used for nonlinear adjustment in the tone mapping process of the image, u is a constant that controls the nonlinear compression, μ is set to 5000, and then the μlaw function is applied to the L1 loss:
[0126] L HDRL1 =||T(Y)-T(Y GT )||1;
[0127] Where, L HDRL1 Representing images in the tone-mapped domain ensures that the loss is computed in a perceptually relevant space.
[0128] SSIM loss is a function that measures the similarity between two images based on structural information through the SSIM index (structural similarity index). It compares brightness, contrast, and structure, and reflects the perceptual quality better than traditional pixel loss. It can be written as:
[0129] L SSIM =1-SSIM(Y,Y GT );
[0130] In addition, for paired data, the present invention uses LOLv1 and LOLv2 datasets, LOLv1 includes 485 images for training and testing, and LOLv2 includes two subsets: real capture and synthesis. The real capture subset (LOLv2 Real) has 689 images for training and 100 images for testing, while the synthetic subset (LOLv2 synthetic) has 900 training images and 100 test images, using PSNR, SSIM and LPIPS as evaluation indicators.
[0131] For unpaired data, the present invention uses five datasets: LIME, MEF, NPE, VV and DICM, and adopts NIQE as the evaluation indicator.
[0132] Among them, LOL (Deep Retinex Decomposition for Low-Light Enhancement): contains paired datasets of low-light / normal-light images;
[0133] PSNR (Peak Signal-to-Noise Ratio): Peak signal-to-noise ratio;
[0134] SSIM (Structural Similarity Index): structural similarity;
[0135] LPIPS (Learned Perceptual Image Patch Similarity): can learn to perceive image patch similarity;
[0136] LIME (Low-light Image Enhancement via Illumination Map Estimation): A dataset for enhancing low-light images through illumination map estimation.
[0137] MEF (Power-constrained contrast enhancement for emissive displays based on histogram equalization): a dataset of power-constrained contrast enhancement technology for emissive displays based on histogram equalization;
[0138] NPE (Naturalness preserved enhancement algorithm for non-uniform illumination images): a dataset of naturalness preserved enhancement algorithms for non-uniform illumination images.
[0139] VV (Busting image enhancement and tone-mapping algorithms: A collection of the most challenging cases from Vassilios Vonikakis): Busting image enhancement and tone-mapping algorithms: A collection of the most challenging cases from Vassilios Vonikakis;
[0140] DICM (Contrast enhancement based on layered difference representation): a dataset of contrast enhancement techniques based on layered difference representation;
[0141] NIQE (Natural Image Quality Evaluator): Natural image quality evaluator.
[0142] The present invention will use several state-of-the-art methods such as LIME, Retinex-Net, KinD, EnGAN and the low-light image enhancement neural network CPGA-Net+ proposed in the present invention to conduct experiments on benchmark datasets and evaluate the experimental results.
[0143] Table 1 Comparison table of the present invention and SOTA method on paired data sets
[0144]
[0145] Table 2 Comparison of image quality of the present invention in unpaired data
[0146] Method NIQE↓ MEF LIME NPE VV DICM Avg Low-light Image 4.265 4.438 4.319 3.535 4.255 4.162 NPE 3.524 3.905 3.953 2.524 3.76 3.533 LIME 3.72 4.155 4.268 2.489 3.846 3.696 EnlightenGAN 3.232 3.719 4.113 2.581 3.57 3.443 KinD 3.883 3.343 3.724 2.321 2.989 3.252 Zero-DCE 4.041 3.789 3.504 2.753 3.102 3.438 RUAS 4.14 4.29 4.871 3.509 4.542 4.27 IAT 3.619 4.172 3.289 2.527 3.033 3.328 PairLIE 4.086 4.311 4.089 3.16 3.242 3.778 FLIGHT-Net 3.549 3.705 3.331 2.944 2.898 3.285 CPGA-Net 3.87 3.707 3.548 2.264 2.693 3.216 CPGA-Net+(Proposed) 3.5 3.066 3.083 1.913 2.827 2.878
[0147] According to the results in Tables 1 and 2, the first and second places are indicated in bold and underline respectively. Compared with other methods, the method of the present invention reaches a high standard, ranking third on paired datasets and first on five sets of unpaired datasets, while the model is still a lightweight design with low number of parameters and FLOPs. In addition, the method using the CPGA architecture presents better quality on unpaired data, which means that the improved theoretical equation assumptions are closer to nature, making the image more realistic. In addition, the method in the present invention successfully improves the performance by 5% SSIM over CPGA-Net with the same architecture while maintaining a lightweight design.
[0148] S3. Based on the trained low-light image enhancement neural network, ablation experiments are performed on the extended gamma correction attention module, the number of channel prior modules and the loss function to obtain the enhanced image.
[0149] In one embodiment, the ablation experiment of the extended gamma correction attention module, the number of channel prior modules and the loss function based on the trained low-light image enhancement neural network comprises the following steps:
[0150] S41. Based on gamma correction and attention mechanism, an ablation experiment is conducted on the extended gamma correction attention module.
[0151] In one embodiment, the ablation experiment of the extended gamma correction attention module based on the gamma correction combined with the attention mechanism comprises the following steps:
[0152] S411. Establish attention mechanism based on gamma correction;
[0153] S412. Fusion the gamma correction from the global branch to the local branch, and conduct ablation experiments on the extended gamma correction attention module.
[0154] S42. Based on the low-light image enhancement neural network, an ablation experiment was performed by changing the number of channel prior modules.
[0155] In one embodiment, the ablation experiment based on the low-light image enhancement neural network by changing the number of channel prior modules includes the following steps:
[0156] S421, based on the low-light image enhancement neural network, gradually changing the number of channel prior modules;
[0157] S422. Evaluate the model performance under each configuration respectively, and record the number of parameters and computational cost.
[0158] S43. Based on the default settings of the low-light image enhancement neural network, an ablation experiment is performed on the loss function.
[0159] In one embodiment, the ablation experiment on the loss function based on the default setting of the low-light image enhancement neural network includes the following steps:
[0160] S431, based on the default settings of the low-light image enhancement neural network, conduct ablation experiments on the loss function;
[0161] S432. Combine the loss function after the ablation experiment to obtain the best overall monitoring performance.
[0162] It should be explained that the present invention will analyze the effectiveness of each system module and training technique, including the design of the CPGA block, the number of CP blocks and the loss function.
[0163] Table 3 Ablation study on CPGA module design
[0164]
[0165] Table 4 Ablation study on the number of CP modules
[0166] N PSNR↑ SSIM↑ LPIPS↓ # of P.(M) FLOPs(G) 0 20.56 0.754 0.25 0.034 4.243 2 22.53 0.812 0.205 0.06 9.356 4 21.93 0.805 0.215 0.087 14.503
[0167] Table 5 Ablation study of loss function
[0168]
[0169] First, as shown in Table 3, ablation experiments are performed on the design of the CPGA block. The results show that gamma correction can be effectively fused from the global branch to the local branch, thereby improving the overall performance and demonstrating the advantages of the method in the present invention. By building the attention mechanism on the basis of gamma correction, the enhancement process is ensured to be consistent with the nonlinearities inherent in the imaging process and human perception. As shown in Table 4, ablation experiments are performed on the number of CP blocks. The results show that increasing the number of CP blocks leads to an improvement from 0 blocks to 2 blocks, but there is no significant change from 2 blocks to 4 blocks. However, with the increase of CP blocks, the number of parameters and computational cost (FLOPs) will increase, resulting in greater computational requirements. Therefore, the optimal number of CP blocks should balance performance gain and resource efficiency. For the final design of the method in the present invention, 2 CP blocks were selected to achieve a lightweight and efficient design.
[0170] Finally, as shown in Table 5, ablation experiments are performed on the loss functions. L1 loss, perceptual loss, HDR L1 loss, and SSIM loss are tested, and the results show that the combination of L1 and perceptual loss performs well with the default settings in CPGA-Net, with a PSNR improvement of +2.82dB and a SSIM improvement of +2.4%. HDR L1 loss significantly enhances all three indicators, with a PSNR increase of +2.86dB, a SSIM increase of +4.1%, and a LPIPS reduction of 0.09. Although SSIM loss improves the SSIM gain by 3.1%, it is less effective in improving PSNR. Finally, combining all these losses together can achieve the best overall monitoring performance, with a PSNR of 4.04dB, a SSIM of 8.3%, and a LPIPS of -0.12.
[0171] According to another embodiment of the present invention, an image enhancement system based on a gamma correction prior driven attention mechanism is also provided. Figure 2 As shown, the image enhancement system includes a neural network construction module 1, a neural network training module 2 and an ablation experiment module 3;
[0172] A neural network building module 1, used to build a low-light image enhancement neural network based on a pre-configured network structure;
[0173] A neural network training module 2 is used to train and evaluate a neural network for evaluating low-light image enhancement based on a pre-selected loss function, training data set, and evaluation index;
[0174] Ablation experiment module 3 is used to perform ablation experiments on the extended gamma correction attention module, the number of channel prior modules and the loss function based on the trained low-light image enhancement neural network to obtain the enhanced image.
[0175] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An image enhancement method based on a gamma correction prior driven attention mechanism, characterized in that: The image enhancement method comprises the following steps: S1. Build a low-light image enhancement neural network based on a pre-configured network structure; S2, training and evaluating the low-light image enhancement neural network based on the pre-selected loss function, training data set and evaluation index; S3. Based on the trained low-light image enhancement neural network, ablation experiments are performed on the number of extended gamma correction attention modules, channel prior modules, and loss functions to obtain enhanced images. The low-light image enhancement neural network includes a channel prior module for fusing original RGB channel features and an extended gamma correction attention module for estimating global features.
2. The image enhancement method based on gamma correction prior driven attention mechanism according to claim 1, characterized in that: The method of constructing a low-light image enhancement neural network based on a preconfigured network structure, wherein the low-light image enhancement neural network includes a channel prior module and an extended gamma correction attention module, comprises the following steps: S11, channel prior module obtained based on Retinex theory and pre-configured atmospheric scattering model; S12. Introduce gamma correction in the attention process, and combine it with the channel prior module to use global features to estimate the optimal gamma correction of the feature channel to obtain the extended gamma correction attention module.
3. The image enhancement method based on gamma correction prior driven attention mechanism according to claim 2, characterized in that: The method for obtaining a channel priori module based on Retinex theory and a pre-configured atmospheric scattering model comprises the following steps: S111, couple the Retinex theory and the pre-configured atmospheric scattering model and transform it into a parameter learning model; S112. Reconstruct the network structure expression of the parameter learning model using the convolutional network layer and the residual network layer to obtain the channel prior module.
4. The image enhancement method based on gamma correction prior driven attention mechanism according to claim 2, characterized in that: The expressions of the channel prior module and the extended gamma correction attention module are: Where L′ represents the mapped input tensor with matching channels, represents the complement of atmospheric light intensity, t represents atmospheric transmittance, F represents the input feature map, and F CP represents the channel prior characteristics, Represents gamma-corrected features and the original feature R att The attention features established, Represents the gamma-corrected feature, R att Represents the original feature of attention.
5. The image enhancement method based on gamma correction prior driven attention mechanism according to claim 1, characterized in that: The loss functions include L1 loss, perceptual loss, HDR loss and SSIM loss; When the low-light image enhancement neural network is trained using matching data, the training data set includes a LOLv1 data set and a LOLv2 data set, the LOLv2 data set includes a real capture subset and a synthetic subset, and the evaluation indicators include peak signal-to-noise ratio, structural similarity, and learnable perceptual image block similarity; When the low-light image enhancement neural network is trained using unmatched data, the training data set includes a low-light image data set enhanced by illumination map estimation, an emissive display power-limited contrast enhancement technology data set based on histogram equalization, a naturalness enhancement algorithm data set for non-uniform illumination images, a cracked image enhancement and tone mapping algorithm data set, and a contrast enhancement technology data set based on hierarchical difference representation, and the evaluation index includes a natural image quality evaluator.
6. The image enhancement method based on gamma correction prior driven attention mechanism according to claim 1, characterized in that: The ablation experiment of the extended gamma correction attention module, the number of channel prior modules and the loss function based on the trained low-light image enhancement neural network includes the following steps: S41, based on gamma correction and combined with the attention mechanism, an ablation experiment is conducted on the extended gamma correction attention module; S42, based on low-light image enhancement neural network, ablation experiments were performed by changing the number of channel prior modules; S43. Based on the default settings of the low-light image enhancement neural network, an ablation experiment is performed on the loss function.
7. The image enhancement method based on gamma correction prior driven attention mechanism according to claim 6, characterized in that: The ablation experiment of the extended gamma correction attention module based on the gamma correction combined with the attention mechanism includes the following steps: S411. Establish attention mechanism based on gamma correction; S412. Fusion the gamma correction from the global branch to the local branch, and conduct ablation experiments on the extended gamma correction attention module.
8. The image enhancement method based on gamma correction prior driven attention mechanism according to claim 6, characterized in that: The ablation experiment based on the low-light image enhancement neural network by changing the number of channel prior modules includes the following steps: S421, based on the low-light image enhancement neural network, gradually changing the number of channel prior modules; S422. Evaluate the model performance under each configuration respectively, and record the number of parameters and computational cost.
9. The image enhancement method based on gamma correction prior driven attention mechanism according to claim 6, characterized in that: The ablation experiment on the loss function based on the default setting of the low-light image enhancement neural network includes the following steps: S431, based on the default settings of the low-light image enhancement neural network, conduct ablation experiments on the loss function; S432. Combine the loss function after the ablation experiment to obtain the best overall monitoring performance.
10. An image enhancement system based on a gamma correction prior-driven attention mechanism, used to implement the image enhancement method based on a gamma correction prior-driven attention mechanism according to any one of claims 1 to 9, characterized in that: The image enhancement system includes a neural network building module, a neural network training module and an ablation experiment module; A neural network building module for building a low-light image enhancement neural network based on a pre-configured network structure; A neural network training module is used to train and evaluate the low-light image enhancement neural network based on a pre-selected loss function, training data set, and evaluation index; The ablation experiment module is used to perform ablation experiments on the extended gamma correction attention module, the number of channel prior modules and the loss function based on the trained low-light image enhancement neural network to obtain the enhanced image.
Citation Information
Patent Citations
Photographing method based on low-illumination image enhancement algorithm of brightness attention mechanism
CN111915526A
Low-illumination image enhancement method based on fusion of multiple neural network structures
CN112435191A
Image enhancement method and device, electronic equipment and storage medium
CN116703745A
Low-illumination image enhancement method based on feature fusion and attention embedding
CN116797488A
Physical model and prior fused low-illumination image enhancement method
CN117974459A
Cited By
Enhanced information display method and device, computer equipment and storage medium
CN120182548A
Underwater image enhancement method based on tensor learnable prior
CN121582127A