An image detail enhancement method and system for dark light scenes
By employing an encoder-decoder architecture and a Laplacian pyramid frequency division fusion method, the problem of noise misjudgment in diffusion models under low light conditions was solved, achieving high-quality image detail enhancement and improving the visual stability and color consistency of the image.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SICHUAN UNIV
- Filing Date
- 2026-06-09
- Publication Date
- 2026-07-10
Smart Images

Figure CN122367795A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and in particular to a method and system for enhancing image details in low-light scenes. Background Technology
[0002] In low-light environments, the light signal received by the image sensor is extremely weak, resulting in a significant deterioration in the image quality captured by imaging devices (such as mobile phones and cameras). Figure 1 As shown. This is mainly reflected in:
[0003] (1) Due to insufficient light, the sensor will increase the ISO sensitivity to enhance the signal, but this will inevitably amplify the noise, especially random noise and color noise, making the image look grainy and seriously affecting the visual effect; (2) In order to suppress noise, the noise reduction algorithms built into the camera or in post-processing often over-smooth the image, causing high-frequency details such as object edges and textures to be erased, resulting in a blurry image and a severe "smearing" of details.
[0004] In recent years, generative methods, represented by diffusion models, have demonstrated great potential in image restoration. By learning the prior distribution of massive amounts of natural images, they can generate extremely rich and realistic image details, thus addressing to some extent the problem of insufficient detail restoration in traditional methods. However, when directly applying diffusion models to detail enhancement tasks in low-light scenes, their inherent randomness and generative paradigm also bring new and pressing problems, such as... Figure 2 As shown, it is clear that: Degradation noise interference problem: When degraded images are directly used as input to the diffusion model, the model has difficulty distinguishing between real content and degraded components. It is easy to misjudge degradation features such as noise and blur as semantic information, thereby introducing false details in the generation process and affecting the stability and visual aesthetics of the results.
[0005] The issue of fidelity in generated details: The essence of diffusion models is "creation" rather than "recovery." When the input image is severely lacking in detail, the randomness of its denoising process may cause the model to "conjure" false textures that do not match the real scene. This is unacceptable for applications requiring high fidelity.
[0006] Color consistency and artifact issues: The diffusion model operates directly in the RGB space, and its noise addition process disrupts the original precise color balance between the red, green, and blue channels. During reverse denoising, the model must re-infer this complex color relationship from scratch, and any tiny prediction deviation will lead to a visible color shift. Furthermore, the randomness of the sampling process further exacerbates this instability, making it difficult to guarantee that the final color output is completely consistent with the original scene. Summary of the Invention
[0007] The purpose of this invention is to overcome the problems existing in the prior art, such as: data distribution mismatch causing the inherent random sampling process of the model to easily misinterpret noise in the input as valid structural information and amplify it improperly, ultimately generating visual artifacts that do not match the original scene structure, seriously damaging the visual quality of the image, and the difficulty in maintaining consistency of low-frequency components such as texture structure and color brightness in the original scene. The invention provides a method and system for enhancing image details in low-light scenes.
[0008] In a first aspect, the present invention provides a method for enhancing image details in low-light scenes, comprising: A denoised image is obtained by denoising a low-light image, and a detail-enhanced image is obtained by enhancing the details of the denoised image. In the HSV color space, the brightness of the denoised image and the detail-enhancing image are frequency-divided and fused based on the Laplacian pyramid to obtain the target output image; The Laplacian pyramid is based on the brightness and texture information of the image and the pyramid hierarchy to assign fusion weights, and it fuses the pixels of the denoised image and the detail-enhancing image in a non-local fusion manner.
[0009] Preferably, the low-light image is denoised using an image denoising network, wherein the image denoising network is an encoder-decoder architecture; During the encoding stage, cross-scale features are extracted by modeling global and local features, noise degradation is removed, and a degraded image is output. During the decoding stage, the degraded image is decomposed into different frequency subbands, high and low frequency image content is extracted through a cross-attention mechanism, and a denoised image is generated through bidirectional convolution.
[0010] Preferably, a denoised image is generated based on the degraded image through a frequency learning module, specifically including: Frequency separation: The degraded image and intermediate features are aligned, and two-dimensional wavelet coefficients are calculated using forward discrete wavelet transform. The obtained two-dimensional wavelet coefficients are then zero-filled and subjected to discrete inverse wavelet transform to separate low-frequency and high-frequency information. The intermediate features are features that contain channel information and spatial information. Frequency mining: Based on low-frequency and high-frequency information, a transposed channel attention mechanism is used to obtain low-frequency mining features and high-frequency mining features from the intermediate features; Interactive integration: Low-frequency mining features and high-frequency mining features are interactively refined to obtain low-frequency refined features and high-frequency refined features; 1×1 convolution is used to aggregate low-frequency refined features and high-frequency refined features to generate global frequency features, and cross-attention mechanism is used to fuse global frequency features into the intermediate features to obtain high and low frequency image content. Image generation: Features in high- and low-frequency image content are refined through bidirectional convolutional attention to obtain a denoised image.
[0011] Preferably, spatial attention units are used to refine low-frequency mining features, specifically including: Global max pooling and global average pooling are performed on the high-frequency mining features respectively to generate two single-channel spatial feature maps, which are then connected along the channel dimension. The number of channels is adjusted and the features are refined by 7×7 convolution, and a spatial attention map is generated by sigmoid operation. The spatial attention map is multiplied by the low-frequency mining features to generate low-frequency refined features.
[0012] Preferably, channel attention units are used to refine high-frequency mining features, specifically including: Adaptive average pooling and adaptive max pooling are applied to the low-frequency mining features along the spatial dimension, respectively. The features after adaptive average pooling are sequentially subjected to two 1×1 convolutions to obtain the upper branch features; The features after adaptive max pooling are sequentially subjected to two 1×1 convolutions to obtain the next branch features; After adding the features from the upper branch to the features from the lower branch, a channel attention map is generated using a sigmoid operation; The channel attention map is multiplied by the high-frequency mining features to generate high-frequency refined features.
[0013] Preferably, a detail-enhanced image is obtained by freezing the image denoising network and using a single-step diffusion generation model to generate details; the single-step diffusion generation model is trained using adversarial loss, perceptual loss, and MSE loss.
[0014] Preferably, the fusion weight is inversely proportional to the level of the Laplace pyramid.
[0015] Preferably, the fusion weight is proportional to the brightness and texture information of the image.
[0016] Preferably, nonlocal fusion is performed based on the structural similarity of pixels within a preset search range in the detail-enhanced image and the denoised image.
[0017] In a second aspect, the present invention provides an image detail enhancement system for low-light scenes, for performing the method described in the first aspect, comprising: An image denoising network is used to denoise low-light images to obtain denoised images. A single-step diffusion generation model is used to generate details from denoised images, resulting in enhanced detail images. The Laplacian pyramid is used to perform frequency division and fusion of the brightness of the denoised image and the detail-enhancing image in the HSV color space to obtain the target output image.
[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. Based on task decoupling, this invention performs denoising before image detail enhancement, providing a "clean base" with a high signal-to-noise ratio for the generative model, making the input of the diffusion model closer to the natural image distribution, and avoiding misjudgment and amplification of noise from the source; 2. This invention further corrects texture and color deviations by performing self-frequency division fusion in the HSV color space, solving the problem that the noise addition process of the diffusion model directly operating in the RGB space will destroy the original accurate color balance between the red, green and blue channels; it also uses the Laplacian pyramid for fusion, and uses the fusion weight to select the most likely realistic part in the diffusion model generation result, making the texture edges transition more naturally. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of a low signal-to-noise ratio image in a low-light scene. Among them, (a) indicates that the low signal-to-noise ratio image in a low-light scene has a lot of noise, and (b) indicates that the low signal-to-noise ratio image in a low-light scene has detail smearing. Figure 2 This is a diagram illustrating the false details and color deviations caused by the diffusion model. Wherein, (a) represents the image enhanced by the diffusion model, (b) represents an example original image, (c) represents another example original image, and (d) represents the image enhanced by the diffusion model; Figure 3 This is a flowchart of an image detail enhancement method in low-light scenes according to one embodiment of the present invention; Figure 4 This is a diagram illustrating the overall technical solution of an image detail enhancement method in low-light scenes according to one embodiment of the present invention. Figure 5 This is a diagram of an image denoising network architecture provided in one embodiment of the present invention; Figure 6 This is a schematic diagram of an overall image denoising network scheme provided in one embodiment of the present invention; Figure 7 This is a schematic diagram of the modules and units in an image denoising network provided in one embodiment of the present invention; Among them, (a) is the internal structure of TransformerBlock in the image denoising network encoder; (b) is the internal structure of WaveTransBlock in each layer of the image denoising network decoder; (c) is a schematic diagram of the frequency learning module structure; (d) is a schematic diagram of the spatial attention unit structure; and (e) is a schematic diagram of the channel attention unit structure. Figure 8 This is a schematic diagram of the Transformer cross-attention mechanism structure provided in one embodiment of the present invention; Figure 9 This is a schematic diagram of an enhancement-of-detail network provided in one embodiment of the present invention; Figure 10 This is an example of a detail-enhanced image generated based on a detail-enhancing network, provided in one embodiment of the present invention. Wherein, (a) represents the original image of a low signal-to-noise ratio scene in low light, and (b) represents the image after detail enhancement; Figure 11 This is a flowchart of brightness frequency division and fusion provided in one embodiment of the present invention; Figure 12 This is a texture distribution map of RGB and HSV color spaces provided in one embodiment of the present invention; Wherein, (a) is the R channel space of the image; (b) is the G channel space of the image; (c) is the B channel space of the image; (d) is the H channel space of the image; (e) is the S channel space of the image; and (f) is the V channel space of the image. Figure 13 This is a display effect diagram of different levels of Gaussian pyramid images after scaling, provided in one embodiment of the present invention; In this image, (a) to (d) represent images at different levels of the Gaussian pyramid. Pyramid1: The layer closest to the original image, with the highest resolution and the most detail, texture, and noise. Pyramid2: The image after blurring / downsampling, with reduced resolution and less detail. Pyramid3: A coarser-scale image, mainly retaining the overall outline and brightness distribution, with even less detail. Pyramid4: A higher level with lower resolution, basically only retaining overall brightness and structural information, with less noise interference. Figure 14 This is a fusion weight map provided in one embodiment of the present invention; Wherein, Wb: brightness weight map, We: edge / texture weight map, Wbe: the result of fusing brightness weight and edge weight, W1: the first layer of the pyramid fusion weight, W2: the second layer of the pyramid fusion weight, W3: the third layer of the pyramid fusion weight, W4: the fourth layer of the pyramid fusion weight, and W5: the fifth layer of the pyramid fusion weight. Figure 15This is a fused high-fidelity image provided in one embodiment of the present invention; In this image, (a) represents the original image after detail enhancement, (b) represents the image after fusion, and (c) is the original image. Detailed Implementation
[0020] The present invention will now be described in further detail with reference to specific embodiments. However, this should not be construed as limiting the scope of the present invention to the following embodiments; all technologies implemented based on the content of the present invention fall within the scope of the present invention.
[0021] Example 1 Please refer to Figure 3 and Figure 4 This embodiment provides a method for enhancing image details in low-light scenes, including: A denoised image is obtained by denoising a low-light image, and a detail-enhanced image is obtained by enhancing the details of the denoised image. In the HSV color space, the brightness of the denoised image and the detail-enhancing image are frequency-divided and fused based on the Laplacian pyramid to obtain the target output image; The Laplacian pyramid is based on the brightness and texture information of the image and the pyramid hierarchy to assign fusion weights, and it fuses the pixels of the denoised image and the detail-enhancing image in a non-local fusion manner.
[0022] In the description of the embodiments of this application, "low-light image" refers to image data in scenes where the ambient illumination is significantly lower than standard imaging conditions, resulting in a severe decrease in overall signal-to-noise ratio, contrast, and dynamic range due to a lack of photon signals. For example, the causes of the low-light image may include, but are not limited to: natural environments at night or without auxiliary lighting, indoor low-light environments, low exposure parameter settings actively adopted to shorten exposure time to freeze fast motion, or insufficient light transmission due to limitations in the aperture of the optical system and the size of the sensor. Its typical characteristics may include, but are not limited to: overall brightness values concentrated in the low grayscale range, loss of detail in shadow areas, signal severely submerged by random noise, and visible color distortion and channel response imbalance. Regardless of whether the low-light image is caused by a single factor or the result of multiple conditions, or whether it has undergone preprocessing such as gain enhancement or nonlinear tone mapping, as long as it does not fundamentally solve the problem of information loss caused by photon scarcity, it falls within the scope of "low-light image" as defined in this application. However, it does not necessarily mean that the image exhibits uniform low signal-to-noise ratio characteristics in all brightness channels.
[0023] Diffusion models, due to their strong prior knowledge of natural images, have demonstrated exceptional ability to reconstruct image details. Therefore, some studies have attempted to directly apply diffusion models for end-to-end detail enhancement to address the common problem of severe detail smearing in low-light images. However, this direct strategy faces a fundamental challenge: the high noise and low signal-to-noise ratio characteristics of low-light images create a significant domain gap between their data distribution and the standard natural images used for model pre-training. This distribution mismatch causes the model's inherent random sampling process to easily misinterpret noise in the input as valid structural information and improperly amplify it, ultimately generating visual artifacts that do not conform to the original scene structure, severely impairing the visual quality of the image.
[0024] This embodiment provides an input optimization and stabilization strategy for generative models, and proposes a phased enhancement framework based on task decoupling, which adopts a two-stage, end-to-end intelligent enhancement framework.
[0025] The task of enhancing details in low-light scenes is broken down into two independent parts: "basic denoising" and "detail generation." The denoising module, for example... Figure 7 As shown, the diffusion model adopts the open-source single-step diffusion generation model HYPIR. This method aims to provide a high signal-to-noise ratio "clean substrate" for the generation model, making the input of the diffusion model closer to the natural image distribution, avoiding the misjudgment and amplification of noise from the source, and transforming the ill-posed end-to-end recovery problem into two easier-to-solve sub-problems, thereby improving the stability and controllability of the entire framework.
[0026] In addition, while generative methods such as diffusion models excel at enhancing image details, ensuring high fidelity of the generated content—that is, maintaining consistency with the original scene in low-frequency components such as texture structure and color brightness—remains a core challenge. To address this, current approaches inject textual descriptions as high-level semantic priors, using cross-attention mechanisms to guide the model's denoising process. However, this method suffers from a fundamental limitation: the inherent "semantic gap" between text and image. Text, as a highly abstract and compressed information carrier, provides coarse guidance, failing to precisely constrain the specific shape, position, and texture of objects in the image. Therefore, such methods remain insufficient in fine-grained structural fidelity control. To address this critical issue, adaptive brightness selection and color consistency fusion within the HSV color space are employed to further correct texture and color deviations.
[0027] Example 2 Please refer to Figures 5-15 This embodiment is a further optimization based on embodiment 1.
[0028] As one possible implementation, this embodiment uses an image denoising network to denoise the low-light image, and the image denoising network is an encoder-decoder architecture; During the encoding stage, cross-scale features are extracted by modeling global and local features, noise degradation is removed, and a degraded image is output. During the decoding stage, the degraded image is decomposed into different frequency subbands, high and low frequency image content is extracted through a cross-attention mechanism, and a denoised image is generated through bidirectional convolution.
[0029] like Figure 5 As shown, as one possible implementation, an image denoising network based on a Transformer encoder-decoder architecture is provided, aiming to remove noise degradation from the input image and output an intermediate image. Specifically, given a degraded image of size H×W×3, the deepest layer features are generated through a four-layer encoder. In this process, TransformerBlocks leverage their powerful ability to model global and local features, extracting cross-scale features at each layer. Downsampling is performed using PixelUnshuffle (inverse subpixel convolution), progressively reducing the resolution by expanding the number of channels.
[0030] Next, the deepest features are input into the four-layer decoder. The PixelShuffle operation restores the deepest features to their original size. During this process, the Frequency Learning Module (FLM) decomposes the noise-degraded input image into different frequency sub-bands using its powerful cross-scale frequency analysis capabilities. Then, the Transformer cross-attention mechanism is used to extract high and low frequency image content from the intermediate features F (features containing channel and spatial information, i.e., the output of WaveTransBlock in CDRnet). Each frequency band contains specific degraded content and image content. Finally, the features are refined through the bidirectional convolutional attention module, which suppresses or allows specific frequency content to pass through, thereby enhancing components unrelated to degradation and achieving noise degradation removal.
[0031] The internal structure of the TransformerBlock in the image denoising network encoder and the internal structure of each WaveTransBlock layer in the image denoising network decoder are respectively as follows: Figure 7 (a) and Figure 7 As shown in (b).
[0032] Specifically, based on the degraded image, a denoised image is generated through a frequency learning module, which includes: Frequency separation: Align the degraded image with the intermediate features, and use forward discrete wavelet transform to calculate two-dimensional wavelet coefficients. Then, perform zero-filling and discrete inverse wavelet transform on the obtained two-dimensional wavelet coefficients to separate low-frequency and high-frequency information. Frequency mining: Based on low-frequency and high-frequency information, a transposed channel attention mechanism is used to obtain low-frequency mining features and high-frequency mining features from the intermediate features; Interactive integration: Low-frequency mining features and high-frequency mining features are interactively refined to obtain low-frequency refined features and high-frequency refined features; 1×1 convolution is used to aggregate low-frequency refined features and high-frequency refined features to generate global frequency features, and cross-attention mechanism is used to fuse global frequency features into the intermediate features to obtain high and low frequency image content. Image generation: Features in high- and low-frequency image content are refined through bidirectional convolutional attention to obtain a denoised image.
[0033] In the description of the embodiments of this application, "low frequency" refers to the background component that characterizes the overall brightness distribution and smooth color transition of the image, and the structural component that reflects the main outline and slow change trend of the image; "high frequency" refers to the edge and texture details that characterize drastic changes in pixel values, and the fine component caused by sensor noise or random disturbance.
[0034] As one possible implementation, such as Figure 7 As shown in (c), the degraded image X and intermediate features Simultaneous input, processed through discrete wavelet transform and its inverse transform. X Perform spectral decoupling, from F Different frequency representations are learned in the process. The proposed FLM mainly consists of three parts: frequency separation, mining, and refinement.
[0035] For the frequency separation section X First, it is processed by a convolutional group to combine its spatial dimensions and channel dimensions. F Alignment obtained For example, the dimensions of the degraded image X are (128, 128, 256), and the dimensions of the intermediate feature map F are (64, 64, 512). After convolution, the dimensions of the degraded image X are changed to (64, 64, 512). Then, the two-dimensional wavelet coefficients are calculated using the forward discrete wavelet transform (DWT). (1) in, , , and They represent The approximation coefficients, horizontal coefficients, vertical coefficients, and diagonal coefficients, It is the forward discrete wavelet transform function. This is the degraded image after dimension alignment. Each coefficient is processed as follows: (2) (3) in, This represents a depthwise convolution with a kernel size of 3×3. Four independent convolutions are used to process the approximation coefficients, horizontal coefficients, vertical coefficients, and diagonal coefficients, respectively, yielding four features that enhance local information: LL, LH, HL, and HH. For approximate coefficient convolution processing, For horizontal coefficient convolution processing, This is a convolution process using vertical coefficients. This involves diagonal coefficient convolution. To process low-frequency and high-frequency information separately, zero-padding and discrete inverse wavelet transform are used to obtain the denoised low-frequency components (in...). Figure 7 (represented in the upper branch of (c)) and high-frequency components containing texture details (in Figure 7 (represented in the lower branch of (c)). The specific processing steps are as follows: (4) (5) in, For inverse discrete wavelet transform, Zero-filled, To perform splicing at the channel dimension, These are features that enhance local information corresponding to the approximation coefficients. These are features that enhance local information corresponding to the level coefficient. These are features that enhance local information, corresponding to the vertical coefficient. These are features that enhance local information corresponding to the diagonal coefficients. and These refer to the low-frequency and high-frequency information separated from the degraded image X, respectively.
[0036] Next, spatial attention units are used to refine the low-frequency mined features, specifically including: Global max pooling and global average pooling are performed on the high-frequency mining features respectively to generate two single-channel spatial feature maps, which are then connected along the channel dimension. The number of channels is adjusted and features are refined through 7×7 convolution, and a spatial attention map is generated through sigmoid operation (i.e., operation of the sigmoid function). The spatial attention map is multiplied by the low-frequency mining features to generate low-frequency refined features.
[0037] Channel attention units are used to refine high-frequency mining features, specifically including: Adaptive average pooling and adaptive max pooling are applied to the low-frequency mining features along the spatial dimension, respectively. The features after adaptive average pooling are sequentially subjected to two 1×1 convolutions to obtain the upper branch features; The features after adaptive max pooling are sequentially subjected to two 1×1 convolutions to obtain the next branch features; After adding the features from the upper branch to the features from the lower branch, a channel attention map is generated using a sigmoid operation; The channel attention map is multiplied by the high-frequency mining features to generate high-frequency refined features.
[0038] Specifically, as one possible implementation method, such as Figure 7 (d) and Figure 7 As shown in (e), the low-frequency features after inverse wavelet transform are obtained using the Transformer cross-attention mechanism. High-frequency features after inverse wavelet transform Guided by the algorithm, different feature regions are mined from the intermediate feature map F. The mined high-frequency and low-frequency features each contain degradation and image content information. Subsequently, two convolutional attention units, a spatial attention unit and a channel attention unit, are used to modulate these high-frequency and low-frequency features, reducing the influence of degradation factors in each frequency band and integrating image content. For the channel attention unit, channel-level attention is obtained by adaptive average pooling and max pooling on the low-frequency information, suppressing redundant degradation features in the high-frequency information from the channel dimension. The operation process is as follows: (6) (7) in, It is the high-frequency characteristic of the output modulation of the channel attention unit. For dot product processing, These are high-frequency features of the input. These are the channel-level features processed by the spatial attention unit. , , , These are 1×1 convolutions with different parameters; the subscripts indicate the sequence number and are used only for differentiation. For the low-frequency features of the input, γ is the Sigmoid function, γ is the ReLU activation function, and AAP() and AMP() are adaptive average pooling and adaptive max pooling, respectively.
[0039] For the spatial attention unit, pixel-level attention is obtained through global average pooling and max pooling, suppressing information unrelated to the image content along the spatial dimension. The operation process is described below: (8) (9) in, It is the low-frequency characteristic of the output modulation of the spatial attention unit. It is a low-frequency feature of the input. These are the pixel-level features processed by the channel attention unit. It is a 7×7 convolution. For high-frequency features of the input, δ It is the Sigmoid function. It is a convolution with a kernel size of 7 and half the number of channels. GAP and GMP are global average pooling and global max pooling, respectively.
[0040] Finally, 1×1 convolution aggregation is used. and , generate Then, TCA is used to fuse the modulated features into the intermediate feature map F. By progressively processing features of different resolutions across frequency scales during the upsampling process, effective removal of noise degradation is achieved.
[0041] Transformer cross-attention mechanism, such as Figure 9 As shown, this is used for low-frequency features after inverse wavelet transform. High-frequency features after inverse wavelet transform Under the guidance of [the relevant authority], different feature parts are extracted from the intermediate feature map F. Figure 9 The middle section represents the detail enhancement module, which utilizes a diffusion model for detail enhancement. The main component is UNet, with the encoder on the left and the decoder on the right. The blue areas in the diagram represent frozen regions, and the orange areas represent activated regions, which can be trained. The specific processing steps are as follows: (10) (11) (12) (13) in, It is a low-frequency / high-frequency indicator. This represents a 3×3 depthwise convolution, with subscripts indicating the sequence number for distinguishing purposes only. This represents a 1×1 pointwise convolution, with subscripts used for identification purposes only. , V represents the query, key, and value projection, respectively; T represents the transpose operation; and softmax represents the softmax operation. This is an intermediate feature map. It is a scaling factor used to control... and The size of the dot product.
[0042] After noise removal, the overall image distribution approximates a natural image. Subsequently, a frozen image denoising network is used, and a single-step diffusion generation model is employed for detail generation, resulting in a detail-enhanced image. The single-step diffusion generation model is trained using adversarial loss, perceptual loss, and MSE loss, with a learning rate of [missing information]. The formula is as follows: (14) in, This is the training loss for the first part, i.e., the denoising loss. The image output by the model. It is the ground truth (GT), which is the clean image. It is the square of the L2 norm.
[0043] (15) in, This represents the total training loss for the second part. To combat the losses, In order to perceive loss, This is the MSE loss.
[0044] (16) in, For the true value GT, To generate an image, For the discriminator output, Indicates the expected output. It is activated by Sigmoid, and log is calculated as a logarithm.
[0045] (17) (18) in, It is perceived loss. It is an MSE loss. For the true value GT, To generate an image, It is a feature extractor for pre-trained VGG networks or LPIPS models. It is the square of the L2 norm.
[0046] like Figure 8As shown, Stable Diffusion 2 was chosen as the initial network, and rank=64 was set. The Unet part was fine-tuned using LoRA, a highly efficient fine-tuning method that adapts to new tasks quickly by training a small number of low-rank matrices without modifying the parameters of the original large model. Figure 9 The blue and orange sections retain the encoder and decoder, such as Figure 6 As shown in the image. The image with enhanced detail is as follows. Figure 10 As shown, the model removes most of the noise and enhances the texture details of the tree trunks and buildings.
[0047] After the above steps, two images are obtained: a denoised image and a detail-enhanced image. The denoised image is obtained by a single-task denoising model, preserving the low-to-mid-frequency information of the original image (e.g., color, illumination, low-to-mid-frequency textures), but some high-frequency texture information is also filtered out along with the noise. The detail-enhanced image, based on a diffusion model, recovers some texture details on top of the denoising model, but due to the uncertainty of diffusion, it also generates false textures, as well as illumination and color deviations. To ensure the realism of the texture details in the enhanced image, the two images are fused using a Laplacian pyramid in the luminance channel of the HSV space. Adaptive fusion weights are used to select the most likely realistic parts from the diffusion model's generation, while ensuring natural transitions at texture edges. The overall process is as follows: Figure 11 As shown, the specific details are as follows: First, the lightness channel is blended in the HSV color space; the image's color information is preserved by separating color and texture information. For example... Figure 12 As shown in the red window, unlike the RGB color space, the HSV color space separates color and texture. In the HSV color space, texture is concentrated in the V (lightness) channel; for example, the densely textured areas in the lower left corner and the middle of the image. Therefore, simply enhancing the V (lightness) component in the HSV color space can enhance details while preserving accurate color information.
[0048] Secondly, a Laplace pyramid pattern is used to divide and fuse brightness; this fusion pattern selectively retains more of the mid-to-low frequency components that are less affected by noise, while ensuring brightness consistency. For example... Figure 13 As shown, the upper layers of the pyramid are almost unaffected by noise and contain the correct brightness distribution, resulting in fewer choices in the generated image. Furthermore, the Laplacian pyramid frequency division fusion method makes the blended texture transition smoother and avoids artifacts (ghosting).
[0049] Next, the weighted graph is merged as follows: Figure 14 As shown, a fusion weight map is adaptively calculated based on the brightness and texture information of the image. Figure 14In the diagram, Wb and We represent the luminance weight and edge weight, respectively, focusing on regions with high brightness and rich texture. Wbe is the result of fusing the luminance weight and edge weight. W1-W5 are the fusion weights for the first to fifth layers of the pyramid, obtained jointly by Wbe and the pyramid levels. Wbe is the joint weight map. The design of the fusion weights is based on the following principles: the higher the pyramid level, the lower the proportion of diffused fusion, concentrating the joint weight map (Wbe) in mid-to-high brightness and textured regions; conversely, for relatively smooth and low-light-throughput dark areas, the missing texture information increases the difficulty of reconstructing realistic textures and reduces the accuracy of generated textures. Given the aforementioned characteristic that the higher the pyramid level, the lower the noise ratio, a progressively decreasing fusion weight is set based on the pyramid level to reduce interference from erroneous textures.
[0050] Finally, given that the diffusion model may produce pixel-level deviations in the generated results, i.e., the same texture structure may have several uncertain pixel offsets in the generated results, the pixel information of the two images is fused in a non-local manner. Non-local fusion is performed based on the structural similarity of pixels within a preset search range in the detail-enhanced image and the denoised image.
[0051] Preferably, the pixels with the most similar structure in a local area of the diffusion result are selected for fusion, rather than direct fusion of pixels, in order to avoid blurring problems that may be caused by pixel-level deviations.
[0052] For example, let and On detail-enhanced images and denoised images respectively , Center The control block, constant This is used to adjust the magnitude of the similarity change in the control blocks. The similarity of the control blocks between the enhanced and denoised images can be described as: (19) In Centered on, with radius Search window Within, the most similar coordinates are: (20) Preferably, in this embodiment, the following is provided: The value is 2, meaning the search pixel window is... .
[0053] exist Figure 15 The example given shows the image before and after fusion, demonstrating that the fused image is more faithful to the original.
[0054] Example 3 An image detail enhancement system for low-light scenes, used to execute the image detail enhancement method for low-light scenes described in Embodiment 1 or Embodiment 2, includes: An image denoising network is used to denoise low-light images to obtain denoised images. A single-step diffusion generation model is used to generate details from denoised images, resulting in enhanced detail images. The Laplacian pyramid is used to perform frequency division and fusion of the brightness of the denoised image and the detail-enhancing image in the HSV color space to obtain the target output image.
[0055] This invention employs an innovative two-stage processing flow. First, a denoising network provides a high signal-to-noise ratio "clean base" for the subsequent diffusion model, effectively avoiding the problems of false textures and artifacts that easily arise when traditional methods directly process noise. This significantly improves the stability and realism of the generated details. Furthermore, the unique Laplacian multi-scale fusion method based on the HSV space, through adaptive fusion of the lightness (V) channel, can accurately restore and enhance texture details while perfectly preserving the hue (H) and saturation (S) of the original image, ensuring high color consistency and fidelity, ultimately achieving visual effects far exceeding those of other methods.
[0056] 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, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for enhancing image details in low-light scenes, characterized in that, include: A denoised image is obtained by denoising a low-light image, and a detail-enhanced image is obtained by enhancing the details of the denoised image. In the HSV color space, the brightness of the denoised image and the detail-enhancing image are frequency-divided and fused based on the Laplacian pyramid to obtain the target output image; The Laplacian pyramid is based on the brightness and texture information of the image and the pyramid hierarchy to assign fusion weights, and it fuses the pixels of the denoised image and the detail-enhancing image in a non-local fusion manner.
2. The method for enhancing image details in low-light scenes according to claim 1, characterized in that, The low-light image is denoised using an image denoising network, which is an encoder-decoder architecture. During the encoding stage, cross-scale features are extracted by modeling global and local features, noise degradation is removed, and a degraded image is output. During the decoding stage, the degraded image is decomposed into different frequency subbands, high and low frequency image content is extracted through a cross-attention mechanism, and a denoised image is generated through bidirectional convolution.
3. The method for enhancing image details in low-light scenes according to claim 2, characterized in that, The process of denoising low-light images specifically includes: Frequency separation: The degraded image and intermediate features are aligned, and two-dimensional wavelet coefficients are calculated using forward discrete wavelet transform. The obtained two-dimensional wavelet coefficients are then zero-filled and subjected to discrete inverse wavelet transform to separate low-frequency and high-frequency information. The intermediate features are features that contain channel information and spatial information. Frequency mining: Based on low-frequency and high-frequency information, a transposed channel attention mechanism is used to obtain low-frequency mining features and high-frequency mining features from the intermediate features; Interactive integration: Low-frequency mining features and high-frequency mining features are interactively refined to obtain low-frequency refined features and high-frequency refined features; 1×1 convolution is used to aggregate low-frequency refined features and high-frequency refined features to generate global frequency features, and cross-attention mechanism is used to fuse global frequency features into the intermediate features to obtain high and low frequency image content. Image generation: Features in high- and low-frequency image content are refined through bidirectional convolutional attention to obtain a denoised image.
4. The method for enhancing image details in low-light scenes according to claim 3, characterized in that, The process of refining low-frequency mining features includes: Global max pooling and global average pooling are performed on the high-frequency mining features respectively to generate two single-channel spatial feature maps, which are then connected along the channel dimension. The number of channels is adjusted and the features are refined by 7×7 convolution, and a spatial attention map is generated by sigmoid operation. The spatial attention map is multiplied by the low-frequency mining features to generate low-frequency refined features.
5. The method for enhancing image details in low-light scenes according to claim 3, characterized in that, The process of refining high-frequency mining features includes: Adaptive average pooling and adaptive max pooling are applied to the low-frequency mining features along the spatial dimension, respectively. The features after adaptive average pooling are sequentially subjected to two 1×1 convolutions to obtain the upper branch features; The features after adaptive max pooling are sequentially subjected to two 1×1 convolutions to obtain the next branch features; After adding the features from the upper branch to the features from the lower branch, a channel attention map is generated using a sigmoid operation; The channel attention map is multiplied by the high-frequency mining features to generate high-frequency refined features.
6. The method for enhancing image details in low-light scenes according to claim 2, characterized in that, A detail-enhanced image is obtained by freezing the image denoising network and using a single-step diffusion generation model for detail generation; the single-step diffusion generation model is trained using adversarial loss, perceptual loss, and MSE loss.
7. The method for enhancing image details in low-light scenes according to claim 1, characterized in that, The fusion weight is inversely proportional to the level of the Laplace pyramid.
8. The method for enhancing image details in low-light scenes according to claim 1, characterized in that, The fusion weights are proportional to the brightness and texture information of the image.
9. The method for enhancing image details in low-light scenes according to claim 1, characterized in that, Non-local fusion is performed based on the structural similarity of pixels within a preset search range in the detail-enhanced image and the denoised image.
10. A system for enhancing image details in low-light scenes, characterized in that, The method for enhancing image details in low-light scenes according to any one of claims 1-9 includes: An image denoising network is used to denoise low-light images to obtain denoised images. A single-step diffusion generation model is used to generate details from denoised images, resulting in enhanced detail images. The Laplacian pyramid is used to perform frequency division and fusion of the brightness of the denoised image and the detail-enhancing image in the HSV color space to obtain the target output image.