Image enhancement method and apparatus, electronic device, and storage medium

WO2024217182A1PCT designated stage expired Publication Date: 2024-10-24UNIV OF SCI & TECH OF CHINA +1

Patent Information

Application Number
PCT/CN2024/081100
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-17
Filing Date
2024-03-12
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

Existing low-light image enhancement methods require a large number of paired images for training, and the definition of true-value images is subjective and vague, affecting the generalization ability of the model. They also rely on the statistical characteristics of the training data, making it difficult to effectively generalize in real scenes.

Method used

The zero-shot learning enhancer is trained using a defined prior-guided regularization loss, and the expected exposure image is learned from a single low-light image to build a flexible and controllable image enhancement network, using illumination priors and natural image priors, segmentation Smooth constraints and flexibility factors realize two-stage progressive learning.

Benefits of technology

It achieves good generalization ability in real scenes, can learn the expected exposure image from a single low-light image, reduces dependence on training data, improves the quality and visibility of image enhancement, suppresses noise, and maintains the naturalness of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024081100_24102024_PF_FP_ABST
    Figure CN2024081100_24102024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention provides an image enhancement method and apparatus, an electronic device, and a storage medium. The method comprises: acquiring a single low-light image to be processed; inputting said single low-light image into an image enhancement network, wherein the image enhancement network is obtained by training a zero-sample learning enhancer by defining priori-guided regularization loss; and acquiring an expected exposure image outputted by the image enhancement network for said single low-light image. The present invention provides a flexible and controllable zero-sample learning enhancer, which can learn the expected exposure image, only needs the single low-light image and does not depend on statistical characteristics of training data, so that the present invention has a good generalization ability for a real scene; and correspondingly, the image enhancement network constructed on the basis of the zero-sample learning enhancer can learn the expected exposure image only by inputting the single low-light image for training.
Need to check novelty before this filing date? Find Prior Art

Description

Image enhancement method, device, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 17, 2023, with application number 202310424938.5 and invention name “Image enhancement method, device, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present invention relates to the field of image enhancement technology, and more specifically, to an image enhancement method, device, electronic device and storage medium. Background Art

[0003] Images taken in low-light environments often suffer from severe visual degradation, such as low brightness, color distortion, and unclear textures. To address this issue, mainstream research applies supervised learning to achieve low-light image enhancement. These models are trained using carefully collected datasets containing a large number of low-light / normal-light paired images. Although these methods have achieved remarkable performance, a key problem is that they require collecting a large number of paired images, which is tedious and time-consuming. In addition, unlike high-level vision tasks with clear definitions of labels, the definition of ground-truth images (i.e., normal-light images) in low-light image enhancement tasks is subjective and vague, which affects the representation of enhanced images and makes it more difficult to achieve satisfactory generalization capabilities.

[0004] To alleviate the above problems, many unsupervised learning methods have been developed. Generally speaking, these methods mainly include two technical routes. One is to use unpaired low-light / normal-light paired images for training, where low-light images are used for coarse enhancement, and unpaired images are used to refine the global style with the help of adversarial learning; the other is to use multiple low-light images for training, where image priors are used to help restore normal-light images. Both research routes can achieve good visibility. However, in order to achieve satisfactory performance, the data distribution of external low-light (and normal-light) images used for training must be highly correlated with the test images captured from real scenes, otherwise the generalization ability of the low-light image enhancement model cannot be guaranteed.

[0005] Summary of the Invention

[0006] In view of this, in order to solve the above problems, the present invention provides an image enhancement method, device, electronic device and storage medium, and the technical solutions are as follows:

[0007] An image enhancement method, comprising:

[0008] Obtain a single low-light image to be processed;

[0009] Inputting the single low-light image to be processed into an image enhancement network, wherein the image enhancement network is obtained by training a zero-shot learning enhancer by defining a prior-guided regularization loss;

[0010] Obtain an expected exposure image output by the image enhancement network for the single low-light image to be processed.

[0011] Preferably, the process of training the zero-shot learning enhancer to obtain the image enhancement network by defining a priori guided regularization loss includes:

[0012] Construct the zero-shot learning booster:

[0013] in, is the expected exposure image of the output; For the output illumination ratio map, satisfy the piecewise smoothness constraint, L is the illumination diagram, is the desired illumination; I is the input single low-light image, R is the reflectivity map; N is the output noise map; φ(N) is the regularization term of the output expected exposure image, illumination ratio map and noise map respectively; λ1, λ2 and λ3 are The balancing weights of φ(N) are: λ1 is set to 1, λ2 is set to 0.5, and λ3 is set to 0.1; They are texture regularization term, color regularization term, and illumination regularization term respectively;

[0014] Construct the loss function of the zero-shot learning enhancer:

[0015] Among them, L all is the overall loss function; L rec To rebuild the losses, L L is the regularization loss of the illumination map, is the gradient operator, λ g is the balance factor, λ g Set to 10; L N is the regularization loss of the noise map, L N =||M(N)||, M(·) is the function for calculating the input mean; L T is the texture loss, F(·) is the feature extractor, T(·) is the illumination transformation, D(·) is the denoising operation, and γt is the learnable factor; L C For color loss, is the pixel-to-pixel conversion function, α and β are learnable parameters, and S(·) is the function for calculating the input variance; for Corresponding r, g, b channels, I i ∈{I r ,I g ,I b} are the r, g, and b channels corresponding to I; λ cf is a constant parameter used to enhance image color, set to 0.025; E n is a constant parameter used to determine the color level of the image, set to 0.32; ω is a weight parameter, set to 0.3; L I is the illumination loss, δ(·) is the operation of generating a local image from the input image, B is the number of image blocks, and λ il is a parameter used to balance the local contrast of the expected exposure image, λ il Set to 2; ε is a constant parameter set in the range of [0.25, 0.75];

[0016] The zero-shot learning enhancer is trained by iteratively optimizing the loss function of the zero-shot learning enhancer, and the trained zero-shot learning enhancer is used as the image enhancement network.

[0017] Preferably, the training of the zero-shot learning enhancer comprises:

[0018] The zero-shot learning enhancer is trained in a first phase using input-guided enhancement: a single low-light image for iterative training is obtained; the single low-light image for iterative training is input into the zero-shot learning enhancer to obtain a corresponding expected exposure image;

[0019] The zero-shot learning enhancer is trained in the second phase using output-guided refinement:

[0020] The expected exposure image obtained from each iterative training in the first stage is stored in a historical data pool, and the average value of multiple expected exposure images stored closest to the current moment in the historical data pool is used as the rough enhanced exposure image output in the first stage; the rough enhanced exposure image is input into the zero-shot learning enhancer to obtain the corresponding expected exposure image; and the expected exposure image obtained from each iterative training in the second stage is stored in the historical data pool.

[0021] Preferably, the illumination transformation T(·) is a gamma correction, and the denoising operation D(·) is a zero-sample denoising operation.

[0022] An image enhancement device, comprising:

[0023] An image acquisition module, used to acquire a single low-light image to be processed;

[0024] An image enhancement module is configured to input the single low-light image to be processed into an image enhancement network, wherein the image enhancement network is obtained by training a zero-shot learning enhancer with a defined prior-guided regularization loss; and obtain an expected exposure image output by the image enhancement network for the single low-light image to be processed.

[0025] Preferably, the image enhancement module trains the zero-shot learning enhancer to obtain the image enhancement network by defining a priori guided regularization loss, comprising:

[0026] Construct the zero-shot learning booster:

[0027] in, is the expected exposure image of the output; For the output illumination ratio map, satisfy the piecewise smoothness constraint, L is the illumination diagram, is the desired illumination; I is the input single low-light image, R is the reflectivity map; N is the output noise map; φ(N) is the regularization term of the output expected exposure image, illumination ratio map and noise map respectively; λ1, λ2 and λ3 are The balancing weights of φ(N) are: λ1 is set to 1, λ2 is set to 0.5, and λ3 is set to 0.1; They are texture regularization term, color regularization term, and illumination regularization term respectively;

[0028] Construct the loss function of the zero-shot learning enhancer:

[0029] Among them, L all is the overall loss function; L rec To rebuild the losses, is the regularization loss of the illumination map, is the gradient operator, λ g is the balance factor, λ g Set to 10; L N is the regularization loss of the noise map, L N =||M(N)||, M(·) is the function for calculating the input mean; L T is the texture loss, F(·) is the feature extractor, T(·) is the illumination transformation, D(·) is the denoising operation, and γt is the learnable factor; LC For color loss, is the pixel-to-pixel conversion function, α and β are learnable parameters, and S(·) is the function for calculating the input variance; for Corresponding r, g, b channels, I i ∈{I r ,I g ,I b} are the r, g, and b channels corresponding to I; λ cf is a constant parameter used to enhance image color, set to 0.025; E n is a constant parameter used to determine the color level of the image, set to 0.32; ω is a weight parameter, set to 0.3; L I is the illumination loss, δ(·) is the operation of generating a local image from the input image, B is the number of image blocks, and λ il is a parameter used to balance the local contrast of the expected exposure image, λ il Set to 2; ε is a constant parameter set in the range of [0.25, 0.75];

[0030] The zero-shot learning enhancer is trained by iteratively optimizing the loss function of the zero-shot learning enhancer, and the trained zero-shot learning enhancer is used as the image enhancement network.

[0031] Preferably, the process of the image enhancement module training the zero-shot learning enhancer includes:

[0032] The zero-shot learning enhancer is trained in a first phase using input-guided enhancement: a single low-light image for iterative training is obtained; the single low-light image for iterative training is input into the zero-shot learning enhancer to obtain a corresponding expected exposure image;

[0033] The zero-shot learning enhancer is trained in the second phase using output-guided refinement:

[0034] The expected exposure image obtained from each iterative training in the first stage is stored in a historical data pool, and the average value of multiple expected exposure images stored closest to the current moment in the historical data pool is used as the rough enhanced exposure image output in the first stage; the rough enhanced exposure image is input into the zero-shot learning enhancer to obtain the corresponding expected exposure image; and the expected exposure image obtained from each iterative training in the second stage is stored in the historical data pool.

[0035] Preferably, the illumination transformation T(·) is a gamma correction, and the denoising operation D(·) is a zero-sample denoising operation.

[0036] An electronic device comprises: at least one memory and at least one processor; the memory stores an application program, the processor calls the application program stored in the memory, and the application program is used to implement the image enhancement method.

[0037] A storage medium stores computer program code, which implements the image enhancement method when executed.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] The present invention provides an image enhancement method, apparatus, electronic device, and storage medium, which obtain a single low-light image to be processed; input the single low-light image to be processed into an image enhancement network, wherein the image enhancement network is trained by defining a priori-guided regularization loss to obtain an expected exposure image output by the image enhancement network for the single low-light image to be processed. The present invention proposes a flexible and controllable zero-shot learning enhancer that can learn the expected exposure image, requiring only the single low-light image itself and not relying on the statistical characteristics of the training data. Therefore, it has good generalization capabilities for real scenes. Accordingly, an image enhancement network constructed based on the zero-shot learning enhancer can learn the expected exposure image by only inputting a single low-light image for training. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] FIG1 is a flow chart of an image enhancement method provided by an embodiment of the present invention;

[0042] FIG2 is a schematic diagram of the structure of an image enhancement network provided by an embodiment of the present invention;

[0043] FIG3 is a diagram of λ provided by an embodiment of the present invention. cf and λ il Schematic diagram of parameter analysis;

[0044] FIG4 is a visualization comparison result of the image enhancement network provided by an embodiment of the present invention and other low-light image enhancement models;

[0045] FIG5 is a visualization comparison result of the image enhancement network provided by an embodiment of the present invention and other low-light image enhancement models on a non-reference dataset;

[0046] FIG6 is a schematic structural diagram of an image enhancement device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0049] In order to solve the problem of visual degradation in low-light images in the prior art, the inventors found that:

[0050] Researchers have proposed many methods, which are mainly divided into non-learning methods, supervised learning methods and unsupervised learning methods.

[0051] Non-learning methods include gamma correction, histogram equalization, and Retinex-based methods. Gamma correction-based methods transform the image illumination through the gamma curve, which can improve the image contrast, but it can easily cause overexposure or underexposure. Histogram equalization-based methods first calculate the histogram of the low-light image and then improve the image contrast by stretching the dynamic range. This method is simple and effective, but it can easily amplify local noise. Retinex-based methods decompose the low-light image into an illumination map and a reflectance map, and then use the reflectance map as the final enhanced image. This technology improves the details and naturalness of the enhanced image, but it is still susceptible to strong noise.

[0052] In recent years, supervised learning methods have dominated research on low-light image enhancement. The low-light network (LLNet) was one of the earliest attempts, achieving image enhancement by training a deep autoencoder with synthetic dark images. Inspired by this work, many studies have adopted synthetic datasets to train low-light image enhancement models. However, synthetic datasets fail to reflect the characteristics of real low-light images, hindering the applicability of these methods to real-world scenarios. To address this issue, Wei et al. collected a low-light dataset (LOL) consisting of paired low-light and normal-light images. Yang et al. extended the LOL dataset to construct a larger dataset of low-light paired images with more realistic scenes. Chen et al. introduced a real paired image dataset consisting of original short-exposure low-light images and corresponding long-exposure reference images. Based on these real paired datasets, more supervised learning methods have been proposed. For example, Zhang et al. proposed KinD (kindling the darkness) and KinD++ (kindling the darkness plus), which not only illuminate dark areas but also remove hidden artifacts. Xu et al. utilized a signal-to-noise ratio-aware Transformer and a convolutional model to dynamically enhance pixels through spatially varying operations. Although these methods have made great breakthroughs in enhancing quality, they rely on large-scale low-light / normal-light paired images, which are very time-consuming to obtain.

[0053] To reduce the requirement for paired low-light / normal-light images, many works have been devoted to developing unsupervised learning methods. Typically, Jiang et al. proposed the Inspired Adversarial Network (IAN), a lightweight but effective single-path generative adversarial network. Ni et al. proposed the unsupervised enhancement generative adversarial network (UEGAN), which learns image-to-image mappings from a set of images with desired features. Jin et al. integrated a decomposition network and a light effect suppression network in a unified framework to achieve unsupervised nighttime image enhancement. These methods fully exploit unpaired images and achieve encouraging results. Furthermore, some methods attempt to achieve unsupervised low-light image enhancement using only low-light images. For example, Guo et al. proposed zero-reference deep curve estimation (Zero-DCE++), which defines low-light image enhancement as the task of image-specific curve estimation. Liu et al. proposed retinex-inspired unrolling with architecture search (RUAS), which achieves unsupervised learning by designing a cooperative no-reference learning strategy. All of these methods achieve good enhancement quality. However, they still require the collection of large-scale training images. Recently, two papers have further developed low-light image enhancement models trained on a single low-light image based on deep image prior (DIP). However, DIP mainly focuses on restoring the overall texture and color of the image and cannot effectively restore the ideal illumination.

[0054] To solve the above-mentioned problems of the prior art, the present invention proposes an image enhancement method for learning an expected exposure image from a single low-light image. No training dataset is required, and the expected exposure image can be restored given a low-light image and expected brightness.

[0055] Referring to Figure 1, Figure 1 is a flowchart of an image enhancement method provided by an embodiment of the present invention. As shown in Figure 1, the image enhancement method includes the following steps:

[0056] S10: Acquire a single low-light image to be processed.

[0057] In the embodiment of the present invention, the single low-light image to be processed is an image taken in a low-light environment and can be specified by the user.

[0058] S20, inputs the single low-light image to be processed into the image enhancement network, which is obtained by training the zero-shot learning enhancer by defining a priori guided regularization loss.

[0059] In this paper, a flexible and controllable zero-shot learning enhancer is proposed. It can learn the expected exposure image, requiring only the low-light image itself as input. This zero-shot learning enhancer does not rely on the statistical characteristics of the training data, and therefore has good generalization capabilities to real-world scenes.

[0060] To this end, the present invention proposes a set of prior-guided regularization losses based on illumination prior and natural image prior, in which a learnable flexibility factor is introduced to reduce the adverse effects of illumination difference between low-light images and enhanced images.

[0061] This paper proposes an image enhancement strategy for learning an expected exposure image from a single low-light image, and constructs an image enhancement network for learning an expected exposure image from a single low-light image. In the low-light image enhancement task, the definition of normal illumination is subjective, while the image's potential color and texture are objectively determined by the scene. Inspired by this, the proposed zero-shot learning enhancer introduces an expected illumination to restore the expected exposure image, and utilizes natural images before learning the potential color and texture from the input low-light image itself. From this perspective, the paper formulates a set of prior-guided regularization losses and designs a two-stage progressive learning scheme to train the zero-shot learning enhancer step by step, helping to enhance images to achieve clear textures, vivid colors, and adjustable lighting.

[0062] Based on this, the process of training the zero-shot learning enhancer to obtain the image enhancement network by defining the prior-guided regularization loss includes the following steps:

[0063] Build a zero-shot learning booster:

[0064] in, is the expected exposure image of the output; For the output illumination ratio map, satisfy the piecewise smoothness constraint, L is the illumination diagram, is the desired illumination; I is the input single low-light image, R is the reflectivity map; N is the output noise map; φ(N) is the regularization term of the output expected exposure image, illumination ratio map and noise map respectively; λ1, λ2 and λ3 are The balancing weights of φ(N) are: λ1 is set to 1, λ2 is set to 0.5, and λ3 is set to 0.1; They are texture regularization term, color regularization term, and illumination regularization term respectively;

[0065] Construct the loss function of the zero-shot learning booster:

[0066] Among them, L all is the overall loss function; L rec To rebuild the losses, is the regularization loss of the illumination map, is the gradient operator, λ g is the balance factor, λ g Set to 10; L N is the regularization loss of the noise map, L N =||M(N)||, M(·) is the function for calculating the input mean; L T is the texture loss, F(·) is the feature extractor, T(·) is the illumination transformation, D(·) is the denoising operation, and γt is the learnable factor; L C For color loss, is the pixel-to-pixel conversion function, α and β are learnable parameters, and S(·) is the function for calculating the input variance; for Corresponding r, g, b channels, I i ∈{I r ,I g ,I b} are the r, g, and b channels corresponding to I; λ cf is a constant parameter used to enhance image color, set to 0.025; E n is a constant parameter used to determine the color level of the image, set to 0.32; ω is a weight parameter, set to 0.3; L I is the illumination loss, δ(·) is the operation of generating a local image from the input image, B is the number of image blocks, and λ il is a parameter used to balance the local contrast of the expected exposure image, λ il Set to 2; ε is a constant parameter set in the range of [0.25, 0.75];

[0067] The zero-shot learning enhancer is trained by iteratively optimizing the loss function of the zero-shot learning enhancer, and the trained zero-shot learning enhancer is used as the image enhancement network.

[0068] In the specific implementation process, 1) the process of building an image enhancer that learns the expected exposure image from a single low-light image can include the following steps:

[0069] This paper is based on an image enhancement strategy that learns the expected exposure image from a single low-light image and uses a zero-shot learning enhancer to construct an image enhancement network that learns the expected exposure image from a single low-light image. Based on Retinex theory, the low-light image can be modeled as:

[0070] Among them, I is the low-light input image, R is the reflectivity map, L is the illumination map, N is the noise map, is an element-by-element multiplication. Given a low-light image I, the goal of the low-light image enhancement task is to restore the normal-light image. However, as mentioned above, the definition of the normal-light image is quite subjective. To solve this problem, the present invention introduces an expected illumination and aims to restore an image with a desired exposure Based on this, formula (1) can be restated as:

[0071] in, is the expected exposure image, is a light ratio map that satisfies the piecewise smoothness constraint. Then, the present invention can recover from I by solving a regularized minimization problem

[0072] in, φ(N) is the regularization term of the expected exposure image, the illumination ratio map and the noise map, respectively, and λ1, λ2 and λ3 are φ(N) is the respective balance weight.

[0073] As explained above, is the expected exposure image. Therefore, the core of the present invention is To this end, the present invention is based on the illumination prior, as well as the objectivity of texture and color (i.e., natural image prior), to construct Inspired by the illumination prior, the present invention introduces an expected illumination into the regularization term; and inspired by the natural image prior, the present invention maintains the consistency of texture and color with the input low-light image. However, the illumination difference between the expected exposure image and the input low-light image hinders the consistency of texture and color. To solve this problem, the present invention further introduces Decoupled into an illumination regularization term A color regularization term and a texture regularization term Right now:

[0074] in, is designed using the illumination prior, and ψ c and ψT It is designed based on the prior of natural images. In particular, the present invention c and ψ T A learnable flexibility factor (i.e., a learnable parameter that changes continuously during training iterations) is introduced to help ensure the flexible consistency of texture and color. Therefore, by setting λ1 to 1, the basic idea of ​​the zero-shot learning enhancer can be expressed as:

[0075] Based on the above analysis, the present invention constructs a flexible and controllable zero-shot learning enhancer, which can be called ZSEer (Zero-shot Enhancer in English). See Figure 2, which is a schematic diagram of the structure of the image enhancement network provided by an embodiment of the present invention. As shown in Figure 2, a single low-light image is input into the zero-shot learning enhancer (the zero-shot learning enhancer can be a deep neural network Enhancer(·)), and then output and N, the zero-shot learning enhancer can be expressed as:

[0076] 2) The process of constructing the loss function of the zero-shot learning enhancer can include the following steps:

[0077] This paper develops a set of loss functions to help reconstruct and N. According to formula (5), the present invention converts the overall loss function L all Defined as:

[0078] Among them, L rec To reconstruct the losses:

[0079] is the regularization loss of the illumination map, λ2, λ3, λ T ,λ C ,λ I are set to 0.5, 0.1, 0.2, 1.0, and 0.1 respectively. In the present invention, the piecewise smooth constraint definition is used.

[0080] in, is the gradient operator, λ g is the balance factor, set to 10.

[0081] L N is the regularization loss of the noise map. Here, the present invention does not require a priori noise distribution, but simply assumes that the mean value of the noise is 0. Therefore, L N Defined as: L N =||M(N)|| (10)

[0082] Where M(·) is a function that calculates the mean of the input.

[0083] L I , L C and L T denote the prior-guided illumination loss, color loss, and texture loss, respectively.

[0084] Texture loss L T The goal of texture loss is to encourage the zero-shot learning enhancer to learn texture details from the input low-light image. However, the low illumination and high noise of low-light images hinder the learning of texture. To solve this problem, the present invention performs an illumination transformation T(·) and a denoising operation D(·) on the input low-light image. Specifically, given a single low-light image I, the present invention first calculates the transformed image D(T(I)) and uses it as a reference. Then, the perceptual features of the enhanced image are constrained to be flexible and consistent with the perceptual features of the transformed image, which is described in the form of:

[0085] Where F(·) is a feature extractor (specifically, a perceptual feature extractor), which can be implemented using a pre-trained VGG model; γt is a learnable factor that can reduce the adverse effects of illumination differences between the expected exposure image and the transformed image; the illumination transformation T(·) can be implemented in a variety of ways, such as gamma correction, histogram equalization, and linear stretching. In this embodiment of the present invention, gamma correction is simply used, i.e., T(I) = I γi , γi is a learnable parameter; for the denoising operation D(·), the present invention adopts a zero-sample denoising operation, which realizes image denoising by using the input low-light image itself for training.

[0086] Color loss L C Design. The red (r), green (g) and blue (b) components of the color loss constraint enhanced image are consistent with the components of the input low-light image. At the same time, inspired by the color metric method, the present invention introduces a color regularization term to ensure color output. C The formal definition of is:

[0087] in:

[0088] is a pixel-to-pixel conversion function that adjusts the intensity of the enhanced image, where α and β are both learnable parameters; M(·) is a function that calculates the input mean, and S(·) is a function that calculates the input variance; for Corresponding r, g, b channels, I i ∈{I r ,I g ,I b} are the r, g, and b channels corresponding to I; λ cf is a constant parameter for enhancing image color, see FIG3 , FIG3 is provided in an embodiment of the present invention. cf and λ il Parameter analysis diagram, as shown in FIG3, in the present invention, λ cf The value is 0.025; E n is a constant parameter that determines the color level of the expected enhanced image and is set to 0.32; ω is a weight parameter and is set to 0.3.

[0089] Illumination loss L I The illumination loss forces the image illumination to be close to the expected illumination and improves the image contrast. To this end, the present invention adopts global constraints and local constraints to define the illumination loss. Given the expected illumination ε,L I It can be defined as:

[0090] Where δ(·) is the operation of generating a local image from the input image. B is the number of local image blocks, λ il is a parameter used to balance the local contrast of the expected exposure image, as shown in Figure 3. Based on experience, it is set to 2 in the embodiment of the present invention. ε is a constant parameter, usually set in the range of [0.25, 0.75], which helps the zero-shot learning enhancer overcome the subjectivity of the normal illumination definition.

[0091] 3) The process of training the zero-shot learning enhancer by iteratively optimizing the loss function of the zero-shot learning enhancer can include the following steps:

[0092] The present invention uses seven datasets for comparative experiments: a real low-light dataset (LOL-real), a test low-light dataset (LOL-test), a multi-exposure image fusion dataset (MEF), a low-light image enhancement dataset (LIME-D), a digital image contrast enhancement commercial dataset (DICM), a commonly used dark light enhancement test set (Vasileios Vonikakis dataset, VV), and a naturalness preserved enhancement dataset (NPE). LOL-real and LOL-test have normal-light images paired with their low-light images. Therefore, the present invention uses peak signal-to-noise ratio (PSNR), structural similarity (SSIM), and the natural image quality evaluator (NIQE) for evaluation. MEF, LIME, DICM, VV, and NPE do not have normal-light images paired with their low-light images. Therefore, the present invention uses the non-reference metric NIQE for evaluation.The comparison methods include low-light image enhancement (LIME), low-light image enhancement using the camera response model, retinex network (Retinex-Net), KinD++, signal-to-noise ratio-aware low-light image enhancement method (Xu et al.), UEGAN, illuminated generative adversarial network (GAN) EnlightenGAN, unsupervised night enhancement method (Jin et al.), self-calibrated illumination (SCI), semantic-guided zero-shot learning method (SGZ), Zero-DCE++, RetinexDIP, and self-supervised method based on differential untrained network (Liang et al.).

[0093] In practical enhancement applications, in order to further reduce the adverse effects of the illumination difference between the expected exposure image and the input single low-light image, as shown in Figure 2, the present invention adopts a two-stage progressive learning strategy to train the enhancer, namely input-guided enhancement and output-guided refinement:

[0094] The first phase of training of the zero-shot learning enhancer is performed using input-guided enhancement: a single low-light image for iterative training is obtained; the single low-light image used for iterative training is input into the zero-shot learning enhancer to obtain the corresponding expected exposure image;

[0095] The second stage of training the zero-shot learning booster is performed in the output-guided refinement manner:

[0096] The expected exposure image obtained from each iterative training in the first stage is stored in the historical data pool, and the average value of multiple expected exposure images stored closest to the current moment in the historical data pool is used as the rough enhanced exposure image output in the first stage; the rough enhanced exposure image is input into the zero-shot learning enhancer to obtain the corresponding expected exposure image; the expected exposure image obtained from each iterative training in the second stage is stored in the historical data pool.

[0097] Specifically, input guided enhancement uses the input low-light image to guide the learning of the expected exposure image. At this stage, due to the effects of low illumination and noise amplification, a flexible constraint on texture loss is required. In addition, in order to stabilize the training process, a historical data pool is constructed to store the expected exposure images output in each iteration. Then, the present invention uses the average of the latest 200 expected exposure images to construct the output of the first stage. After this stage, the network outputs a coarse enhanced exposure image.

[0098] Output guided refinement, i.e. using the exposure image of the first stage rough enhancement The image is refined with history enhancement to restore the expected exposure image. In this stage, the texture loss is modified as follows:

[0099] Here, the flexibility factor γt is removed because the first stage has learned an appropriate illumination, and The illumination difference between and the final expected exposure image is quite small. Note that the output-guided refinement stage can be executed multiple times. In each execution, the latest expected exposure image is used to update

[0100] Therefore, the present invention designs a two-stage progressive learning scheme, which uses the input low-light image and the historical expected exposure image to gradually restore the ideal image, helping the enhancer to generate images with clear texture and bright colors.

[0101] S30: Obtain an expected exposure image output by the image enhancement network for the single low-light image to be processed.

[0102] In an embodiment of the present invention, based on an image enhancement network, an expected exposure image corresponding to a single low-light image to be processed can be obtained.

[0103] Furthermore, to validate the effectiveness of the image enhancement method provided by the present invention, the following experimental analysis was conducted. Three versions of the zero-shot learning enhancer were developed based on different expected illumination criteria. The results demonstrate that the proposed zero-shot learning enhancer achieves competitiveness and visibility compared to existing methods:

[0104] This paper compares the performance of the proposed method with several state-of-the-art image enhancement methods. In this embodiment, three versions of the zero-shot learning enhancer are developed. ZSEer-V1 is the first version of the enhancer, configured with a fixed expected illumination of 0.5. ZSEer-V2 is the second version of the enhancer, configured with 10 expected illuminations, and the final result is determined by a non-reference metric. ZSEer-V3 is the third version of the enhancer, configured with 10 expected illuminations, and the final result is determined by subjective evaluation through user interaction.

[0105] Results on the LOL-real and LOL-test datasets. See Table 1 for results on the LOL-real and LOL-test datasets. As shown in Table 1, the proposed method achieves superior performance in terms of PSNR, SSIM, and NIQE compared to non-learning methods. Given appropriate expected illumination, ZSEer-V3 can even achieve comparable performance to supervised and unsupervised learning methods. Compared to methods trained solely on low-light images, the proposed method achieves more competitive performance, even without requiring user interaction. These results can be attributed to the introduction of expected illumination and the proposed regularization loss, which can reduce the ill-posedness of image reconstruction. Furthermore, see Figure 4, which shows a visual comparison of the image enhancement network provided by an embodiment of the present invention with other low-light image enhancement models. As shown in Figure 4, existing methods tend to amplify noise and over-enhance color. In contrast, the proposed method effectively suppresses noise while maintaining the naturalness of the image. Furthermore, ZSEer-V3 significantly improves PSNR and SSIM, while maintaining similar NIQE to ZSEer-V1 and ZSEerV2. This result is because ZSEer-V1, ZSEer-V2 and ZSEer-V3 recover similar textures and colors.

[0106] Universal evaluation of non-reference real datasets. The present invention further evaluates the low-light image enhancement model on real scenes using MEF, LIME, DICM, VV and NPE datasets. See Table 2, which shows the NIQE results of non-reference datasets. Comparing Table 1 and Table 2, it can be seen that although the supervised and unsupervised learning methods have achieved very competitive results on the LOL-real and LOL-test datasets, they cannot achieve satisfactory performance in some real scenes. This result occurs because the data distribution of the test image may be quite different from the data distribution of the training image. In contrast, this method does not rely on training data, which enables it to generalize well to unknown scenes. In addition, compared with the method trained with a single low-light image, the method proposed in the present invention can obtain more competitive visibility, see Figure 5, which is a visual comparison result of the image enhancement network provided by an embodiment of the present invention and other low-light image enhancement models on a non-reference dataset.

[0107] Table 1

[0108] Table 2

[0109] Based on the image enhancement method provided in the above embodiment, an embodiment of the present invention provides a device for executing the above image enhancement method. The structural diagram of the device is shown in FIG6 , including:

[0110] An image acquisition module 10 is used to acquire a single low-light image to be processed;

[0111] The image enhancement module 20 is used to input the single low-light image to be processed into the image enhancement network, where the image enhancement network is obtained by training a zero-shot learning enhancer with a regularized loss guided by a priori definition; and obtain the expected exposure image output by the image enhancement network for the single low-light image to be processed.

[0112] Optionally, the image enhancement module 20 trains the zero-shot learning enhancer to obtain the image enhancement network by defining a priori-guided regularization loss, including:

[0113] Build a zero-shot learning booster:

[0114] in, is the expected exposure image of the output; For the output illumination ratio map, satisfy the piecewise smoothness constraint, L is the illumination diagram, is the desired illumination; I is the input single low-light image, R is the reflectivity map; N is the output noise map; φ(N) is the regularization term of the output expected exposure image, illumination ratio map and noise map respectively; λ1, λ2 and λ3 are The balancing weights of φ(N) are: λ1 is set to 1, λ2 is set to 0.5, and λ3 is set to 0.1; They are texture regularization term, color regularization term, and illumination regularization term respectively;

[0115] Construct the loss function of the zero-shot learning booster:

[0116] Among them, L all is the overall loss function; L rec To rebuild the losses, is the regularization loss of the illumination map, is the gradient operator, λ g is the balance factor, λ g Set to 10; L N is the regularization loss of the noise map, L N =||M(N)||, M(·) is the function for calculating the input mean; L T is the texture loss, F(·) is the feature extractor, T(·) is the illumination transformation, D(·) is the denoising operation, and γt is the learnable factor; L C For color loss, is the pixel-to-pixel conversion function, α and β are learnable parameters, and S(·) is the function for calculating the input variance; for Corresponding r, g, b channels, I i ∈{I r ,I g ,I b} are the r, g, and b channels corresponding to I; λ cf is a constant parameter used to enhance image color, set to 0.025; E n is a constant parameter used to determine the color level of the image, set to 0.32; ω is a weight parameter, set to 0.3; L I is the illumination loss, δ(·) is the operation of generating a local image from the input image, B is the number of image blocks, and λ il is a parameter used to balance the local contrast of the expected exposure image, λ il Set to 2; ε is a constant parameter set in the range of [0.25, 0.75];

[0117] The zero-shot learning enhancer is trained by iteratively optimizing the loss function of the zero-shot learning enhancer, and the trained zero-shot learning enhancer is used as the image enhancement network.

[0118] Optionally, the process of training the zero-shot learning enhancer by the image enhancement module 20 includes:

[0119] The first phase of training of the zero-shot learning enhancer is performed using input-guided enhancement: a single low-light image for iterative training is obtained; the single low-light image used for iterative training is input into the zero-shot learning enhancer to obtain the corresponding expected exposure image;

[0120] The second stage of training the zero-shot learning booster is performed in the output-guided refinement manner:

[0121] The expected exposure image obtained from each iterative training in the first stage is stored in the historical data pool, and the average value of multiple expected exposure images stored closest to the current moment in the historical data pool is used as the rough enhanced exposure image output in the first stage; the rough enhanced exposure image is input into the zero-shot learning enhancer to obtain the corresponding expected exposure image; the expected exposure image obtained from each iterative training in the second stage is stored in the historical data pool.

[0122] Optionally, the illumination transformation T(·) is a gamma correction and the denoising operation D(·) is a zero-sample denoising operation.

[0123] It should be noted that the detailed functions of each module in the embodiment of the present invention can be found in the corresponding disclosed part of the above-mentioned image enhancement method embodiment, and will not be repeated here.

[0124] Based on the image enhancement method provided in the above embodiment, an embodiment of the present invention provides an electronic device, which includes: at least one memory and at least one processor; the memory stores an application, the processor calls the application stored in the memory, and the application is used to implement the image enhancement method.

[0125] Based on the image enhancement method provided in the above embodiment, an embodiment of the present invention provides a storage medium, which stores computer program code, and the image enhancement method is implemented when the computer program code is executed.

[0126] The above describes in detail the image enhancement method, device, electronic device, and storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method and core concept of the present invention. At the same time, for those skilled in the art, based on the concept of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.

[0127] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0128] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that the process, method, article, or apparatus comprising a series of elements inherent to the elements, or also including elements inherent to these processes, methods, articles, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0129] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An image enhancement method, It is characterized in that The method comprises: Obtain a single low-light image to be processed; Inputting the single low-light image to be processed into an image enhancement network, wherein the image enhancement network is obtained by training a zero-shot learning enhancer by defining a priori guided regularization loss; Obtain an expected exposure image output by the image enhancement network for the single low-light image to be processed.

2. The method according to claim 1, It is characterized in that The process of training the zero-shot learning enhancer to obtain the image enhancement network by defining a priori guided regularization loss includes: Construct the zero-shot learning enhancer: in, is the expected exposure image of the output; To output the illumination ratio map, satisfy the piecewise smoothness constraint, L is the illumination diagram, is the desired illumination; I is the input single low-light image, R is the reflectivity map; N is the output noise map; φ(N) is the regularization term of the output expected exposure image, illumination ratio map and noise map respectively; λ 1 , 2 , 3 They are φ(N) respective balance weights, λ 1 Set to 1, λ 2 Set to 0.5, λ 3 Set to 0.1; They are texture regularization term, color regularization term, and illumination regularization term respectively; Construct the loss function of the zero-shot learning enhancer: Among them, L all is the overall loss function; L rec To rebuild the losses, is the regularization loss of the illumination map, is the gradient operator, λ g is the balance factor, λ g set up Set to 10; L N is the regularization loss of the noise map, L N =||M(N)||, M(·) is the function for calculating the input mean; L T is the texture loss, F(·) is the feature extractor, T(·) is the illumination transformation, D(·) is the denoising operation, and γt is the learnable factor; L C For color loss, is the pixel-to-pixel conversion function, α and β are learnable parameters, and S(·) is the function for calculating the input variance; for The corresponding r, g, b channels, I i ∈{I r ,I g ,I b } is the r, g, b channel corresponding to I; λ cf is a constant parameter used to enhance image color, set to 0.025; E n is a constant parameter used to determine the color level of the image, set to 0.32; ω is a weight parameter, set to 0.3; L I is the illumination loss, δ(·) is the operation of generating a local image from the input image, B is the number of image blocks, and λ il is a parameter used to balance the local contrast of the desired exposure image, λ il Set to 2; ε is a constant parameter set in the range of [0.25, 0.75]; The zero-shot learning enhancer is trained by iteratively optimizing the loss function of the zero-shot learning enhancer, and the trained zero-shot learning enhancer is used as the image enhancement network.

3. The method according to claim 2, It is characterized in that The training of the zero-shot learning enhancer comprises: The zero-shot learning enhancer is trained in the first stage in an input-guided enhancement manner: a single low-light image for iterative training is obtained; the single low-light image for iterative training is input into the zero-shot learning enhancer to obtain a corresponding expected exposure image; The zero-shot learning enhancer is trained in the second stage in an output-guided refinement manner: The expected exposure image obtained by each iterative training in the first stage is stored in the historical data pool, and the average value of multiple expected exposure images stored closest to the current moment in the historical data pool is used as the rough enhanced exposure image output by the first stage; the rough enhanced exposure image is input into the zero-sample learning enhancer to obtain the corresponding expected exposure image; the expected exposure image obtained by each iterative training in the second stage is stored in the historical data pool.

4. The method according to claim 2, It is characterized in that The illumination transformation T(·) is the gamma correction and the denoising operation D(·) is the zero-sample denoising operation.

5. An image enhancement device, It is characterized in that The device comprises: An image acquisition module, used for acquiring a single low-light image to be processed; An image enhancement module is used to input the single low-light image to be processed into an image enhancement network, wherein the image enhancement network is obtained by training a zero-shot learning enhancer with a regularization loss guided by a priori definition; and obtain an expected exposure image output by the image enhancement network for the single low-light image to be processed.

6. The device according to claim 5, It is characterized in that The image enhancement module trains the zero-shot learning enhancer to obtain the image enhancement network by defining a priori guided regularization loss, which includes: Construct the zero-shot learning enhancer: in, is the expected exposure image of the output; To output the illumination ratio map, satisfy the piecewise smoothness constraint, L is the illumination diagram, is the desired illumination; I is the input single low-light image, R is the reflectivity map; N is the output noise map; φ(N) is the regularization term of the output expected exposure image, illumination ratio map and noise map respectively; λ 1 , 2 , 3 They are φ(N) respective balance weights, λ 1 Set to 1, λ 2 Set to 0.5, λ 3 Set to 0.1; They are texture regularization term, color regularization term, and illumination regularization term respectively; Construct the loss function of the zero-shot learning enhancer: Among them, L all is the overall loss function; L rec To rebuild the losses, is the regularization loss of the illumination map, is the gradient operator, λ g is the balance factor, λ g Set to 10; L N is the regularization loss of the noise map, L N =||M(N)||, M(·) is the function for calculating the input mean; L T is the texture loss, F(·) is the feature extractor, T(·) is the illumination transformation, D(·) is the denoising operation, and γt is the learnable factor; L C For color loss, is the pixel-to-pixel conversion function, α and β are learnable parameters, and S(·) is the function for calculating the input variance; for The corresponding r, g, b channels, I i ∈{I r ,I g ,I b } is the r, g, b channel corresponding to I; λ cf is a constant parameter used to enhance image color, set to 0.025; E n is a constant parameter used to determine the color level of the image, set to 0.32; ω is a weight parameter, set to 0.3; L I is the illumination loss, δ(·) is the operation of generating a local image from the input image, B is the number of image blocks, and λ il is a parameter used to balance the local contrast of the desired exposure image, λ il Set to 2; ε is a constant parameter set in the range of [0.25, 0.75]; The zero-shot learning enhancer is trained by iteratively optimizing the loss function of the zero-shot learning enhancer, and the trained zero-shot learning enhancer is used as the image enhancement network.

7. The device according to claim 6, It is characterized in that The process of the image enhancement module training the zero-sample learning enhancer includes: The zero-shot learning enhancer is trained in the first stage in an input-guided enhancement manner: a single low-light image for iterative training is obtained; the single low-light image for iterative training is input into the zero-shot learning enhancer to obtain a corresponding expected exposure image; The zero-shot learning enhancer is trained in the second stage in an output-guided refinement manner: The expected exposure image obtained by each iterative training in the first stage is stored in the historical data pool, and the average value of multiple expected exposure images stored closest to the current moment in the historical data pool is used as the rough enhanced exposure image output by the first stage; the rough enhanced exposure image is input into the zero-sample learning enhancer to obtain the corresponding expected exposure image; the expected exposure image obtained by each iterative training in the second stage is stored in the historical data pool.

8. The device according to claim 6, It is characterized in that The illumination transformation T(·) is the gamma correction and the denoising operation D(·) is the zero-sample denoising operation.

9. An electronic device, It is characterized in that The electronic device comprises: at least one memory and at least one processor; the memory stores an application, the processor calls the application stored in the memory, and the application is used to implement the image enhancement method described in any one of claims 1-4.

10. A storage medium, It is characterized in that The storage medium stores computer program codes, and when the computer program codes are executed, the image enhancement method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Single image defogging method for generating adversarial network based on priori knowledge guide condition

    CN110288550A

  • Single low-light image enhancement method based on generative adversarial network

    CN111161178A

  • Low-illumination image enhancement method based on Retinex and deep learning

    CN111968044A

  • Low-illumination image enhancement method

    CN115760630A

  • Image enhancement method and device, electronic equipment and storage medium

    CN116703745A

Cited By

  • Image enhancement method and device, electronic equipment and storage medium

    CN116703745A

  • Image enhancement method and device, electronic equipment and storage medium

    CN116703745B

  • Space-frequency fusion low-illumination image enhancement method and system

    CN119027328A

  • Low-light image enhancement method based on zero-reference Retinex decomposition network

    CN119168895A

  • Multi-modal medical image fusion method based on image denoising and illumination enhancement

    CN119559469A