Transform low-light image enhancement method based on dynamic four-prior

By combining dynamic four-prior estimation and frequency domain channel attention mechanism, the adaptability and noise suppression problems of low-light image enhancement methods under complex lighting conditions are solved, achieving high-quality image enhancement effects and improving the visual perception and recognition accuracy of autonomous driving, security monitoring and drone navigation.

CN121998883APending Publication Date: 2026-05-08KUNSHAN INNOVATION RES INST OF XIAN UNIV OF ELECTRONIC SCI & TECH +2

Patent Information

Application Number
CN202610134709.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-30
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing low-light image enhancement methods have poor adaptability under complex lighting conditions, insufficient noise suppression, and poor preservation of color and structural information. They are also difficult to separate noise and high-frequency details in multi-channel processing, resulting in uneven exposure, noise amplification, and color distortion in the enhanced image.

Method used

A dynamic four-prior estimator based on Kubelka-Munk theory is used to generate illumination-invariant and spatially adaptive four-prior features, which guide the multi-head self-attention mechanism of Transformer. A frequency domain channel attention mechanism is also introduced to collaboratively optimize spatial and frequency domain feature representations. The importance of the priors in different image regions is adaptively adjusted through a dynamic weight generation module.

Benefits of technology

It significantly improves the exposure uniformity, color fidelity, detail recovery, and noise suppression of image enhancement, effectively enhancing image quality in complex low-light scenes and improving the visual perception and recognition accuracy of applications such as autonomous driving, security monitoring, and drone navigation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998883A_ABST
    Figure CN121998883A_ABST
Patent Text Reader

Abstract

The invention discloses a Transform low-light image enhancement method based on dynamic four-priori, and the method comprises the steps: obtaining a low-light image data set, and dividing the low-light image data set into a training sample set, a verification sample set and a test sample set; a Transform low-light image enhancement model DQPGT based on the dynamic four priori is constructed; inputting the training sample set into a DQPGT model to train the model, and verifying the model through the verification sample set to complete training of the DQPGT model; inputting a test sample set into the trained model for image enhancement and then outputting the test sample set; according to the method, spatial and frequency domain feature representation is collaboratively optimized on the basis of dynamic four-priori estimation and a frequency domain channel attention mechanism, so that the problems of uneven exposure, noise amplification and color distortion of an existing method based on the Retinex theory under a complex real illumination condition are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of low-light image enhancement technology, and more specifically to a Transformer low-light image enhancement method based on dynamic four priors. Background Technology

[0002] Low-light image enhancement technology is an important research direction in the fields of computer vision and image processing. This technology aims to improve the quality of images acquired under low-light conditions, enhancing image brightness, contrast, and detail visibility to meet the high requirements for visual quality and information integrity in practical applications such as autonomous driving, security monitoring, medical imaging, and drone navigation. In low-light environments, images often suffer severe degradation, such as uneven exposure, noise interference, and color distortion, which not only affect human visual perception but also hinder the performance of high-level vision tasks.

[0003] Image enhancement techniques face numerous challenges in complex low-light scenes. Traditional methods mainly include pixel-based histogram equalization and gamma correction. While these methods can directly improve image brightness, they ignore the characteristics of illumination distribution and are prone to introducing artifacts under complex lighting conditions. Methods based on Retinex theory decompose the image into reflection and illumination components, achieving physically interpretable enhancement. However, these methods assume smooth illumination, which is difficult to adapt to the complex and variable lighting conditions in the real world. This leads to distortion of the decomposed reflection component, resulting in problems such as noise amplification, color shift, and structural distortion in the enhanced image.

[0004] In recent years, deep learning technology has significantly promoted the development of low-light image enhancement. Early methods based on convolutional neural networks (CNNs) included end-to-end models and multi-stage Retinex decomposition frameworks. The former often resulted in visually unnatural enhancement effects, while the latter had high training complexity. Unsupervised methods reduced their dependence on paired data through adversarial learning and curve estimation strategies, but still had limitations in suppressing noise and color cast. With the widespread application of the Transformer architecture in vision tasks, its global modeling capabilities have been introduced into the field of low-light enhancement. Works such as UFormer, SNR-Net, and Retinexformer utilize self-attention mechanisms to improve illumination restoration and detail reconstruction. However, most existing Transformer methods rely on feature maps obtained from Retinex decomposition as prior guidance, which still has significant shortcomings in color fidelity and structure preservation, limiting further improvements in model performance.

[0005] The existing technology is as follows:

[0006] CN202411939652 discloses an image enhancement method combining Retinex theory and wavelet transform, trained and inferred within the Transformer framework. This method introduces a perturbation term into the Retinex model to more accurately simulate image degradation in low-light environments. Simultaneously, it utilizes wavelet transform to decompose the image into high-frequency and low-frequency components, performing enhancement and noise reduction separately to preserve details. Furthermore, a gated fusion module is designed to adaptively fuse upsampling and downsampling features from the encoder and decoder, balancing noise suppression and detail preservation. The self-attention mechanism of the Transformer is used to model global dependencies, improving the enhancement effect. However, this method has limitations. Its assumption of illumination smoothing based on Retinex theory does not align with complex real-world lighting conditions, easily leading to noise amplification and color shift in the enhanced image. Additionally, it struggles to distinguish noise from high-frequency details in multi-channel processing and lacks a frequency-domain cross-channel feature calibration mechanism.

[0007] CN202411391478 discloses a method combining convolution, Transformer, and diffusion models to enhance low-light images through low-light feature priors, improving extremely dark areas and reducing artifacts. This method first recovers local details using a convolutional network, with feature maps guiding a Transformer to repair extremely dark areas. Subsequently, features are fused to obtain coarse-grained results, which are then fine-grained through a block-based diffusion model. The drawback of this method is that in low-light feature extraction, grayscale conversion discards multi-channel information and lacks dynamic weights. Feature fusion uses fixed interpolation, assigning weights based on single-channel images, which cannot dynamically adapt to regional requirements, resulting in incomplete feature representation and insufficient enhancement of region specificity.

[0008] Therefore, in order to address the problems of poor adaptability, insufficient noise suppression, and unsatisfactory preservation of color and structural information in existing low-light image enhancement methods under complex lighting conditions, there is an urgent need for a new enhancement framework that can more effectively integrate physical priors and has dynamic adaptability and multi-dimensional optimization capabilities. Summary of the Invention

[0009] The purpose of this invention is to provide a Transformer low-light image enhancement method based on dynamic four-priority. This method constructs illumination-invariant and spatially adaptive four-prior features using a dynamic four-prior estimator based on Kubelka-Munk theory, guiding the Transformer's multi-head self-attention mechanism. This addresses the problem that existing Retinex-based methods cannot accurately represent illumination information under complex real-world lighting conditions, leading to uneven exposure, noise amplification, and color distortion in the enhanced image. Simultaneously, a frequency-domain channel attention mechanism is introduced to solve the problem that existing methods struggle to separate noise and high-frequency details in multi-channel processing, resulting in noise amplification and detail loss. By calibrating cross-channel feature responses, channels dominated by high-frequency components are enhanced, while noise-dominated channels are suppressed, thereby collaboratively optimizing features in both the spatial and frequency domains.

[0010] The technical solution adopted in this invention is as follows: a Transformer low-light image enhancement method based on dynamic four priors, the method comprising: Obtain a low-light image dataset and divide it into a training sample set, a validation sample set, and a test sample set; Model construction: Construct a Transformer low-light image enhancement model DQPGT based on dynamic four priors; The training model is trained by inputting the training sample set into the DQPGT model and then verifying it using the verification sample set. The output results are obtained by inputting the test sample set into the trained model, performing image enhancement, and then outputting the results.

[0011] Furthermore, the construction of the Transformer low-light image enhancement model DQPGT based on dynamic four priors specifically includes: first, generating dynamic four priors through a dynamic four prior estimator, and then guiding the generation of a loss repairer based on the dynamic four priors and the Transformer framework.

[0012] Furthermore, the generation of the dynamic four prior features is as follows: Input image The input image is divided into three channels: RGB, and its size is [size missing]. ; The spectral quantities of the input image are measured using a Gaussian color model, and the three spectral quantities are approximated by a linear transformation of the RGB pixel values. As shown in the following formula: (1) In the formula, for The matrix, whose parameters are obtained through training, The input image contains the spatial x and y coordinates. For wavelength, , for right The first and second partial derivatives; The obtained spectral quantities and the scale parameters of the input image are output to a Gaussian filter, and scale-adjustable Gaussian filtering is applied to each of the three spectral components to generate basic features. and derivative characteristics ,right exist The feature is obtained by taking the partial derivative of the direction. ; Using the spectral quantities and characteristics described above Obtain four prior feature maps Through four prior feature maps Obtain dynamic four prior features.

[0013] Furthermore, in the generation of the dynamic four prior features, the acquisition of the scale parameter of the input image specifically involves processing the input image... The process is handled through three convolutional layers, with two interleaved layers. Activation function, to obtain the Gaussian filter scaling parameters ; The features Specifically, it is obtained using the following formula: (2) (3) (4) (5) (5) In the formula, for In the generation step, the first Characteristics of each stage The convolution kernel is The number of output channels is Step length , Convolution operation, For Silu activation function, For the scale Gaussian filtering operation.

[0014] Furthermore, by substituting the acquired spectral features into three prior calculation formulas, three sizes are obtained. Prior feature map As shown in the following formula: (6) (7) (8) (9) In the formula, It is the arctangent function. It is a logarithmic function. It is the tangent function. for exist Component of direction; The fourth prior definition is as follows: (10) In the formula, They represent The relative order of channels in the RGB color space, and the normalized value range. ; Four prior feature maps Features are obtained by splicing channels. As shown in the following formula: (11) In the formula, For channel splicing operations; The input image is fed into the dynamic weight generation module, which adaptively predicts four prior features based on the features of the input image. The weights are as follows: (12) (13) (14) In the formula, For the weight generation process Characteristics of each stage Use the Softmax activation function; The obtained weights are multiplied element-wise with the corresponding prior features to obtain the final weights. Then the obtained features After convolution kernel size is The convolution is adjusted to have 3 channels, resulting in a size of [size missing]. Dynamic four priors As shown in the following formula: (15) (16) In the formula, This is the Hadamard product operation on the feature map.

[0015] Furthermore, the loss repairer built on the Transformer framework specifically includes an encoder, an intermediate layer, and a decoder, wherein both the encoder and the decoder integrate a multi-head self-attention module. With convolutional layers.

[0016] Furthermore, the encoder specifically adopts a hierarchical feature extraction architecture, the specific process of which includes: firstly, increasing the number of channels in the input image to complete the initial feature mapping; then, passing the initial features through a... The module integrates local context and global dependencies, performs secondary channel number enhancement and introduces spatial downsampling after fusion, and then the fused features are sequentially processed through two cascaded layers. The module models deep semantic associations and structured information. Finally, the number of channels is increased three times to complete the fusion and compression of high-level features, and the final multi-channel feature map is output to the intermediate layer. The intermediate layer includes two Module cascading, the specific process includes: the first The module receives the multi-channel feature map output by the encoder, performs initial feature cleansing and enhancement, and outputs the processing result to the second module. The module then undergoes a second round of in-depth interaction and context fusion. The decoder employs a symmetrical hierarchical upsampling structure. The specific process includes: initial upsampling of the intermediate layer output features to reduce the number of channels; concatenating the reduced-channel features with the intermediate features of the corresponding layer of the encoder to achieve the fusion of deep semantic information and shallow spatial details; and then sequentially passing the fused features through two cascaded layers. The module performs feature manipulation and context association, reduces the number of channels in the obtained features twice, and concatenates them with the early intermediate features of the encoder, injecting low-level details. Finally, the features after secondary fusion are processed by a... The module performs feature optimization, mapping and fine-tuning the optimized features through convolutional layers to output enhanced images with high visual quality.

[0017] Furthermore, the aforementioned Specifically, the module is a core computational unit that integrates multi-head self-attention and feedforward networks. The input features first pass through a normalization layer. After stabilization preprocessing, the system proceeds to the dynamic four-prior-guided multi-head self-attention module. The Attention weight allocation is guided by a dynamic four-prior approach, and the output of the attention module is passed through another normalization layer. Then, it is fed into the feedforward network. The features are fused and enhanced through nonlinear transformation, as shown in the following formula: (17) (18) (19) (20) (twenty one) In the formula, for The first in the module Characteristics of the stage for The module's input image, For normalization layer, This is a matrix addition operation. It is a multi-head self-attention module guided by dynamic four priors. For feedforward network layer, For frequency domain channel attention modules, for The module outputs an image; where The multi-head self-attention calculation process is as follows: (twenty two) (twenty three) (twenty four) (25) (26) (27) (28) (29) (30) (31) (32) (33) In the formula, The number of channels is The dynamic four prior features, for Input features, all of which are of the following dimensions. , For different stages The number of feature processing channels in the module For channel splitting operation, The input features are those obtained after multi-head splitting. The dynamic four prior features are derived from the multi-head split. For the number of heads, The input feature of a certain head, with a size of , For a given head, the dynamic four prior features are of size . ; To make feature size Convert to , The input features of one end after splitting are... This represents the dynamic four prior features of a given end after splitting. For the first The query for size, key, value, and dimension are all... , For the first A fully connected layer, For the first Attention calculation results based on size This is a matrix transpose operation. For the first Trainable scaling parameters for the size; To make feature size Convert to , For Gelu activation functions, For the first The location encoding information of the head, with a size of ; For the feature output of a certain head, the size is ; for Output features, size is .

[0018] Furthermore, the training model specifically includes: Set initialization iteration parameters; From the training sample set Random selection without replacement Each training sample is input as the original image into the DQPGT model to generate the augmented result image. Using mean absolute error loss Perceived loss Structural similarity loss Weighted generation total loss function To calculate the enhancement results and real images The loss is used to update the model's weights; Determine whether the training sample set has been completed. A complete traversal is performed. If the result is positive, the next verification step is performed. Otherwise, the model DQPGT is input for weight update. Verification set Input the model in the current training phase for forward inference, calculate the peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) on the validation set. If neither of the two indicators improves for several consecutive cycles, it is determined that the model has converged or is overfitting, and training is terminated early; otherwise, proceed to the next step. If the model fails to converge or is overfitted, then check the inequality between the initial parameters and the maximum iteration parameters. If the condition is met, the trained Transformer low-light image enhancement model DQPGT based on dynamic four priors is obtained; otherwise, the initialization parameters are set to... And perform weight updates.

[0019] In summary, due to the adoption of the above technical solution, the beneficial effects of this application are: This invention presents a Transformer-based low-light image enhancement method based on dynamic four-prior estimation. By leveraging dynamic four-prior estimation and a frequency-domain channel attention mechanism, it collaboratively optimizes spatial and frequency-domain feature representations, thereby addressing the problems of uneven exposure, noise amplification, and color distortion encountered by existing Retinex-based methods under complex real-world lighting conditions. This invention constructs a dynamic four-prior estimator, generating illumination-invariant and spatially adaptive four-prior features based on Kubelka-Munk theory. A dynamic weight generation module adaptively adjusts the importance of each prior in different image regions. Simultaneously, a multi-head self-attention mechanism guided by dynamic four-prior estimation and a frequency-domain channel attention module are introduced into the Transformer architecture's loss repairer to enhance global dependency modeling and cross-channel feature response calibration, respectively. This method exhibits significant advantages in complex low-light scenes, effectively improving exposure uniformity, color fidelity, detail recovery, and noise suppression in image enhancement. Furthermore, it outperforms existing state-of-the-art methods in multiple quantitative indicators and visual quality assessments. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating the low-light image enhancement method of the Transformer based on dynamic four priors of the present invention. Figure 2 This is a diagram of the overall network structure in the Transformer low-light image enhancement method based on dynamic four priors of this invention. Figure 3 This is a schematic diagram of the DQPG-AB, DQPG-MSA, and FCAN modules in the Transformer low-light image enhancement method based on dynamic four priors of the present invention. Figure 4 This is a schematic diagram of the dynamic four-prior mechanism in the Transformer low-light image enhancement method based on dynamic four priors of the present invention; Figure 5This is a graph showing the experimental results of the LOL-v1 dataset in an embodiment of the present invention; Figure 6 This is a graph showing the experimental results of the LOL-v2-real dataset in an embodiment of the present invention; Figure 7 This is a graph showing the experimental results of the LOL-v2-sys dataset in an embodiment of the present invention; Figure 8 This is a graph showing the experimental results of a dataset without real labels in an embodiment of the present invention; Figure 9 The images shown are experimental results of target detection before and after image enhancement in an embodiment of the present invention. Detailed Implementation

[0021] The present invention will now be described in detail with reference to the accompanying drawings.

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the 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 merely illustrative and not intended to limit the invention.

[0023] This invention proposes a Transformer low-light image enhancement network model, DQPGT, based on dynamic four priors. Its key feature lies in constructing an end-to-end enhancement framework that integrates physical priors and an attention mechanism. This method uses a dynamic four-prior estimator to extract four illumination-invariant features—hue, chroma, structure, and color relative relationships—from the input image based on Kubelka-Munk theory. A dynamic weight generation module is introduced to adaptively adjust the importance of each prior in different regions according to the image content. Furthermore, a multi-head self-attention mechanism guided by dynamic four priors is designed, incorporating prior features into the Transformer's attention calculation, enabling the model to focus on key regions and effectively improve structural integrity and color fidelity. Simultaneously, a frequency domain channel attention module is embedded in the network. Through frequency domain analysis and recalibration of multi-channel features, high-frequency detail-dominant channels are enhanced, while noise channels are suppressed, complementing spatial attention. Finally, a Transformer network with an encoder-intermediate-decoder structure, combined with skip connections and multi-stage feature fusion, achieves high-quality, high-fidelity enhancement of low-light images, as illustrated in the following embodiments.

[0024] Example This embodiment provides a Transformer low-light image enhancement method based on dynamic four priors, such as... Figure 1 As shown, please follow these steps: Step 1: Divide the training sample set from the publicly available low-light image dataset LOL. Validation sample set and test sample set ; The LOL dataset comprises three different versions: LOL-v1, LOL-v2-real, and LOL-v2-syn. Each version provides images in low-light scenarios and their corresponding normal-light reference images. LOL-v1 and LOL-v2-real consist of images captured from the real world, while LOL-v2-syn uses synthetically generated image data. The data distribution for each version is as follows: LOL-v1 contains 500 paired images, with 400 pairs selected as the training set, 47 pairs as the validation set, and 53 pairs as the test set; LOL-v2-real contains 789 paired images, with 629 pairs selected as the training set, 75 pairs as the validation set, and 85 pairs as the test set; LOL-v2-syn contains 1000 paired images, with 800 pairs selected as the training set, 100 pairs as the validation set, and 100 pairs as the test set.

[0025] Step 2, as follows Figure 2 As shown, the Transformer low-light image enhancement model DQPGT based on dynamic four priors is constructed, specifically implemented according to the following steps: Step 2.1: Generate dynamic four priors using a dynamic four-prior estimator. : The input image is divided into three channels: RGB (red, green, and blue), with a size of [missing information]. Input image (height × width × number of channels) For example, when processing low-light images, spectral quantities cannot be directly measured from RGB images. To solve this problem, this embodiment uses a Gaussian color model to approximate the calculation of the three spectral quantities through a linear transformation of RGB pixel values. The specific relationship is defined as follows: (1) In the formula, for The matrix, whose parameters are obtained through training, The input image contains the spatial x and y coordinates. For wavelength, , for right The first and second partial derivatives; Input image Using three convolution kernels Convolution processing with stride of 1 and padding of 1, interspersed twice. The activation function yields a size of Gaussian filter scaling parameters And limit its value to Within the range; the predicted spectral quantities and scale parameters are output to a Gaussian filter, and scale-adjustable Gaussian filters are applied to the three spectral components to generate the basic features. and derivative characteristics ,right exist The feature is obtained by taking the partial derivative of the direction. As shown in the following formula: (2) (3) (4) (5) (5) In the formula, for In the generation step, the first Characteristics of each stage The convolution kernel is The number of output channels is Step length , Convolution operation, For Silu activation function, For the scale Gaussian filtering operation.

[0026] like Figure 4 As shown, based on the three illumination-independent priors involved in Kubelka-Munk theory, from a physical perspective, the priors... The spectral slope and curvature of the material's reflectance were quantified; this index is related to the material's hue, specifically corresponding to the arctangent of the maximum reflection wavelength; therefore, It can be used as a strong light invariant descriptor for hue, unaffected by changes in light intensity; prior. It is invariant to changes in illumination and depends only on the material's reflective properties; a priori By quantifying chromaticity through spectral variations, a color intensity metric independent of illumination is provided; prior The intensity-normalized spatial derivative of spectral energy is encoded, capturing structural details such as edges and textures. This prior condition enhances robustness to illumination changes while preserving key spatial features required for image reconstruction. Substituting the previously obtained spectral features into the three prior calculation formulas yields three dimensions... Prior feature map As shown in the following formula: (6) (7) (8) (9) In the formula, It is the arctangent function. It is a logarithmic function. It is the tangent function. for exist Component of direction; Fourth Prior Related to the relative relationship between RGB three-channel pixel values, some color information will be lost during the generation of the above three illumination invariants; in this embodiment, additional color information is introduced by utilizing the relative relationship between RGB three-channel pixel values, and the fourth prior definition is as follows: (10) In the formula, They represent The relative order of channels in the RGB color space, and the normalized value range. ; Thus, four prior feature maps were obtained. The features are obtained by splicing the channels. : (11) In the formula, For channel splicing operations; The input image is fed into the dynamic weight generation module, which adaptively predicts four prior features based on the features of the input image. The weights are assigned to allow the model to flexibly adjust the importance of different priors in different regions of the image based on the image content, as shown in the following formula: (12) (13) (14) In the formula, For the weight generation process Characteristics of each stage Use the Softmax activation function; The obtained weights are multiplied element-wise with the corresponding prior features to obtain the final weights. This achieves adaptive weighted adjustment of different prior features, and then the resulting features are... After convolution kernel size is The convolution is adjusted to have 3 channels, resulting in a size of [size missing]. Dynamic four priors This is subsequently used to guide the multi-head self-attention calculation, as shown in the following formula: (15) (16) In the formula, This is the Hadamard product operation on the feature map.

[0027] Step 2.2, build a loss repairer based on the Transformer framework: The loss repairer used in this embodiment consists of an encoder, an intermediate layer, and a decoder in sequence; both the encoder and the decoder integrate a multi-head self-attention module. With convolutional layers; the workflow of this loss insulator is as follows: Input image First, the image is downsampled by an encoder to extract deep features; these features are then passed to two... The intermediate layer, composed of modules, performs enhancement processing; finally, the processed features are upsampled by the decoder and fused with multi-stage features to output an enhanced image.

[0028] The encoder employs a hierarchical feature extraction architecture, progressively enhancing feature representation capabilities and expanding the receptive field. The input image first passes through a... The convolutional layer increases the number of channels to 70, achieving initial feature mapping; subsequently, the features are passed through a... Modules are used to integrate local context and global dependencies, enhancing the representation capabilities of key features; next, a layer... Convolution further expands the number of channels to 140, enhancing feature diversity and introducing some spatial downsampling; subsequently, the features are sequentially processed through two cascaded convolutions. The modules progressively model deeper semantic relationships and structured information; finally, another layer... Convolution increases the number of channels to 280, further fusing and compressing high-level features, and outputting the final feature map to the intermediate layer; the entire encoding process gradually abstracts visual features while expanding the channels, forming a structure with multi-scale perception capabilities; specifically as follows: (34) (35) (36) (37) (38) In the formula, For the encoder Characteristics of the stage This is a dynamically oriented four-prior-guided attention module.

[0029] The middle layer consists of two The module is cascaded; this design aims to perform deep modeling and information condensation of the high-level features of the encoder output; the first... The module receives multi-channel features from the encoder and, through a dynamic four-prior guidance mechanism, efficiently focuses on key information within the vast feature space, suppressing redundancy and completing the initial feature cleanup and enhancement; the result is output to the second... The module performs a second deep interaction and context fusion; this cascaded structure allows the network to perform more complex nonlinear transformations, filtering noise layer by layer and consolidating global semantic representations; this intermediate layer is designed to improve the model's ability to capture complex patterns and long-range dependencies, and to lay the foundation for subsequent decoding processes; specifically as follows: (39) In the formula, These are the features after processing by the intermediate layer.

[0030] The decoder employs a symmetrical hierarchical upsampling structure, progressively fusing the skip connection features passed from the encoder to accurately reconstruct spatial details and generate the final enhanced image. First, the intermediate layer output is passed through a... Deconvolution is used for initial upsampling, reducing the number of channels to 140; this result is compared with intermediate features from the corresponding layer of the encoder. Channel splicing is performed to achieve the first fusion of deep semantic information and shallow spatial details; subsequently, a Convolution performs cross-channel interaction and compression on the concatenated features, stabilizing the number of channels at 140; further, the fused features are then sequentially passed through two cascaded convolutions. The module performs in-depth feature manipulation and context association to further improve the robustness and consistency of features; the resulting features are then processed by another layer. Deconvolution upsampling reduces the number of channels to 70 and incorporates earlier intermediate features from the encoder. The features are then stitched together to inject richer underlying details such as edges and textures; finally, the features after secondary fusion also undergo a... The convolutions are consolidated, maintaining 70 channels, and then fed into a... The module performs final feature optimization; ultimately, one layer Convolution maps and fine-tunes features, reducing the number of channels to 3 and directly outputting a high-quality enhanced image. The entire decoding process effectively restores the spatial resolution and details of the image, while skip connections are used to avoid information loss and ensure the naturalness of the enhancement result. Specifically, the formula is as follows: (40) (41) (42) (43) (44) (45) (46) In the formula, For the decoder Characteristics of each stage To ultimately enhance the image, For the deconvolution kernel is The number of output channels is Step length , The deconvolution operation.

[0031] In this embodiment The module is a core computing unit integrating multi-head self-attention and feedforward networks. This embodiment innovatively introduces dynamic four-prior guidance and frequency domain channel attention to collaboratively capture global dependencies and local contextual features. The input features first pass through a normalization layer. After stabilization preprocessing, the system proceeds to the dynamic four-prior-guided multi-head self-attention module. This module guides attention weight allocation through dynamic four-prior guidance, enabling the model to dynamically focus on key information regions in different contexts, thereby efficiently modeling long-range dependencies and complex spatial relationships; the output of the attention module is passed through another normalization layer. Then, it is fed into the feedforward network. Features are further fused and enhanced through nonlinear transformations; to strengthen the expressive power of local features, the output of the feedforward network is input to a frequency domain channel attention module. This module analyzes features in the frequency domain and adaptively recalibrates the weights of each channel to highlight important channel information and suppress noise, as shown in the following formula: (17) (18) (19) (20) (twenty one) In the formula, for The first in the module Characteristics of the stage for The module's input image, For normalization layer, This is a matrix addition operation. It is a multi-head self-attention module guided by dynamic four priors. For feedforward network layer, For frequency domain channel attention modules, for The module outputs an image; where The multi-head self-attention calculation process is as follows: (twenty two) (twenty three) (twenty four) (25) (26) (27) (28) (29) (30) (31) (32) (33) In the formula, The number of channels is The dynamic four prior features, for Input features, all of which are of the following dimensions. , For different stages The number of feature processing channels in the module For channel splitting operation, The input features are those obtained after multi-head splitting. The dynamic four prior features are derived from the multi-head split. For the number of heads, The input feature of a certain head, with a size of , For a given head, the dynamic four prior features are of size . ; To make feature size Convert to , The input features of one end after splitting are... This represents the dynamic four prior features of a given end after splitting. For the first The query for size, key, value, and dimension are all... , For the first A fully connected layer, For the first Attention calculation results based on size This is a matrix transpose operation. For the first Trainable scaling parameters for the size; To make feature size Convert to , For Gelu activation functions, For the first The location encoding information of the head, with a size of ; For the feature output of a certain head, the size is ; for Output features, size is .

[0032] like Figure 3 As shown, when the number of heads Attention mechanisms can process image features in different subspaces by dividing the image into multiple heads. Dynamic four prior features are introduced into attention computation. The structural and color features of the image guide the attention heads to adaptively focus on different regions, ensuring that semantically important regions receive higher weights. This significantly improves the structural integrity and color fidelity of the output image and enhances the visual quality of the image. The calculation process is shown in the following formula: (47) (48) (49) In the formula, for Input features, for Characteristics of different stages for The output characteristics.

[0033] The calculation process is shown in the formula: (50) (51) (52) In the formula, After channel splitting One portion, For discrete cosine transform, After discrete cosine transform Each frequency domain component It is a fully connected layer. For output features.

[0034] By processing multi-channel image features in the frequency domain, the dependencies between multiple channels can be efficiently modeled and the attention to key channels can be enhanced, while noise-related channels can be suppressed. This complements the attention calculation in the spatial domain, resulting in synergistic enhancement.

[0035] By processing multi-channel features in the frequency domain and analyzing the global statistical characteristics and spectral energy distribution of each channel, the interdependencies between channels are efficiently modeled. Key channels are adaptively enhanced while suppressing the responses of channels associated with noise or invalid information. This frequency domain operation effectively complements the attention computation in the spatial domain. Working together, they enhance the model's feature representation capabilities and the visual quality of the final output image. At this point, all modules involved in the DQPGT model have been completed.

[0036] Step 3: Iteratively train the Transformer low-light image enhancement model DQPGT based on dynamic four priors: Step 3.1, Set initialization iteration parameters In this embodiment, the maximum iteration parameter Set to 300000; Step 3.2, from the training sample set Random selection without replacement Each training sample is input as the original image into the DQPGT network to generate the augmented result image. Using mean absolute error loss Perceived loss Structural similarity loss Weighted generation total loss function To calculate the enhancement results and real images The loss is used to update the model's weights; the total loss function... The specific formula is as follows: (53) (54) (55) (56) In the formula, The weights for the three loss functions are as follows: To find the mean absolute error between the enhanced result and the real image pixels, To calculate the mean of the mean squared error, To extract features from the enhanced results and the real image using intermediate layers specified in the VGG16 network; To perform calculations in different local windows using a sliding window, The mean of the results for all windows is calculated. These represent the mean pixel values ​​of local windows in the enhanced image and the real image, respectively. These are the local window pixel variances of the enhanced image and the real image, respectively. To enhance the results and the local window pixel covariance of the real image; Step 3.3: Determine whether the training sample set has been completed. If a complete traversal is performed, proceed to step 3.4; otherwise, return to step 3.2. Step 3.4, validate the set Input the model in the current training phase for forward inference, calculate the peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) on the validation set. If neither index improves for five consecutive cycles, it is determined that the model has converged or is overfitting, and training is terminated early. Otherwise, proceed to step 3.5. Step 3.5, Determine If true, obtain the trained Transformer low-light image enhancement model DQPGT based on dynamic four priors; otherwise, let... Then proceed with steps 3.2 and 3.3; Step 4: Obtain the output of the Transformer low-light image enhancement model based on dynamic four priors: Test sample set The test samples are used as input to the trained Transformer low-light image enhancement model DQPGT based on dynamic four priors for forward inference. The PSNR and SSIM were measured to verify the model's performance; and the number of floating-point operations per second (FLOPS) and the total number of parameters (Params) of the model were calculated for comprehensive comparison.

[0037] The technical effects of this invention will be explained below with reference to simulation experiments: To verify the effectiveness of the proposed method in low-light image enhancement, experiments were conducted on three datasets: LOL-v1, LOL-v2-real, and LOL-v2-syn. The experimental results were compared with those of other methods on four evaluation metrics: PSNR, SSIM, FLOPS, and Params. The results are shown in Tables 1, 2, and 3.

[0038] Table 1 Comparison of the effects of the method of the present invention and the low-light image enhancement method based on the LOL-v1 dataset.

[0039] Table 2 Comparison of the effects of the method of the present invention and the low-light image enhancement method based on the LOL-v2-real dataset

[0040] Table 3. Comparison of the effects of the method of the present invention with low-light image enhancement methods based on the LOL-v2-sys dataset.

[0041] In summary, the experimental results demonstrate that the method described in this invention exhibits excellent performance even under relatively low computational complexity and parameter count conditions. Specifically, when tested on three datasets, this invention achieved leading results across multiple metrics on the LOL-v1 and LOL-v2-sys datasets; and on the LOL-v2-real dataset, the SSIM metric was also optimal.

[0042] In addition, such as Figure 5 , Figure 6 , Figure 7 , Figure 8 and Figure 9 As shown, by comparing the output image enhanced by the method of this invention with the output results of existing technologies, this invention achieves significant progress in the following technical effects: a better balance is achieved between exposure control and color fidelity; image detail and contrast are significantly improved in low-visibility areas; visual artifacts are avoided while effectively suppressing image noise; and the final output image colors conform to the perceptual characteristics of the human visual system. In a comprehensive comparison with other advanced methods, including those based on attention mechanisms, the method proposed in this invention demonstrates superior overall performance in multiple quantitative indicators and qualitative visual evaluations.

[0043] This invention presents a dynamic four-prior-based Transformer low-light image enhancement method with broad application prospects in multiple fields, particularly in addressing the challenges faced by existing low-light image enhancement methods under complex real-world lighting conditions. This method, through a dynamic four-prior estimator and a Transformer architecture, collaboratively optimizes spatial and frequency domain feature representations, thereby significantly improving the exposure uniformity, color fidelity, detail recovery, and noise suppression of image enhancement. In autonomous driving, this technology effectively improves visual perception quality in low-light environments, enhances target detection and recognition accuracy in nighttime or dimly lit scenes, and strengthens driving safety. In security monitoring, it enhances the clarity and detail visibility of nighttime surveillance images, facilitating more accurate identification of suspicious behavior or events and optimizing security efficiency. In UAV navigation, it improves the visual navigation and obstacle avoidance capabilities of UAVs in low-light environments, ensuring flight safety and mission reliability. Furthermore, in augmented reality (AR), intelligent robotics, and remote sensing image analysis, this technology provides higher-quality image input, enhancing the system's scene understanding and autonomous decision-making capabilities. The Transformer low-light image enhancement method based on dynamic four priors effectively solves problems such as uneven exposure, noise amplification, and color distortion in existing methods, promoting the further development and application of intelligent systems in fields such as autonomous driving, smart security, and drone photography.

[0044] This article uses specific embodiments to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims

1. A Transformer low-light image enhancement method based on dynamic four priors, characterized in that, The method includes: Obtain a low-light image dataset and divide it into a training sample set, a validation sample set, and a test sample set; Model construction: Construct a Transformer low-light image enhancement model DQPGT based on dynamic four priors; The training model is trained by inputting the training sample set into the DQPGT model and then verifying it using the verification sample set. The output results are obtained by inputting the test sample set into the trained model, performing image enhancement, and then outputting the results.

2. The Transformer low-light image enhancement method based on dynamic four priors according to claim 1, characterized in that, The construction of the Transformer low-light image enhancement model DQPGT based on dynamic four priors specifically includes: first, generating dynamic four priors through a dynamic four prior estimator, and then guiding the generation of a loss repairer based on the dynamic four priors and the Transformer framework.

3. The Transformer low-light image enhancement method based on dynamic four priors according to claim 2, characterized in that, The generation of the dynamic four prior features is as follows: Input image The input image is divided into three channels: RGB, and its size is [size missing]. ; The spectral quantities of the input image are measured using a Gaussian color model, and the three spectral quantities are approximated by a linear transformation of the RGB pixel values. As shown in the following formula: (1) In the formula, for The matrix, whose parameters are obtained through training, The input image contains the spatial x and y coordinates. For wavelength, , for right The first and second partial derivatives; The obtained spectral quantities and the scale parameters of the input image are output to a Gaussian filter, and scale-adjustable Gaussian filtering is applied to each of the three spectral components to generate basic features. and derivative characteristics ,right exist The feature is obtained by taking the partial derivative of the direction. ; Using the spectral quantities and characteristics described above Obtain four prior feature maps Through four prior feature maps Obtain dynamic four prior features.

4. The Transformer low-light image enhancement method based on dynamic four priors according to claim 3, characterized in that, In the generation of the dynamic four prior features, the acquisition of the scale parameter of the input image specifically involves processing the input image... The process is handled through three convolutional layers, with two interleaved layers. Activation function to obtain Gaussian filter scaling parameters ; The features Specifically, it is obtained using the following formula: (2) (3) (4) (5) (5) In the formula, for In the generation step, the first Characteristics of each stage The convolution kernel is The number of output channels is Step length , Convolution operation, For Silu activation function, For the scale Gaussian filtering operation.

5. The Transformer low-light image enhancement method based on dynamic four priors according to claim 4, characterized in that, The The feature map is as follows: Substituting the acquired spectral features into three prior calculation formulas yields three sizes. Prior feature map As shown in the following formula: (6) (7) (8) (9) In the formula, It is the arctangent function. It is a logarithmic function. It is the tangent function. for exist Component of direction; The fourth prior definition is as follows: (10) In the formula, They represent The relative order of channels in the RGB color space, and the normalized value range. ; Four prior feature maps Features are obtained by splicing channels. As shown in the following formula: (11) In the formula, For channel splicing operations; The input image is fed into the dynamic weight generation module, which adaptively predicts four prior features based on the features of the input image. The weights are as follows: (12) (13) (14) In the formula, For the weight generation process Characteristics of each stage Use the Softmax activation function; The obtained weights are multiplied element-wise with the corresponding prior features to obtain the final weights. Then the obtained features After convolution kernel size is The convolution is adjusted to have 3 channels, resulting in a size of [size missing]. Dynamic four priors As shown in the following formula: (15) (16) In the formula, This is the Hadamard product operation on the feature map.

6. The Transformer low-light image enhancement method based on dynamic four priors according to claim 2, characterized in that, The loss repairer built on the Transformer framework specifically includes an encoder, an intermediate layer, and a decoder, with both the encoder and decoder integrating a multi-head self-attention module. With convolutional layers.

7. The Transformer low-light image enhancement method based on dynamic four priors according to claim 6, characterized in that, The encoder specifically adopts a hierarchical feature extraction architecture, the specific process of which includes: firstly, increasing the number of channels in the input image to complete the initial feature mapping; then, passing the initial features through a... The module integrates local context and global dependencies, performs secondary channel number enhancement and introduces spatial downsampling after fusion, and then the fused features are sequentially processed through two cascaded layers. The module models deep semantic associations and structured information. Finally, the number of channels is increased three times to complete the fusion and compression of high-level features, and the final multi-channel feature map is output to the intermediate layer. The intermediate layer includes two Module cascading, the specific process includes: the first The module receives the multi-channel feature map output by the encoder, performs initial feature cleansing and enhancement, and outputs the processing result to the second module. The module then undergoes a second round of in-depth interaction and context fusion. The decoder employs a symmetrical hierarchical upsampling structure. The specific process includes: initial upsampling of the intermediate layer output features to reduce the number of channels; concatenating the reduced-channel features with the intermediate features of the corresponding layer of the encoder to achieve the fusion of deep semantic information and shallow spatial details; and then sequentially passing the fused features through two cascaded layers. The module performs feature manipulation and context association, reduces the number of channels in the obtained features twice, and concatenates them with the early intermediate features of the encoder, injecting low-level details. Finally, the features after secondary fusion are processed by a... The module performs feature optimization, mapping and fine-tuning the optimized features through convolutional layers to output enhanced images with high visual quality.

8. The Transformer low-light image enhancement method based on dynamic four priors as described in claim 5 or 6, characterized in that, The Specifically, the module is a core computational unit that integrates multi-head self-attention and feedforward networks. The input features first pass through a normalization layer. After stabilization preprocessing, the system proceeds to the dynamic four-prior-guided multi-head self-attention module. The Attention weight allocation is guided by a dynamic four-prior approach, and the output of the attention module is passed through another normalization layer. Then, it is fed into the feedforward network. The features are fused and enhanced through nonlinear transformation, as shown in the following formula: (17) (18) (19) (20) (21) In the formula, for The first in the module Characteristics of the stage for The input image of the module, For normalization layer, This is a matrix addition operation. It is a multi-head self-attention module guided by dynamic four priors. For feedforward network layer, For frequency domain channel attention modules, for The module outputs an image; where The multi-head self-attention calculation process is as follows: (22) (23) (24) (25) (26) (27) (28) (29) (30) (31) (32) (33) In the formula, The number of channels is The dynamic four prior features, for Input features, all of which are of the following dimensions. , For different stages The number of feature processing channels in the module For channel splitting operation, The input features are those obtained after multi-head splitting. The dynamic four prior features are derived from the multi-head split. For the number of heads, The input feature of a certain head, with a size of , For a given head, the dynamic four prior features are of size . ; To make feature size Convert to , The input features of one end after splitting are... This represents the dynamic four prior features of a given end after splitting. For the first The query for size, key, value, and dimension are all... , For the first A fully connected layer, For the first Attention calculation results based on size This is a matrix transpose operation. For the first Trainable scaling parameters for size; To make feature size Convert to , For Gelu activation functions, For the first The location encoding information of the head, with a size of ; For the feature output of a certain head, the size is ; for Output features, size is .

9. The Transformer low-light image enhancement method based on dynamic four priors according to claim 1, characterized in that, The training model specifically includes: Set initialization iteration parameters; From the training sample set Random selection without replacement Each training sample is input as the original image into the DQPGT model to generate the augmented result image. Using mean absolute error loss Perceived loss Structural similarity loss Weighted generation total loss function To calculate the enhancement results and real images The loss is used to update the model's weights; Determine whether the training sample set has been completed. A complete traversal is performed. If the result is positive, the next verification step is performed. Otherwise, the model DQPGT is input for weight update. Verification set Input the model in the current training phase for forward inference, calculate the peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) on the validation set. If neither of the two indicators improves for several consecutive cycles, it is determined that the model has converged or is overfitting, and training is terminated early; otherwise, proceed to the next step. If the model fails to converge or is overfitted, then check the inequality between the initial parameters and the maximum iteration parameters. If the condition is met, the trained Transformer low-light image enhancement model DQPGT based on dynamic four priors is obtained; otherwise, the initialization parameters are set to... And perform weight updates.

Citation Information

Patent Citations

  • Low-illumination image enhancement method based on low-light feature prior

    CN119205539A

  • Low-light image enhancement method based on combination of retinex and wavelet transform

    CN119963465B

Cited By

  • A low-light image super-resolution reconstruction method and system fusing illumination prior

    CN122155956A

  • A method and system for super-resolution reconstruction of low-light images based on illumination priors

    CN122155956B