Low-light image enhancement method and device, electronic equipment and storage medium

By using the image enhancement model in a low-light environment, the local detail information of the image and the noise removal information are enhanced, and the problem of difficulty in improving the brightness and suppressing low-light images at the same time in the prior art is solved, and the image enhancement effect of high quality, clarity and realism is achieved.

CN119991475APending Publication Date: 2025-05-13SUZHOU GAIDE PHOTOELECTRIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510201749.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve the brightness of low-light images and suppress noise at the same time, resulting in the enhanced image being too blurred, color distorted or excessive noise.

Method used

A low-light image enhancement method is provided. By acquiring an image and an image enhancement model in a low-light environment, the first module enhances the local detail information of the image, and the second module removes noise information, so as to achieve brightness improvement and detail clarity enhancement of the image, while effectively suppressing noise.

Benefits of technology

It realizes the realization and natural visual effects of the image while improving the brightness and detail clarity of the image while effectively reducing noise, improving the quality and usability of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991475A_ABST
    Figure CN119991475A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a low-light image enhancement method and device, electronic equipment and a storage medium. The method comprises the steps that a first image and an image enhancement model in a target environment are acquired, and the illumination intensity in the target environment is lower than or equal to preset intensity; the image enhancement model comprises a first module and a second module, the first module is used for enhancing local detail information of an input image, and the second module is used for removing noise information in input information; and inputting the first image into the image enhancement model to obtain a first enhanced image of the first image, thereby solving the problem that it is difficult to effectively improve the brightness of a low-light image and suppress noise at the same time in related technologies, improving the brightness and definition of the first image, and ensuring the sense of reality and natural visual effect of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of image processing technology, and in particular to a low-light image enhancement method, device, electronic device and storage medium. Background Art

[0002] Images taken in low-light environments usually suffer from problems such as insufficient brightness, low contrast, blurred details, and high noise, which seriously affect the quality and usability of the images.

[0003] In related technologies, image enhancement methods often have difficulty in simultaneously resolving the contradiction between brightness enhancement and noise suppression, resulting in the enhanced image being too blurry, distorted in color, or too noisy. Therefore, how to effectively reduce noise while improving image brightness and detail clarity has become a challenge in the field of low-light image processing. Summary of the invention

[0004] The embodiments of the present invention provide a low-light image enhancement method, device, electronic device and storage medium, which solve the problem in the related art that it is difficult to effectively improve brightness and suppress noise at the same time.

[0005] According to one aspect of the present invention, a low-light image enhancement method is provided, which may include:

[0006] Acquire a first image in a target environment and an image enhancement model, wherein the illumination intensity in the target environment is lower than or equal to a preset intensity, and the image enhancement model includes a first module and a second module, the first module is used to enhance local detail information of the input image, and the second module is used to remove noise information in the input information;

[0007] The first image is input into the image enhancement model to obtain a first enhanced image of the first image.

[0008] According to another aspect of the present invention, a low-light image enhancement device is provided, which may include:

[0009] A first acquisition module, used to acquire a first image and an image enhancement model in a target environment, wherein the illumination intensity in the target environment is lower than or equal to a preset intensity, and the image enhancement model includes a first module and a second module, the first module is used to enhance local detail information of an input image, and the second module is used to remove noise information in the input information;

[0010] The enhanced image determination module is used to input the first image into the image enhancement model to obtain a first enhanced image of the first image.

[0011] According to another aspect of the present invention, there is provided an electronic device, which may include:

[0012] at least one processor; and

[0013] a memory communicatively connected to at least one processor; wherein,

[0014] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by the at least one processor so that the at least one processor implements the low-light image enhancement method provided by any embodiment of the present invention when executing the computer program.

[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored. The computer instructions are used to enable a processor to implement the low-light image enhancement method provided by any embodiment of the present invention when executed.

[0016] According to another aspect of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the low-light image enhancement method provided by any embodiment of the present invention is implemented.

[0017] The technical solution of the embodiment of the present invention is, first, to obtain a first image in a target environment and an image enhancement model. Since the light intensity in the target environment is lower than or equal to a preset intensity, the image enhancement model includes a first module and a second module. The first module is used to enhance the local detail information of the input image, and the second module is used to remove noise information in the input information, which can provide sufficient data support and tools for the enhancement of the first image; then, by inputting the first image into the image enhancement model, a first enhanced image of the first image is obtained, and the first enhanced image with improved brightness and detail clarity and effectively suppressed noise can be obtained, which solves the problem in the related art that it is difficult to effectively improve the brightness of low-light images and suppress noise at the same time, and not only improves the brightness and clarity of the first image, but also ensures the realism and natural visual effects of the image.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1is a flow chart of a low-light image enhancement method provided according to Embodiment 1 of the present invention;

[0021] Figure 2 is a flow chart of a low-light image enhancement method provided according to Embodiment 2 of the present invention;

[0022] Figure 3 is a flow chart of a low-light image enhancement method provided according to Embodiment 3 of the present invention;

[0023] Figure 4 is a structural diagram of a low-light image enhancement device provided according to a fourth embodiment of the present invention;

[0024] Figure 5 is a schematic diagram of the structure of an electronic device for implementing the low-light image enhancement method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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 creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The situations of "target", "original", etc. are similar and will not be repeated here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] Embodiment 1

[0028] Figure 1This is a flow chart of a low-light image enhancement method provided in Embodiment 1 of the present invention. This embodiment can be applied to solve the problem that images generally have insufficient brightness, significant noise, and loss of details under low-light conditions. The method can be executed by a low-light image enhancement device provided in an embodiment of the present invention, which can be implemented by software and / or hardware, and can be integrated in an electronic device, which can be various user terminals or servers.

[0029] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:

[0030] S110. Acquire a first image in a target environment and an image enhancement model, wherein the illumination intensity in the target environment is lower than or equal to a preset intensity, and the image enhancement model includes a first module and a second module, the first module is used to enhance local detail information of an input image, and the second module is used to remove noise information in the input information.

[0031] Among them, the target environment can be understood as the actual scene or position when the first image is collected, and the light intensity in the target environment is lower than or equal to the preset intensity. The light intensity can be understood as the brightness of the light in the environment, usually measured in lux. The preset intensity can be understood as a preset light intensity threshold. Specifically, if the light intensity in the target environment is lower than or equal to the preset intensity, it is determined that the target environment meets the low light condition, and the image acquired under the low light condition may need to be improved by a specific image enhancement technology. Exemplarily, in photography or detection applications with high precision requirements, the preset intensity may be set higher to ensure that high-quality images can be captured in a relatively bright environment; while in some scenes with non-strict lighting requirements, the preset intensity may be lower. The first image can be understood as a photo or image taken when the light intensity in the target environment is lower than or equal to the preset intensity. Due to insufficient light, the first image will show problems such as insufficient brightness, low contrast, color distortion, and possible high noise. By improving the visual quality of the first image, the first image is made clearer, brighter, and richer in details. The image enhancement model can be understood as a machine learning or deep learning model, which is trained to enhance the image quality of the first image. The image quality includes but is not limited to at least one of brightness, contrast and color. The first module can be understood as a part of the image enhancement model, which makes the enhanced first image sharper and more vivid. The first module identifies and enhances the local detail information in the image, making the originally blurred details more clearly visible. The local detail information can be understood as the fine structure and texture features in a specific area of ​​the first image, including but not limited to at least one of edges, lines, textures and other fine structures. The second module can be understood as another part of the image enhancement model, which is used to reduce various forms of noise in the image. The second module can improve the overall brightness and contrast of the first image by analyzing the overall illumination distribution of the first image and removing the noise caused by the target environment.

[0032] On the basis of the above scheme, optionally, obtaining the first image in the target environment includes: capturing the first image through a shooting device; or, in response to an image upload operation, obtaining the uploaded first image; or, pulling the first image from a preset image database; or, obtaining multiple fifth images, and constructing the first image based on the multiple fifth images; or, pulling a video from a preset video database, extracting frames from the video to obtain the first image, etc., which are not specifically limited here.

[0033] The fifth image may be a group of photos or images taken in the target environment. The fifth image may be an image taken from a different angle, at a different time point, or using a different exposure setting. The first image may be synthesized based on the fifth image by an algorithm or other technical means.

[0034] S120: Input the first image into the image enhancement model to obtain a first enhanced image of the first image.

[0035] Among them, the first enhanced image can be understood as an image generated after being processed by an image enhancement model, which has a better visual effect than the first image, and the visual effect includes but is not limited to at least one of increased detail visibility, reduced noise level, improved brightness and contrast, etc.

[0036] The technical solution of the embodiment of the present invention is, first, to obtain a first image in a target environment and an image enhancement model. Since the light intensity in the target environment is lower than or equal to a preset intensity, the image enhancement model includes a first module and a second module. The first module is used to enhance the local detail information of the input image, and the second module is used to remove noise information in the input information, which can provide sufficient data support and tools for the enhancement of the first image; then, by inputting the first image into the image enhancement model, a first enhanced image of the first image is obtained, and the first enhanced image with improved brightness and detail clarity and effectively suppressed noise can be obtained, which solves the problem in the related art that it is difficult to effectively improve the brightness of low-light images and suppress noise at the same time, and not only improves the brightness and clarity of the first image, but also ensures the realism and natural visual effects of the image.

[0037] Embodiment 2

[0038] Figure 2It is a flow chart of a low-light image enhancement method provided in the second embodiment of the present invention. This embodiment is based on the above embodiments, and further refines the first enhanced image of the first image obtained by inputting the first image into the image enhancement model. In this embodiment, optionally, the image enhancement model includes a third module and a fourth module, the third module is used to extract local detail information and global illumination information from the input image, and the fourth module is used to fuse the input information; the first image is input into the image enhancement model to obtain the first enhanced image of the first image, including: inputting the first image into the third module for information extraction to obtain global illumination information and local detail information; inputting the local detail information into the first module for information enhancement processing to obtain enhanced detail information, and inputting the global illumination information into the second module for denoising processing to obtain global denoising information; inputting the enhanced detail information and the global denoising information into the fourth module to obtain the first enhanced image of the first image. Among them, the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.

[0039] See also Figure 2 The method of this embodiment may specifically include the following steps:

[0040] S210. Acquire a first image in a target environment and an image enhancement model, wherein the illumination intensity in the target environment is lower than or equal to a preset intensity, and the image enhancement model includes a first module and a second module, the first module is used to enhance local detail information of an input image, and the second module is used to remove noise information in the input information, and the image enhancement model also includes a third module and a fourth module, the third module is used to extract local detail information and global illumination information in the input image, and the fourth module is used to fuse the input information.

[0041] Among them, the third module can be understood as a part of the image enhancement model, which is responsible for extracting local detail information and global illumination information from the input image. The third module can not only identify the subtle structures and features in the image, but also analyze the brightness distribution of the entire image, providing a basis for subsequent adjustments to improve image quality. The fourth module can be understood as a part of the image enhancement model, which integrates various information generated or extracted by other modules. The global illumination information can be understood as information about the brightness distribution of the first image, which helps to analyze the overall light and dark contrast of the first image.

[0042] S220: Input the first image into the third module to extract information to obtain global illumination information and local detail information.

[0043] On the basis of the above scheme, optionally, the inputting the first image into the third module for information extraction to obtain global illumination information and local detail information includes: inputting the first image into the third module, performing short-time fractional Fourier transform decomposition on the first image with first transformation parameters to extract the global illumination information, and performing short-time fractional Fourier transform decomposition on the first image with second transformation parameters to extract the local detail information.

[0044] Among them, the short-time fractional Fourier transform can be understood as a signal processing technology, which is used to set the transformation parameters of the short-time fractional Fourier transform to extract global illumination information and local detail information. The first transformation parameter can be understood as a set of parameters for performing a short-time fractional Fourier transform on the first image to extract global illumination information. The second transformation parameter can be understood as a set of parameters for performing a short-time fractional Fourier transform on the first image to extract local detail information. The first transformation parameter and the second transformation parameter at least include a fractional order parameter and a window length. The fractional order parameter can be understood as determining the angle of frequency domain rotation in the short-time fractional Fourier transform, which is between 0 and 2 and is used to adjust the weight of frequency domain and time domain information. A smaller fractional order parameter is more suitable for capturing rapidly changing local details, while a larger fractional order parameter helps to extract slowly changing global illumination information. The window length can be understood as the size of the time or space range considered each time the short-time fractional Fourier transform is calculated, which is used to determine the capture accuracy of local detail information and global illumination information. Longer windows may be better for extracting global illumination information because they cover a larger area, while shorter windows are better for capturing fine local details.

[0045] In an optional implementation manner, the short-time fractional Fourier transform can be calculated based on the following formula:

[0046]

[0047]

[0048] Where STFrFT{I(x,y)} represents the result of short-time fractional Fourier transform of the first image I(x,y), t represents the time variable, t0 represents the center position of the time window, w represents the window length, and the value of w is an integer power of 2; α represents the fractional order parameter, K α (t,u) is the kernel function, and u represents the frequency domain variable in the fractional Fourier domain.

[0049] In this embodiment, when the value of w is greater than 128 and the value of α does not exceed 0.1, the short-time fractional Fourier transform extracts global illumination information; when the value of w is less than 16 and the value of α is greater than 0.1, the short-time fractional Fourier transform extracts local detail information.

[0050] In an optional implementation, the third module includes: a global illumination information extraction channel of a short-time fractional Fourier transform integrating the first transformation parameter, and a local detail information channel of a short-time fractional Fourier transform integrating the second transformation parameter. The global illumination information is extracted by inputting the first image into the global illumination information extraction channel, and the local detail information is extracted by inputting the first image into the local detail information extraction channel.

[0051] By adopting this technical solution, by performing short-time fractional Fourier transform decomposition on the first image and setting the first transformation parameter and the second transformation parameter to extract global illumination information and local detail information, it is possible to accurately separate the different frequency components of the first image, which can not only effectively capture the macroscopic illumination features in the image, but also retain the tiny structures and textures, providing high-quality basic data for subsequent enhancement processing.

[0052] S230, inputting the local detail information into the first module for information enhancement processing to obtain enhanced detail information, and inputting the global illumination information into the second module for denoising processing to obtain global denoising information.

[0053] Wherein, the second module can be constructed based on a diffusion model. The forward diffusion process of the diffusion model is not the model itself used for training, but is used to generate training data. After the model is trained, the denoising process will no longer include the forward diffusion process, but directly use the trained model for reverse diffusion denoising. The diffusion model can gradually transform a complex distribution (noisy image distribution) into a simple distribution (clear image distribution).

[0054] Based on the above solution, optionally, the global denoising information can be determined based on the following formula:

[0055] G clean (x,y)=D θ {G(x,y)};

[0056] Among them, G clean (x,y) represents the global denoising information, D θ {·} represents the diffusion model, and G(x,y) represents the global illumination information.

[0057] On the basis of the above scheme, optionally, the local detail information is input into the first module for information enhancement processing to obtain enhanced detail information, including: performing Fourier transform on the local detail information through the first module to obtain frequency domain information, and enhancing the frequency domain information through a high-pass filter to obtain high-frequency detail information; performing inverse Fourier transform on the high-frequency detail information to obtain spatial domain detail information, and weighted enhancing the spatial domain detail information to obtain weighted detail information; weighted fusion of the weighted detail information and the local detail information to obtain the enhanced detail information.

[0058] Among them, the frequency domain information can be understood as information about different frequency components in the local detail information obtained after Fourier transform. The frequency domain information reflects the intensity distribution of each frequency component in the local detail information, including low-frequency (smooth area), medium-frequency (gradient area) and high-frequency (edge, detail) components, and can be used to specifically enhance or suppress features within a specific frequency range. The high-pass filter can be used to enhance high-frequency details in the image, such as edges and textures, while reducing the influence of low-frequency areas (smooth areas). The high-frequency detail information can be understood as frequency domain information processed by a high-pass filter, mainly including edges and other fine structures in the image. The high-frequency detail information includes the details in the image and is the key to enhancing the clarity of the first image. Through the high-frequency detail information, the details in the first image can be made sharper and clearer. The inverse Fourier transform can convert the processed frequency domain information back to the original spatial domain representation, that is, the spatial domain detail information. The spatial domain detail information can be understood as the high-frequency detail information represented in the spatial domain after the inverse Fourier transform. The spatial domain detail information can be used to combine with other image information and is the basis for enhancing the details in the image. The weighted enhancement can be understood as enhancing the spatial detail information according to the weight coefficient, emphasizing the detail parts in the first image, such as edges and textures. The weighted enhancement includes but is not limited to the attention mechanism. The weighted detail information can be understood as the spatial detail information after weighted enhancement. The enhanced detail information can be understood as the image obtained by weighted fusion of the weighted detail information and the local detail information. The enhanced detail information not only improves the detail clarity of the first image, but also maintains the overall quality and naturalness of the first image.

[0059] In an optional implementation manner, the high-frequency detail information may be determined based on the following formula:

[0060] D f (u,v)=H(u,v)·F{D(x,y)};

[0061] Among them, D f(u,v) represents high-frequency detail information, D(x,y) represents local detail information, H(u,v) represents a high-pass filter, and F{·} represents Fourier transform.

[0062] The airspace detail information may be determined based on the following formula:

[0063] D s (x,y)=F -1 {D f (u,v)};

[0064] Among them, D s (x,y) represents the spatial details, F -1 {·} denotes inverse Fourier transform.

[0065] The spatial domain detail information can be weighted and enhanced through the attention mechanism to obtain weighted detail information, which can be based on the following formula:

[0066] D att (x,y)=A(x,y)·D s (x,y);

[0067] Among them, D att (x,y) represents weighted detail information, and A(x,y) represents the attention mechanism.

[0068] The enhanced detail information may be determined based on the following formula:

[0069] D final (x,y)=λD att (x,y)+(1-λ)D(x,y);

[0070] Among them, D final (x, y) represents the enhanced detail information, and λ represents the weight.

[0071] By adopting this technical solution, the local detail information is Fourier transformed and a high-pass filter is used to enhance the high-frequency details in the frequency domain, and then restored to the spatial domain through inverse Fourier transform and the spatial domain detail information is weighted enhanced, and finally weighted fused with the local detail information. This can significantly improve the detail clarity and edge sharpness of the first image, effectively enhance the tiny structures and textures in the first image, and ensure the realism and natural visual effect of the image.

[0072] S240: Input the enhanced detail information and the global denoising information into the fourth module to obtain a first enhanced image of the first image.

[0073] On the basis of the above scheme, the enhanced detail information and the global denoising information are input into the fourth module to obtain a first enhanced image of the first image, including: fusing the enhanced detail information and the global denoising information, performing an inverse short-time fractional Fourier transform on the fused information, and obtaining a first enhanced image.

[0074] In an optional implementation manner, the inputting the enhanced detail information and the global denoising information into the fourth module to obtain a first enhanced image of the first image can be determined by the following formula:

[0075] I fusion (x,y)=βG clean (x,y)+(1-β)D final (x,y);

[0076] I enhanced (x,y)=InvSTFrFT{I fusion (x,y)};

[0077] Among them, I fusion (x, y) represents the fusion image of the enhanced detail information and the global denoising information, D final (x, y) represents enhanced detail information, G clean (x, y) represents the global denoising information, β represents the weight balance factor between the enhanced detail information and the global denoising information, I enhanced (x, y) represents the first enhanced image, and InvSTFrFT{·} represents the inverse short-time fractional Fourier transform.

[0078] The technical solution of the embodiment of the present invention uses a short-time fractional Fourier transform to decompose the first image through the third module, and extracts global illumination information and local detail information respectively, thereby ensuring accurate capture of features at different levels of the image; then, the first module significantly improves the clarity of fine structures in the image by performing frequency domain high-pass filtering and weighted enhancement processing after inverse transformation on local details; the second module denoises the global illumination information, optimizes the overall brightness distribution of the image, and reduces noise interference; finally, the fourth module fuses the enhanced detail information with the denoised global illumination information to generate a final first enhanced image, thereby enhancing the visual effect of the image and obtaining a high-quality, detail-rich image output.

[0079] Embodiment 3

[0080] Figure 3It is a flow chart of a low-light image enhancement method provided in the second embodiment of the present invention. This embodiment can be combined with the above embodiments. Optionally, before acquiring the first image in the target environment and the image enhancement model, it also includes: acquiring a second image, a third image, a fourth image and an image enhancement model to be trained, wherein the second image is collected in an environment where the illumination intensity is less than or equal to a preset intensity, the third image is an expected output label image corresponding to the second image, and the fourth image is an image that does not semantically match the second image; inputting the second image into the image enhancement model to be trained to obtain a second enhanced image of the second image, and determining the target loss according to the second image, the fourth image and the second enhanced image; determining the performance index of the image enhancement model to be trained according to the third image and the second enhanced image, wherein the performance index includes peak signal-to-noise ratio and / or structural similarity; adjusting the parameters of the image enhancement model to be trained according to the target loss and the performance index to obtain the image enhancement model. Among them, the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.

[0081] S310. Acquire a second image, a third image, a fourth image, and an image enhancement model to be trained, wherein the second image is collected in an environment where the illumination intensity is less than or equal to a preset intensity, the third image is an expected output label image corresponding to the second image, and the fourth image is an image that semantically does not match the second image.

[0082] Among them, the second image can be understood as a group of images taken in an environment where the illumination intensity is less than or equal to the preset intensity, which is used to train and verify the model. The image enhancement model to be trained can be understood as a deep learning model with a specific architecture but has not yet completed training, which is used to improve its performance by learning the second image, and finally can effectively enhance the second image. The third image can be understood as an expected output, high-quality reference image corresponding to the second image, that is, an image with good illumination, such as an image taken in an environment with an illumination intensity greater than the preset intensity, which is used to provide an idealized processing result for the second image, used as a label in detection learning, and help determine the performance indicators of the image enhancement model to be trained. The fourth image can be understood as an image that does not match the second image semantically, that is, an image with completely different or irrelevant content or scene. The fourth image can be an image with poor illumination and content that is different from the second image. The fourth image can be used to assist in defining the target loss function, which can help the image enhancement model to be trained distinguish which features are important and which can be ignored, and help enhance the discrimination of the image enhancement model to be trained, ensuring that the image enhancement model to be trained can not only improve the image quality, but also maintain the semantic consistency of the second image, and avoid generating content that does not match the second image scene.

[0083] In order to enhance the generalization ability of the model, the second image may be preprocessed, and then the image enhancement model to be trained may be trained using the preprocessed second image. The preprocessing may include but is not limited to at least one of random rotation, flipping and scaling, and the second image may be normalized to have a mean of 0 and a standard deviation of 1, or other forms of normalization to facilitate model training.

[0084] S320: Input the second image into the image enhancement model to be trained to obtain a second enhanced image of the second image, and determine the target loss according to the second image, the fourth image and the second enhanced image.

[0085] Among them, the second enhanced image can be understood as an enhanced image generated after the image quality of the second image is enhanced after being processed by the image enhancement model to be trained. The second enhanced image has higher quality than the second image, including but not limited to increasing the brightness or contrast of the second image, reducing noise, and strengthening the details and textures in the second image, so that the second image looks clearer, more natural and closer to the effect under normal lighting conditions. The target loss can be understood as a measure of the gap between the model output and the expected output calculated based on the second image, the fourth image and the second enhanced image. The target loss guides the training process of the model by quantifying the difference between the second enhanced image output by the image enhancement model to be trained and the second image, as well as the semantic consistency between the second image and the fourth image, so that the model can produce more realistic and expected enhancement results.

[0086] On the basis of the above scheme, optionally, determining the target loss according to the second image, the fourth image and the second enhanced image includes: determining the pixel reconstruction loss according to the deviation value between the second enhanced image and the second image; determining the perceptual loss according to the deviation value of the feature value of the image enhancement model to be trained between the second enhanced image and the second image; determining a first similarity between the second enhanced image and the second image, and determining a second similarity between the second enhanced image and the fourth image, and determining the contrast loss according to the first similarity and the second similarity; determining the target loss according to the pixel reconstruction loss, the perceptual loss and the contrast loss.

[0087] The pixel reconstruction loss can be understood as the loss calculated according to the deviation value between the second enhanced image and the second image, ensuring that the second enhanced image is as close to the second image as possible at the pixel level, but avoiding overfitting at the same time, mainly acting on the low-level features (such as brightness and color, etc.) of the second image to ensure the fidelity of details. The perceptual loss can be understood as the loss determined according to the deviation value of the feature values ​​of the second enhanced image and the second image in the image enhancement model to be trained. The feature value can be understood as a high-level feature extracted from the second image, such as edge, texture or color distribution, which is usually output by the middle layer of the image enhancement model. The perceptual loss integrates the similarity of the second image in the feature space, not just the difference at the pixel level, which helps to capture the semantic information of the second image and ensure that the second enhanced image not only looks more realistic visually, but also remains consistent in content. The first similarity can be understood as a measure of the similarity between the second enhanced image and the second image. The first similarity includes but is not limited to metrics such as cosine similarity. The second similarity can be understood as a measure of the similarity between the second enhanced image and the fourth image. The contrast loss can be understood as a loss determined according to the first similarity between the second enhanced image and the second image, and the second similarity between the second enhanced image and the fourth image. The contrast loss ensures that the second enhanced image is not only similar to the second image, but also significantly different from other irrelevant images, which helps to improve the generalization ability and semantic consistency of the image enhancement model and prevent the image enhancement model from being confused or incorrectly associated.

[0088] In an optional implementation manner, the pixel reconstruction loss may be determined based on the following formula:

[0089]

[0090] Among them, L pixel represents the pixel reconstruction loss, I enhanced (x, y) represents the second enhanced image, and I(x, y) represents the second image.

[0091] The perceptual loss may be determined based on the following formula:

[0092]

[0093] Among them, L perceptual represents the perceptual loss, φ l (·) represents the lth layer feature of the image enhancement model to be trained, I enhanced (x, y) represents the second enhanced image, I(x, y) represents the second image, and ||·||2 represents the 2-norm.

[0094] The contrast loss can be determined based on the following formula:

[0095]

[0096] Among them, L contrast represents contrast loss, sim(·) represents similarity, k represents the identifier of the fourth image, I k (x, y) represents the fourth image; τ represents the temperature parameter, which is between 0.1 and 1.0 and can be determined by cross-validation. A smaller τ will make the similarity value difference larger, so that the image enhancement model to be trained focuses on the similarity between the second image and the second enhanced image and the difference between the fourth image, while a larger τ will make the similarity difference smaller, thereby reducing the impact of contrast loss.

[0097] The target loss can be determined based on the following formula:

[0098]

[0099] Among them, L total represents the target loss, L pixel represents the pixel reconstruction loss, L perceptual represents the perceptual loss, L contrast represents the contrast loss, σ, and δ represent weights.

[0100] This technical solution uses pixel reconstruction loss, perceptual loss and contrast loss to determine the target loss, which not only ensures the accuracy of the second enhanced image at the pixel level, but also improves the semantic consistency and visual quality of the image. Pixel reconstruction loss ensures detail fidelity, perceptual loss captures high-level feature differences, and contrast loss enhances the discriminability of the image enhancement model and prevents overfitting. The multi-dimensional loss evaluation mechanism can fully optimize the image enhancement model to ensure that the enhanced image it outputs is both clear and natural.

[0101] S330. Determine a performance indicator of the image enhancement model to be trained according to the third image and the second enhanced image.

[0102] Among them, the performance index can be understood as a standard of the quality of the second enhanced image relative to the third image. The performance index may include but is not limited to at least one of peak signal-to-noise ratio and / or structural similarity. The peak signal-to-noise ratio can be understood as a standard for measuring the compression quality of the enhanced image. The higher the value of the peak signal-to-noise ratio, the closer the second enhanced image and the third image are, and the less quality loss. The peak signal-to-noise ratio is measured in decibels (dB). The structural similarity can be understood as an indicator for measuring the similarity between the second enhanced image and the third image. The structural similarity includes but is not limited to at least one of brightness contrast, contrast contrast and structural contrast. The numerical value of the structural similarity is between -1 and 1, where 1 indicates that the second enhanced image and the third image are exactly the same, 0 or close to 0 indicates that there is no linear relationship between the two images, and a negative value indicates that there is an inverse relationship between the two images.

[0103] On the basis of the above scheme, optionally, determining the performance indicator of the image enhancement model to be trained based on the third image and the second enhanced image includes: determining the peak signal-to-noise ratio based on the average value of the square of the errors between the pixels of the second enhanced image and the third image and the maximum power of the second enhanced image; and / or determining the structural similarity based on the average value of the pixels of the second enhanced image and the third image and the covariance of the pixels of the second enhanced image and the third image.

[0104] Specifically, the peak signal-to-noise ratio is determined according to the average value of square errors between pixels of the second enhanced image and the third image and the maximum power of the second enhanced image, which can be determined based on the following formula:

[0105]

[0106] Among them, PSNR represents the peak signal-to-noise ratio, MAX I Indicates the maximum power of the image signal. For an 8-bit grayscale image, MAX I =255, MSE represents the average value of the square errors between the pixels of the second enhanced image and the third image.

[0107] The average value of the square error between the pixels of the second enhanced image and the third image can be calculated based on the following formula:

[0108]

[0109] Wherein, m and n are the height and width of the second enhanced image, respectively. enhanced (i, j) represents the pixel value of the second enhanced image at position (i, j), and K(i, j) represents the pixel value of the third image at the same position.

[0110] Specifically, the determining of the structural similarity according to the average value of pixels of the second enhanced image and the third image and the covariance of pixels of the second enhanced image and the third image may be based on the following formula:

[0111]

[0112] Among them, μ x and μ y Respectively represent the average values ​​of pixels of the second enhanced image and the third image; and denote the variance of the pixels of the second enhanced image and the third image, σ xy represents the covariance of pixels of the second enhanced image and the third image, C1 and C2 represent constants for stabilizing division operations to avoid the denominator being zero, and are related to the pixel range of the second enhanced image and the third image.

[0113] By adopting this technical solution and determining the performance indicators of the image enhancement model (such as peak signal-to-noise ratio and structural similarity) based on the second enhanced image and the third image, the enhancement effect of the image enhancement model can be objectively evaluated, which not only ensures the quality of image enhancement, but also can accurately measure the performance of the image enhancement model in improving brightness, detail clarity and noise suppression.

[0114] S340. Adjust parameters of the image enhancement model to be trained according to the target loss and the performance index to obtain the image enhancement model.

[0115] The parameter adjustment can be understood as updating the model parameters of the image enhancement model to be trained based on the target loss to reduce the gap between the second enhanced image and the third image. The parameters can also include a learning rate, etc., and the image enhancement model to be trained can be converged quickly by adjusting the learning rate.

[0116] It is clear that the learning rate is a hyperparameter in the optimization algorithm, which determines the step size by which the parameters should be adjusted in the direction indicated by the gradient in each iteration. During the model training process, the learning rate can be adjusted through pre-set rules or strategies in the hope of obtaining better model performance and convergence speed.

[0117] The value of the learning rate may be determined by using a fixed learning rate, a learning rate that is gradually reduced during training, or a learning rate that is dynamically adjusted according to the performance of the model during training, etc., and no specific limitation is made here.

[0118] S350, obtaining a first image in a target environment and an image enhancement model, wherein the illumination intensity in the target environment is lower than or equal to a preset intensity, and the image enhancement model comprises a first module and a second module, the first module being used to enhance local detail information of an input image, and the second module being used to remove noise information in the input information.

[0119] S360: Input the first image into the image enhancement model to obtain a first enhanced image of the first image.

[0120] The technical solution of the embodiment of the present invention utilizes the second image, the third image and the fourth image to comprehensively evaluate and optimize the model performance, which can not only reduce the pixel-level reconstruction error, but also capture the high-level feature differences to reduce the perceptual loss, and ensure the semantic consistency of the generated image with the original image through contrast loss. In addition, by calculating performance indicators such as peak signal-to-noise ratio and structural similarity, the authenticity and naturalness of the enhancement effect are further verified. The multi-level and multi-angle loss function design and performance evaluation mechanism enable the image enhancement model to perform well in detail enhancement, noise suppression and maintaining image realism, and ultimately achieve an effective conversion from low-quality input to high-quality output, greatly improving the visibility and application value of the enhanced image.

[0121] Embodiment 4

[0122] Figure 4 This is a structural block diagram of a low-light image enhancement device provided in Embodiment 4 of the present invention. The device is used to execute the low-light image enhancement method provided in any of the above embodiments. The device and the low-light image enhancement method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the low-light image enhancement device, please refer to the embodiments of the above low-light image enhancement method. Figure 4 , the device may specifically include: a first acquisition module 410 and an enhanced image determination module 420.

[0123] Among them, the first acquisition module 410 is used to acquire a first image and an image enhancement model in a target environment, wherein the illumination intensity in the target environment is lower than or equal to a preset intensity, and the image enhancement model includes a first module and a second module, the first module is used to enhance the local detail information of the input image, and the second module is used to remove noise information in the input information; the enhanced image determination module 420 is used to input the first image into the image enhancement model to obtain a first enhanced image of the first image.

[0124] The technical solution of the embodiment of the present invention is as follows: first, a first image and an image enhancement model in a target environment are acquired through a first acquisition module 410. Since the light intensity in the target environment is lower than or equal to a preset intensity, the image enhancement model includes a first module and a second module. The first module is used to enhance the local detail information of the input image, and the second module is used to remove noise information in the input information, which can provide sufficient data support and tools for the enhancement of the first image; then, the first image is input into the image enhancement model through an enhanced image determination module 420 to obtain a first enhanced image of the first image, which can obtain a first enhanced image with improved brightness and detail clarity while effectively suppressing noise, thereby solving the problem in the related art that it is difficult to effectively improve the brightness of a low-light image and suppress noise at the same time, and not only improves the brightness and clarity of the first image, but also ensures the realism and natural visual effect of the image.

[0125] On the basis of the above scheme, optionally, the image enhancement model includes a third module and a fourth module, the third module is used to extract local detail information and global illumination information from the input image, and the fourth module is used to fuse the input information; the enhanced image determination module includes: an extraction submodule, a denoising submodule and a fusion submodule. Among them, the extraction submodule is used to input the first image into the third module for information extraction to obtain global illumination information and local detail information; the denoising submodule is used to input the local detail information into the first module for information enhancement processing to obtain enhanced detail information, and input the global illumination information into the second module for denoising processing to obtain global denoising information; the fusion submodule is used to input the enhanced detail information and the global denoising information into the fourth module to obtain a first enhanced image of the first image.

[0126] Based on the above scheme, optionally, the extraction submodule is specifically used to: input the first image into the third module, perform short-time fractional Fourier transform decomposition on the first image with a first transformation parameter to extract the global illumination information, and perform short-time fractional Fourier transform decomposition on the first image with a second transformation parameter to extract the local detail information, wherein the first transformation parameter and the second transformation parameter include at least a fractional order parameter and a window length.

[0127] On the basis of the above scheme, optionally, the enhanced detail information determination submodule is specifically used to: perform Fourier transform on the local detail information through the first module to obtain frequency domain information, and enhance the frequency domain information through a high-pass filter to obtain high-frequency detail information; perform inverse Fourier transform on the high-frequency detail information to obtain spatial domain detail information, and perform weighted enhancement on the spatial domain detail information to obtain weighted detail information; weightedly fuse the weighted detail information and the local detail information to obtain the enhanced detail information.

[0128] On the basis of the above scheme, optionally, the low-light image enhancement device further includes: a second acquisition module, a target loss determination module, a performance index determination module and an image enhancement model determination module. The second acquisition module is used to acquire the second image, the third image, the fourth image and the image enhancement model to be trained before acquiring the first image and the image enhancement model in the target environment, wherein the second image is collected in an environment where the illumination intensity is less than or equal to the preset intensity, the third image is the expected output label image corresponding to the second image, and the fourth image is an image that does not match the semantics of the second image; the target loss determination module is used to input the second image into the image enhancement model to be trained to obtain a second enhanced image of the second image, and determine the target loss according to the second image, the fourth image and the second enhanced image; the performance index determination module is used to determine the performance index of the image enhancement model to be trained according to the third image and the second enhanced image, wherein the performance index includes peak signal-to-noise ratio and / or structural similarity; the image enhancement model determination module is used to adjust the parameters of the image enhancement model to be trained according to the target loss and the performance index to obtain the image enhancement model.

[0129] Based on the above scheme, optionally, the target loss determination module is specifically used to: determine the pixel reconstruction loss according to the deviation value between the second enhanced image and the second image; determine the perceptual loss according to the deviation value of the feature values ​​of the second enhanced image and the second image in the image enhancement model to be trained; determine the first similarity between the second enhanced image and the second image, and determine the second similarity between the second enhanced image and the fourth image, and determine the contrast loss according to the first similarity and the second similarity; determine the target loss according to the pixel reconstruction loss, the perceptual loss and the contrast loss.

[0130] Based on the above scheme, optionally, the performance indicator determination module is specifically used to: determine the peak signal-to-noise ratio based on the average value of the square of the errors between the pixels of the second enhanced image and the third image and the maximum power of the second enhanced image; and / or determine the structural similarity based on the average value of the pixels of the second enhanced image and the third image and the covariance of the pixels of the second enhanced image and the third image.

[0131] The low-light image enhancement device provided in the embodiment of the present invention can execute the low-light image enhancement method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0132] Embodiment 5

[0133] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0134] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0135] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0136] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a low-light image enhancement method.

[0137] In some embodiments, a low-light image enhancement method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the low-light image enhancement method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a low-light image enhancement method in any other appropriate manner (e.g., by means of firmware).

[0138] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0139] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0140] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0141] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0142] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0143] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0144] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0145] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A low-light image enhancement method, characterized in that: include: Acquire a first image in a target environment and an image enhancement model, wherein the illumination intensity in the target environment is lower than or equal to a preset intensity, and the image enhancement model includes a first module and a second module, the first module is used to enhance local detail information of the input image, and the second module is used to remove noise information in the input information; The first image is input into the image enhancement model to obtain a first enhanced image of the first image.

2. The method according to claim 1, characterized in that The image enhancement model includes a third module and a fourth module, wherein the third module is used to extract local detail information and global illumination information from an input image, and the fourth module is used to fuse the input information; The step of inputting the first image into the image enhancement model to obtain a first enhanced image of the first image includes: Inputting the first image into the third module to extract information to obtain global illumination information and local detail information; Inputting the local detail information into the first module for information enhancement processing to obtain enhanced detail information, and inputting the global illumination information into the second module for denoising processing to obtain global denoising information; The enhanced detail information and the global denoising information are input into the fourth module to obtain a first enhanced image of the first image.

3. The method according to claim 2, characterized in that The inputting the first image into the third module to extract information to obtain global illumination information and local detail information includes: The first image is input into the third module, and the first image is decomposed by short-time fractional Fourier transform with first transformation parameters to extract the global illumination information, and the first image is decomposed by short-time fractional Fourier transform with second transformation parameters to extract the local detail information, wherein the first transformation parameters and the second transformation parameters at least include fractional order parameters and window length.

4. The method according to claim 2, characterized in that: The step of inputting the local detail information into the first module for information enhancement processing to obtain enhanced detail information includes: Performing Fourier transform on the local detail information through the first module to obtain frequency domain information, and enhancing the frequency domain information through a high-pass filter to obtain high-frequency detail information; Performing inverse Fourier transform on the high-frequency detail information to obtain spatial domain detail information, and performing weighted enhancement on the spatial domain detail information to obtain weighted detail information; The weighted detail information and the local detail information are weighted and fused to obtain the enhanced detail information.

5. The method according to claim 1, characterized in that: Before acquiring the first image in the target environment and the image enhancement model, it also includes: Acquire a second image, a third image, a fourth image, and an image enhancement model to be trained, wherein the second image is collected in an environment where the illumination intensity is less than or equal to a preset intensity, the third image is a label image corresponding to the second image that is expected to be output, and the fourth image is an image that does not semantically match the second image; Inputting the second image into an image enhancement model to be trained to obtain a second enhanced image of the second image, and determining a target loss according to the second image, a fourth image, and the second enhanced image; Determining a performance indicator of the image enhancement model to be trained according to the third image and the second enhanced image, wherein the performance indicator includes a peak signal-to-noise ratio and / or a structural similarity; The parameters of the image enhancement model to be trained are adjusted according to the target loss and the performance index to obtain the image enhancement model.

6. The method according to claim 5, characterized in that The determining of the target loss according to the second image, the fourth image and the second enhanced image comprises: Determine a pixel reconstruction loss according to a deviation value between the second enhanced image and the second image; Determine the perceptual loss according to the deviation value between the second enhanced image and the feature value of the second image in the image enhancement model to be trained; determining a first similarity between the second enhanced image and the second image, and determining a second similarity between the second enhanced image and the fourth image, and determining a contrast loss according to the first similarity and the second similarity; The target loss is determined according to the pixel reconstruction loss, the perceptual loss and the contrast loss.

7. The method according to claim 5, characterized in that The step of determining the performance index of the image enhancement model to be trained according to the third image and the second enhanced image includes: Determining the peak signal-to-noise ratio according to an average value of square errors between pixels of the second enhanced image and the third image and a maximum power of the second enhanced image; and / or, The structural similarity is determined according to an average value of pixels of the second enhanced image and the third image and a covariance of pixels of the second enhanced image and the third image.

8. A low-light image enhancement device, characterized in that: include: A first acquisition module is used to acquire a first image and an image enhancement model in a target environment, wherein the illumination intensity in the target environment is lower than or equal to a preset intensity; the image enhancement model includes a first module and a second module, the first module is used to enhance local detail information of an input image, and the second module is used to remove noise information in the input information; The enhanced image determination module is used to input the first image into the image enhancement model to obtain a first enhanced image of the first image.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the low-light image enhancement method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the low-light image enhancement method as described in any one of claims 1 to 7 when executed.