Image enhancement method, device, equipment and medium based on reversible neural network

Through the image enhancement method based on the reversible neural network, the mapping relationship between images is learned and high-quality enhanced images are generated, which solves the problem of low availability of image enhancement in the existing technology and achieves more efficient image processing.

CN112991223BActive Publication Date: 2024-09-06SHENZHEN PRISM SPACE INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110371064.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-06
Publication Date
2024-09-06
Estimated Expiration
2041-04-06

AI Technical Summary

Technical Problem

Existing image enhancement methods have low usability, require high experience in manually designing filters, and cannot effectively mine the changing relationship from low-quality images to high-quality images.

Method used

The image enhancement method based on reversible neural network is used to construct a sample data set by obtaining the initial image, noise image and enhanced information, train the preset reversible neural network, learn the mapping relationship between the initial image, noise image and enhanced information, and generate Enhance images.

Benefits of technology

It improves the usability of image enhancement and generates high-quality enhanced images by learning the mapping relationship between images, which is suitable for a variety of scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112991223B
    Figure CN112991223B
Patent Text Reader

Abstract

The present invention discloses an image enhancement method, device, equipment and medium based on a reversible neural network, which obtains an initial image, constructs a sample data set based on the initial image, the sample data set includes an initial image, an enhanced image and a noise image, and the difference between the initial image and the enhanced image is the enhancement information; trains a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhancement information in the sample data set, and obtains a target reversible neural network; processes the image to be processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image. The present invention learns the mapping relationship between the initial image, the noise image and the enhancement information through a preset reversible neural network, and then uses the learned target reversible neural network to enhance the image to be processed, thereby effectively improving the usability of current image enhancement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of processing technology, and in particular to an image enhancement method, device, equipment and medium based on a reversible neural network. Background Art

[0002] Image enhancement is to enhance the useful information in the image and improve the visual effect of the image. Traditional image enhancement methods mainly involve manually designing some filters to filter the image to improve the image quality. The most typical ones are bilateral filters and guided filters. The former determines the degree of filtering according to the strength of the image edge to achieve the function of denoising and edge preservation; the latter uses the guided image to indicate the position of the edge to achieve the function of edge preservation filtering. Manually designing filters requires very rich experience and can only be effective for specific scenes. Secondly, the existing image enhancement methods based on deep learning directly learn the mapping relationship from the original image (low-quality image) to the enhanced image (high-quality image). Its essence is to fit the data, and it does not really explore the change relationship from low-quality images to high-quality images, resulting in the low availability of current image enhancement. Summary of the invention

[0003] The main purpose of the present invention is to provide an image enhancement method, device, equipment and medium based on a reversible neural network, aiming to solve the technical problem of low usability of current image enhancement.

[0004] To achieve the above object, an embodiment of the present invention provides an image enhancement method based on a reversible neural network, and the image enhancement method based on a reversible neural network includes:

[0005] Acquire an initial image, and construct a sample data set based on the initial image, wherein the sample data set includes the initial image, an enhanced image, and a noise image, and the difference between the initial image and the enhanced image is the enhancement information;

[0006] Training a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set to obtain a target reversible neural network;

[0007] The image to be processed is processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image.

[0008] Preferably, the step of training a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set to obtain a target reversible neural network comprises:

[0009] Calculating enhancement information according to the initial image and the enhanced image in the sample data set;

[0010] A preset reversible neural network is trained based on the initial image and the enhanced information to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set, and obtain a target reversible neural network.

[0011] Preferably, the step of training a preset reversible neural network based on the initial image and the enhanced information further comprises:

[0012] The loss function of the preset reversible neural network is optimized to solve the network parameters of the preset reversible neural network.

[0013] Preferably, the step of processing the image to be processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image comprises:

[0014] Obtain a target noise image that obeys Gaussian distribution;

[0015] Acquire an image to be processed, and input the image to be processed and the target noise image into the target reversible neural network;

[0016] The image to be processed and the target noise image are processed based on the mapping relationship learned in the target reversible neural network to generate an enhanced image.

[0017] Preferably, the step of processing the image to be processed and the target noise image based on the mapping relationship learned in the target reversible neural network to generate an enhanced image comprises:

[0018] Processing the image to be processed and the target noise image based on the mapping relationship learned in the target reversible neural network to generate a residual image formed by enhanced information;

[0019] An enhanced image is generated according to the residual image and the image to be processed.

[0020] Preferably, the step of constructing a sample data set based on the initial image comprises:

[0021] Calculating an average image of the initial images, and determining the average image as an enhanced image;

[0022] Obtain a noise image that obeys a Gaussian distribution;

[0023] A sample data set is constructed according to the initial image, the enhanced image and the noise image.

[0024] Preferably, the preset reversible neural network is constructed based on a preset reversible function.

[0025] To achieve the above object, the present invention further provides an image enhancement device based on a reversible neural network, the image enhancement device based on a reversible neural network comprising:

[0026] A construction module, used to obtain an initial image, and construct a sample data set based on the initial image, wherein the sample data set includes an initial image, an enhanced image, and a noise image, and the difference between the initial image and the enhanced image is the enhancement information;

[0027] A training module, used for training a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set to obtain a target reversible neural network;

[0028] A generation module is used to process the image to be processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image.

[0029] Furthermore, to achieve the above-mentioned purpose, the present invention also provides an image enhancement device based on a reversible neural network, wherein the image enhancement device based on a reversible neural network comprises a memory, a processor, and a reversible neural network-based image enhancement program stored in the memory and executable on the processor, wherein the reversible neural network-based image enhancement program implements the steps of the above-mentioned reversible neural network-based image enhancement method when executed by the processor.

[0030] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a medium, on which is stored an image enhancement program based on a reversible neural network, and when the image enhancement program based on a reversible neural network is executed by a processor, the steps of the above-mentioned image enhancement method based on a reversible neural network are implemented.

[0031] The embodiment of the present invention provides an image enhancement method, device, equipment and medium based on a reversible neural network, which obtains an initial image, constructs a sample data set based on the initial image, and the sample data set includes an initial image, an enhanced image and a noise image, and the difference between the initial image and the enhanced image is the enhancement information; a preset reversible neural network is trained based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhancement information in the sample data set to obtain a target reversible neural network; and a to-be-processed image is processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image. The present invention learns the mapping relationship between the initial image, the noise image and the enhancement information through a preset reversible neural network, and then uses the learned target reversible neural network to perform image enhancement on the to-be-processed image, thereby effectively improving the usability of current image enhancement. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a schematic diagram of the structure of the hardware operating environment involved in the embodiment of the image enhancement method based on the reversible neural network of the present invention;

[0033] Figure 2 It is a flowchart of a first embodiment of an image enhancement method based on a reversible neural network according to the present invention;

[0034] Figure 3 It is a flowchart of a second embodiment of the image enhancement method based on a reversible neural network of the present invention;

[0035] Figure 4 Schematic diagram of functional modules of a preferred embodiment of an image enhancement device based on a reversible neural network according to the present invention.

[0036] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0037] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0038] The embodiment of the present invention provides an image enhancement method, device, equipment and medium based on a reversible neural network, which obtains an initial image, constructs a sample data set based on the initial image, and the sample data set includes an initial image, an enhanced image and a noise image, and the difference between the initial image and the enhanced image is the enhancement information; a preset reversible neural network is trained based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhancement information in the sample data set to obtain a target reversible neural network; and a to-be-processed image is processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image. The present invention learns the mapping relationship between the initial image, the noise image and the enhancement information through a preset reversible neural network, and then uses the learned target reversible neural network to perform image enhancement on the to-be-processed image, thereby effectively improving the usability of current image enhancement.

[0039] like Figure 1 As shown, Figure 1 It is a schematic diagram of the structure of an image enhancement device based on a reversible neural network in the hardware operating environment involved in an embodiment of the present invention.

[0040] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.

[0041] The image enhancement device based on the reversible neural network in the embodiment of the present invention may be a PC, or a portable terminal device such as a tablet computer or a portable computer.

[0042] like Figure 1 As shown, the image enhancement device based on the reversible neural network may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0043] Those skilled in the art will understand that Figure 1 The structure of the reversible neural network-based image enhancement device shown in the figure does not constitute a limitation on the reversible neural network-based image enhancement device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0044] like Figure 1 As shown, the memory 1005 as a medium may include an operating system, a network communication module, a user interface module, and an image enhancement program based on a reversible neural network.

[0045] exist Figure 1 In the device shown, the network interface 1004 is mainly used to connect to the backend server and perform data communication with the backend server; the user interface 1003 is mainly used to connect to the client (user end) and perform data communication with the client; and the processor 1001 can be used to call the image enhancement program based on the reversible neural network stored in the memory 1005, and perform the following operations:

[0046] Acquire an initial image, and construct a sample data set based on the initial image, wherein the sample data set includes the initial image, an enhanced image, and a noise image, and the difference between the initial image and the enhanced image is the enhancement information;

[0047] Training a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set to obtain a target reversible neural network;

[0048] The image to be processed is processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image.

[0049] Furthermore, the step of training a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set to obtain a target reversible neural network includes:

[0050] Calculating enhancement information according to the initial image and the enhanced image in the sample data set;

[0051] A preset reversible neural network is trained based on the initial image and the enhanced information to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set, and obtain a target reversible neural network.

[0052] Furthermore, the step of training a preset reversible neural network based on the initial image and the enhanced information further includes:

[0053] The loss function of the preset reversible neural network is optimized to solve the network parameters of the preset reversible neural network.

[0054] Furthermore, the step of processing the image to be processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image includes:

[0055] Obtain a target noise image that obeys Gaussian distribution;

[0056] Acquire an image to be processed, and input the image to be processed and the target noise image into the target reversible neural network;

[0057] The image to be processed and the target noise image are processed based on the mapping relationship learned in the target reversible neural network to generate an enhanced image.

[0058] Furthermore, the step of processing the image to be processed and the target noise image based on the mapping relationship learned in the target reversible neural network to generate an enhanced image includes:

[0059] Processing the image to be processed and the target noise image based on the mapping relationship learned in the target reversible neural network to generate a residual image formed by enhanced information;

[0060] An enhanced image is generated according to the residual image and the image to be processed.

[0061] Furthermore, the step of constructing a sample data set based on the initial image includes:

[0062] Calculating an average image of the initial images, and determining the average image as an enhanced image;

[0063] Obtain a noise image that obeys a Gaussian distribution;

[0064] A sample data set is constructed according to the initial image, the enhanced image and the noise image.

[0065] Furthermore, the preset reversible neural network is constructed based on a preset reversible function.

[0066] In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0067] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0068] Reference Figure 2 The first embodiment of the present invention provides a flow chart of an image enhancement method based on a reversible neural network. In this embodiment, the image enhancement method based on a reversible neural network includes the following steps:

[0069] Step S10, acquiring an initial image, and constructing a sample data set based on the initial image, wherein the sample data set includes the initial image, an enhanced image, and a noise image, and the difference between the initial image and the enhanced image is the enhancement information;

[0070] In this embodiment, the image enhancement method based on a reversible neural network is applied to an image enhancement system based on a reversible neural network. For the convenience of description, the image enhancement system based on a reversible neural network will be referred to as the system. The system may include a camera for capturing images of different scenes. Users can set up cameras for different static scenes to capture images. Furthermore, when receiving an image capture instruction sent by the user, the system controls the camera to capture an image of the current scene. Assuming that a certain scene captures a total of n images (10<=n<=30), the n images are respectively recorded as , by controlling multiple cameras to capture images of multiple scenes, and by fixing the cameras, it is ensured that the images captured by each scene do not shift, wherein a certain number of images can be captured for each scene, and in this embodiment, 10-30 images can be captured, and a group of initial images are obtained after completing image capture for each scene, and multiple groups of initial images are obtained after completing image capture for multiple scenes, and the initial reversible neural network can be trained simultaneously through multiple groups of initial images. In the following of this embodiment, the process of training the initial reversible neural network with one group of initial images can be exemplified.

[0071] After obtaining multiple groups of initial images corresponding to multiple scenes, the system first generates enhanced images for each group of initial images, and obtains noise images that obey Gaussian distribution. Then, a sample data set is constructed by the multiple groups of initial images, the enhanced images corresponding to the multiple groups of initial images, and the obtained noise images. The initial image and the enhanced image are basically the same in overall content, but there are differences in details. The difference between the initial image and the enhanced image is the enhancement information between the initial image and the enhanced image, and the enhancement information obeys a certain probability distribution. The noise image is an image of the same size as the enhanced image.

[0072] Furthermore, the step of constructing a sample data set based on the initial image includes:

[0073] Step S11, calculating an average image of the initial images, and determining the average image as an enhanced image;

[0074] Step S12, obtaining a noise image that obeys Gaussian distribution;

[0075] Step S13: constructing a sample data set according to the initial image, the enhanced image and the noise image.

[0076] After the initial image is acquired, since the noise or interference of camera imaging usually obeys a certain distribution and its expectation is 0, the average image E of multiple initial images is used as the enhanced image; specifically, for multiple groups of initial images, the average image of each group of initial images is calculated respectively to obtain the enhanced images corresponding to each group of initial images. Specifically, the average image of multiple initial images in each group of initial images is calculated by the following formula:

[0077]

[0078] in, is the i-th initial image, i=1, 2, 3, ..., n; n is the number of initial images collected in the current scene (10<=n<=30); E is the average image (i.e., enhanced image).

[0079] Furthermore, the system forms a set of image pairs with each initial image and the enhanced image corresponding to the initial image, thereby obtaining multiple sets of image pairs. ; At the same time, a noise image that obeys the Gaussian distribution is obtained through Gaussian distribution sampling; further, the system constructs a sample data set for training a preset reversible neural network through multiple groups of image pairs and noise images.

[0080] It can be understood that this embodiment only provides a method for obtaining an enhanced image. In fact, enhanced images obtained by other means are also suitable for the image enhancement method based on reversible neural network of the present application.

[0081] Step S20, training a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set, and obtaining a target reversible neural network;

[0082] Furthermore, the system first calculates the enhancement information between the initial image and the enhanced image through the initial image and the enhanced image of the image pair in the sample data set. Specifically, the enhancement information between each initial image and the enhanced image is calculated to obtain multiple enhancement information, and then the preset reversible neural network is trained through the multiple initial images and the enhancement information corresponding to the multiple initial images, so that the preset reversible neural network learns the mapping relationship between the initial image, noise image and other information in the sample data set and the enhancement information, wherein the preset reversible neural network is constructed based on the preset reversible function. The preset reversible neural network needs to divide the input into two parts: and , assuming that the input image pair is , the corresponding residual image (enhanced information) is , then:

[0083]

[0084] in, is the i-th initial image, is the residual image (enhanced information) corresponding to the i-th initial image, To enhance an image, a plurality of initial images in a set of initial images corresponds to one enhanced image.

[0085] Since we only learn the probability distribution obeyed by the residual image (i.e., enhanced information), the first part of the preset reversible neural network output is the initial image, and the second part is the noise image (obeying Gaussian distribution). In fact, any reversible neural network can be used for operation. Here we propose a commonly used preset reversible function to construct the network. The preset reversible function is as follows:

[0086]

[0087] in, They are all functions of any form with the same input and output dimensions.

[0088] The inverse function of the preset reversible function is as follows:

[0089]

[0090] It can be understood that the above-mentioned set of reversible functions can constitute an InvBlock (reversible neural network block), and the preset reversible neural network is composed of multiple InvBlocks.

[0091] The function of the preset reversible neural network constructed by the preset reversible function is as follows:

[0092]

[0093] Among them, O represents the input initial image, R represents the input residual image (i.e., enhanced information), Y represents the output initial image, and Z represents the output noise data (i.e., noise image). is the parameter of the function. For the convenience of description, the corresponding items are recorded as:

[0094]

[0095] The corresponding inverse function is denoted by :

[0096]

[0097] Among them, O represents the input initial image, R represents the input residual image (i.e., enhanced information), Y represents the output initial image, and Z represents the output noise data (i.e., noise image). The parameters of the function.

[0098] For the convenience of description, the corresponding items are recorded as:

[0099]

[0100] After the training is completed, the target reversible neural network that has learned the mapping relationship between the initial image, noise image and other information in the sample data set and the enhanced information is obtained. It can be understood that the target reversible neural network is the current optimal reversible neural network, which is convenient for the subsequent generation of enhanced images of the image to be processed according to the mapping relationship learned by the target reversible neural network to improve the usability of the current image enhancement, where the image to be processed is the image that needs to be enhanced. The function of the target reversible neural network is as follows:

[0101]

[0102] in, To enhance the image, is the image to be processed, is the target noise image that obeys Gaussian distribution.

[0103] Step S30, processing the image to be processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image.

[0104] After training the current optimal target reversible neural network, the system first obtains the image to be processed and the target noise image at the same time, and then processes the image to be processed and the target noise image through the mapping relationship between the initial image, noise image and enhanced information learned in the target reversible neural network, and obtains the residual image formed by the enhanced information through inverse processing, and then generates an enhanced image based on the image to be processed and the residual image, effectively improving the usability of the current image enhancement.

[0105] Furthermore, the step of processing the image to be processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image includes:

[0106] Step S31, obtaining a target noise image that obeys Gaussian distribution;

[0107] Step S32, obtaining an image to be processed, and inputting the image to be processed and the target noise image into the target reversible neural network;

[0108] Step S33, processing the image to be processed and the target noise image based on the mapping relationship learned in the target reversible neural network to generate an enhanced image.

[0109] Furthermore, the system acquires the image to be processed, which can be acquired through a set-up camera, read through an internal memory, or acquired through a network. After acquiring the image to be processed, the system generates a target noise image that obeys a Gaussian distribution through Gaussian distribution sampling, and then inputs the image to be processed and the target noise image into the trained target reversible neural network. The target reversible neural network uses the mapping relationship between the learned initial image, noise image and the enhancement information to generate an enhanced image from the image to be processed and the target noise image, thereby improving the usability of image enhancement.

[0110] Furthermore, the step of processing the image to be processed and the target noise image based on the mapping relationship learned in the target reversible neural network to generate an enhanced image includes:

[0111] Step S331, processing the image to be processed and the target noise image based on the mapping relationship learned in the target reversible neural network to generate a residual image formed by enhanced information;

[0112] Step S332: generating an enhanced image according to the residual image and the image to be processed.

[0113] Furthermore, since the mapping relationship between the initial image, the noise image and the enhanced information has been learned during training, the system processes the image to be processed and the target noise image through the target reversible neural network. Specifically, the enhanced information is reversely calculated from the image to be processed and the target noise image through the learned mapping relationship between the initial image, the noise image and the enhanced information, and a residual image formed by the enhanced information is generated. Furthermore, the system performs a sum operation on the image to be processed and the residual image. Specifically, the image to be processed and the residual image are added to obtain an enhanced image of the image to be processed.

[0114] The present embodiment provides an image enhancement method, device, equipment and medium based on a reversible neural network, obtaining an initial image, constructing a sample data set based on the initial image, the sample data set including the initial image, an enhanced image and a noise image, and the difference between the initial image and the enhanced image is the enhancement information; training a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhancement information in the sample data set to obtain a target reversible neural network; processing the image to be processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image. The present invention learns the mapping relationship between the initial image, the noise image and the enhancement information through a preset reversible neural network, and then uses the learned target reversible neural network to perform image enhancement on the image to be processed, thereby effectively improving the usability of current image enhancement.

[0115] Further, refer to Figure 3 Based on the first embodiment of the image enhancement method based on a reversible neural network of the present invention, a second embodiment of the image enhancement method based on a reversible neural network of the present invention is proposed. In the second embodiment, the step of training a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhancement information in the sample data set to obtain the target reversible neural network includes:

[0116] Step S21, calculating enhancement information according to the initial image and the enhanced image in the sample data set;

[0117] Step S22, training a preset reversible neural network based on the initial image and the enhanced information to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set, and obtain a target reversible neural network.

[0118] It can be understood that the initial image and the enhanced image are substantially the same in overall content, but differ in details, so that the relationship between the initial image and the enhanced image is:

[0119]

[0120] Among them, O represents the input initial image, R represents the input residual image (i.e., enhanced information), and E represents the enhanced image.

[0121] It can be understood that the residual image describes the details of the enhanced initial image, which usually has little information and obeys a certain unknown distribution. This distribution has a certain correlation with the input initial image. Therefore, we use a reversible neural network to learn this distribution and thus enhance the camera imaging image.

[0122] Further, the system extracts all the initial images in the sample data set, performs difference operations on each initial image and the enhanced image corresponding thereto, calculates the enhanced information between each initial image and its enhanced image, and obtains multiple enhanced information after the operation is completed. It can be understood that each initial image collected in each scene has a corresponding enhanced image, and the enhanced image corresponding to each scene may be the same as or different from the enhanced images of other scenes. Further, the system inputs multiple initial images and multiple enhanced information corresponding to the multiple initial images into a preset reversible neural network, and trains the preset reversible neural network through multiple initial images and multiple enhanced information corresponding to the multiple initial images to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set, wherein one initial image and its corresponding enhanced information can be used as a set of training data, so multiple initial images and multiple enhanced information corresponding to the multiple initial images can constitute multiple sets of training data. After completing the training of the preset reversible neural network through multiple sets of training data, a target reversible neural network that has learned the mapping relationship between the initial image, the noise image and other information in the sample data set and the enhanced information is obtained, so that the enhanced image of the image to be processed is generated according to the mapping relationship learned by the target reversible neural network in the future, so as to improve the usability of the current image enhancement.

[0123] Furthermore, the step of training a preset reversible neural network based on the initial image and the enhanced information further includes:

[0124] Step S221, optimizing the loss function of the preset reversible neural network to solve the network parameters of the preset reversible neural network.

[0125] Furthermore, the loss function L of the preset reversible neural network is composed of the following three parts:

[0126]

[0127] in, , , It is an artificially set proportional weight greater than 0. , , They are as follows:

[0128]

[0129]

[0130]

[0131] Among them, O represents the input initial image, R represents the input residual image (i.e., enhanced information), E represents the enhanced image, and Z represents the noise image. is the noise image corresponding to the i-th initial image, is the i-th initial image, is the residual image (enhanced information) corresponding to the i-th initial image; i=1, 2, 3, ..., N; is the given residual distribution;

[0132] The purpose of the entire network is to learn the distribution of residual images. The initial image is not within the learning range, so the first item means that the generated image should be as similar as possible to the initial image; the second item requires that the reconstructed enhanced image should be as similar as possible to the original enhanced image; Generated by sampling from a Gaussian distribution; the third term requires that the residual distribution The generated residual sample R, the generated data The probability of obeying the Gaussian distribution p(z) is as large as possible. The entire network is optimized through continuous iteration to minimize the loss function L to solve the network parameters. , so that the network parameters of the generated target reversible neural network are optimal, and further the enhanced image processed by the target reversible neural network is more usable.

[0133] This embodiment uses a preset reversible neural network to learn the mapping relationship between the initial image, the noisy image and the enhancement information, so that the image to be processed can be enhanced according to the learned target reversible neural network, thereby effectively improving the usability of the current image enhancement.

[0134] Furthermore, the present invention also provides an image enhancement device based on a reversible neural network.

[0135] Reference Figure 4 , Figure 4 Schematic diagram of functional modules of the first embodiment of the image enhancement device based on reversible neural network of the present invention.

[0136] The image enhancement device based on the reversible neural network comprises:

[0137] A construction module 10 is used to obtain an initial image, and construct a sample data set based on the initial image, wherein the sample data set includes an initial image, an enhanced image, and a noise image, and the difference between the initial image and the enhanced image is the enhancement information;

[0138] A training module 20 is used to train a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set to obtain a target reversible neural network;

[0139] The generating module 30 is used to process the image to be processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image.

[0140] Furthermore, the building block 10 includes:

[0141] A first calculation unit, configured to calculate an average image of the initial images, and determine the average image as an enhanced image;

[0142] A first acquisition unit, used for acquiring a noise image obeying Gaussian distribution;

[0143] A construction unit is used to construct a sample data set according to the initial image, the enhanced image and the noise image.

[0144] Furthermore, the training module 20 includes:

[0145] A second calculation unit, used for calculating enhancement information according to the initial image and the enhanced image in the sample data set;

[0146] A training unit is used to train a preset reversible neural network based on the initial image and the enhancement information to learn the mapping relationship between the initial image, the noise image and the enhancement information in the sample data set to obtain a target reversible neural network.

[0147] Furthermore, the training module 20 also includes:

[0148] The optimization unit is used to optimize the loss function of the preset reversible neural network to solve the network parameters of the preset reversible neural network.

[0149] Furthermore, the generating module 30 includes:

[0150] A second acquisition unit is used to acquire a target noise image that obeys a Gaussian distribution;

[0151] An input unit, used to obtain an image to be processed, and input the image to be processed and the target noise image into the target reversible neural network;

[0152] The first generating unit is used to process the image to be processed and the target noise image based on the mapping relationship learned in the target reversible neural network to generate an enhanced image.

[0153] Furthermore, the generating module 30 further includes:

[0154] A second generating unit is used to process the image to be processed and the target noise image based on the mapping relationship learned in the target reversible neural network to generate a residual image formed by enhanced information;

[0155] The third generating unit is used to generate an enhanced image according to the residual image and the image to be processed.

[0156] In addition, the present invention also provides a medium, which is preferably a computer-readable storage medium, on which a reversible neural network-based image enhancement program is stored. When the reversible neural network-based image enhancement program is executed by a processor, the steps of each embodiment of the above-mentioned reversible neural network-based image enhancement method are implemented.

[0157] In the embodiments of the image enhancement device based on a reversible neural network and the computer-readable medium of the present invention, all the technical features of the above-mentioned embodiments of the image enhancement method based on a reversible neural network are included, and the description and explanation content are basically the same as those of the above-mentioned embodiments of the image enhancement method based on a reversible neural network, and will not be repeated here.

[0158] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0159] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes several instructions for enabling a terminal device (which can be a fixed terminal, such as an IoT smart device, including smart air conditioners, smart lights, smart power supplies, smart routers and other smart homes; it can also be a mobile terminal, including smart phones, wearable networked AR / VR devices, smart speakers, self-driving cars and many other networked devices) to execute the methods described in the various embodiments of the present invention.

[0161] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An image enhancement method based on a reversible neural network, characterized in that: The image enhancement method based on reversible neural network comprises: Acquire an initial image, and construct a sample data set based on the initial image, wherein the sample data set includes the initial image, an enhanced image, and a noise image, and the difference between the initial image and the enhanced image is the enhancement information; Training a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set to obtain a target reversible neural network; Processing the image to be processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image; The step of training a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set to obtain a target reversible neural network includes: Calculating enhancement information according to the initial image and the enhanced image in the sample data set; Training a preset reversible neural network based on the initial image and the enhanced information to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set, and obtaining a target reversible neural network; Wherein, the step of training a preset reversible neural network based on the initial image and the enhanced information further includes: Optimizing the loss function of the preset reversible neural network to solve the network parameters of the preset reversible neural network; The loss function of the preset reversible neural network is: ; in, , , is a scale parameter greater than 0, , , They are: ; ; ; Among them, O represents the input initial image, R represents the input enhanced information, E represents the enhanced image, and Z represents the noise image. is the noise image corresponding to the i-th initial image, is the i-th initial image, is the enhancement information corresponding to the i-th initial image, i=1, 2, 3, ..., N, q(r) is the residual distribution.

2. The image enhancement method based on a reversible neural network as claimed in claim 1, characterized in that: The step of processing the image to be processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image comprises: Obtain a target noise image that obeys Gaussian distribution; Acquire an image to be processed, and input the image to be processed and the target noise image into the target reversible neural network; The image to be processed and the target noise image are processed based on the mapping relationship learned in the target reversible neural network to generate an enhanced image.

3. The image enhancement method based on a reversible neural network as claimed in claim 2, characterized in that: The step of processing the image to be processed and the target noise image based on the mapping relationship learned in the target reversible neural network to generate an enhanced image includes: Processing the image to be processed and the target noise image based on the mapping relationship learned in the target reversible neural network to generate a residual image formed by enhanced information; An enhanced image is generated according to the residual image and the image to be processed.

4. The image enhancement method based on a reversible neural network as claimed in claim 1, characterized in that: The step of constructing a sample data set based on the initial image comprises: Calculating an average image of the initial images, and determining the average image as an enhanced image; Obtain a noise image that obeys a Gaussian distribution; A sample data set is constructed according to the initial image, the enhanced image and the noise image.

5. The image enhancement method based on a reversible neural network as claimed in claim 1, characterized in that: The preset reversible neural network is constructed based on a preset reversible function.

6. An image enhancement device based on a reversible neural network, characterized in that: The image enhancement device based on the reversible neural network comprises: A construction module, used to obtain an initial image, and construct a sample data set based on the initial image, wherein the sample data set includes an initial image, an enhanced image, and a noise image, and the difference between the initial image and the enhanced image is the enhancement information; A training module, used for training a preset reversible neural network based on the sample data set to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set to obtain a target reversible neural network; A generating module, used for processing the image to be processed according to the mapping relationship learned by the target reversible neural network to generate an enhanced image; The training module is further used to calculate the enhancement information according to the initial image and the enhanced image in the sample data set; train the preset reversible neural network based on the initial image and the enhanced information to learn the mapping relationship between the initial image, the noise image and the enhanced information in the sample data set, and obtain the target reversible neural network; The training module is further used to optimize the loss function of the preset reversible neural network to solve the network parameters of the preset reversible neural network; The loss function of the preset reversible neural network is: ; in, , , is a scale parameter greater than 0, , , They are: ; ; ; Among them, O represents the input initial image, R represents the input enhanced information, E represents the enhanced image, and Z represents the noise image. is the noise image corresponding to the i-th initial image, is the i-th initial image, is the enhancement information corresponding to the i-th initial image, i=1, 2, 3, ..., N, q(r) is the residual distribution.

7. An image enhancement device based on a reversible neural network, characterized in that: The reversible neural network-based image enhancement device includes a memory, a processor, and a reversible neural network-based image enhancement program stored in the memory and executable on the processor. When the reversible neural network-based image enhancement program is executed by the processor, the steps of the reversible neural network-based image enhancement method as described in any one of claims 1 to 5 are implemented.

8. A medium, characterized in that The medium stores an image enhancement program based on a reversible neural network, and when the image enhancement program based on a reversible neural network is executed by a processor, the steps of the image enhancement method based on a reversible neural network as described in any one of claims 1 to 5 are implemented.