A multi-scale feature restoration image enhancement method, device and storage medium
Through the multi-scale feature recovery image enhancement method, the problems of color migration, detail loss and insufficient robustness in low-light image enhancement are solved, the brightness and detail features of the image are restored, and the robustness of the image and computer vision tasks are improved. efficiency.
Patent Information
- Application Number
- CN202210442217.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The existing technology has problems of color migration, detail loss, insufficient robustness and color distortion in low-light image enhancement, and ignores the image features required for subsequent computer vision tasks, affecting the robustness of the image and the efficiency of the computer vision task. .
The multi-scale feature recovery image enhancement method is used to decompose the image into Y channel, U channel and V channel through the decomposition module, and the Y channel enhancement module and U-net multi-scale feature recovery module are used for processing, combined with the end-to-end network structure and VGG -16 network, optimizing the loss function to restore image brightness and detail features, ensuring the naturalness and accuracy of the enhanced results.
It effectively restores the brightness and detail features of low-light images, improves the robustness of images and the efficiency of computer vision tasks, provides more natural enhancement results, reduces noise interference, and is suitable for subsequent target detection and image recognition tasks.
Smart Images

Figure CN114862707B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a multi-scale feature restoration image enhancement method, device and storage medium. Background Art
[0002] Bright images taken under uniformly distributed light have obvious features and contain rich details. When the ambient light is insufficient or there is an abnormal exposure problem, people may take pictures with poor lighting (these pictures are called low-light pictures). These dark pictures not only affect human observation, but also seriously affect subsequent computer vision tasks. With the rapid development of computer technology, more and more people choose electronic devices to store and process digital images, which makes computer vision tasks particularly important. Low-light image enhancement is usually a key part of preprocessing and is of great significance to improving the efficiency and performance of digital image processing.
[0003] In the prior art, for low-light image enhancement, there are usually methods based on histogram equalization (HE), methods based on the Retinex model, and methods based on the defogging model. The disadvantage of the HE model is that the merging and stretching of grayscale may cause color migration and detail loss in the image. The Retinex model will affect the robustness of the image and may even cause very obvious color distortion in certain scenes. The low-light enhancement method based on the defogging model lacks physical model support, and the brightness and contrast effects of its final enhanced image are average, and its enhancement quality still needs to be improved. In addition, most of the methods mentioned so far only focus on the visual enjoyment brought to the observer by the final enhancement result, while ignoring key detail information such as image features required for subsequent computer vision tasks. Features are crucial for images. They can enhance the robustness of images and improve the efficiency of subsequent target segmentation and image recognition operations. Summary of the invention
[0004] The present invention aims to at least solve the technical problems existing in the prior art and provide a multi-scale feature restoration image enhancement method, device and storage medium.
[0005] In order to achieve the above-mentioned object of the present invention, according to a first aspect of the present invention, the present invention provides a multi-scale feature restoration image enhancement method, comprising: obtaining an image to be enhanced; inputting the image to be enhanced into a multi-scale feature restoration image enhancement model for processing to obtain an enhanced image; the multi-scale feature restoration image enhancement model comprises a decomposition module, a Y channel enhancement module, a synthesis module and a U-net multi-scale feature recovery module; the decomposition module decomposes the image to be enhanced into a Y channel image, a U channel image and a V channel image; the Y channel enhancement module processes the Y channel image to obtain a Y channel enhanced image; the synthesis module is used to synthesize the Y channel enhanced image, the U channel image and the V channel image, and convert the synthesized image into RGB form; the U-net multi-scale feature recovery module processes the synthesized image in RGB form to obtain an enhanced image.
[0006] The above technical solution: The image to be enhanced is preferably but not limited to a low-light image with lower brightness. The multi-scale feature recovery image enhancement model is in an "end-to-end" form. In the YUV space, the three channels Y, U, and V are independent of each other. The Y channel represents brightness. The low-light image has a large difference in brightness compared to the normal light image. Therefore, the Y channel enhancement module is used to enhance the brightness of the low-light image and restore the main features that were originally hidden in the dark; the U-net multi-scale feature recovery module focuses on the detailed features at different positions in the image, so as to further explore and restore those effective feature information. The multi-scale feature recovery image enhancement model can take into account the naturalness of global image enhancement and the accuracy of local feature recovery, which is beneficial to subsequent computer vision tasks.
[0007] In a preferred embodiment of the present invention, after acquiring the image to be enhanced, a step of denoising the image to be enhanced is further included.
[0008] The above technical solution removes noise from the image to be enhanced and reduces the interference and uncertainty caused by the noise to subsequent processing and transmission.
[0009] In a preferred embodiment of the present invention, the Y channel enhancement module includes a first convolution layer, a first activation layer, a second convolution layer, a second activation layer, a third convolution layer, a third activation layer, a fourth convolution layer and a fourth activation layer connected in sequence.
[0010] The above technical solution: Y channel image enhancement processing is performed through a four-layer convolutional network, and the structure is simple.
[0011] In a preferred embodiment of the present invention, the convolution kernel size of the first convolution layer is 9×9, the activation function of the first activation layer is LRelu, the convolution kernel size of the second convolution layer is 1×1, the activation function of the second activation layer is Relu, the convolution kernel size of the third convolution layer and the fourth convolution layer is 5×5, and the activation function of the third activation layer and the activation function of the fourth activation layer are both Relu.
[0012] In a preferred embodiment of the present invention, the U-net multi-scale feature recovery module includes a first down-sampling module, a second down-sampling module, a third down-sampling module, and a fourth down-sampling module connected in sequence, a fourth up-sampling module, a third up-sampling module, a second up-sampling module, and a first up-sampling module connected in sequence, and a first convolutional splicing link, a second convolutional splicing link, and a third convolutional splicing link; the first down-sampling module includes a first convolutional layer and a first maximum pooling layer connected in sequence, the second down-sampling module includes a second convolutional layer and a second maximum pooling layer connected in sequence, the third down-sampling module includes a third convolutional layer and a third maximum pooling layer connected in sequence, and the fourth The downsampling module includes a fourth convolutional layer; the fourth upsampling module includes a fourth deconvolutional layer, the input end of the fourth deconvolutional layer is connected to the output end of the fourth convolutional layer, the third upsampling module includes a third convolutional merging layer and a third deconvolutional layer connected in sequence, the second upsampling module includes a second convolutional merging layer and a second deconvolutional layer connected in sequence, the first upsampling module includes a first convolutional merging layer and a first deconvolutional layer connected in sequence; the first convolutional splicing link is used to connect the first convolutional layer and the first convolutional merging layer; the second convolutional splicing link is used to connect the second convolutional layer and the second convolutional merging layer; the third convolutional splicing link is used to connect the third convolutional layer and the third convolutional merging layer.
[0013] The above technical solution: U-net multi-scale feature recovery module can take into account the receptive fields of both high-level and low-level layers, thereby enhancing the semantic information representation capability of the image and enriching the spatial feature detail information of the image.
[0014] In a preferred embodiment of the present invention, the training process of the multi-scale feature restoration image enhancement model is: obtaining a normal lighting image, reducing the brightness of the normal lighting image to obtain a low-light image corresponding to the normal lighting image, and using the low-light image as a training sample to construct a training set; constructing a network structure of the multi-scale feature restoration image enhancement model; using the training set to train the network structure of the multi-scale feature restoration image enhancement model. During the training, the VGG-16 network is used to obtain the perceptual loss between the normal lighting image corresponding to the training sample and the enhanced image output by the network, and the perceptual loss is used as part of the loss function. During the training, the network structure parameters of the multi-scale feature restoration image enhancement model are continuously adjusted according to the loss function result.
[0015] The above technical solution: uses normal-light images to generate low-light images as training samples, so that the network can well learn the mapping relationship between normal images and low-light images; during training, the VGG-16 network is used to obtain the perceptual loss of the normal-light images corresponding to the training samples and the enhanced images output by the network, and the network structure parameters are adjusted by reducing the perceptual loss so that the model can obtain better enhancement results.
[0016] In a preferred embodiment of the present invention, the loss function I total for: Where i represents the pixel index, 1≤i≤N, N represents the number of pixels in the image to be enhanced; y′ di Represents the pixel value of the i-th pixel of the Y channel enhanced image; y i I′ represents the pixel value of the i-th pixel in the Y channel image of the normal illumination image corresponding to the training sample; i I represents the pixel value of the i-th pixel of the enhanced image output by the network corresponding to the training sample; i represents the pixel value of the i-th pixel in the normal illumination image corresponding to the training sample; L PL Indicates perceived loss.
[0017] The above technical solution: The pixel difference calculated by the first item of the above loss function ensures the degree of brightness recovery, the pixel difference calculated by the second item ensures the naturalness of the overall color, and the third item, perceptual loss, uses the VGG-16 network to compare the feature information of the output enhanced image and the corresponding normal illumination image at different scales to improve the clarity of the output enhanced image, effectively improving the traditional problem that only the first two items of minimizing the mean square error loss compare the difference at the pixel level, which may cause the problem of high-order image information loss at the feature level, thereby causing the restored or reconstructed result image to be blurred, which is not conducive to the subsequent computer vision tasks.
[0018] In a preferred embodiment of the present invention, the perceptual loss L PL for: Where I′ represents the enhanced image output by the multi-scale feature restoration image enhancement model network corresponding to the training sample; I represents the normal illumination image corresponding to the training sample; λ1 represents the first weight; λ2 represents the second weight; λ3 represents the third weight; λ4 represents the fourth weight; Represents the difference between the features of image I′ extracted by convolutional layer conv1-2 in the VGG-16 network and the features of image I; Represents the difference between the features of image I′ and the features of image I extracted by convolutional layer conb2_2 in the VGG-16 network; Represents the difference between the features of image I′ extracted by convolutional layer conv3_2 in the VGG-16 network and the features of image I; Represents the difference between the features of image I′ and the features of image I extracted by convolutional layer conv4_2 in the VGG-16 network; j represents the layer index of the VGG-16 network, j = 1, 2, 3, 4, φ j (I′) represents the features of image I′ extracted by the jth layer of the VGG-16 network; φ j (I) represents the features of image I extracted by the jth layer of the VGG-16 network; ||||2 represents the L2 norm; C j H represents the number of channels of the features extracted by the jth layer of the VGG-16 network; j W represents the length of the feature extracted by the jth layer of the VGG-16 network; j Represents the width of the features extracted by the jth layer of the VGG-16 network.
[0019] The above technical solution makes full use of the convolution characteristics of the neural network, retains the characteristic information of color, edge, etc. in the image in multi-scale space, so that the final enhanced result image is more in line with human image cognition at the visual and thinking levels.
[0020] In order to achieve the above-mentioned purpose of the present invention, according to the second aspect of the present invention, the present invention provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the multi-scale feature restoration image enhancement method as described in the first aspect of the present invention.
[0021] In order to achieve the above-mentioned object of the present invention, according to the third aspect of the present invention, the present invention provides a multi-scale feature restoration image enhancement device, comprising: an image acquisition module, used to acquire an image to be enhanced; a multi-scale feature restoration image enhancement model module, which processes the image to be enhanced to obtain an enhanced image; the multi-scale feature restoration image enhancement model module comprises a decomposition module, a Y channel enhancement module, a synthesis module and a U-net multi-scale feature recovery module; the decomposition module decomposes the image to be enhanced into a Y channel image, a U channel image and a V channel image; the Y channel enhancement module processes the Y channel image to obtain a Y channel enhanced image; the synthesis module is used to synthesize the Y channel enhanced image, the U channel image and the V channel image, and convert the synthesized image into RGB form; the U-net multi-scale feature recovery module processes the synthesized image in RGB form to obtain an enhanced image. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1It is a schematic diagram of the overall process of a multi-scale feature restoration image enhancement method in a preferred embodiment of the present invention;
[0023] Figure 2 It is a structural schematic diagram of a multi-scale feature restoration image enhancement model in a preferred embodiment of the present invention;
[0024] Figure 3 It is a schematic diagram of a specific flow of an image enhancement algorithm in a preferred embodiment of the present invention;
[0025] Figure 4 This is a comparison diagram of the real low-light image enhancement effect in an application scenario of the present invention;
[0026] Figure 5 It is a comparison diagram of the effect of enhancing frankincense for target detection in an application scenario of the present invention. DETAILED DESCRIPTION
[0027] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0028] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0029] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.
[0030] The present invention discloses a multi-scale feature restoration image enhancement method. In a preferred embodiment, Figure 1 The overall flow chart shown includes:
[0031] Step S1, obtaining an image to be enhanced. The image to be enhanced is preferably, but not limited to, some dark pictures taken in real life due to lack of ambient light or abnormal exposure caused by prominent light sources. These pictures are called low-light images or low-light pictures, which not only affect human visual perception, but also greatly hinder subsequent computer vision tasks. The image to be enhanced can also be a picture with normal lighting but requires more detailed feature restoration.
[0032] In this embodiment, preferably, after obtaining the image to be enhanced, the step of denoising the image to be enhanced is also included. A large number of experiments have shown that the noise of low-light images in reality is often Gaussian noise, and these noise points usually have certain errors relative to the pixels in the image, thereby interfering with human visual perception and computer vision tasks. Therefore, adding a denoising module before network training can reduce the pressure of data processing, promote the development of image enhancement experiments, and also facilitate the network to learn truly effective features in the image. It is preferred but not limited to selecting bilinear filtering and median filtering for denoising, but these denoising algorithms all use local information of the image for processing, which will weaken the edge and smooth the original feature information of the image. Further preferably, a non-local mean (NL-M) algorithm is used for denoising. The algorithm fully takes into account the redundant information that is prevalent in the image, finds a similar neighborhood structure of the pixel at the current position from a specified range, and then replaces the pixel in the original position with the weighted average estimate of the pixels in the area. The algorithm searches and calculates in the entire image in units of image blocks, using a larger amount of calculation in exchange for a more refined calculation result, thereby retaining the image's detailed feature information to the greatest extent while denoising the image.
[0033] Step S2: Input the image to be enhanced into the multi-scale feature recovery image enhancement model to obtain an enhanced image. Figure 2 As shown, the multi-scale feature recovery image enhancement model includes a decomposition module, a Y channel enhancement module, a synthesis module and a U-net multi-scale feature recovery module; the decomposition module decomposes the image to be enhanced into a Y channel image, a U channel image and a V channel image; the Y channel enhancement module processes the Y channel image to obtain a Y channel enhanced image; the synthesis module is used to synthesize the Y channel enhanced image, the U channel image and the V channel image, and convert the synthesized image into RGB form; the U-net multi-scale feature recovery module processes the synthesized image in RGB form to obtain an enhanced image. Further preferably, it also includes an output layer, the input end of the output layer is connected to the output end of the U-net multi-scale feature recovery module, and the enhanced image is output through the output layer. The output layer is preferably, but not limited to, a convolution layer with a convolution kernel size of 3×3. From Figure 3It can be seen that the network structure of the multi-scale feature restoration image enhancement model is first a dense connection of multiple convolutional layers and activation layers, followed by a multi-scale feature restoration network based on the U-net network, so as to learn the brightness function mapping expression from low light to normal light, and finally obtain the enhanced result image.
[0034] In this embodiment, preferably, Figure 3 As shown, the Y channel enhancement module includes a first convolution layer, a first activation layer, a second convolution layer, a second activation layer, a third convolution layer, a third activation layer, a fourth convolution layer and a fourth activation layer connected in sequence. Further preferably, the convolution kernel size of the first convolution layer is 9×9, the activation function of the first activation layer is LRelu, and the number of feature maps output by the first activation layer is 64; the convolution kernel size of the second convolution layer is 1×1, the activation function of the second activation layer is Relu, and the number of feature maps output by the second activation layer is 32; the convolution kernel size of the third convolution layer and the fourth convolution layer is 5×5, and the activation function of the third activation layer and the activation function of the fourth activation layer are both Relu. The number of feature maps output by the third activation layer is 16. The number of feature maps output by the fourth activation layer is 1. This part completes the preliminary brightness enhancement of the low-light image on the Y channel, which can reduce the difficulty of subsequent U-net network training.
[0035] In this embodiment, preferably, Figure 3 As shown, the U-net multi-scale feature recovery module includes a first down-sampling module, a second down-sampling module, a third down-sampling module, and a fourth down-sampling module located on the right, which are sequentially connected; a fourth up-sampling module, a third up-sampling module, a second up-sampling module, and a first up-sampling module located on the left, which are sequentially connected; and a first convolution splicing link, a second convolution splicing link, and a third convolution splicing link connecting the left and right parts; the first down-sampling module includes a first convolution layer and a first maximum pooling layer connected in sequence, the second down-sampling module includes a second convolution layer and a second maximum pooling layer connected in sequence, and the third down-sampling module includes a third convolution layer and a third maximum pooling layer connected in sequence. The fourth down-sampling module includes a fourth convolutional layer; the fourth up-sampling module includes a fourth deconvolutional layer, the input end of the fourth deconvolutional layer is connected to the output end of the fourth convolutional layer, the third up-sampling module includes a third convolutional merging layer and a third deconvolutional layer connected in sequence, the second up-sampling module includes a second convolutional merging layer and a second deconvolutional layer connected in sequence, the first up-sampling module includes a first convolutional merging layer and a first deconvolutional layer connected in sequence; the first convolutional splicing link is used to connect the first convolutional layer and the first convolutional merging layer; the second convolutional splicing link is used to connect the second convolutional layer and the second convolutional merging layer; the third convolutional splicing link is used to connect the third convolutional layer and the third convolutional merging layer.
[0036] In this embodiment, the convolution kernel size of the first convolution layer, the second convolution layer, the third convolution layer, and the fourth convolution layer is 3×3. The pooling window of the first maximum pooling layer, the second maximum pooling layer, and the third maximum pooling layer is 2×2. A convolution layer with a convolution kernel size of 3×3 is followed by a maximum pooling layer with a pooling window of 2×2 to complete a downsampling operation, so that a feature map output of a specific scale can be obtained. Then, the same method is followed, and the convolution kernel and the maximum pooling layer of the same size are used to perform two downsampling operations, thereby retaining the image features at different scales. Finally, only one convolution layer with a convolution kernel size of 3×3 needs to be added to complete the entire feature extraction part. In the whole process, the number of features output after the first downsampling is 64, and then increases to 128, 256 and 512 respectively. There are a total of 4 scales including the original image.
[0037] In this embodiment, the left side of the U structure is the feature mapping and fusion part. Its specific structure is a deconvolution layer followed by a splicing and fusion step to complete a feature mapping. It is worth noting that the convolution kernel size of the deconvolution layer is not fixed like downsampling, it is closely related to the input and output of the layer. Then follow the same method and continue to determine the convolution kernel of each layer with the same strategy to perform two feature mappings. Each time, it needs to be spliced with the multi-scale feature map obtained in the right stage through the corresponding convolution splicing link. Finally, you only need to add a convolution layer (output layer) with a convolution kernel size of 3×3 to complete the final enhanced result map output. In the whole process, the number of features obtained after the first fusion and splicing process is 256, and then it is reduced to 128 and 64 respectively. Finally, the convolution outputs 3 feature maps, which represent the three channels of the image respectively.
[0038] In this embodiment, preferably, the training process of the multi-scale feature restoration image enhancement model is:
[0039] Step A, obtaining a normal light image, reducing the brightness of the normal light image to obtain a low light image corresponding to the normal light image, and using the low light image as a training sample to construct a training set;
[0040] Step B, constructing a network structure of a multi-scale feature restoration image enhancement model, specifically including a Y channel enhancement module network and a U-net multi-scale feature restoration module network;
[0041] Step C, using the training set to train the network structure of the multi-scale feature restoration image enhancement model. During the training, the VGG-16 network is used to obtain the perceptual loss of the normal illumination image corresponding to the training sample and the enhanced image output by the network, and the perceptual loss is used as part of the loss function. During the training, the network structure parameters of the multi-scale feature restoration image enhancement model are continuously adjusted according to the loss function results.
[0042] In this embodiment, further preferably, the loss function I total for:
[0043] Where i represents the pixel index, 1≤i≤N, N represents the number of pixels in the image to be enhanced; y′ di Represents the pixel value of the i-th pixel of the Y channel enhanced image; y i I′ represents the pixel value of the i-th pixel in the Y channel image of the normal illumination image corresponding to the training sample; i I represents the pixel value of the i-th pixel of the enhanced image output by the network corresponding to the training sample; i represents the pixel value of the i-th pixel in the normal illumination image corresponding to the training sample; L PL Indicates perceived loss.
[0044] In this embodiment, the loss function I total The first two are minimizing mean square error (MSE) loss functions. The first one calculates the pixel difference between the Y channel enhanced image and the Y channel of the normal illumination image in the network, ensuring the degree of brightness restoration. The second one calculates the pixel difference between the final output enhanced image and the normal illumination image corresponding to the training sample in the RGB color space, ensuring the naturalness of the overall color. The traditional MSE loss function of minimizing mean square error compares the difference at the pixel level, which may cause the problem of high-order image information loss at the feature level, resulting in blurred restored or reconstructed result images, which is not conducive to the subsequent computer vision tasks. The perceptual loss combines the simple and effective idea of the pixel-by-pixel loss function and the high quality of the images obtained by the pretrained convolutional networks, so that it can use the VGG-16 network to compare the feature information of the result image and the target image at different scales to improve the clarity of the final result image, alleviating the problems caused by the MSE loss function alone to image enhancement.
[0045] In this embodiment, further preferably, the perception loss L PL for:
[0046] Where I′ represents the enhanced image output by the multi-scale feature restoration image enhancement model network corresponding to the training sample; I represents the normal illumination image corresponding to the training sample; λ1 represents the first weight; λ2 represents the second weight; λ3 represents the third weight; λ4 represents the fourth weight; Represents the difference between the features of image I′ extracted by convolutional layer conv1_2 in the VGG-16 network and the features of image I; Represents the difference between the features of image I′ and the features of image I extracted by convolutional layer conb2_2 in the VGG-16 network; Represents the difference between the features of image I′ extracted by convolutional layer conv3_2 in the VGG-16 network and the features of image I; Represents the difference between the features of image I′ and the features of image I extracted by convolutional layer conv4_2 in the VGG-16 network; This formula represents the Euclidean distance between the feature maps obtained by calculating the normal image corresponding to the training sample and the enhanced image of the corresponding output training sample after being processed by a specific convolutional layer in the VGG-16 network. The network continuously adjusts parameters through training to reduce the gap between them to obtain better enhancement results. j represents the layer index of the VGG-16 network, j = 1, 2, 3, 4, φ j (I′) represents the features of image I′ extracted by the jth layer of the VGG-16 network; φ j (I) represents the features of image I extracted by the jth layer of the VGG-16 network; ||||2 represents the L2 norm; C j H represents the number of channels of the features extracted by the jth layer of the VGG-16 network; j W represents the length of the feature extracted by the jth layer of the VGG-16 network; j Represents the width of the features extracted by the jth layer of the VGG-16 network.
[0047] In this embodiment, λ1, λ2, λ3, and λ4 represent scale feature weights, and their values are 2.6, 4.8, 3.7, and 5.6, respectively. The perceptual loss makes full use of the convolution characteristics of the neural network, retains the feature information of the color, edge, etc. in the multi-scale space of the image, and makes the final enhanced result image more consistent with human image cognition at the visual and thinking levels.
[0048] In an application scenario of the multi-scale feature restoration image enhancement method provided by the present invention, an experimental verification is carried out to obtain a large number of real dark images in real life that are not supervised.
[0049] 1. Enhanced verification
[0050] Select 3 images from the real dark image for enhancement processing. Figure 4By comparing the output image effects after enhancement of the multi-scale feature restoration image enhancement method provided by the present invention and other existing low-light enhancement algorithms, it can be seen that the existing LIME and DeHaze will produce some line noise at the boundaries of image objects, while GP and BIMEF are slightly inferior in color restoration. OCTM will over-enhance some high-brightness areas in the image, and RetinexNet still has the problem of color distortion, which will reduce the readability of the image. Kind and the method of the present invention have received good reviews in all aspects, such as natural colors and relatively less noise, which can bring a pleasant feeling to the observer. The enhancement method provided by the present invention can correctly adjust the brightness of the image while reducing distortion, and can better restore the features of the image located in the spatial domain.
[0051] 2. Object detection experiment
[0052] The subsequent target detection machine vision task is added to determine whether the image enhancement method provided by the present invention can achieve the purpose of prediction. The enhancement results obtained by LIME, GP, Kind, IMEF and the image enhancement method provided by the present invention are tested by Y0lov3 to determine the enhancement effect of each method on the subsequent computer vision task. Figure 5 As shown in FIG. 1 , the image enhancement algorithm provided by the present invention has the best detection results. Figure 5 In the example on the left, Yolov3 mistakenly identified the warning sign area in the upper left corner of the enhanced image obtained by other algorithms as an object such as a household appliance, while only the enhanced image provided by the present invention provides it with the image feature information of the sign. At the same time, although the GP algorithm can restore the passerby in the upper right corner, only the enhanced image obtained by the enhancement method provided by the present invention can correctly give the feature range, allowing Yolov3 to point out the existence of two passers-by. Not only that, the enhanced image obtained by the enhancement method provided by the present invention can also allow Yolov3 to determine the feature information of the indicator light in the image. Figure 5 In the example on the right, Yolov3 mistook the black plate in the LIME result image as an inkstone, and also detected the white cup in the Bimef and Kind enhanced images as a kettle, which means that although the two enhancement algorithms can obtain natural color enhanced images with normal brightness, their ability to recover detail features is not strong enough. Moreover, the enhanced image obtained by the enhancement method provided by the present invention is also the only algorithm that allows Yolov3 to recognize the existence of the knife and fork in the lower right corner. It can be seen that the image enhancement method provided by the present invention can pay more attention to the high-order and low-order feature information in the image, so that the final restored image detail features are more prominent, and the target detection results obtained by Yolov3 are more in line with the actual situation.
[0053] The present invention also discloses a computer-readable storage medium. In a preferred embodiment, the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the multi-scale feature restoration image enhancement method provided by the present invention.
[0054] The present invention also discloses a multi-scale feature restoration image enhancement device, which in a preferred embodiment includes: an image acquisition module, used to acquire an image to be enhanced; a multi-scale feature restoration image enhancement model module, used to process the image to be enhanced to obtain an enhanced image; the multi-scale feature restoration image enhancement model module includes a decomposition module, a Y channel enhancement module, a synthesis module and a U-net multi-scale feature recovery module; the decomposition module decomposes the image to be enhanced into a Y channel image, a U channel image and a V channel image; the Y channel enhancement module processes the Y channel image to obtain a Y channel enhanced image; the synthesis module is used to synthesize the Y channel enhanced image, the U channel image and the V channel image, and convert the synthesized image into RGB form; the U-net multi-scale feature recovery module processes the synthesized image in RGB form to obtain an enhanced image.
[0055] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0056] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A multi-scale feature restoration image enhancement method, characterized in that: include: Acquire an image to be enhanced; Inputting the image to be enhanced into a multi-scale feature restoration image enhancement model for processing to obtain an enhanced image; The multi-scale feature restoration image enhancement model includes a decomposition module, a Y channel enhancement module, a synthesis module and a U-net multi-scale feature restoration module; The decomposition module decomposes the image to be enhanced into a Y channel image, a U channel image and a V channel image; the Y channel enhancement module processes the Y channel image to obtain a Y channel enhanced image; the synthesis module is used to synthesize the Y channel enhanced image, the U channel image and the V channel image, and convert the synthesized image into RGB form; the U-net multi-scale feature recovery module processes the synthesized image in RGB form to obtain an enhanced image; The training process of the multi-scale feature restoration image enhancement model is as follows: Acquire a normal-light image, reduce the brightness of the normal-light image to obtain a low-light image corresponding to the normal-light image, and use the low-light image as a training sample to construct a training set; Construct the network structure of the multi-scale feature restoration image enhancement model; The network structure of the multi-scale feature restoration image enhancement model is trained using the training set. During the training, the VGG-16 network is used to obtain the perceptual loss between the normal illumination image corresponding to the training sample and the enhanced image output by the network, and the perceptual loss is used as part of the loss function. During the training, the network structure parameters of the multi-scale feature restoration image enhancement model are continuously adjusted according to the loss function result; The loss function I total for: Where i represents the pixel index, 1≤i≤N, N represents the number of pixels in the image to be enhanced; y di Represents the pixel value of the i-th pixel of the Y channel enhanced image; y i I′ represents the pixel value of the i-th pixel in the Y channel image of the normal illumination image corresponding to the training sample; i I represents the pixel value of the i-th pixel of the enhanced image output by the network corresponding to the training sample; i represents the pixel value of the i-th pixel in the normal illumination image corresponding to the training sample; L PL Indicates perceived loss; The perceptual loss L PL for: Where I′ represents the enhanced image output by the multi-scale feature restoration image enhancement model network corresponding to the training sample; I represents the normal illumination image corresponding to the training sample; λ1 represents the first weight; λ2 represents the second weight; λ3 represents the third weight; λ4 represents the fourth weight; Represents the difference between the features of image I′ extracted by convolutional layer conv1-2 in the VGG-16 network and the features of image I; Represents the difference between the features of image I′ extracted by convolutional layer conv2_2 in the VGG-16 network and the features of image I; Represents the difference between the features of image I′ extracted by convolutional layer conv3_2 in the VGG-16 network and the features of image I; Represents the difference between the features of image I′ and the features of image I extracted by convolutional layer conv4_2 in the VGG-16 network; j represents the layer index of the VGG-16 network, j = 1, 2, 3, 4, φ j (I′) represents the features of image I′ extracted by the jth layer of the VGG-16 network; φ j (i) represents the features of image I extracted by the jth layer of the VGG-16 network; || ||2 represents the L2 norm; C j H represents the number of channels of the features extracted by the jth layer of the VGG-16 network; j W represents the length of the features extracted from the jth layer of the VGG-16 network; j Represents the width of the features extracted by the jth layer of the VGG-16 network.
2. The multi-scale feature restoration image enhancement method according to claim 1, characterized in that: After the image to be enhanced is acquired, the process further includes a step of performing denoising processing on the image to be enhanced.
3. The multi-scale feature restoration image enhancement method according to claim 1 or 2, characterized in that: The Y channel enhancement module includes a first convolution layer, a first activation layer, a second convolution layer, a second activation layer, a third convolution layer, a third activation layer, a fourth convolution layer and a fourth activation layer connected in sequence.
4. The multi-scale feature restoration image enhancement method according to claim 3, characterized in that: The convolution kernel size of the first convolution layer is 9×9, the activation function of the first activation layer is LRelu, the convolution kernel size of the second convolution layer is 1×1, the activation function of the second activation layer is Relu, the convolution kernel size of the third convolution layer and the fourth convolution layer is 5×5, and the activation function of the third activation layer and the activation function of the fourth activation layer are both Relu.
5. The multi-scale feature restoration image enhancement method according to claim 1, 2 or 4, characterized in that: The U-net multi-scale feature recovery module includes a first down-sampling module, a second down-sampling module, a third down-sampling module, and a fourth down-sampling module connected in sequence, a fourth up-sampling module, a third up-sampling module, a second up-sampling module, and a first up-sampling module connected in sequence, and a first convolution splicing link, a second convolution splicing link, and a third convolution splicing link; The first down-sampling module includes a first convolutional layer and a first maximum pooling layer connected in sequence, the second down-sampling module includes a second convolutional layer and a second maximum pooling layer connected in sequence, the third down-sampling module includes a third convolutional layer and a third maximum pooling layer connected in sequence, and the fourth down-sampling module includes a fourth convolutional layer; The fourth upsampling module includes a fourth deconvolution layer, the input end of the fourth deconvolution layer is connected to the output end of the fourth convolution layer, the third upsampling module includes a third convolution merging layer and a third deconvolution layer connected in sequence, the second upsampling module includes a second convolution merging layer and a second deconvolution layer connected in sequence, and the first upsampling module includes a first convolution merging layer and a first deconvolution layer connected in sequence; The first convolutional splicing link is used to connect the first convolutional layer and the first convolutional merging layer; The second convolutional splicing link is used to connect the second convolutional layer and the second convolutional merging layer; The third convolutional splicing link is used to connect the third convolutional layer and the third convolutional merging layer.
6. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the multi-scale feature restoration image enhancement method as described in any one of claims 1 to 5.
7. A multi-scale feature restoration image enhancement device, characterized in that: The device is used to implement the multi-scale feature restoration image enhancement method according to any one of claims 1 to 5, comprising: An image acquisition module, used for acquiring an image to be enhanced; The multi-scale feature restoration image enhancement model module processes the image to be enhanced to obtain an enhanced image; The multi-scale feature restoration image enhancement model module includes a decomposition module, a Y channel enhancement module, a synthesis module and a U-net multi-scale feature restoration module; the decomposition module decomposes the image to be enhanced into a Y channel image, a U channel image and a V channel image; the Y channel enhancement module processes the Y channel image to obtain a Y channel enhanced image; the synthesis module is used to synthesize the Y channel enhanced image, the U channel image and the V channel image, and convert the synthesized image into RGB form; the U-net multi-scale feature restoration module processes the synthesized image in RGB form to obtain an enhanced image.
