A method and system for low-light image enhancement based on zero-shot learning
By decomposing and fusing the illumination, reflection, and edge feature information of low-light images, and utilizing loss functions and Laplacian pyramid techniques, the problem of uneven contrast in low-light images is solved, resulting in a significant improvement in image quality.
Patent Information
- Application Number
- CN202411710329.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Existing zero-shot learning methods have failed to effectively address the issue of overall image contrast unevenness in high-contrast scenes during low-light image enhancement, resulting in reduced image quality during direct enhancement.
By decomposing low-light images into illumination information, reflectance information, and edge feature information, the total loss is calculated using illumination, reflectance, and edge feature loss functions. The image is then optimized using gamma transform and Laplacian pyramid fusion techniques to ensure improved image quality.
It significantly improves the lighting conditions of low-light images, preserves the characteristics of high-exposure areas, enhances the detail richness and clarity of images, and solves the problem of image quality degradation caused by uneven contrast.
Smart Images

Figure CN119624809B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a low-light image enhancement method and system based on zero-shot learning. Background Technology
[0002] In real-world shooting environments, low lighting conditions and limitations of imaging equipment often result in visual defects in images captured under low light conditions, such as low contrast, color distortion, increased noise, and blurred details. These low-light images not only affect the viewing experience but also negatively impact subsequent image processing workflows, such as image segmentation, target recognition, and detection, as these processes typically require high-resolution images under sufficient lighting. Therefore, improving the brightness of low-light images, restoring image contrast, and revealing more detail is particularly important.
[0003] In recent years, deep learning technology has made significant progress in image processing, especially in low-light image enhancement. These techniques improve image quality by building complex models. However, most deep learning-based methods rely on large-scale image datasets for training, which can be time-consuming in terms of data acquisition. In contrast, zero-shot learning techniques offer an effective alternative. They do not require large amounts of paired training data and can achieve good generalization capabilities, making them particularly suitable for low-light image enhancement tasks. Existing zero-shot learning methods mainly focus on enhancing the brightness of dark areas, but often neglect low-light images in high-contrast scenes. For example, under the influence of artificial light sources, low-light images may have locally overexposed areas, causing uneven overall image contrast and potentially accompanied by halo effects. In such cases, directly enhancing the image may lead to diffuse blurring of the exposed areas, further degrading image quality. Summary of the Invention
[0004] Therefore, the technical problem to be solved by the present invention is to overcome the image quality reduction caused by the unevenness of the overall image contrast in the prior art when directly enhancing the image.
[0005] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a low-light image enhancement method based on zero-shot learning, comprising:
[0006] S1. Obtain a low-light image, and decompose the illumination information, reflectance information and edge feature information based on the low-light image;
[0007] S2. Input the illumination information into the illumination loss function to obtain a first loss; input the reflection map information into the reflection loss function to obtain a second loss; input the edge feature information into the edge feature loss function to obtain a third loss; calculate the total loss based on the first loss, the second loss, and the third loss; obtain the gradient value based on the total loss.
[0008] S3. Determine whether the preset conditions are met simultaneously based on the total loss and the gradient value; if the preset conditions are not met, return to S1; if the preset conditions are met, obtain the optimal illumination information, optimal reflection information, and optimal edge feature information; enhance the optimal illumination information using gamma transform to obtain enhanced illumination information; wherein, the preset conditions are reaching a preset number of iterations and the gradient value being the minimum.
[0009] S4. The enhanced illumination information, the optimal reflectance map information, and the optimal edge feature information are fused to obtain a primary enhanced image;
[0010] S5. Construct Laplacian image pyramids for the primary enhanced image and the low-light image respectively, to obtain the first Laplacian pyramid and the second Laplacian pyramid.
[0011] S6. Perform image fusion on the first Laplacian pyramid and the second Laplacian pyramid to obtain an enhanced image.
[0012] In one embodiment of the present invention, the mathematical expression of the illumination loss function is:
[0013]
[0014] Among them, Loss I Let be the illumination loss function. This represents the sum of the longitudinal gradient losses for all illuminated pixels. Let I be the sum of the lateral losses of all illuminated pixels, and let I be the illumination information. max The pixel with the most illumination information. For the vertical gradient of the pixel-level reflectance map, The horizontal gradient of the pixel-level reflectance map. This is the Gaussian smoothing term of the vertical gradient of the original pixel's grayscale. ε is the Gaussian smoothing term for the horizontal gradient of the original pixel grayscale, and ε1 is the illumination loss penalty term.
[0015] In one embodiment of the present invention, the mathematical expression of the reflection loss function is:
[0016]
[0017] Among them, Loss R Let reflectance loss function be used. This is the sum of the longitudinal gradient losses for all reflecting pixels. Let I be the sum of the lateral losses of all reflective pixels, I be the illumination information, P be the low-light image, and R be the reflectance map information. For the vertical gradient of the pixel-level reflectance map, The horizontal gradient of the pixel-level reflectance map. The vertical gradient of the original pixel's grayscale. ε is the horizontal gradient of the original pixel's grayscale, and ε2 is the reflection penalty term.
[0018] In one embodiment of the present invention, the mathematical expression of the edge feature loss function is:
[0019] Loss F =||I*F e || F ;
[0020] Among them, Loss F Let F be the edge feature loss function, I be the illumination information, and F be the edge feature loss function. e This refers to the edge feature information.
[0021] In one embodiment of the present invention, the total loss further includes an image reconstruction loss, the calculation formula of which is:
[0022] Loss re =||P-(I*R+F e )||1;
[0023] Among them, Loss re Let P be the image reconstruction loss, I be the illumination information, R be the reflectance information, and F be the image reconstruction loss. e This refers to the edge feature information.
[0024] In one embodiment of the present invention, the formula for calculating the total loss is:
[0025] Loss = Loss re +Loss R +5000 Loss F +ln3Loss I ;
[0026] Where Loss is the total loss amount, Loss re Loss is the image reconstruction loss. R Let Loss be the reflection loss function. F Loss is the edge feature loss function.I This is the illumination loss function.
[0027] In one embodiment of the present invention, when the preset condition is met in step S3, the optimal illumination information, the optimal reflectance information, and the optimal edge feature information are further subjected to smoothing processing.
[0028] In one embodiment of the present invention, before obtaining the enhanced image in S6, the method further includes upsampling image restoration processing on the fused Plas pyramid.
[0029] Secondly, to solve the above-mentioned technical problems, the present invention provides a low-light image enhancement system based on zero-shot learning, comprising:
[0030] The decomposition module is used to acquire a low-light image and decompose it into illumination information, reflectance information and edge feature information based on the low-light image.
[0031] The loss calculation module is used to input the illumination information into the illumination loss function to obtain a first loss; input the reflection map information into the reflection loss function to obtain a second loss; input the edge feature information into the edge feature loss function to obtain a third loss; calculate the total loss based on the first loss, the second loss, and the third loss; and obtain the gradient value based on the total loss.
[0032] The judgment module is used to determine whether a preset condition is met simultaneously based on the total loss and the gradient value; when the preset condition is not met, it returns to the decomposition module; when the preset condition is met, the optimal illumination information, optimal reflection information, and optimal edge feature information are obtained; the optimal illumination information is enhanced using gamma transform to obtain enhanced illumination information; wherein, the preset condition is reaching a preset number of iterations and the gradient value is minimized;
[0033] An image fusion module is used to fuse the enhanced illumination information, the optimal reflectance map information, and the optimal edge feature information to obtain a primary enhanced image;
[0034] The Laplacian pyramid construction module is used to build Laplacian image pyramids for the primary enhanced image and the low-light image respectively, resulting in a first Laplacian pyramid and a second Laplacian pyramid.
[0035] The output module is used to perform image fusion on the first Laplacian pyramid and the second Laplacian pyramid, and output an enhanced image.
[0036] Thirdly, in order to solve the above-mentioned technical problems, the present invention provides an electrical device, including the aforementioned low-light image enhancement system based on zero-shot learning.
[0037] Compared with the prior art, the above-described technical solution of the present invention has the following advantages:
[0038] (1) The low-light image enhancement method and system based on zero-shot learning described in this invention decomposes the low-light image into illumination information, reflectance information, and edge feature information, achieving precise optimization of each image component, effectively preserving image details and significantly enhancing its visual expressiveness. A loss function is used to constrain these three types of information, while gamma transform is employed to enhance the optimized illumination information, thereby significantly improving the illumination conditions of the low-light image, making the image appear brighter and more natural. Furthermore, this method calculates the total loss and iteratively optimizes using gradient descent, gradually improving image quality until a preset condition is met, ensuring the acquisition of optimal image information. Image fusion technology is used, and a Laplacian pyramid is constructed between the low-light image and the enhanced image for deep fusion, ensuring the complete preservation of features in high-exposure areas. This design effectively solves the problem of image quality degradation caused by direct enhancement due to uneven overall image contrast.
[0039] (2) This invention fuses enhanced illumination information, optimal reflectance map information, and optimal edge feature information into an image. This fusion strategy can better preserve the feature information of the original image, while effectively compensating for the loss of details that may occur during the image enhancement process. In addition, the enhanced image significantly improves the detail richness and clarity of the image, ensuring that the image has a high signal-to-noise ratio. Attached Figure Description
[0040] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein...
[0041] Figure 1 This is a flowchart of a low-light image enhancement method based on zero-shot learning in a preferred embodiment of the present invention;
[0042] Figure 2 This is a structural diagram of the edge features and reflection map network in a preferred embodiment of the present invention;
[0043] Figure 3 This is a network structure diagram of illumination information in a preferred embodiment of the present invention;
[0044] Figure 4 Comparison of subjective results in preferred embodiments of the present invention Figure 1 ;
[0045] Figure 5 Comparison of subjective results in preferred embodiments of the present invention Figure 2 . Detailed Implementation
[0046] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0047] Example 1
[0048] Reference Figure 1 As shown, this embodiment of the invention provides a low-light image enhancement method based on zero-shot learning, including but not limited to the following steps:
[0049] S1. Obtain the low-light image, and decompose the lighting information, reflectance information and edge feature information based on the low-light image;
[0050] S2. Input the illumination information into the illumination loss function to obtain the first loss; input the reflection map information into the reflection loss function to obtain the second loss; input the edge feature information into the edge feature loss function to obtain the third loss; calculate the total loss based on the first, second, and third loss; obtain the gradient value based on the total loss.
[0051] S3. Determine whether the preset conditions are met simultaneously based on the total loss and gradient value. If the preset conditions are not met, return to S1. If the preset conditions are met, the optimal illumination information, optimal reflection information, and optimal edge feature information will be obtained. The optimal illumination information will be enhanced using gamma transformation to obtain enhanced illumination information. The preset conditions are reaching the preset number of iterations and minimizing the gradient value.
[0052] S4. The enhanced illumination information, optimal reflectance map information and optimal edge feature information are fused to obtain the primary enhanced image;
[0053] S5. Construct Laplacian image pyramids for the primary enhanced image and the low-light image respectively, to obtain the first Laplacian pyramid and the second Laplacian pyramid.
[0054] S6. Perform image fusion on the first and second Laplace pyramids to obtain an enhanced image.
[0055] This invention provides a low-light image enhancement method based on zero-shot learning. By decomposing illumination information, reflectance information, and edge feature information from a low-light image, it achieves targeted optimization of different components of the image, effectively preserving image details and enhancing its expressiveness. Constraining the three types of information through a loss function and enhancing the optimal illumination information using gamma transform significantly improves the illumination conditions of the low-light image, making it appear brighter and more natural. Furthermore, this method calculates the total loss and iteratively optimizes based on gradient values, gradually improving image quality until preset conditions are met, thus obtaining the optimal information. Initial enhancement is achieved through image fusion, and a Laplacian image pyramid is constructed between the low-light image and the enhanced image for further fusion to ensure the integrity of features in high-exposure areas. This method effectively solves the problem of image quality degradation caused by the unevenness of overall image contrast when directly enhancing the image. This method is not only applicable to low-light image enhancement but also to other image enhancement scenarios, demonstrating broad versatility and applicability. This invention combines zero-shot learning and multiple loss function optimization, opening up a new technical path in the field of image enhancement and providing innovative ideas for future research and applications.
[0056] Specifically, in step S1, a low-light image (also known as the original image) is read and converted into a three-dimensional tensor format (channel, length information, and width information) to represent each pixel. Then, the three-dimensional tensor is expanded to four dimensions by adding one dimension. This four-dimensional tensor is then input into the edge feature and reflectance map network and the illumination information network, respectively. The structures of the edge feature and reflectance map network and the illumination information network can be referred to... Figure 2 and Figure 3 As shown. The edge feature and reflectance map networks, as well as the illumination information network, are all included in the neural network model. Figure 2 Each state represents the number of convolutional kernels in that convolutional layer. Figure 3 Each state represents the number of convolutional kernels in that convolutional layer. After processing by the illumination information network, low-light images can generate illumination information with excellent smoothness. Simultaneously, through processing by the edge feature and reflectance map networks, the image can be accurately decomposed into complete reflectance map information and sharp edge feature information. The reflectance map information also exhibits good smoothness, while the edge feature information is very significant; these details together provide a solid foundation for image enhancement.
[0057] Furthermore, the ELU function reduces neuron death, accelerates training, improves model generalization, possesses self-normalization properties to reduce internal covariate shifts, enhances numerical stability, and provides parameter flexibility, thus enabling more effective learning and better performance in deep learning models. Therefore, this embodiment prefers the ELU function as the activation function for the edge feature and reflectance map networks. The soft saturation of the ELU function improves the robustness of the edge feature and reflectance map networks to noise and provides a certain degree of anti-interference capability, mitigating the gradient vanishing problem. The formula for the ELU function is:
[0058]
[0059] Where x is a variable and α is a hyperparameter, and in this embodiment, the preferred value of α is 1.
[0060] Specifically, the ReLU function is computationally efficient, alleviates the vanishing gradient problem, promotes sparse activation to reduce model complexity and overfitting, has biological rationale, reduces memory usage, and is easy to implement and applicable to various network structures due to its simplicity. Therefore, this embodiment of the invention preferably uses the ReLU function as the activation function for the illumination information network. The formula for the ReLU function is:
[0061]
[0062] Specifically, in step S2, the obtained reflection map information, edge feature information, and illumination information are substituted into the corresponding loss function to calculate the total loss. In this embodiment of the invention, the total loss includes a first loss (i.e., illumination information smoothing loss), a second loss (i.e., reflection information smoothing loss), and a third loss (i.e., edge feature loss). The total loss also includes image reconstruction loss. The calculation formula for the image reconstruction loss is as follows:
[0063] Loss re =||P-(I*R+F e )||1;
[0064] Among them, Loss re Let P be the image reconstruction loss, I be the illumination information, R be the reflectance information, and F be the image reconstruction loss. e This represents edge feature information. The loss after image reconstruction is obtained by calculating the 1-norm between the original image and the reconstructed image.
[0065] The smoothing loss of illumination information is obtained by inputting the illumination information into the illumination loss function. By applying the illumination loss function, the illumination image information can be optimized, resulting in a smoother and more detailed effect. In this embodiment, the mathematical expression of the illumination loss function is:
[0066]
[0067]
[0068] Among them, Loss I Let be the illumination loss function. This represents the sum of the longitudinal gradient losses for all illuminated pixels. I is the sum of the lateral losses of all illuminated pixels. max The pixel with the most illumination information. For the vertical gradient of the pixel-level reflectance map, The horizontal gradient of the pixel-level reflectance map. This is the Gaussian smoothing term of the vertical gradient of the original pixel's grayscale. ε1 is the Gaussian smoothing term for the horizontal gradient of the original pixel grayscale, and ε2 is the illumination loss penalty term. In this embodiment of the invention, the preferred value of ε1 is 0.0001. The value of the illumination loss penalty term can be adjusted according to different actual scenarios.
[0069] The smoothing loss of reflection information is obtained by inputting the reflection map information into the reflection loss function. The reflection loss function can improve image quality and enhance image expressiveness. In this embodiment, the mathematical expression of the reflection loss function is:
[0070]
[0071] Among them, Loss R Let reflectance loss function be used. This is the sum of the longitudinal gradient losses for all reflecting pixels. This is the sum of the lateral losses of all reflecting pixels. For the vertical gradient of the pixel-level reflectance map, The horizontal gradient of the pixel-level reflectance map. The vertical gradient of the original pixel's grayscale. ε1 represents the horizontal gradient of the original pixel's grayscale, and ε2 represents the reflection penalty term. In this embodiment of the invention, the preferred value of ε2 is 0.0001. The value of the reflection penalty term can be adjusted according to different actual scenarios.
[0072] The edge feature loss is obtained by inputting edge feature information into the edge feature loss function. The edge feature loss function accurately captures and describes the edge feature information within a high-contrast, low-light image, ensuring the accuracy of these crucial details. In this embodiment, the mathematical expression of the edge feature loss function is:
[0073] Loss F =||I*F e ||F;
[0074] Among them, Loss F Let F be the edge feature loss function. e For edge feature information, ||·|| F The Frobenius norm, or simply the F-norm, is calculated by convolving the illumination information I with the feature information F. e The edge feature loss can be obtained by finding the F-norm.
[0075] Furthermore, based on the smoothing loss of illumination information, the smoothing loss of reflection information, the edge feature loss, and the image reconstruction loss, the formula for calculating the total loss can be obtained. The formula for calculating the total loss (Loss) is as follows:
[0076] Loss = Loss re +Loss R +5000 Loss F +ln3Loss I ;
[0077] The formula for calculating the total loss can also be called the total loss function.
[0078] Furthermore, during neural network training, this embodiment of the invention utilizes the backpropagation algorithm to accurately calculate the gradient of the total loss function with respect to each model parameter, including illumination information, reflection information, and edge feature information. Then, based on these gradients, the weights are continuously updated using the stochastic gradient descent (SGD) algorithm, ensuring that the loss function is continuously optimized along the fastest descent path. In each optimization iteration, the updated parameters are re-input into the network for the next round of calculation and optimization. This iterative process is repeated to gradually reduce the gradient values, ensuring a continuous decrease in the total loss. According to the design of this embodiment, the process iterates 2000 times to achieve the optimal performance of the model; that is, the preset number of iterations is 2000. The number of iterations can be adjusted according to different practical scenarios.
[0079] Specifically, in step S3, it is determined whether preset conditions are simultaneously met based on the total loss and gradient value. If the preset conditions are met, it signifies the completion of all iterative tasks, resulting in the acquisition of optimal illumination information, optimal reflection information, and optimal edge feature information. To further improve the quality of this information, smoothing processing is applied to the optimal illumination information, optimal reflection information, and optimal edge feature information to reduce noise and unevenness. In particular, a gamma transform is performed on the optimal illumination information to enhance its contrast, making the image more vivid and three-dimensional in terms of illumination. Through these processing steps, this embodiment of the invention ensures that the final output image achieves optimal performance in terms of illumination, reflection, and edge features.
[0080] Specifically, in step S4, enhanced illumination information, optimal reflectance map information, and optimal edge feature information are fused together. This fusion strategy can better preserve the feature information of the original image while effectively compensating for the loss of detail that may occur during the enhancement process. Ultimately, after this series of processes, the enhanced image not only retains the important features of the original image but also significantly improves the image's detail richness and clarity, ensuring a high signal-to-noise ratio and thus providing users with a superior visual experience.
[0081] Specifically, in step S5, during the construction of the Laplacian pyramid for the original image, this embodiment of the invention first constructs a 7-level Laplacian pyramid for the original image to precisely capture and express its high-frequency detail features. Subsequently, the same processing is performed on the primary enhanced image, that is, a Laplacian pyramid with the same 7 levels is constructed to present its high-frequency detail features in the same detailed manner. It is worth noting that the number of levels of the Laplacian pyramid is not fixed, but can be flexibly selected and adjusted according to the actual application scenario and specific needs to ensure the best image detail feature extraction effect.
[0082] Specifically, in step S6, the Laplacian pyramid features at each level of the original image and the primary enhanced image are fused to construct a fused Laplacian pyramid. During the upsampling process, for each level of upsampling, the detailed features of the Laplacian pyramid at that scale need to be superimposed, and this process continues until the last layer of the pyramid is reached. Through this method, the embodiments of the present invention can recover the final enhanced image. Furthermore, before obtaining the enhanced image, upsampling image restoration is performed on the fused Laplacian pyramid. Upsampling image restoration includes upsampling and image restoration. Upsampling increases the number of pixels in the final image, making the image larger in each dimension. Image restoration can reverse the image degradation process to restore the original state of the image.
[0083] To more clearly demonstrate the advantages and effects of the embodiments of the present invention, the following comparative experiments will be used to provide a detailed description.
[0084] Specifically, two images with strong contrast and overall low-light characteristics were selected from two publicly available low-light image databases and enhanced using the method described in this embodiment. The results were compared with those of the Multi-Scale Retinex Color Restoration (MSRCP), Retinex Network (RetinexNet), Zero-Reference Curve Estimation (Zero-Dce), and Self-Calibrating Illumination (SCI) algorithms on both subjective and objective dimensions. The results of the subjective comparison are shown in... Figure 4 and Figure 5 In the middle. Through observation Figure 4 and Figure 5 It can be seen that the method proposed in this embodiment has a significant advantage in visual effects.
[0085] To further evaluate the experimental results, three objective evaluation metrics were used for comparative analysis: Peak Signal-to-Noise Ratio (PSNR), Structural Similarity (SSIM), and Perceptual Loss (LPIPS). These metrics can comprehensively evaluate the performance of different enhancement methods.
[0086] Table 1 Comparison of Objective Parameter Indicators in Scenario 1
[0087]
[0088] Table 2 compares the objective parameter indicators for Scenario 2.
[0089]
[0090] The comparison results in Tables 1 and 2 clearly show that the embodiments of the present invention perform excellently in all three key parameter indicators. Therefore, the present invention integrates the advantages of existing image enhancement technologies and proposes a high-contrast low-light image enhancement method based on zero-shot learning. Compared with other enhancement technologies, this method has significant effects on image quality improvement and achieves industry-leading levels in numerical indicators such as signal-to-noise ratio and image correlation coefficient. The present invention is not only applicable to various high-contrast low-light image scenarios, but also has broad application prospects in multiple image processing fields such as transportation, aerospace, military and public security, and machine vision.
[0091] Example 2
[0092] Based on the same inventive concept, this embodiment provides a low-light image enhancement system based on zero-shot learning. The principle of solving the problem is similar to that of the low-light image enhancement method based on zero-shot learning provided in Embodiment 1, and the repeated parts will not be described again.
[0093] This embodiment provides a low-light image enhancement system based on zero-shot learning, including:
[0094] The decomposition module is used to acquire low-light images and decompose them into illumination information, reflectance information, and edge feature information.
[0095] The loss calculation module is used to input illumination information into the illumination loss function to obtain a first loss; input reflection map information into the reflection loss function to obtain a second loss; input edge feature information into the edge feature loss function to obtain a third loss; calculate the total loss based on the first, second, and third loss; and obtain the gradient value based on the total loss.
[0096] The judgment module is used to determine whether the preset conditions are met simultaneously based on the total loss and gradient value. If the preset conditions are not met, the process returns to the decomposition module. If the preset conditions are met, the optimal illumination information, optimal reflection information, and optimal edge feature information are obtained. The optimal illumination information is enhanced using gamma transformation to obtain enhanced illumination information. The preset conditions are reaching a preset number of iterations and minimizing the gradient value.
[0097] The image fusion module is used to fuse enhanced illumination information, optimal reflectance map information, and optimal edge feature information to obtain a primary enhanced image;
[0098] The Laplacian pyramid building module is used to build Laplacian image pyramids for the primary enhanced image and the low-light image respectively, resulting in the first Laplacian pyramid and the second Laplacian pyramid.
[0099] The output module is used to perform image fusion on the first and second Laplacian pyramids and output an enhanced image.
[0100] Example 3
[0101] This embodiment provides an electrical device, including a low-light image enhancement system based on zero-shot learning provided in Embodiment 2.
[0102] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0103] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0104] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0105] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0106] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A low-light image enhancement method based on zero-shot learning, characterized in that, The method comprises the following steps: S1, obtaining a low-light image, and decomposing illumination information, a reflectance map and edge feature information from the low-light image; S2, inputting the illumination information into an illumination loss function to obtain a first loss quantity; inputting the reflectance map into a reflectance loss function to obtain a second loss quantity; inputting the edge feature information into an edge feature loss function to obtain a third loss quantity; calculating a total loss quantity according to the first loss quantity, the second loss quantity and the third loss quantity; and obtaining a gradient value according to the total loss quantity; S3, judging whether the total loss quantity and the gradient value satisfy a preset condition simultaneously; returning to S1 when the preset condition is not satisfied; and obtaining optimal illumination information, optimal reflectance map information and optimal edge feature information when the preset condition is satisfied; enhancing the optimal illumination information by using gamma transformation to obtain enhanced illumination information; wherein the preset condition is that a preset iteration number is reached and the gradient value is minimum; S4, performing image fusion on the enhanced illumination information, the optimal reflectance map information and the optimal edge feature information to obtain a primary enhanced image; S5, establishing Laplace image pyramids of the primary enhanced image and the low-light image respectively to obtain a first Laplace pyramid and a second Laplace pyramid; S6, performing image fusion on the first Laplace pyramid and the second Laplace pyramid to obtain an enhanced image.
2. The low-light image enhancement method based on zero-shot learning according to claim 1, characterized in that, The mathematical expression of the illumination loss function is: ; ; ; wherein, is the illumination loss function, is the vertical gradient loss sum of all illumination pixels, is the horizontal loss sum of all illumination pixels, is the illumination information, is the pixel with the maximum illumination information, is the vertical gradient of the pixel-level reflectance map, is the horizontal gradient of the pixel-level reflectance map, is the Gaussian smoothing term of the vertical gradient of the original pixel gray level, is the Gaussian smoothing term of the horizontal gradient of the original pixel gray level, is the illumination loss penalty term.
3. The low-light image enhancement method based on zero-shot learning according to claim 1, characterized in that, The mathematical expression of the reflectance loss function is: ; ; ; wherein, is a reflection loss function, is a sum of vertical gradient loss of all reflection pixels, is a sum of horizontal loss of all reflection pixels, is the illumination information, is the low-light image, is the reflection map information, is a vertical gradient of the pixel-level reflection map, is a horizontal gradient of the pixel-level reflection map, is a vertical gradient of the original pixel gray level, is a horizontal gradient of the original pixel gray level, is a reflection penalty term.
4. The low-light image enhancement method based on zero-shot learning according to claim 1, characterized in that, The mathematical expression of the edge feature loss function is: ; wherein, is an edge feature loss function, is the illumination information, is the edge feature information.
5. The low-light image enhancement method based on zero-shot learning according to claim 1, characterized in that, The total loss quantity further comprises an image reconstruction loss quantity, and the calculation formula of the image reconstruction loss quantity is: ; wherein, is an image reconstruction loss quantity, is the low-light image, is the illumination information, is the reflection map information, is the edge feature information.
6. The low-light image enhancement method based on zero-shot learning according to claim 1 or 5, characterized in that, The calculation formula of the total loss quantity is: ; wherein, is the total loss amount, is the image reconstruction loss amount, is the reflection loss function, is the edge feature loss function, is the illumination loss function.
7. The low-light image enhancement method based on zero-shot learning according to claim 1, characterized in that, When the preset condition is satisfied in S3, the optimal illumination information, the optimal reflectance map information and the optimal edge feature information are further subjected to smoothing processing.
8. The low-light image enhancement method based on zero-shot learning according to claim 1, characterized in that, Before the enhanced image is obtained in S6, the fused Laplace pyramid is further subjected to up-sampling image recovery processing.
9. A zero-shot learning based low-light image enhancement system, characterized in that, The method comprises the following steps: A decomposition module is configured to obtain a low-light image, and decompose illumination information, a reflectance map and edge feature information from the low-light image; A loss calculation module is configured to input the illumination information into an illumination loss function to obtain a first loss quantity; input the reflectance map into a reflectance loss function to obtain a second loss quantity; input the edge feature information into an edge feature loss function to obtain a third loss quantity; calculate a total loss quantity according to the first loss quantity, the second loss quantity and the third loss quantity; and obtain a gradient value according to the total loss quantity; A judgment module is configured to judge whether the total loss quantity and the gradient value satisfy a preset condition simultaneously; return to the decomposition module when the preset condition is not satisfied; and obtain optimal illumination information, optimal reflectance map information and optimal edge feature information when the preset condition is satisfied; enhance the optimal illumination information by using gamma transformation to obtain enhanced illumination information; wherein the preset condition is that a preset iteration number is reached and the gradient value is minimum; An image fusion module is configured to fuse the enhanced illumination information, the optimal reflection map information and the optimal edge feature information to obtain a primary enhanced image; A Laplacian pyramid construction module is configured to construct a Laplacian pyramid of the primary enhanced image and a Laplacian pyramid of the low-illumination image respectively to obtain a first Laplacian pyramid and a second Laplacian pyramid; An output module is configured to fuse the first Laplacian pyramid and the second Laplacian pyramid to output an enhanced image.
10. An electric device, characterized by The system for low-illumination image enhancement based on zero-shot learning comprises the system for low-illumination image enhancement based on zero-shot learning according to claim 9.
Citation Information
Patent Citations
Dark light image enhancement method based on Retinex and attention mechanism
CN113052814A
CNN-based low-illumination image enhancement method with color recovery and edge sharpening effects
CN113256510A