Low-illumination image enhancement method and system based on zero sample learning
By decomposing and optimizing the illumination, reflection and edge feature information of low-light images based on zero-sample learning, combined with gamma transformation and image fusion technology, the image quality reduction problem caused by contrast inequality during low-light images is solved, and a higher quality image enhancement effect is achieved.
Patent Information
- Application Number
- CN202411710329.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-27
AI Technical Summary
The prior art results in the image quality degradation due to unevenness of the overall contrast of the image when the low-light image is enhanced.
Using a zero-sample learning method, lighting information, reflective map information and edge feature information are decomposed from low-light images, these information are constrained by loss functions, and gamma transformation is used to enhance the lighting information, and finally image quality is improved through image fusion and Laplace pyramid fusion technology.
Effectively maintain image details, significantly enhance the visual expression of the image, improve lighting conditions, make the image look brighter and natural, and solve the problem of image quality degradation caused by contrast inequality.
Smart Images

Figure CN119624809A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a low-light image enhancement method and system based on zero-sample learning. Background Art
[0002] In actual shooting environments, low lighting conditions and limitations of imaging equipment often lead to visual defects such as low contrast, color distortion, increased noise, and blurred details in images captured under low light conditions. These low-light images not only affect the viewing experience, but also have an adverse effect on subsequent image information processing processes, such as image segmentation, target recognition and detection, because these processes usually require high-definition images under sufficient light. Therefore, it is particularly important to improve the brightness of low-light images, restore image contrast, and reveal more detailed information.
[0003] In recent years, deep learning techniques have made significant progress in the field of image processing, especially in low-light image enhancement. These techniques improve image quality by building complex models. Nevertheless, most deep learning-based methods rely on large-scale image datasets for training, which can be time-consuming in data acquisition. In contrast, zero-shot learning techniques provide an effective alternative that does not require a large amount of paired training data to achieve good generalization capabilities and is particularly suitable for low-light image enhancement tasks. Existing zero-shot learning methods mainly focus on improving the brightness of dark areas, but often ignore low-light images in high-contrast scenes. For example, under the influence of artificial light sources, low-light images may have local high-exposure areas, resulting in uneven overall image contrast and may be accompanied by a halo effect. In this case, if the image is directly enhanced, it may cause diffuse blurring of the exposed area, further reducing the image quality. Summary of the invention
[0004] Therefore, the technical problem to be solved by the present invention is to overcome the problem in the prior art that the image quality is reduced when the image is directly enhanced due to the non-uniformity of the overall contrast of the image.
[0005] In a first aspect, in order to solve the above technical problems, the present invention provides a low-light image enhancement method based on zero-sample learning, comprising:
[0006] S1. Acquire a low-light image, and decompose illumination information, reflection map information, and edge feature information according to the low-light image;
[0007] S2, input the illumination information into the illumination loss function to obtain a first loss amount; input the reflection map information into the reflection loss function to obtain a second loss amount; input the edge feature information into the edge feature loss function to obtain a third loss amount; calculate the total loss amount according to the first loss amount, the second loss amount and the third loss amount; obtain a gradient value according to the total loss amount;
[0008] S3, judging whether the preset conditions are met at the same time according to the total loss amount and the gradient value; when the preset conditions are not met, returning to S1; when the preset conditions are met, obtaining optimal illumination information, optimal reflection information and optimal edge feature information; enhancing the optimal illumination information by using gamma transform to obtain enhanced illumination information; wherein the preset conditions are that the preset number of iterations is reached and the gradient value is the minimum;
[0009] S4, performing image fusion on the enhanced illumination information, the optimal reflection map information and the optimal edge feature information to obtain a primary enhanced image;
[0010] S5. Establishing Laplacian image pyramids of the primary enhanced image and the low-light image respectively to obtain a first Laplacian pyramid and a 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 is the illumination loss function, is the sum of the longitudinal gradient losses of all illuminated pixels, is the sum of the lateral losses of all illuminated pixels, I is the illumination information, and I max is the pixel with the largest illumination information, is the vertical gradient of the pixel-level reflectance map, is the lateral gradient of the pixel-level reflectance map, is the Gaussian smoothing term of the vertical gradient of the grayscale of the original pixel, is the Gaussian smoothing term of the grayscale lateral gradient of the original pixel, 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 is the reflection loss function, is the sum of the longitudinal gradient losses of all reflected pixels, is the sum of the lateral losses of all reflection pixels, I is the illumination information, P is the low-light image, R is the reflection image information, is the vertical gradient of the pixel-level reflectance map, is the lateral gradient of the pixel-level reflectance map, is the vertical grayscale gradient of the original pixel, is the horizontal grayscale gradient of the original pixel, 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 is the edge feature loss function, I is the illumination information, F e is the edge feature information.
[0021] In one embodiment of the present invention, the total loss also includes an image reconstruction loss, and the image reconstruction loss is calculated as follows:
[0022] Loss re =||P-(I*R+F e )||1;
[0023] Among them, Loss re is the image reconstruction loss, P is the low-light image, I is the illumination information, R is the reflection map information, and F e is the edge feature information.
[0024] In one embodiment of the present invention, the calculation formula of the total loss is:
[0025] Loss=Loss re +Loss R +5000Loss F +ln3Loss I ;
[0026] Among them, Loss is the total loss, Loss re is the image reconstruction loss, Loss R is the reflection loss function, Loss F is the edge feature loss function, LossI is the illumination loss function.
[0027] In one embodiment of the present invention, when the S3 satisfies the preset condition, it further includes smoothing the optimal illumination information, the optimal reflection map information and the optimal edge feature information.
[0028] In one embodiment of the present invention, before obtaining the enhanced image in S6, the process further includes performing up-sampling image restoration processing on the fused Plaus pyramid.
[0029] In a second aspect, in order to solve the above technical problems, the present invention provides a low-light image enhancement system based on zero-sample learning, comprising:
[0030] A decomposition module, used to obtain a low-light image, and decompose lighting information, reflectance map information and edge feature information according to the low-light image;
[0031] A loss calculation module, used for inputting the illumination information into the illumination loss function to obtain a first loss amount; inputting the reflection map information into the reflection loss function to obtain a second loss amount; inputting the edge feature information into the edge feature loss function to obtain a third loss amount; calculating a total loss amount according to the first loss amount, the second loss amount and the third loss amount; and obtaining a gradient value according to the total loss amount;
[0032] A judgment module, used to judge whether the preset conditions are met at the same time according to the total loss amount and the gradient value; when the preset conditions are not met, return to the decomposition module; when the preset conditions are met, the optimal illumination information, the optimal reflection information and the optimal edge feature information are obtained; the optimal illumination information is enhanced by using gamma transformation to obtain enhanced illumination information; wherein the preset condition is that a preset number of iterations is reached and the gradient value is the minimum;
[0033] An image fusion module, used for fusing the enhanced illumination information, the optimal reflection map information and the optimal edge feature information to obtain a primary enhanced image;
[0034] A Laplacian pyramid construction module, used to respectively establish Laplacian image pyramids of the primary enhanced image and the low-light image to obtain a first Laplacian pyramid and a second Laplacian pyramid;
[0035] An output module is used to perform image fusion on the first Laplacian pyramid and the second Laplacian pyramid, and output an enhanced image.
[0036] In a third aspect, in order to solve the above-mentioned technical problem, the present invention provides an electrical device, including the above-mentioned low-light image enhancement system based on zero-sample learning.
[0037] The above technical solution of the present invention has the following beneficial effects compared with the prior art:
[0038] (1) The present invention discloses a method and system for low-light image enhancement based on zero-sample learning, which decomposes illumination information, reflectance map information and edge feature information from low-light images, realizes accurate optimization of each image component, effectively maintains image details and significantly enhances its visual expression. The three types of information are constrained by a loss function, and the optimized illumination information is enhanced by a gamma transform, thereby greatly improving the illumination conditions of low-light images and making the images look brighter and more natural. In addition, the method calculates the total loss amount and iteratively optimizes according to the gradient descent method, gradually iteratively improves the image quality until the preset conditions are met, and ensures that the optimal image information is obtained. Through image fusion technology, a Laplacian pyramid of low-light images and illumination-enhanced images is constructed for deep fusion to ensure that the features of high-exposure areas are fully preserved. The design effectively solves the problem of image quality degradation caused by direct enhancement due to uneven overall image contrast.
[0039] (2) The present invention fuses the enhanced illumination information, the optimal reflection map information and the optimal edge feature information. Such a fusion strategy can better preserve the feature information of the original image and effectively compensate for the problem of detail loss that may occur in the image enhancement process. In addition, the enhanced image also significantly improves the detail richness and clarity of the image, ensuring that the image has a high signal-to-noise ratio. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein
[0041] Figure 1 This is a flow chart of a low-light image enhancement method based on zero-sample learning in a preferred embodiment of the present invention;
[0042] Figure 2 A structural diagram of an edge feature and a reflection graph network in a preferred embodiment of the present invention;
[0043] Figure 3 A network structure diagram of illumination information in a preferred embodiment of the present invention;
[0044] Figure 4 Comparison of subjective results in the preferred embodiment of the present invention Figure 1 ;
[0045] Figure 5 Comparison of subjective results in the preferred embodiment of the present invention Figure 2 . DETAILED DESCRIPTION
[0046] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0047] Embodiment 1
[0048] Reference Figure 1 As shown, the embodiment of the present invention provides a low-light image enhancement method based on zero-sample learning, including but not limited to the following steps:
[0049] S1. Obtain a low-light image, and decompose illumination information, reflection map information, and edge feature information according to the low-light image;
[0050] S2, input the illumination information into the illumination loss function to obtain a first loss amount; input the reflection map information into the reflection loss function to obtain a second loss amount; input the edge feature information into the edge feature loss function to obtain a third loss amount; calculate the total loss amount according to the first loss amount, the second loss amount and the third loss amount; obtain the gradient value according to the total loss amount;
[0051] S3, judging whether the preset conditions are met at the same time according to the total loss amount and the gradient value; when the preset conditions are not met, returning to S1; when the preset conditions are met, the optimal illumination information, the optimal reflection information and the optimal edge feature information are obtained; the optimal illumination information is enhanced by using gamma transform to obtain enhanced illumination information; wherein the preset conditions are that the preset number of iterations is reached and the gradient value is the minimum;
[0052] S4, performing image fusion on the enhanced illumination information, the optimal reflection map information and the optimal edge feature information to obtain a primary enhanced image;
[0053] S5. Establishing Laplacian image pyramids for the primary enhanced image and the low-light image respectively to obtain a first Laplacian pyramid and a second Laplacian pyramid;
[0054] S6. Perform image fusion on the first Laplacian pyramid and the second Laplacian pyramid to obtain an enhanced image.
[0055] The embodiment of the present invention provides a low-light image enhancement method based on zero-sample learning. By decomposing illumination information, reflectance map information and edge feature information from low-light images, targeted optimization of different components of the image is achieved, image details are effectively retained and its expressiveness is enhanced. The three types of information are constrained by the loss function, and the optimal illumination information is enhanced by using the gamma transform, which significantly improves the illumination conditions of the low-light image, making the image appear brighter and more natural. In addition, the method calculates the total loss and performs iterative optimization according to the gradient value, gradually improves the image quality until the preset conditions are met, and can obtain the optimal information. Preliminary enhancement is achieved through image fusion, and the Laplacian image pyramid of the low-light image and the illumination-enhanced image is constructed, and further fusion is performed to ensure the integrity of the features of the high-exposure area. This method effectively solves the problem of image quality degradation when directly enhancing the image due to the uneven contrast of the overall image. This method is not only applicable to low-light image enhancement, but also to other image enhancement scenarios, showing wide versatility and applicability. The embodiments of the present invention combine zero-sample learning and multi-loss function optimization, open up a new technical path in the field of image enhancement, and provide innovative ideas for future research and applications.
[0056] Specifically, in step S1, a low-light image is read (the low-light image may also be referred to as an original image), and the image is converted into a three-dimensional tensor format (channel, length information, width information), and each pixel can be expressed. Then, the three-dimensional tensor is increased by one dimension and expanded to four dimensions. The four-dimensional tensor is input into the edge feature and reflection map network and the illumination information network respectively. The structures of the edge feature and reflection map network and the illumination information network may refer to Figure 2 and Figure 3 As shown in Figure 2, 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 in is the number of convolution kernels in the convolution layer. Figure 3 Each state in is the number of convolution kernels in the convolution layer. After being processed by the illumination information network, the low-light image can generate illumination information with excellent smoothness. At the same time, the image can be accurately decomposed into complete reflection map information and distinct edge feature information through the processing of edge feature and reflection map network. Among them, the reflection map information also shows good smoothness, while the edge feature information is very significant. These details together provide a solid foundation for image enhancement.
[0057] Furthermore, since the ELU function can reduce the problem of neuron death, accelerate the training process, improve the generalization ability of the model, has a self-normalization property to reduce internal covariate offset, enhance numerical stability, and provide flexibility in parameters, more effective learning and better performance can be achieved in the deep learning model. Therefore, this embodiment will preferably use the ELU function as the activation function of the edge feature and reflectance map network. The soft saturation of the ELU function can improve the robustness of the edge feature and reflectance map network to noise, and has a certain anti-interference ability, which can alleviate the gradient disappearance problem. The formula of the ELU function is:
[0058]
[0059] Wherein, x is a variable, α is a hyperparameter, and in this embodiment, the preferred value of α is 1.
[0060] Specifically, the ReLU function has high computational efficiency, can alleviate the gradient vanishing problem, promotes sparse activation to reduce model complexity and overfitting, has biological rationality, reduces memory usage, and is easy to implement and applicable to a variety of network structures due to its simplicity. Therefore, the embodiment of the present invention preferably uses the ReLU function as the activation function of the illumination information network, and the formula of 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 the embodiment of the present invention, the total loss includes the first loss (i.e., the smooth loss of illumination information), the second loss (i.e., the smooth loss of reflection information), and the third loss (i.e., the edge feature loss). Among them, the total loss also includes the image reconstruction loss. For the image reconstruction loss, its calculation formula is:
[0063] Loss re =||P-(I*R+F e )||1;
[0064] Among them, Loss re is the image reconstruction loss, P is the low-light image, I is the illumination information, R is the reflectance map information, and F e is the edge feature information. The loss of the image after reconstruction is obtained by calculating the 1-norm between the original image and the reconstructed image.
[0065] The smoothness loss of the 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 to make it appear smoother and more delicate. In this embodiment, the mathematical expression of the illumination loss function is:
[0066]
[0067]
[0068] Among them, Loss I is the illumination loss function, is the sum of the longitudinal gradient losses of all illuminated pixels, is the sum of the lateral losses of all illuminated pixels, I max is the pixel with the largest illumination information, is the vertical gradient of the pixel-level reflectance map, is the lateral gradient of the pixel-level reflectance map, is the Gaussian smoothing term of the vertical gradient of the grayscale of the original pixel, is the original pixel grayscale horizontal gradient Gaussian smoothing term, and ε1 is the light loss penalty term. In the embodiment of the present invention, the preferred value of ε1 is 0.0001. The value of the light loss penalty term can be adjusted according to different actual scenarios.
[0069] For the smooth loss of reflection information, the reflection map information is input into the reflection loss function to obtain the reflection loss function. The reflection loss function can improve the image quality and enhance the image expression. In this embodiment, the mathematical expression of the reflection loss function is:
[0070]
[0071] Among them, Loss R is the reflection loss function, is the sum of the longitudinal gradient losses of all reflected pixels, is the sum of the lateral losses of all reflection pixels, is the vertical gradient of the pixel-level reflectance map, is the lateral gradient of the pixel-level reflectance map, is the vertical grayscale gradient of the original pixel, is the horizontal grayscale gradient of the original pixel, and ε2 is the reflection penalty term. In the embodiment of the present 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] For the edge feature loss, the edge feature information is input into the edge feature loss function to obtain the loss. The edge feature loss function can accurately capture and describe the edge feature information inside the high-contrast low-light image, ensuring the accuracy of these key 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 is the edge feature loss function, F e is the edge feature information, ||·|| F The Frobenius norm can be abbreviated as F norm. By solving the convolution of illumination information I and feature information F e The F norm of , we can get the edge feature loss.
[0075] Furthermore, according to the smooth loss of illumination information, the smooth loss of reflection information, the edge feature loss, and the image reconstruction loss, the calculation formula of the total loss can be obtained. The calculation formula of the total loss Loss is:
[0076] Loss=Loss re +Loss R +5000Loss F +ln3Loss I ;
[0077] Among them, the calculation formula of the total loss can also be called the total loss function.
[0078] Furthermore, during the neural network training process, the embodiment of the present invention uses a back-propagation algorithm to accurately calculate the gradient of the total loss function for each model parameter including illumination information, reflection information, and edge feature information, and then uses the stochastic gradient descent (SGD) algorithm to continuously update the weights based on these gradient information to ensure that the loss function is continuously optimized along the fastest descent path. In each optimization iteration, the parameters are updated and re-entered into the network for the next round of calculation and optimization. This iterative process is repeated with the aim of gradually reducing the gradient value to ensure that the total loss continues to decrease. According to the design of the embodiment of the present invention, the process will iterate 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 actual scenarios.
[0079] Specifically, in step S3, it is determined whether the preset conditions are met at the same time based on the total loss amount and the gradient value. When the preset conditions are met, it means that all iterative tasks are completed, and the optimal illumination information, the optimal reflection information and the optimal edge feature information will be obtained. In order to further improve the quality of this information, the optimal illumination information, the optimal reflection information and the optimal edge feature information are smoothed to reduce noise and unevenness. In particular, for the optimal illumination information, a gamma transformation is performed to enhance its own contrast, so that the image is more vivid and three-dimensional in terms of illumination. Through these processing steps, the embodiment of the present invention can ensure that the final output image reaches the optimal state in terms of illumination, reflection and edge features.
[0080] Specifically, in step S4, the enhanced illumination information, the optimal reflection map information and the optimal edge feature information are fused. Such a fusion strategy can better preserve the feature information of the original image, while effectively compensating for the problem of detail loss that may occur in the image enhancement process. Finally, after this series of processing, the enhanced image not only retains the important features of the original image, but also significantly improves the detail richness and clarity of the image, ensuring that the image has a higher signal-to-noise ratio, thereby providing users with a better visual experience.
[0081] Specifically, in step S5, in the process of constructing the Laplacian pyramid of the original image, the embodiment of the present invention first constructs a 7-level Laplacian pyramid for the original image to finely capture and express its high-frequency detail features. Subsequently, the primary enhanced image is also processed in the same way, that is, a Laplacian pyramid also containing 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 actual application scenarios and specific needs to ensure the best image detail feature extraction effect.
[0082] Specifically, in step S6, the Laplacian pyramid features of each level of the original image and the primary enhanced image are fused to construct a fused Laplacian pyramid. In the upsampling process, each level of upsampling needs to be superimposed with the Laplacian pyramid detail features at that scale, and this process continues until the last level of the pyramid is reached. Through such a method, the embodiment of the present invention can restore the final enhanced image. In addition, before obtaining the enhanced image, it also includes upsampling image restoration of the fused Laplacian pyramid. Upsampling image restoration includes upsampling and image restoration. The upsampling process can increase the number of pixels of 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] In order to more clearly demonstrate the advantages and effects of the embodiments of the present invention, a detailed description is given below through comparative experiments.
[0084] Specifically, two images with strong contrast and overall low-light characteristics were selected from two public low-light image databases and enhanced using the method described in this embodiment. In terms of both subjective and objective dimensions, this experiment compared the processing results with the color restoration multi-scale Retinex algorithm (MSRCP), the Retinex network algorithm (RetinexNet), the zero reference curve estimation algorithm (Zero-Dce), and the self-calibration illumination algorithm (SCI). The results of the subjective comparison are shown in Figure 4 and Figure 5 Through observation Figure 4 and Figure 5 It can be found that the method proposed in this embodiment has obvious advantages in visual effects.
[0085] In order to further evaluate the experimental results, three objective evaluation indicators are calculated for comparative analysis: Peak Signal-to-Noise Ratio (PSNR), Structural Similarity (SSIM), and Perceptual Loss (LPIPS). These indicators can comprehensively evaluate the performance of different enhancement methods.
[0086] Table 1 Comparison of objective parameter indicators in scenario 1
[0087]
[0088] Table 2 shows the comparison of objective parameter indicators for scenario 2
[0089]
[0090] It can be clearly seen from the comparison results of Table 1 and Table 2 that the embodiments of the present invention perform well in all three key parameter indicators. Therefore, the present invention combines the advantages of existing image enhancement technologies and proposes a high-contrast, low-light image enhancement method based on zero-sample learning. Compared with other enhancement technologies, this method has significant effects in improving image quality, and has reached the industry-leading level in numerical indicators such as signal-to-noise ratio and image correlation coefficient. The present invention is not only suitable for various high-contrast, low-light image scenes, but also has broad application prospects in multiple image processing fields such as transportation, aerospace, military public security, and machine vision.
[0091] Embodiment 2
[0092] Based on the same inventive concept, this embodiment provides a low-light image enhancement system based on zero-sample learning. The principle of solving the problem is similar to the low-light image enhancement method based on zero-sample learning provided in Example 1, and the repeated parts are not repeated here.
[0093] This embodiment provides a low-light image enhancement system based on zero-sample learning, including:
[0094] A decomposition module is used to obtain a low-light image and decompose the illumination information, the reflection map information and the edge feature information according to the low-light image;
[0095] The loss calculation module is used to input the illumination information into the illumination loss function to obtain a first loss amount; input the reflection map information into the reflection loss function to obtain a second loss amount; input the edge feature information into the edge feature loss function to obtain a third loss amount; calculate the total loss amount according to the first loss amount, the second loss amount and the third loss amount; and obtain a gradient value according to the total loss amount;
[0096] A judgment module is used to judge whether the preset conditions are met at the same time according to the total loss amount and the gradient value; when the preset conditions are not met, it returns to the decomposition module; when the preset conditions are met, the optimal illumination information, the optimal reflection information and the optimal edge feature information are obtained; the optimal illumination information is enhanced by using gamma transform to obtain enhanced illumination information; wherein the preset conditions are that the preset number of iterations is reached and the gradient value is the minimum;
[0097] An image fusion module is used to fuse the enhanced illumination information, the optimal reflection map information and the optimal edge feature information to obtain a primary enhanced image;
[0098] A Laplacian pyramid building module is used to build Laplacian image pyramids for the primary enhanced image and the low-light image, respectively, to obtain a first Laplacian pyramid and a second Laplacian pyramid;
[0099] The output module is used to perform image fusion on the first Laplacian pyramid and the second Laplacian pyramid to output an enhanced image.
[0100] Embodiment 3
[0101] This embodiment provides an electrical device, including a low-light image enhancement system based on zero-sample learning provided in Embodiment 2.
[0102] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0103] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0104] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0105] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0106] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A low-light image enhancement method based on zero-shot learning, characterized in that: include: S1. Acquire a low-light image, and decompose illumination information, reflection map information, and edge feature information according to the low-light image; S2, input the illumination information into the illumination loss function to obtain a first loss amount; input the reflection map information into the reflection loss function to obtain a second loss amount; input the edge feature information into the edge feature loss function to obtain a third loss amount; calculate the total loss amount according to the first loss amount, the second loss amount and the third loss amount; obtain a gradient value according to the total loss amount; S3, judging whether the preset conditions are met at the same time according to the total loss amount and the gradient value; when the preset conditions are not met, returning to S1; when the preset conditions are met, optimal illumination information, optimal reflection information and optimal edge feature information are obtained; The optimal illumination information is enhanced by using a gamma transform to obtain enhanced illumination information; wherein the preset condition is that a preset number of iterations is reached and the gradient value is the minimum; S4, performing image fusion on the enhanced illumination information, the optimal reflection map information and the optimal edge feature information to obtain a primary enhanced image; S5. Establishing Laplacian image pyramids of the primary enhanced image and the low-light image respectively to obtain a first Laplacian pyramid and a second Laplacian pyramid; S6. Perform image fusion on the first Laplacian pyramid and the second Laplacian pyramid to obtain an enhanced image.
2. The method for low-light image enhancement based on zero-shot learning according to claim 1, characterized in that: The mathematical expression of the illumination loss function is: Among them, Loss I is the illumination loss function, is the sum of the longitudinal gradient losses of all illuminated pixels, is the sum of the lateral losses of all illuminated pixels, I is the illumination information, and I max is the pixel with the largest illumination information, is the vertical gradient of the pixel-level reflectance map, is the lateral gradient of the pixel-level reflectance map, is the Gaussian smoothing term of the vertical gradient of the grayscale of the original pixel, is the Gaussian smoothing term of the grayscale lateral gradient of the original pixel, and ε1 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 reflection loss function is: Among them, Loss R is the reflection loss function, is the sum of the longitudinal gradient losses of all reflected pixels, is the sum of the lateral losses of all reflection pixels, I is the illumination information, P is the low-light image, R is the reflection image information, is the vertical gradient of the pixel-level reflectance map, is the lateral gradient of the pixel-level reflectance map, is the vertical grayscale gradient of the original pixel, is the horizontal grayscale gradient of the original pixel, and ε2 is the reflection penalty term.
4. The method for low-light image enhancement based on zero-shot learning according to claim 1, characterized in that: The mathematical expression of the edge feature loss function is: Loss F =||I*F e || F ; Among them, Loss F is the edge feature loss function, I is the illumination information, F e is the edge feature information.
5. The method for low-light image enhancement based on zero-shot learning according to claim 1, characterized in that: The total loss also includes an image reconstruction loss, and the image reconstruction loss is calculated as follows: Loss re =||P-(I*R+F e )||1; Among them, Loss re is the image reconstruction loss, P is the low-light image, I is the illumination information, R is the reflection map information, and F e is the edge feature information.
6. The method for low-light image enhancement based on zero-shot learning according to claim 1 or 5, characterized in that: The calculation formula of the total loss is: Loss=Loss re +Loss R +5000Loss F +ln3Loss I ; Among them, Loss is the total loss, Loss re is the image reconstruction loss, Loss R is the reflection loss function, Loss F is the edge feature loss function, Loss I is the illumination loss function.
7. The method for low-light image enhancement based on zero-shot learning according to claim 1, characterized in that: When the S3 meets the preset condition, it also includes smoothing the optimal illumination information, the optimal reflection map information and the optimal edge feature information.
8. The method for low-light image enhancement based on zero-shot learning according to claim 1, characterized in that: Before obtaining the enhanced image in S6, the method further includes performing up-sampling image restoration processing on the fused Plaus pyramid.
9. A low-light image enhancement system based on zero-shot learning, characterized in that: include: A decomposition module, used to obtain a low-light image, and decompose lighting information, reflectance map information and edge feature information according to the low-light image; A loss calculation module, used for inputting the illumination information into the illumination loss function to obtain a first loss amount; inputting the reflection map information into the reflection loss function to obtain a second loss amount; inputting the edge feature information into the edge feature loss function to obtain a third loss amount; calculating a total loss amount according to the first loss amount, the second loss amount and the third loss amount; and obtaining a gradient value according to the total loss amount; A judgment module, used to judge whether preset conditions are met at the same time according to the total loss amount and the gradient value; when the preset conditions are not met, the module returns to the decomposition module; when the preset conditions are met, the optimal illumination information, the optimal reflection information and the optimal edge feature information are obtained; The optimal illumination information is enhanced by using a gamma transform to obtain enhanced illumination information; wherein the preset condition is that a preset number of iterations is reached and the gradient value is the minimum; An image fusion module, used for fusing 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, used to respectively establish Laplacian image pyramids of the primary enhanced image and the low-light image to obtain a first Laplacian pyramid and a second Laplacian pyramid; An output module is used to perform image fusion on the first Laplacian pyramid and the second Laplacian pyramid, and output an enhanced image.
10. An electrical device, characterized in that: Including a low-light image enhancement system based on zero-sample learning as described in 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
Self-adaptive low-light noise image enhancement method and system based on zero-order learning
CN116579944A
Highly precise measurement method of microscope focusing position
JP2006309088A
Cited By
Partition exposure correction method based on deep learning
CN120510049A