Low-light image enhancement method based on image hierarchy network based on flow learning

Through the image hierarchical structure network based on flow learning and the reversible network of normalized flow, the global, regional and local features of the image are extracted, which solves the problem of poor low-light image quality, achieves improvement of contrast and noise, and enhances the quality of the image. Overall lighting and clarity.

CN118115378BActive Publication Date: 2024-09-27CHONGQING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410207897.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-26
Publication Date
2024-09-27
Estimated Expiration
2044-02-26

AI Technical Summary

Technical Problem

The image quality captured by existing mobile imaging equipment under low-light conditions is poor, with problems such as low visibility, low contrast, noise, and color distortion. Existing enhancement methods cannot effectively improve the overall quality of the image.

Method used

Using the image hierarchical structure network based on flow learning, through the FIHN structure composed of the image hierarchical structure network and the reversible network based on normalized flow, the network is trained using the negative log likelihood loss function to extract the global, regional and local aspects of the image. Features, and denoising and improving contrast through a dual-pass dconv cross-fusion module.

Benefits of technology

Effectively deal with low visibility, low contrast, noise and color distortion problems in low-light images, improve the overall illumination of the image and avoid underexposure or excessive adaptive enhancement, and restore the clarity and naturalness of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118115378B
    Figure CN118115378B
Patent Text Reader

Abstract

The present invention relates to the field of low-light image technology, and in particular to a low-light image enhancement method based on a flow learning-based image hierarchy network. The steps are as follows: a FI HN structure is formed by an image hierarchy network and a reversible network based on normalized flow learning; and the network is trained using a negative log-likelihood loss function. The present invention provides a low-light image enhancement method based on a flow learning-based image hierarchy network, wherein the FI HN is composed of an image hierarchy network and a reversible network based on normalized flow; the image hierarchy network extracts image information from three dimensions: local, regional, and global, so as to obtain as much image information as possible; under the constraint of the negative log-likelihood loss function, the reversible network based on the normalized flow can fully learn the complex distribution of a normal exposure image and avoid outputting a large amount of noise.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of low-light images, and in particular to a low-light image enhancement method based on a flow learning-based image hierarchical structure network. Background Art

[0002] With the popularity of mobile imaging devices, taking photos is becoming more and more popular. However, in practical applications, facing complex and changing environments, the image quality captured by existing mobile devices is seriously reduced compared to professional photography equipment. Especially under underexposure conditions, the details and clarity of the captured images are worse. At the same time, these low-light images will also affect some advanced computer vision tasks (such as semantic segmentation, pose estimation, image style transfer, video understanding and action recognition, etc.);

[0003] Existing mobile imaging devices often enhance low-light images by increasing the aperture, increasing the ISO, and using flash, but these methods also have obvious shortcomings. For example, increasing the aperture will reduce the image sharpness, blur the edges, and blur the background. Increasing the ISO can increase the sensitivity of the imaging device to light, making it easier to capture low light in the environment. However, high ISO will cause the imaging device to capture more noise, ultimately resulting in a grainy or blurred image. Using a flash can illuminate the near view, but it is powerless for the distant view. And point light sources and unnatural lighting will also appear in the near view.

[0004] Compared with well-exposed images, low-light images often have defects such as low visibility, low contrast, noise and color distortion. If the low-light area is directly enhanced, it will inevitably increase the noise and make the image blurry. And according to the Retinex theory, the reflectivity of different areas of the image may be different. Blindly processing the entire image may not ultimately produce an ideal enhanced image.

[0005] Researchers have done a lot of research on this and proposed many feasible solutions. Although many solutions have certain effects, they can only improve one aspect of the image, and the overall quality of the image still has great defects. Nowadays, more and more people choose to use deep learning methods to enhance low-light images, which can improve the overall quality and visual effects of the image. However, this method still cannot achieve satisfactory results when enhancing images with severe underexposure.

[0006] To this end, a low-light image enhancement method based on a flow learning-based image hierarchical network is designed to provide another technical solution to the above technical problems. Summary of the invention

[0007] Based on this, it is necessary to provide a low-light image enhancement method based on a flow learning-based image hierarchy network to solve the technical problems raised in the above background technology.

[0008] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0009] The low-light image enhancement method based on the image hierarchy network of flow learning is as follows:

[0010] The FIHN structure is composed of an image hierarchy network and a reversible network based on normalized flow learning;

[0011] The network is trained using the negative log-likelihood loss function.

[0012] As a preferred implementation of the low-light image enhancement method of the image hierarchical structure network based on flow learning provided by the present invention, the image hierarchical structure network is composed of a three-branch region and global fusion module and a dual-path dconv cross fusion module;

[0013] The three-branch regional and global fusion module is used to extract and fuse the global and regional features of the image;

[0014] The dual-path Dconv cross-fusion module extracts local features while removing noise and improving contrast;

[0015] The reversible network is used to learn the complex distribution of normal exposure images;

[0016] The neuron weights of FIHN are adjusted by the negative log-likelihood loss function to obtain the network model with optimal performance.

[0017] As a preferred implementation of the low-light image enhancement method based on the image hierarchical structure network of flow learning provided by the present invention, in the three-branch regional and global fusion module, the top first branch extracts the global features of the image, and the second branch and the third branch are used to extract regional features of different scales;

[0018] So the three-branch regional and global fusion modules will Duplicate it into three copies, , and ;

[0019] The first branch at the top is used to extract global features, not feature matrix Adjust the size;

[0020] The second branch will Resize to 4 sizes The characteristic matrices of , and were processed by MDTA to obtain The four feature matrices are the respective regional features, and then These four feature matrices containing regional information are resized to ;

[0021] The third branch will Resized to 9 sizes The characteristic matrices of ; Then use MDTA to extract the corresponding regional information, and at the same time extract the regional information between different feature matrices of the second branch, and process it as The feature matrix is ​​resized to .

[0022] As a preferred implementation of the low-light image enhancement method of the image hierarchical network based on flow learning provided by the present invention, the MDTA uses an attention mechanism in the channel dimension, obtains an attention map between channels by calculating the cross covariance between channels, and uses the attention map to adjust the weights between different channels, thereby extracting the global features of the image.

[0023] As a preferred implementation of the low-light image enhancement method based on the image hierarchical structure network of flow learning provided by the present invention, the dual-path dconv cross-fusion module has the following steps:

[0024] Based on the Sigmoid activation function to improve the gradient between local pixels in space;

[0025] Based on the Gelu activation function to approximately linearly increase the pixel value;

[0026] Based on element-by-element dot product operation to balance each pixel value;

[0027] The cross-dot product-based approach can improve the correlation between features of the two branches and eliminate the independence of features.

[0028] As a preferred implementation of the low-light image enhancement method of the image hierarchy network based on flow learning provided by the present invention, the similarity between the image hierarchy network and the reversible network structure output based on normalized flow learning is represented by a probability density function;

[0029] The expression of the probability density function is as follows:

[0030]

[0031] Among them, P represents the probability density function of the potential feature z, represents the model that generates the latent feature z.

[0032] As a preferred implementation of the low-light image enhancement method of the image hierarchical network based on flow learning provided by the present invention, a negative log-likelihood loss function is used to train the network, and the loss function expression is as follows:

[0033]

[0034] in, A hierarchical network of images representing the design; Represents the i-th Flow Step block; Represents the output of each Flow Step block, Represents the input features of the image hierarchy network in the i-th Flow Step block; represents the probability density function (PDF) of the latent feature z;

[0035] The expression is as follows:

[0036]

[0037] Among them, C( ) represents an image The color map of is expressed as follows:

[0038]

[0039] in, Representation calculation The average value for each pixel in the channel.

[0040] It can be seen without a doubt that the above-mentioned technical solution of the present application can definitely solve the technical problem to be solved by the present application.

[0041] At the same time, through the above technical solutions, the present invention has at least the following beneficial effects:

[0042] The present invention provides a low-light image enhancement method based on a flow learning-based image hierarchical network, wherein the FIHN consists of an image hierarchical network and a reversible network based on a normalized flow; the image hierarchical network extracts image information from three dimensions: local, regional and global, so as to obtain as much image information as possible; the image hierarchical network mainly consists of two parts: a three-branch regional and global fusion module (TRGF) and a two-way dconv cross fusion (TDCF) module; the three-branch regional and global fusion module (TRGF) mainly extracts and fuses regional and global features of the image; the two-way dconv cross fusion module mainly extracts local features of the image and is used for denoising and contrast improvement; in addition, under the constraint of a negative log-likelihood loss function, the reversible network based on the normalized flow can fully learn the complex distribution of a normally exposed image and avoid outputting a large amount of noise;

[0043] FIHN can effectively handle low visibility, low contrast, noise and color distortion in low-light images;

[0044] The three-branch regional and global fusion module (TRGF) extracts and fuses the global and regional features of the image. It can enhance the overall illumination of the image and avoid the inadaptive enhancement of the image area (underexposure or overexposure);

[0045] Through the dual-channel dconv cross-fusion module that can extract local image features, denoise and improve contrast; the image can be restored by suppressing or enhancing relevant pixel value data through activation functions. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 It is a schematic diagram of the FIHN structure of the present invention;

[0048] Figure 2 Schematic diagram of the structure of the three-branch regional and global fusion module (TRGF) of the present invention;

[0049] Figure 3 It is a schematic diagram of the structure of the multi-Dconv head transposed attention (MDTA) module of the present invention;

[0050] Figure 4 It is a schematic diagram of the structure of a dual-path dconv cross fusion module (TDCF) of the present invention;

[0051] Figure 5 It is a schematic diagram of the first visual comparison result of various algorithms of the present invention on the LOL-v1 dataset;

[0052] Figure 6 It is a schematic diagram of the second visual comparison result of various algorithms of the present invention on the LOL-v1 dataset;

[0053] Figure 7 It is a schematic diagram of visual comparison results of various algorithms of the present invention on the LOL-v2-Real dataset;

[0054] Figure 8 It is a schematic diagram of visual comparison results of various algorithms of the present invention on the LOL-v2-Synthetic dataset;

[0055] Fig. 9 It is a schematic diagram of visual comparison results of various algorithms of the present invention on the DICM data set;

[0056] Fig.10 It is a schematic diagram of visual comparison results of various algorithms of the present invention on the LIME dataset;

[0057] Fig.11 It is a schematic diagram of visual comparison results of various algorithms of the present invention on the MEF data set;

[0058] Fig.12 It is a schematic diagram of the visualization results of the ablation experiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0060] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.

[0061] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features and technical solutions in the embodiments may be combined with each other.

[0062] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0063] Reference Figure 1-Figure 12 ,A low-light image enhancement method based on flow learning image hierarchy network.

[0064] 1. Related Information

[0065] 1.1 Research data

[0066] Many researchers have explored the low-light image enhancement task in many aspects. In the early days, histogram equalization (HE) enhanced the contrast by re-adjusting the grayscale range of the image. Later, based on HE, a variety of related algorithms were proposed (adaptive histogram equalization (AHE)

[40] , contrast-constrained adaptive histogram equalization (CLAHE)

[41] , global histogram equalization (GHE) and local histogram equalization (LHE)

[42] ). These methods can improve the quality of images by improving contrast, but they ignore the enhancement of illumination. The method based on Retinex theory decomposes the image into illumination and reflection components, and then uses different methods to enhance these two components respectively. Land and McCann use a random path algorithm to enhance the illumination component [1]. Park et al. use anisotropic TV prior to enhance the reflection component to reduce the noise of the enhanced image [2]. Moreover, this method can reduce noise by minimizing the loss of edge information using an anisotropic TV-prior on the reflectance component. Subsequently, researchers proposed various Retinex models to obtain better enhancement results, such as the single-scale Retinex (SSR) algorithm [3], the multi-scale Retinex (MSR) algorithm [4], and the multi-scale Retinex with color restoration (MSRCR) algorithm [5]. Wang et al. [6] built a brightness channel filter (bright-pass filter) for image decomposition, which can enhance the details and naturalness of the image. Guo et al. [7] used a structural prior to optimize the initial illumination map. Based on the traditional Retinex model, Li et al. [8] considered the noise map and used the alternating direction minimization algorithm to solve the optimization problem. Ren et al. [9] gradually estimated the piecewise smooth illumination and noise-suppressed reflectivity through a continuous sequence method. In recent years, deep learning has been widely developed in the field of basic image processing and has achieved good results. At the same time, phased progress has also been made in the task of low-light image enhancement. Wei et al.

[10] created a paired dataset containing low-light / normal-light images and proposed a matching Retinex-Net network. Retinex-Net combines Retinex theory and deep learning for the first time, but because the network does not consider the impact of reflectivity and illumination components on the image, the enhancement results have certain defects.Zhang et al. built a simple yet effective network for Kindling theDarkness (KinD)

[11] , but the excessive pooling and upsampling of the reflection restoration network caused halos in the enhanced image. To this end, they designed a multi-scale illumination attention module. Zamir et al.

[12] focused on the fusion and complementarity of features and deeply fused features of different scales. Restormer

[13] enhanced images by aggregating the interaction between local and non-local pixels and used a gating mechanism to control the flow of features, which suppressed features with less information and facilitated the accumulation of useful features. Wang et al.

[14] used an attention mechanism between axes and different levels. Although it reduced the linear complexity, the enhanced image had the defect of overexposure.

[0067] 1.2 Normalization

[0068] Normalized flow learns the complex distribution of data through reversible operations. Conventional deep neural networks are irreversible. In order to make the network reversible and computationally simple, the normalized flow model carefully designs the network structure used. For example: split and splice

[15] , permutation

[15] , 1 × 1 convolution

[15] , and radial coupling layer

[16] . In recent years, normalized flow has performed well in many tasks in the image field. For example, Lei et al.

[17] used pyramid normalized flow to locate defects. Oublal et al.

[18] used semi-supervised normalized flow to detect and recognize license plates. Windsheimer et al.

[19] used multi-scale normalized flow in image compression. In addition, normalized flow also exists in image denoising tasks. For example, Wei et al.

[20] combined the normalized flow in the proximal gradient algorithm to denoise the image. Of course, the idea of ​​normalized flow can also be used in low-light image tasks. Based on the idea of ​​normalized flow, a flow learning-based image hierarchy network (FIHN) was built for low-light image enhancement.

[0069] like Figure 1The FIHN structure shown in the figure. It consists of two parts: an image hierarchy network and a reversible network based on normalized flow learning. First, the designed image hierarchy network is mainly composed of a three-branch regional and global fusion module (TRGF) and a two-way dconv cross fusion module. The three-branch regional and global fusion module (TRGF) is mainly used to extract and fuse the global and regional features of the image, so as to enhance the overall brightness of the image and retain the image regional information. The two-way dconv cross fusion (TDCF) module can denoise and improve the contrast while extracting local features. The DU module is an upsampling and downsampling operation adapted to the model. Secondly, the reversible network is used to learn the complex distribution of the normal exposure image. Finally, the neuron weights of FIHN are adjusted by the negative log-likelihood loss function to obtain the network model with the best performance.

[0070] 2. Methods

[0071] An efficient low-light image enhancement model is built through the hierarchical structure of the image, so the following Figure 1 The FIHN network structure shown in Figure 1 is a FIHN network. FIHN consists of an image hierarchy network and a reversible network based on normalized flow, and the network is trained using a negative log-likelihood loss function. First, the core modules designed are introduced: the three-branch regional and global fusion module (TRGF) and the two-way dconv cross-fusion module. Secondly, the MDTA

[13] module used in the three-branch regional and global fusion module (TRGF) is introduced; finally, the negative log-likelihood loss function used is introduced.

[0072] 2.1 Three-branch regional and global fusion modules

[0073] like Figure 2 As shown in the figure, the structure of the three-branch regional and global fusion module (TRGF). The three-branch regional and global fusion module (TRGF) mainly extracts and fuses the global and regional features of the image. The first branch at the top extracts the global features of the image, and the second and third branches are used to extract regional features of different scales;

[0074] And all three branches use the MDTA module. Since there are three branches, the three-branch regional and global fusion module (TRGF) will Copied into three copies ( , and Next, we will introduce the processing of these three data. First, the first branch at the top does not process the feature matrix in order to extract global features. Secondly, in order to extract regional features, the second and third branches resize the feature matrix. The details are as follows: Resize to 4 sizes The characteristic matrix of ), and process them through MDTA to obtain 4 feature matrices ( ) their respective regional features. Next, these four feature matrices containing regional information ( ) and then readjusted to Since the second branch misses the regional features between the four feature matrices, and in order to further extract image information of smaller areas, the third branch at the bottom is designed. Different from the second branch, the third branch takes Resized to 9 sizes The characteristic matrix of ). MDTA is also used to extract their regional information, and the regional information between different feature matrices of the second branch is extracted at the same time. Then, the processed feature matrix ( ) is rescaled to Finally, due to the global feature ( ) is associated with each pixel, and the information it can express is more obvious, so and Designed weights and It is used to balance the difference between regional features and global features. The whole process of the above three-branch regional and global fusion module (TRGF) module can be defined as:

[0075]

[0076]

[0077]

[0078]

[0079]

[0080] Where X and Z represent the input feature matrix and output feature matrix respectively. R represents the reshaping of the feature matrix size. and are all set to 1. C, H, and W represent the dimension, height, and width of the feature matrix, respectively.

[0081] 2.2 Attention Mechanism

[0082] The structure of MDTA is as follows Figure 3As shown in , it uses an attention mechanism in the channel dimension, making its time complexity change linearly with the size of the image, rather than the exponential change of the traditional attention mechanism. MDTA calculates the cross covariance between channels to obtain the attention map between channels, and uses the attention map to adjust the weights between different channels to extract the global features of the image. Figure 3 As shown, MDTA first Then, the data is processed by single-pixel cross-channel aggregation (1x1 convolution) and single-channel spatial encoding (3x3 depth convolution), and we get , and Next, MDTA performs a dot product operation on Q and K to generate a transposed attention map Finally, by performing a dot product operation on V and the attention map A, the global information in the feature matrix V can be extracted. The entire process of MDTA is as follows:

[0083]

[0084]

[0085]

[0086]

[0087] In the above equation, represents the input feature matrix, represents the intermediate feature matrix, Represents the output feature matrix. Represents the layer normalization operation. Represents a 1x1 convolutional layer. Represents a 3x3 depth convolutional layer. R represents the reshaping operation on the feature matrix size. is a learnable hyperparameter.

[0088] 2.3 Dual-channel dconv cross-fusion module

[0089] In order to extract local features of the image, remove noise and improve contrast, a dual-path Dconv cross-fusion module is designed. Figure 4 As shown in Figure 1, TDCF has two main designs: (1) depthwise convolution and (2) element-wise dot product under the action of activation function. Depthwise convolution is used to encode the detailed information of local pixels in space to extract local features.

[0090] In addition, through data analysis of low-light images, the following discoveries and designs were made: (1) The gradient between adjacent pixels in low-light images is small, while the opposite is true for normal exposure images. Therefore, the Sigmoid activation function is used to enhance the gradient between local pixels in space, thereby improving the image contrast macroscopically. (2) Compared with normal exposure images, the pixel values ​​of low-light images are generally low. Therefore, the Gelu activation function is used to approximately linearly increase the pixel value to improve the visibility of the image. Then, the element-by-element dot product operation is used to balance each pixel value. Finally, in order to improve the correlation between the features of the two branches and eliminate the independence of the features, the cross dot product method is used. The mathematical formula of the dual-path dconv cross fusion module is expressed as follows:

[0091]

[0092]

[0093] Where X and Z represent the input feature matrix and output feature matrix respectively, LN represents the layer normalization operation, represents the Gelu activation function, Represents the Sigmoid activation function. represents the jth 1x1 convolutional layer on the i-th branch, represents the jth 3x3 depthwise convolutional layer on the i-th branch. In short, the dual-channel dconv cross-fusion module can not only extract local features, but also enhance the image in a single pixel dimension to make up for the shortcomings of the three-branch regional and global fusion module (TRGF) in local detail processing, thereby achieving the purpose of denoising and contrast enhancement.

[0094] In this embodiment, a reversible network based on normalized flow [43,44,45] is used, combined with the proposed image hierarchy network to form the following Figure 1 The FIHN network framework shown in Figure 1. Figure 1 It can be seen that the reversible network of FIHN consists of three identical layers, each of which consists of a SqueezeLayer

[43] and 12 flowstep layers. Each flowstep layer includes a conditional affine coupling layer, an affine injector layer, a 1×1 convolutional layer, and an Actnorm layer. SqueezeLayer is used to transform the feature size (converting the shape of ). The Flowstep layer does not change the shape of the feature matrix. In order to adapt to the different scale features of the three levels of the reversible network, at the end of the image hierarchy network, the corresponding downsampling and upsampling structures are designed, such as Figure 1 The DU module is shown in the figure.

[0095] 2.4 Losses and Features

[0096] According to the network structure analysis of the FIHN model, it is found that in order to obtain a higher quality enhanced image in the inference stage, it is necessary to require the reversible network based on the normalized flow and the image hierarchy network to have similar outputs in the training stage. To this end, a probability density function is used to represent the similarity of the outputs of the two network structures. In addition, considering that the reversible network based on the normalized flow is based on the low-light image features, Based on the normal light image Mapped to the potential feature z, the probability density function of is defined as follows:

[0097]

[0098] Where P represents the probability density function of the potential feature z. represents the model that generates the latent feature z.

[0099] In order to allow the model to obtain high-quality enhanced images during the inference phase, the optimal weight parameters in the model are learned by minimizing the negative log-likelihood during training. The loss function is as follows:

[0100]

[0101] in, Represents the designed image hierarchical network. The reversible network based on normalized flow learning is mainly composed of N reversible Flow Step blocks. In order to understand the input and output of each Flow Step block, Indicates the i-th Flow Step block, using Indicates the output of each Flow Step block, using Represents the input features of the image hierarchy network in the i-th Flow Step block. , i=1,2···,N-1.

[0102] in, represents the probability density function (PDF) of the latent feature z, which is calculated as follows:

[0103]

[0104] Among them, C( ) represents an image The color map is defined as follows:

[0105]

[0106] in, Representation calculation The average value for each pixel in the channel.

[0107] S(a, b) is a random selection function, and the calculation formula is as follows:

[0108]

[0109] Here is a hyperparameter and is set to 0.2 in the experiment.

[0110] 3. Experiment

[0111] 3.1 Implementation Details

[0112] The model was mainly experimented on the LOL-v1 dataset

[22] and the LOL-v2 dataset

[23] . In addition, relevant tests were also conducted on the unpaired datasets DICM dataset, LIME dataset, and MEF dataset. Among them, the LOL-v1 dataset has 500 pairs of low / normal light images, 485 pairs of images are used for training, and 15 pairs of images are used for testing. During training, 12x104 iterations were repeated, and the learning rate was reduced by 0.5 times at 4x104, 9x104, 10.8x104, and 11.4x104 iterations, respectively. The LOL-v2 dataset consists of two subsets: LOL-v2-real and LOL-v2-synthetic. LOL-v2-real includes 789 pairs of low / normal light images, 689 pairs of images are used for training, and 100 pairs of images are used for testing. LOL-v2-synthetic includes 1000 pairs of low / normal light images, 900 pairs of images are used for training, and 100 pairs of images are used for testing. When training the LOL-v2-real dataset and the LOL-v2-synthetic dataset, 16x104 iterations were performed, and the learning rate was reduced by a factor of 0.5 at 8x104, 14.4x104, and 15.2x104 iterations, respectively. Throughout the experiment, the image patch size was set to 160x160 and the batch size was set to 4. Adam was also used as the optimizer, and the learning rate was set to 5x10-4. The entire model was trained on NVIDIA A100.

[0113] 3.2 Quantitative Experiments

[0114] In order to fully evaluate the method proposed in this embodiment, the method of this embodiment is compared with a variety of advanced low-light image enhancement methods (Zero-DCE

[24] , EnlightenGAN

[25] , Retinex-Net

[26] , DRBN

[27] , KinD

[28] , KinD++

[29] , LLFlow

[30] , SNR-Aware

[31] , Retinex

[32] , MBLLEN

[33] , ExCNet

[34] , LLNet

[35] , FLIGHT-Net

[36] , LLFlow-L-SKF

[37] ,

[38] ) were compared. In order to more accurately evaluate the performance of the method in this embodiment, the peak signal-to-noise ratio (PSNR), structural similarity (SSIM), learning-perceptual patch similarity (LPIPS) and natural image quality evaluation (NIQE) commonly used in the field of image restoration were used as evaluation indicators of the test set. PSNR and SSIM are both used to evaluate the similarity between the enhanced image and the reference image, but PSNR focuses on pixel values, while SSIM focuses on the structure of the image. The higher the values ​​of PSNR and SSIM, the more similar the enhanced image and the reference image are, and vice versa. LPIPS takes into account human perception of images. The lower the LPIPS value, the higher the image quality. NIQE is used to evaluate the naturalness and visual perception quality of images. The lower the NIQE value, the better the image restoration result and the higher the image quality. The experimental results are shown in Tables 1, 2, 3 and 4.

[0115] Table 1 shows the test results of 11 algorithms on the LOL-v1 dataset. The method in this embodiment achieves the best results in all three evaluation indicators. In addition, based on LLFlow, the PSNR of this embodiment method increases by 2.27dB, the SSIM increases by 0.01, and the LPIPS decreases by 0.02. The visualization results of some algorithms are shown in Figure 1. Figure 5 and Figure 6 shown.

[0116] Table 1 Quantitative results of PSNR, SSIM and LPIPS of various algorithms on the LOL-v1 dataset.

[0117]

[0118] In order to verify the generalization performance and robustness of the model, relevant experiments were also conducted on two subsets of the LOL-v2 dataset (LOL-v2-Real dataset and LOL-v2-Synthetic dataset). As shown in Tables 2 and 3, they show the evaluation results of 8 algorithms on the LOL-v2 dataset. The method in this embodiment achieved the best results in both PSNR and SSIM evaluation indicators. Based on LLFlow, the PSNR of LOL-v2-Real increased by 2.27dB, SSIM increased by 0.12, and the PSNR of LOL-v2-Synthetic increased by 4.08dB, and SSIM increased by 0.01. The visualization results of some algorithms are shown in the figure below. Figure 7 and Figure 8 shown.

[0119] Table 2 Quantitative results of PSNR and SSIM of various algorithms on the LOL-v2-Real dataset.

[0120]

[0121] Table 3 Quantitative results of PSNR and SSIM of various algorithms on the LOL-v2-Synthetic dataset.

[0122]

[0123] The method of this embodiment achieved good results on the above paired datasets. In order to further demonstrate the performance of the model, relevant tests were also conducted on unpaired datasets (DICM dataset, MEF dataset and LIME dataset). However, since the unpaired datasets have no reference images, NIQE is used as the evaluation indicator, and the training set of LOL-v1 is used to train the model. The experimental results are shown in Table 4. The method of this embodiment achieved the best results on all three datasets. The visualization results of some algorithms are shown in Table 4. Fig. 9 , Fig.10 and Fig.11 shown.

[0124] Table 4 NIQE quantitative results of various algorithms on unpaired datasets (DICM, MEF and LIME).

[0125]

[0126] 3.3 Qualitative evaluation

[0127] The visualization results of some algorithms on 5 datasets are shown.

[0128] Figure 5 and Figure 6The visual comparison results of the algorithm in this embodiment and other 10 algorithms on the LOL-v1 dataset are shown. It can be observed that Figure 5 The overall brightness of the enhancement results of methods (b) and (d) is not enough. Figure 5 (f) Although the overall brightness of the image is improved, it also adds a lot of noise to the image, making the image blurry. Figure 5 The overall brightness of the LLFlow image is overexposed, and the image color lacks realism and natural softness. Figure 5 The method of this embodiment uses the three-branch regional and global fusion module (TRGF) to fuse the global and regional features of the image, which not only improves the overall brightness of the image, but also maintains more detailed features in different areas of the image, making the image softer and more in line with human visual perception. Figure 6 The EnlightenGAN method in (j) improves the overall brightness of the image, but the image texture is not clear enough and there are a lot of noise points. Figure 6 In the green box, the enhanced image of LLFlow is lighter in color, the purple is not prominent enough, and the stripes are not clear enough. In contrast, the method of this embodiment improves the contrast of the image and makes the texture of the image clearer and more visible due to the design of the dual-path dconv cross-fusion module. It can be seen that the method of this embodiment is superior in terms of image texture clarity and image local contrast. In short, the method proposed in this embodiment has a significant effect on enhancing the brightness of the overall image, the enhanced image is bright in color, and the texture of the image is clearer and more visible.

[0129] Figure 7 and Figure 8 The visual comparison results of the model of this embodiment, SNR-Aware, FLW-Net and LLFlow models on the LOL-v2 datasets (LOL-v2-Real and LOL-v2-Synthetic datasets) are shown respectively. Figure 7 As shown in the figure, by comparing the contents, we can see that the enhancement results of SNR-Aware and FLIGHT-Net are fuzzy and have no clear texture. The real color of the green box in the reference image is dark green, but LLFlow is black, which is an obvious color distortion phenomenon. Figure 8 As shown in the figure, SNR-Aware overexposes the image, making the entire sky appear too white. In addition, the red and green frames of LLFlow are missing details, and most of the small branches in the image are ignored. Figure 7 and Figure 8In the image, not only does it maintain a clear texture, but the color enhancement is also the closest to the reference image. This is due to the regional feature extraction structure of this embodiment, which can ensure that the regional features of the image are not destroyed during the enhancement process. In addition, the dual-channel dconv cross-fusion module can improve the contrast of the image, making the image look clearer.

[0130] Fig. 9 The enhancement results of two images in the DICM dataset, one severely underexposed and the other moderately exposed, are shown. The first row is the original image, the second row is the enhancement result of the LLFlow method, and the third row is the enhancement result of the method of this embodiment. First, by comparing the image on the left, the road surface of the model of this embodiment is clearer and more visible than that of LLFlow. And for the enhancement of the sky, the enhanced image of LLFlow has color distortion. Secondly, in the enhanced image of sunflowers, the petals and stamens of the method of this embodiment are clearer than those of the enhanced image of LLFlow, and the overall brightness of the image is higher. Therefore, the method of this embodiment can achieve better enhancement effect.

[0131] Fig.10 The enhanced result of a street corner night scene image in the LIME dataset is shown. By comparing the area in the red box, the method in this embodiment fully considers the context information of the original image, making the wall and the light blend into one, giving a more realistic visual effect. Compared with other methods, the image is either overexposed or too prominent.

[0132] Fig.11 Shows the enhancement results of an outdoor scenery image in the MEF dataset. Fig.11 The enhanced images in c and d are overexposed and have a lot of noise and color distortion. Fig.11 The image in f is blurred as a whole and has low definition. The method of this embodiment not only restores the realism of the grassland and the forest, but also outperforms other methods in terms of local details and contrast of the image.

[0133] 3.4 Ablation study

[0134] In order to prove the effectiveness of the module in this embodiment, multiple ablation experiments were conducted on the LOL-v1 dataset. The results of the ablation experiments are shown in Table 5, and the visualization results are shown in Fig.12As shown. The FIHN is based on LLFlow is the baseline. It can be seen from Table 5 that based on the baseline LLFlow, the introduction of the three-branch regional and global fusion module (TRGF) improves the PSNR by 1.68dB. The introduction of the two-way dconv cross-fusion module improves the PSNR by 0.11dB. The joint introduction of the three-branch regional and global fusion module (TRGF) and the two-way dconv cross-fusion module (ours) improves the PSNR by 2.27dB, the SSIM by 0.01, and the LPIPS by 0.02.

[0135] The three-branch regional and global fusion module (TRGF) and the two-way dconv cross-fusion module were trained and tested separately. Fig.12 As shown in (b), the three-branch regional and global fusion module (TRGF) improves the overall illumination of the image and retains more regional features. It allows the image to show more image details and characteristics in different regions while maintaining uniform illumination. However, when only the three-branch regional and global fusion module (TRGF) is used, the texture clarity and contrast of the image are quite different from the reference image, and there are more noise points in the image, and the image contrast is poor. Therefore, the PSNR, SSIM and LPIPS in the final test results are 26.67dB, 0.92 and 0.12 respectively. By comparing the red box, it can be seen that Fig.12 (c) Ratio Fig.12 (b) has more seat textures. It can be seen that the dual-way dconv cross-fusion module can make up for the shortcomings of the three-branch regional and global fusion module (TRGF). It can improve the contrast and texture clarity of the image, reduce the noise of the image, and make the image clearer. However, when only the dual-way dconv cross-fusion module is used, the performance of the model is much lower than that of the complete network model. As the design intention, whether only the three-branch regional and global fusion module (TRGF) or only the dual-way dconv cross-fusion module is used, their evaluation index values ​​cannot reach the optimal value. Only when both the three-branch regional and global fusion module (TRGF) and the dual-way dconv cross-fusion module are included, the model can achieve the optimal performance. This also proves the effectiveness of the designed module.

[0136] Table 5 Quantitative results of ablation experiments on the LOL-v1 dataset.

[0137]

[0138] Fourth, it is observed that the low-light image enhancement process often generates a lot of noise, and the reflectivity of images in different regions is not always the same. Blindly enhancing the entire image may not eventually result in an ideal enhanced image. Based on the above observations, the FIHN network is proposed, which consists of an image hierarchy network and a reversible network based on normalized flow. The image hierarchy network mainly consists of TRGF modules and DDCF modules. TRGF learns the hierarchical information of the image from both global and regional scales to adjust the overall illumination and regional characteristics. DDCF learns the hierarchical information of the image from the local scale to restore the local details of the image and uses the relevant activation function for pixel-level image restoration. The image hierarchy network provides sufficient conditional features for the reversible network based on normalized flow, so that FIHN can fully learn the complex distribution of the reference image under the constraint of the negative log-likelihood loss function, and finally infer the ideal enhanced image. Experimental results on benchmark datasets show that FIHN outperforms other advanced low-light image enhancement algorithms. It can handle various types of image degradation such as low visibility, low contrast, large amounts of noise, and color distortion.

[0139] References are as follows:

[0140] [1] EH Land and JJ McCann, ''Lightness and Retinex theory,'' J.Opt. Soc. Amer., vol. 61, no. 1, pp. 1–11, Jan. 1971.

[0141] [2] Park S, Yu S, Moon B, et al. Low-light image enhancement using variational optimization-based retinex model[J]. IEEE Transactions onConsumer Electronics, 2017, 63(2): 178-184.

[0142] [3] Jobson, DJ, et al. “Properties and Performance of a Center / Surround Retinex.” IEEE Transactions on Image Processing, Mar. 1997, pp. 451–62, https: / / doi.org / 10.1109 / 83.557356.

[0143] [4] Rahman, Z., et al. “Multi-Scale Retinex for Color ImageEnhancement.” Proceedings of 3rd IEEE International Conference on ImageProcessing, 2002, https: / / doi.org / 10.1109 / icip.1996.560995.

[0144] [5] Jobson, D. J., et al. “A Multiscale Retinex for Bridging the Gapbetween Color Images and the Human Observation of Scenes.” IEEE Transactionson Image Processing, July 1997, pp. 965–76, https: / / doi.org / 10.1109 / 83.597272.

[0145] [6] Wang, Shuhang, et al. "Naturalness preserved enhancementalgorithm for non-uniform illumination images." IEEE transactions on imageprocessing 22.9 (2013): 3538-3548.

[0146] [7] Guo, Xiaojie, Yu Li, and Haibin Ling. "LIME: Low-light imageenhancement via illumination map estimation." IEEE Transactions on imageprocessing 26.2 (2016): 982-993.

[0147] [8] Li, Mading, et al. "Structure-revealing low-light imageenhancement via robust retinex model." IEEE Transactions on Image Processing27.6 (2018): 2828-2841.

[0148] [9] Ren, Xutong, et al. "Joint enhancement and denoising method viasequential decomposition." 2018 IEEE international symposium on circuits andsystems (ISCAS). IEEE, 2018.

[0149]

[10] Wei, Chen, et al. "Deep retinex decomposition for low-lightenhancement." arXiv preprint arXiv:1808.04560 (2018).

[0150]

[11] Zhang, Yonghua, Jiawan Zhang, and Xiaojie Guo. "Kindling thedarkness: A practical low-light image enhancer." Proceedings of the 27th ACMinternational conference on multimedia. 2019.

[0151]

[12] Zamir, Syed Waqas, et al. “Learning Enriched Features for RealImage Restoration and Enhancement.” Computer Vision – ECCV 2020,Lecture Notesin Computer Science, 2020, pp. 492–511, https: / / doi.org / 10.1007 / 978-3-030-58595-2_30.

[0152]

[13] Zamir, Syed Waqas, et al. “Restormer: Efficient Transformer forHigh-Resolution Image Restoration.” 2022 IEEE / CVF Conference on ComputerVision and Pattern Recognition (CVPR), 2022, https: / / doi.org / 10.1109 / cvpr52688.2022.00564.

[0153]

[14] Wang, Tao, et al. Ultra-High-Definition Low-Light ImageEnhancement: A Benchmark and Transformer-Based Method. Dec. 2022.

[0154]

[15] Kingma, DiederikP., and Prafulla Dhariwal. “Glow: GenerativeFlow with Invertible 1x1 Convolutions.” Neural Information ProcessingSystems,Neural Information Processing Systems, Jan. 2018.

[0155]

[16] Dinh, Laurent, David Krueger, and Yoshua Bengio. "Nice: Non-linear independent components estimation." arXiv preprint arXiv:1410.8516(2014).

[0156]

[17] Lei, Jiarui, et al. PyramidFlow: High-Resolution DefectContrastive Localization Using Pyramid Normalizing Flow. Mar. 2023.

[0157]

[18] Oublal, Khalid, and Xinyi Dai. An Advanced Combination of Semi-Supervised Normalizing Flow & Yolo (YoloNF) to Detect and Recognize VehicleLicense Plates. July 2022.

[0158]

[19] Windsheimer, Marc, Fabian Brand, and André Kaup. "MultiscaleAugmented Normalizing Flows for Image Compression." arXiv preprint arXiv:2305.05451 (2023).

[0159]

[20] Wei, Xinyi, et al. "Image denoising with deep unfolding andnormalizing flows." ICASSP 2022-2022 IEEE International Conference onAcoustics, Speech and Signal Processing (ICASSP). IEEE, 2022.

[0160]

[21] Wang, Yufei, et al. “Low-Light Image Enhancement withNormalizing Flow.” Proceedings of the AAAI Conference on ArtificialIntelligence, July 2022, pp. 2604–12, https: / / doi.org / 10.1609 / aaai.v36i3.20162.

[0161]

[22] Wei, Chen, et al. “Deep Retinex Decomposition for Low-LightEnhancement.” arXiv: Computer Vision and Pattern Recognition,arXiv: ComputerVision and Pattern Recognition, Aug. 2018.

[0162]

[23] Yang, Wenhan, et al. “Sparse Gradient Regularized Deep RetinexNetwork for Robust Low-Light Image Enhancement.” IEEE Transactions on ImageProcessing, Jan. 2021, pp. 2072–86, https: / / doi.org / 10.1109 / tip.2021.3050850.

[0163]

[24] Guo, Chunle, et al. "Zero-reference deep curve estimation forlow-light image enhancement." Proceedings of the IEEE / CVF conference oncomputer vision and pattern recognition. 2020.

[0164]

[25] Jiang, Yifan, et al. "Enlightengan: Deep light enhancementwithout paired supervision." IEEE transactions on image processing 30 (2021):2340-2349.

[0165]

[26] Wei, Chen, et al. "Deep retinex decomposition for low-lightenhancement." arXiv preprint arXiv:1808.04560 (2018).

[0166]

[27] Yang, Wenhan , et al. "Band Representation-Based Semi-SupervisedLow-Light Image Enhancement: Bridging the Gap Between Signal Fidelity andPerceptual Quality." IEEE Transactions on Image Processing (2021).

[0167]

[28] Zhang, Yonghua, et al. “Kindling the Darkness: A Practical Low-Light Image Enhancer.” arXiv: Computer Vision and Pattern Recognition,arXiv:Computer Vision and Pattern Recognition, May 2019.

[0168]

[29] Y. Zhang, X. Guo, J. Ma, W. Liu, J. Zhang, Beyond brighteninglowlight images, International Journal of Computer Vision 129 (4) (2021)1013–1037.

[0169]

[30] Wang, Yufei, et al. "Low-light image enhancement withnormalizing flow." Proceedings of the AAAI conference on artificialintelligence. Vol. 36. No. 3. 2022.

[0170]

[31] Xu, Xiaogang, et al. "SNR-aware low-light image enhancement."Proceedings of the IEEE / CVF conference on computer vision and patternrecognition. 2022.

[0171]

[32] Liu, Risheng, et al. "Retinex-inspired unrolling withcooperative prior architecture search for low-light image enhancement."Proceedings of the IEEE / CVF Conference on Computer Vision and PatternRecognition. 2021.

[0172]

[33] Lv, Feifan, et al. "MBLLEN: Low-Light Image / Video EnhancementUsing CNNs." BMVC. Vol. 220. No. 1. 2018.

[0173]

[34] Zhang, Lin, et al. "Zero-shot restoration of back-lit imagesusing deep internal learning." Proceedings of the 27th ACM internationalconference on multimedia. 2019.

[0174]

[35] Lore, Kin Gwn, Adedotun Akintayo, and Soumik Sarkar. "LLNet: Adeep autoencoder approach to natural low-light image enhancement." PatternRecognition 61 (2017): 650-662.

[0175]

[36] Ozcan, Mustafa, Hamza Ergezer, and Mustafa Ayazoğlu. "FLIGHT ModeOn: A Feather-Light Network for Low-Light Image Enhancement." Proceedings ofthe IEEE / CVF Conference on Computer Vision and Pattern Recognition. 2023.

[0176]

[37] Wu, Yuhui, et al. "Learning Semantic-Aware Knowledge Guidancefor Low-Light Image Enhancement." Proceedings of the IEEE / CVF Conference onComputer Vision and Pattern Recognition. 2023.

[0177]

[38] Fu, Huiyuan, et al. "You Do Not Need Additional Priors orRegularizers in Retinex-Based Low-Light Image Enhancement." Proceedings ofthe IEEE / CVF Conference on Computer Vision and Pattern Recognition. 2023.

[0178]

[39] Pizer, S. M., et al. “Contrast-Limited Adaptive HistogramEqualization: Speed and Effectiveness.”

[1990] Proceedings of the FirstConference on Visualization in Biomedical Computing, 2002, https: / / doi.org / 10.1109 / vbc.1990.109340.

[0179]

[40] Tae Keun Kim, et al. “Contrast Enhancement System UsingSpatially Adaptive Histogram Equalization with Temporal Filtering.” IEEETransactions on Consumer Electronics, Jan. 1998, pp. 82–87, https: / / doi.org / 10.1109 / 30.663733.

[0180]

[41] Pisano, Etta D., et al. “Contrast Limited Adaptive HistogramEqualization Image Processing to Improve the Detection of SimulatedSpiculations in Dense Mammograms.” Journal of Digital Imaging, vol. 11, no.4, Nov. 1998, pp. 193–200, https: / / doi.org / 10.1007 / bf03178082.

[0181]

[42] Li, L., et al. "Survey of histogram equalization technology." Comput. Syst. Appl 23.3 (2014): 1-8.

[0182]

[43] Kingma, DiederikP., and Prafulla Dhariwal. “Glow: Generative Flowwith Invertible 1x1 Convolutions.” Neural Information Processing Systems,Neural Information Processing Systems, Jan. 2018.

[0183]

[44] Dinh, Laurent, et al. “NICE: Non-Linear Independent ComponentsEstimation.” arXiv: Learning,arXiv: Learning, Oct. 2014.

[0184]

[45] Lugmayr, Andreas, et al. “SRFlow: Learning the Super-ResolutionSpace with Normalizing Flow.” arXiv: Computer Vision and Pattern Recognition,arXiv: Computer Vision and Pattern Recognition, June 2020.

[0185] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the present invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A low-light image enhancement method based on a flow learning image hierarchy network, characterized in that: Here are the steps: The FIHN structure is composed of an image hierarchy network and a reversible network based on normalized flow learning; The network is trained using the negative log-likelihood loss function; The image hierarchy network consists of a three-branch regional and global fusion module and a two-way dconv cross fusion module; The three-branch regional and global fusion module is used to extract and fuse the global and regional features of the image; The dual-path Dconv cross-fusion module extracts local features while removing noise and improving contrast; The reversible network is used to learn the complex distribution of normal exposure images; The neuron weights of FIHN are adjusted through the negative log-likelihood loss function to obtain the network model with optimal performance; The network is trained using the negative log-likelihood loss function, and the loss function expression is as follows: in, A hierarchical network of images representing the design; Represents the i-th Flow Step block; Represents the output of each Flow Step block, Represents the input features of the image hierarchy network in the i-th Flow Step block; represents the probability density function of the latent feature z; The expression is as follows: Among them, C( ) represents an image The color map of is expressed as follows: in, Representation calculation The average value for each pixel in the channel.

2. The low-light image enhancement method based on the image hierarchical structure network of flow learning according to claim 1, characterized in that: In the three-branch regional and global fusion module, the first branch at the top extracts the global features of the image, and the second branch and the third branch are used to extract regional features of different scales; So the three-branch regional and global fusion modules will Duplicate it into three copies, , and ; The first branch at the top is used to extract global features, not feature matrix Adjust the size of The second branch will Resize to 4 sizes The characteristic matrices of , and were processed by MDTA to obtain The four feature matrices are the respective regional features, and then These four feature matrices containing regional information are resized to ; The third branch will Resized to 9 sizes The characteristic matrices of ; Then use MDTA to extract the corresponding regional information, and at the same time extract the regional information between different feature matrices of the second branch, and process it as The feature matrix is ​​resized to .

3. The low-light image enhancement method based on the image hierarchical structure network of flow learning according to claim 2 is characterized in that: The MDTA uses an attention mechanism in the channel dimension, obtains an attention map between channels by calculating the cross covariance between channels, and uses the attention map to adjust the weights between different channels, thereby extracting the global features of the image.

4. The low-light image enhancement method based on the image hierarchical structure network of flow learning according to claim 1, characterized in that: The dual-channel dconv cross-fusion module has the following steps: Based on the Sigmoid activation function to improve the gradient between local pixels in space; Based on the Gelu activation function to approximately linearly increase the pixel value; Based on element-by-element dot product operation to balance each pixel value; The cross-dot product-based approach can improve the correlation between features of the two branches and eliminate the independence of features.

5. The low-light image enhancement method based on the image hierarchical structure network of flow learning according to claim 1, characterized in that: The similarity between the output of the image hierarchy network and the reversible network structure learned based on normalized flow is represented by a probability density function; The expression of the probability density function is as follows: Among them, P represents the probability density function of the potential feature z, represents the model that generates the latent feature z.