Low-illumination light enhancement method based on sliding layered converter
By decomposing and adjusting the illumination and reflectivity of low-light images through a sliding hierarchical converter and a dual-branch convolutional neural network, combined with denoising processing and the Retinex algorithm, the problem of illumination changes and exposure in low-light images is solved, and the autonomous driving perception system is improved. visual quality.
Patent Information
- Application Number
- CN202410704761.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-09-24
AI Technical Summary
The existing technology is difficult to handle illumination changes and exposure problems for complex types of low-illumination images under low-illumination conditions, which affects the visual quality of the autonomous driving perception system.
A low-illumination light enhancement method based on a sliding hierarchical converter is adopted. The input image is decomposed into an illumination map and a reflectance map through a dual-branch convolutional neural network. The sliding hierarchical converter and multi-scale feature maps are used to adjust the illumination, combined with denoising. Process and reconstruct images with Retinex algorithm.
It provides high-quality low-illumination light-enhanced images, maintains illumination consistency in large areas, improves the representation of complex scenes, reduces noise and detail loss, and improves the visual quality of the autonomous driving perception system.
Smart Images

Figure CN118691849A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision, and in particular to a low-illuminance light enhancement method based on a sliding layered converter. Background Art
[0002] With the rapid development of sensor technology and the iterative update of artificial intelligence technology, autonomous driving technology has become a future trend to improve the driving experience and passenger transportation efficiency. The autonomous driving system architecture is divided into perception module, control module and decision module, and high-definition cameras, lidar and other sensors and artificial intelligence algorithms are deployed on each module to provide generalization and multi-perspective control constraints for the autonomous driving system. However, cars usually run at night or in low-light environments, which will interfere with the sensor's recognition of object details and shorten the car's active environmental perception distance. Due to the high complexity of the autonomous driving perception system, a low-light enhancement method is needed to provide high-quality data for the autonomous driving system.
[0003] There are currently two low-light enhancement methods: traditional methods and deep learning methods. The traditional method uses the Retinex model to decompose the low-light image into a reflective component and an illumination component using some prior or regularization, and the estimated reflective component is regarded as the enhancement result. The traditional method is simple to implement, but suffers from severe detail loss and weak generalization ability. With the vigorous development of deep learning, low-light enhancement solutions based on deep learning continue to emerge. Currently, the CNN method is commonly used for low-light image enhancement, and SL, SSL, GAN, RL and other methods are used to improve the algorithm effect. Compared with traditional methods, solutions based on deep learning have better accuracy, robustness and speed, but require a large number of low-light scenes to learn, and have high requirements on computer performance.
[0004] The Chinese invention patent with announcement number CN110210608B discloses a low-light image enhancement method based on attention mechanism and multi-level feature fusion. It utilizes the multi-level features of the deep convolutional neural network model and uses the convolution layer based on the attention mechanism as the feature extraction module to extract basic features as low-level features; the low-level features are fused with the corresponding high-level features and the deepest sub-level features of the convolution layer, and different weights are given to the feature channels through the channel attention mechanism to obtain a better feature representation.
[0005] The Chinese invention patent application with publication number CN116596809A discloses a low-illumination image enhancement method based on the Residual-Unet network. A low-illumination image enhancement network based on ResidualUnet is constructed, and the second weight layer is replaced by a simple convolutional layer and an activation layer with the entire Unet convolutional neural network, which reduces the impact of illumination changes and enriches the visual information of the image to be enhanced; at the same time, it achieves enhanced visual effects and improves the peak signal-to-noise ratio.
[0006] In highway scenarios, the required protection distance for a car from braking to stopping is more than 50m. However, the image quality under low-light conditions usually has the characteristics of low contrast, obvious noise, and blurred details. The perception distance will be greatly shortened, thus posing a safety hazard. At the pixel scale, the features of visual objects dim, resulting in increased errors, which poses a challenge to the application of deep learning models in autonomous driving perception. Traditional methods are based on set rules and algorithms, and it is difficult to provide a universal enhancement effect for complex types of low-light images. At the same time, in autonomous driving scenarios, there are problems such as lighting changes and exposure, which affect the final visual quality. The method based on deep learning has stronger nonlinear fitting capabilities and better generalization for complex scenes, but this method is prone to losing image details and structural information and lacks learning of the inherent properties of low-light images. Summary of the invention
[0007] In view of the above problems, the present invention provides a low-illuminance light enhancement method based on a sliding layered converter, which solves the problem in the prior art that when enhancing low-illuminance light, complex types of low-illuminance images have problems such as illumination changes and exposure, which affects the final visual quality.
[0008] The present invention provides a low-illuminance light enhancement method based on a sliding layered converter, comprising the following steps:
[0009] Step S1, decomposing the input normal light image and low illumination image based on a dual-branch convolutional neural network to obtain an illumination map and a reflectivity map;
[0010] Step S2: Based on the illumination map and the reflectance map, a sliding hierarchical converter is used to adjust the illumination in layers using a multi-scale feature map to obtain an adjusted illumination map;
[0011] Step S3, performing denoising processing on the reflectivity image to obtain a denoised reflectivity image;
[0012] Step S4: reconstructing an image based on the adjusted illumination map and the denoised reflectance map to obtain a low-illuminance light enhanced image.
[0013] Preferably, step S1 specifically includes: a dual-branch convolutional neural network receives paired low-light images and normal-light images respectively, wherein the weights of the decomposition network of the low-light image branch and the decomposition network of the normal-light image branch are shared, and image decomposition is performed to obtain illumination maps and reflectance maps of the low-light image and the normal-light image respectively.
[0014] Preferably, the decomposition network structure of the low-light image branch and the normal-light image branch includes 2 convolution layers and 5 Bneck layers, and the specific order is: the attention mechanism is no, the activation function is H-swish, the 3×3 two-dimensional convolution layer with a step size of 2, the attention mechanism is no, the activation function is ReLU, the 3×3 Bneck layer with a step size of 1, the attention mechanism is no, the activation function is ReLU, the 3×3 Bneck layer with a step size of 2, the attention mechanism is yes, the activation function is ReLU, the 3×3 Bneck layer with a step size of 1, the attention mechanism is yes, the activation function is ReLU, the 3×3 Bneck layer with a step size of 2, the attention mechanism is yes, the activation function is ReLU, the 3×3 Bneck layer with a step size of 2, the attention mechanism is yes, the activation function is H-swish, the 5×5 Bneck layer with a step size of 1 and the attention mechanism is no, no activation function, and a 1×1 two-dimensional convolution layer with a step size of 1; obtain the reflectance map R and the illumination map I, and use the sigmoid function to constrain R and I to be in the range of [0,1].
[0015] Preferably, the structure of the Bneck layer is: firstly, 1×1 convolution is used for dimensionality increase, then 3×3 convolution is used for feature extraction, an inverted residual structure based on the attention mechanism is used to reduce the information loss caused by the activation function, and finally 1×1 convolution is used for dimensionality reduction; the formula of the H-swish activation function is as follows:
[0016]
[0017] Where ReLU(·) refers to the rectified linear unit activation function and x refers to the input feature of the Bneck module.
[0018] Preferably, step S2 specifically includes: step S2-1, performing multiple downsampling of the illumination map and reflectance map of the low-illuminance image to obtain a multi-scale feature map; step S2-2, performing global feature connection on the multi-scale feature map, modeling based on the self-attention mechanism, and forming an enhanced network; step S2-3, using the enhanced network to hierarchically adjust the illumination of the low-illuminance image to obtain an adjusted illumination map of the low-illuminance image.
[0019] Preferably, the structure of the enhanced network includes 3 convolutional MaxPool layers, 3 splicing UP layers, 1 Bneck convolutional layer, and two Transformer modules, and the specific order is: convolutional MaxPool layer, convolutional MaxPool layer, convolutional MaxPool layer, splicing UP layer, splicing UP layer, splicing UP layer and Bneck convolutional layer; the two Transformer modules are respectively connected to the primary and secondary convolutional MaxPool layers and splicing UP layers; the Bneck layer is connected to the feature map of C×M channels, where C is the basic number of channels, and M is the multiple of the channels increased by the Bneck layer, and then through the 1×1 convolutional layer, the connected features are reduced to C channels to complete the reconstruction of the illumination map and obtain the adjusted illumination map of the low-illuminance image.
[0020] Preferably, the Transformer module adopts a Swin Transformer module, which is composed of a LayerNorm layer, a multi-head self-attention module, a multi-layer perceptron with a nonlinear activation function GELU, and two residual connections between the LayerNorm layers;
[0021] The self-attention learning process of Swin Transformer is expressed as:
[0022]
[0023] Where W-MSA(·), SW-MSA(·), MLP(·), and LN(·) refer to window-based multi-head self-attention, sliding window-based multi-head self-attention, multi-layer perceptron, and layer normalization function, respectively. and z l They refer to the output features of W-MSA(·) at the lth layer and the output features of SW-MSA(·) at the l-1th layer respectively;
[0024] The calculation formula of the self-attention mechanism based on the sliding window is:
[0025]
[0026] Where Q, K, and V refer to the query, key, and value matrices, respectively; d and B refer to the feature dimension and bias term; softmax(·) is a normalized exponential function; and the attention score matrix Attention is finally calculated, which is used to model global feature connections at the pixel level.
[0027] Preferably, step S3 specifically includes: performing denoising processing on the reflectivity map using a BM3D algorithm to obtain a denoised reflectivity map.
[0028] Preferably, step S4 specifically includes: based on the adjusted illumination map and the denoised reflectance map, using the Retinex algorithm to perform image reconstruction to obtain a low illumination light enhanced image, and enhancing the image The calculation method is:
[0029]
[0030] in represents the reflectivity after denoising, represents the illumination after adjustment by the sliding layered converter, and o represents element-by-element multiplication.
[0031] Preferably, the illumination control network of the Transformer-CNN hybrid architecture composed of the dual-branch convolutional neural network and the sliding layered converter is trained; wherein a multi-objective loss function is set for the illumination control network of the Transformer-CNN hybrid architecture, and the minimization of the multi-objective loss function is used as the optimization goal during training, the model loss is continuously reduced, and the training process is finally completed; the multi-objective loss function is composed of the reconstruction loss function Invariant reflection loss function Lighting Smoothness Loss Function It consists of three parts:
[0032]
[0033] where λ ir and λ is A coefficient that represents the balance between reflectivity consistency and lighting smoothness;
[0034] Reconstruction loss function It is expressed as:
[0035]
[0036] Among them, i and j are the pairing numbers of low-light and normal images, low is the low-light image, normal is the normal image, and λ ij is the weight coefficient of each paired image, R i is the reflectivity map, I j is the illumination diagram, S j is the original image, ||·||1 is the L1 norm;
[0037] The invariant reflection loss function is expressed as:
[0038]
[0039] Among them, R low and R normal is the reflectivity map of low illumination and normal images;
[0040] Lighting Smoothness Loss Function It is expressed as:
[0041]
[0042] in For gradients that include both horizontal and vertical directions, I i is the illumination diagram, λ g is the coefficient of balancing the perceived strength of the structure, R i is the reflectivity map, and ||·|| is the L2 norm.
[0043] Compared with the prior art, the present invention has at least the following beneficial effects:
[0044] (1) The present invention constructs a dual-branch convolutional neural network to learn image decomposition and generate reflectance and illumination maps; then, the enhancement network is used to adjust the illumination map to maintain consistency in a large area, and a sliding layered transformer is used to learn the global illumination distribution and the Bneck module to extract local features. Finally, the illumination enhanced image is reconstructed based on the Retinex theory; the present invention combines the sliding layered transformer technology with the convolutional neural network to provide high-quality low-illuminance light-enhanced images for the autonomous driving perception system.
[0045] (2) The design of the present invention is based on the MobileNetV3 network as the decomposition network in the dual-branch convolutional neural network, which performs feature extraction and learning network, and introduces the attention mechanism to pay more attention to key features. MobileNetV3 has the characteristics of an advanced lightweight network, which not only reduces the number of parameters to ensure network speed, but also realizes fast and stable local feature extraction.
[0046] (3) The Swin Transformer designed in the present invention realizes global feature connection modeling in feature space, introduces Swin Transformer in the skip connection of U-shaped convolutional network, constructs a new network architecture of hybrid Transformer-CNN, constructs global illumination distribution for multi-scale feature maps, and can improve the representation ability of complex scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The drawings are only for the purpose of illustrating particular embodiments and are not to be construed as limiting the invention.
[0048] Figure 1 An overall flow chart of a low-illuminance light enhancement method based on a sliding layered converter provided in an embodiment of the present invention;
[0049] Figure 2 A specific flow chart of a low-illuminance light enhancement method based on a sliding layered converter provided in an embodiment of the present invention;
[0050] Figure 3 A flowchart of image decomposition based on a dual-branch convolutional neural network provided by an embodiment of the present invention;
[0051] Figure 4 A structural diagram of a Bneck module provided in an embodiment of the present invention;
[0052] Figure 5 A flowchart of illumination adjustment based on a sliding layered converter provided in an embodiment of the present invention;
[0053] Figure 6 A flow chart of a sliding layered converter provided by an embodiment of the present invention;
[0054] Figure 7 A calculation flow chart of the self-attention mechanism provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. In addition, the present invention can also be implemented in other ways different from those described herein, and therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
[0056] In order to illustrate the effectiveness of the method proposed in the present invention, the above technical solution of the present invention is described in detail below through a specific embodiment, and a low-illuminance light enhancement method based on a sliding layered converter is disclosed. The overall process is as follows: Figure 2 As shown:
[0057] First, the observed image is decomposed into illumination-independent reflectance and structure-aware smooth illumination using a decomposition network. Weight sharing is used to implement the constraints: having the same reflectance while keeping the illumination map smooth and preserving the main structure. Then, the enhancement network is used to adjust the illumination map to maintain consistency over large areas, and the global connection modeling in the feature space is performed by sliding the layered transformer to fully learn the illumination distribution. Noise is often more significant in dark areas and is further amplified during the enhancement process, so a reflectance-based denoising process is introduced. Finally, the image is reconstructed according to the Retinex mechanism. The entire network is trained under the guidance of the reconstruction loss function, the invariant reflectance loss function, and the illumination smoothness loss function.
[0058] like Figure 1 As shown, the specific implementation steps of this embodiment are as follows:
[0059] Step S1, decomposing the input normal light image and low illumination image based on a dual-branch convolutional neural network to obtain an illumination map and a reflectivity map;
[0060] In this step, the input image comes from the sports camera deployed on the car, and the RGB image with a resolution of 1080 × 720 is obtained. The sports camera obtains paired low-light / normal-light images respectively, and the image is decomposed through a two-branch convolutional neural network under the constraint of having the same reflectivity.
[0061] like Figure 3 As shown in the figure, the decomposition network uses a network structure based on MobileNetV3 as a feature extraction and learning network, and introduces an attention mechanism to pay more attention to key features to achieve fast and stable local feature extraction. MobileNetV3 has the characteristics of a lightweight network, which not only reduces the number of parameters to ensure network speed, but also achieves high-precision detection and fast and stable global feature extraction.
[0062] The decomposition network consists of 2 convolutional layers and 5 Bneck layers. The specific structure is shown in Table 1.
[0063] Table 1 MobileNetV3 network structure
[0064]
[0065] The decomposition network uses a 3×3 convolutional layer to extract features from the input image, and uses weight sharing to achieve feature consistency and invariance. The features extracted at different levels or positions are processed in a consistent manner, such as learning features of illumination changes and smooth features, which can have better robustness. Several Bneck layers with rectified linear units (ReLU) as activation functions map the RGB image to reflectivity and illumination related features. Finally, a 1×1 convolutional layer is used to project the reflectivity R and illumination I from the feature space, and the sigmoid function is used to constrain R and I in the range of [0,1] to finally obtain the decomposed reflectivity R and illumination I.
[0066] like Figure 4 As shown in the figure, the Bneck layer uses an inverted residual structure, first using a 1×1 convolution to increase the dimension, then using a 3×3 convolution for feature extraction, using an inverted residual structure based on an attention mechanism to reduce the information loss caused by the activation function, and finally using a 1×1 convolution to reduce the dimension. At the same time, the use of depthwise separable convolution greatly reduces the amount of network calculations. The H-swish activation function is used to reduce the amount of calculations while improving network performance. The formula for the H-swish activation function is as follows:
[0067]
[0068] Where ReLU(·) refers to the rectified linear unit activation function and x refers to the input feature of the Bneck module.
[0069] Step S2: Based on the illumination map and the reflectance map, a sliding hierarchical converter is used to adjust the illumination in layers using a multi-scale feature map to obtain an adjusted illumination map;
[0070] The illumination enhancement network adopts an encoder-decoder structure and uses multi-scale feature maps to hierarchically adjust the illumination, such as Figure 5 As shown in the figure. By downsampling the input image to small scales in turn, the network can perceive the large-scale illumination distribution and obtain contextual feature information in a large area, which gives the network the ability to adaptively adjust the illumination. At the same time, a sliding layered transformer (Swin Transformer) is introduced in the skip connection to model the global feature connection of multi-scale feature maps. The self-attention mechanism better constructs the global illumination distribution and improves the representation ability of complex illumination. Then, the outputs from the downsampling and Swin Transformer are spliced in the channel direction, and the local illumination distribution is reconstructed by the upsampling block using the large-area illumination distribution. Finally, in order to maintain global illumination consistency and adjust the local illumination distribution, the Bneck layer is connected to the feature map of C×M channels, where C is the basic number of channels and M is the number of channels increased by this layer. Then, through a 1×1 convolution layer, the connected features are reduced to C channels and the illumination map is reconstructed.
[0071] In some embodiments, the present invention uses SwinTransformer to implement the pixel-level self-attention mechanism. SwinTransformer simulates the convolution operation of CNN based on shift windows and feature stratification. By setting shift windows between consecutive attention layers, the modeling capability can be enhanced while executing efficient computing strategies. At the same time, hierarchical feature maps of images are constructed based on linear computational complexity. These hierarchical feature maps are used for abstract to specific feature learning, making SwinTransformer more suitable as a general backbone for various computer vision tasks.
[0072] Each Swin Transformer module consists of a LayerNorm layer (LN), a multi-head self-attention module (MSA), a multi-layer perceptron (MLP) with a nonlinear activation function GELU, and two residual connections (LN) between the LayerNorm layers.
[0073] like Figure 6 The figure shows a transformer block based on two consecutive ones with regular window and shifted window partitioning mechanisms. The self-attention learning process of SwinTransformer can be expressed as:
[0074]
[0075] Where W-MSA(·), SW-MSA(·), MLP(·), and LN(·) refer to window-based multi-head self-attention, sliding window-based multi-head self-attention, multi-layer perceptron, and layer normalization function, respectively. and z l They refer to the output features of W-MSA(·) at the lth layer and the output features of SW-MSA(·) at the l-1th layer respectively.
[0076] The self-attention mechanism based on sliding window is as follows Figure 7 As shown, the calculation formula is as follows:
[0077]
[0078] Where Q, K, and V refer to the query, key, and value matrices, respectively; d and B refer to the feature dimension and bias term; softmax(·) is a normalized exponential function; and the attention score matrix Attention is finally calculated, which is used to model global feature connections at the pixel level.
[0079] Step S3, performing denoising processing on the reflectivity image to obtain a denoised reflectivity image;
[0080] The enhanced noise and image details are retained on the reflectivity, so the reflectivity can be denoised before the output image is reconstructed using illumination mapping. Considering that the dark area noise will be amplified according to the brightness during the decomposition process, this paper adopts the BM3D algorithm with excellent comprehensive performance as the denoising operation. Since the noise is amplified unevenly on the reflectivity, the illumination relative strategy is used. The denoising operation process is as follows:
[0081] (1) For each target block in the reflectivity image, find at most N nearby max To avoid the influence of noise, the target block is transformed by DCT and then the Euclidean distance is used to measure the similarity. Sort by distance from small to large and take the maximum N max , stacked into a three-dimensional array, and the matching error or block distance is recorded as:
[0082]
[0083] Among them, each parameter refers to the size of the noise-free image Reference block Same size block as other locations is a two-dimensional orthogonal transformation, is the square of the L2 norm, Z xR ,Z x are the target blocks of the reflectance image, respectively.
[0084] (2) The third dimension of the three-dimensional array is stacked, and the pixels at the same position in each block form an array. After DCT transformation, the hard threshold method is used to set the components less than 0 to 0, and the third dimension is inversely transformed:
[0085]
[0086] in and is the corresponding three-dimensional orthogonal transformation, Y is the hard threshold operation, is a similar block obtained by orthogonal transformation, is the target block of the image.
[0087] (3) After the block is inversely transformed and put back in place, the weights are superimposed using the number of non-zero components. Finally, the superimposed block is divided by the weight of each point to obtain the basic estimated image:
[0088]
[0089] in Assign weight values to the same pixel at different positions in different blocks. Is to determine whether a pixel x is in block x m superior, is the base estimation image, x R and x m is the target block on the image, is the image after orthogonal transformation, To determine whether it is on a similar block, X is the spatial domain composed of pixels.
[0090] (4) For the blocks of the base estimation image, sort them from small to large according to the Euclidean distance and take the maximum N max The basic estimation tiles and the noisy original image tiles are stacked into two three-dimensional arrays respectively:
[0091]
[0092] in and They respectively refer to the three-dimensional array of similar blocks of the basic estimated image and the three-dimensional array of similar blocks of the original noise image. is the estimated image after threshold processing, is the number of blocks, To set the threshold.
[0093] (5) The third dimension of the three-dimensional array of the basic estimation block is stacked, and the pixels at the same position of each block form an array and perform DCT transformation to obtain the following coefficients:
[0094]
[0095] in refers to the three-dimensional DCT transform, σ refers to the variance, is the weighting coefficient value, A three-dimensional array of estimated images.
[0096] (6) The coefficients are multiplied by the blocks of the noisy original image and put back to their original positions, and finally a weighted average adjustment is performed to obtain the final estimated image, which restores too many image details compared to the basic estimated image.
[0097] Through the above process, the reflectivity image is denoised.
[0098] Step S4: reconstructing an image based on the adjusted illumination map and the denoised reflectance map to obtain a low-illuminance light enhanced image.
[0099] The classic retinal theory simulates human color perception. It assumes that the observed image can be decomposed into two components: reflectance and illuminance. represents the enhanced image, it can be expressed as:
[0100]
[0101] in represents the reflectivity after denoising, Represents the illuminance after adjustment by the sliding layered converter, and o represents element-by-element multiplication. Reflectance describes the inherent properties of the captured object and is considered to be consistent under any brightness conditions. Illuminance represents the various brightness on the object. After the denoising operation and illumination adjustment based on reflectance, a clearer and brighter enhanced image for low-light images can be obtained.
[0102] In some embodiments, the present invention trains the illumination adjustment network of the Transformer-CNN hybrid architecture based on a low-light-enhanced image dataset, and the image dataset can be obtained by: collecting through online databases and public datasets, using data generation technology (such as data enhancement, simulated data generation, etc.), obtaining through field collection, or collecting through user contribution, etc. The above methods can provide rich and diverse data resources for deep neural network training to enhance the generalization ability and adaptability of the model. The present invention does not limit the dataset used for training.
[0103] The training methods used may include supervised learning, unsupervised learning, semi-supervised learning, reinforcement learning or transfer learning, etc. In addition, various optimization algorithms and training techniques may be used, such as gradient descent, stochastic gradient descent, batch gradient descent or adaptive learning rate adjustment, etc., to meet different training requirements and improve training efficiency. The present invention does not limit the training method and the software used for training.
[0104] The present invention sets a multi-objective loss function for an illumination adjustment network of a Transformer-CNN hybrid architecture, takes minimizing the multi-objective loss function as an optimization goal during training, continuously reduces model loss, and finally completes the training process.
[0105] The multi-objective loss function is composed of the reconstruction loss function Invariant reflection loss function Lighting Smoothness Loss Function It consists of three parts:
[0106]
[0107] where λ ir and λ is A factor that represents the balance between reflectivity consistency and lighting smoothness.
[0108] Setting R low and R high The corresponding illumination map can be used to reconstruct the image, so the reconstruction loss function is It is expressed as:
[0109]
[0110] Among them, i and j are the pairing numbers of low-light and normal images, low is the low-light image, normal is the normal image, and λ ij is the weight coefficient of each paired image, R i is the reflectivity map, I j is the illumination diagram, S j is the original image, ||·||1 is the L1 norm;
[0111] The invariant reflection loss function is introduced to constrain the consistency of reflectivity:
[0112]
[0113] Among them, R low and R normal Reflectivity maps of low-light and normal images.
[0114] Total variation minimization (TV) minimizes the gradient of the entire image and is often used as a smoothing prior for various image restoration tasks. In order to make the loss function aware of the image structure, the original total variation minimization function is weighted by the gradient of the reflectivity map. The formula is:
[0115]
[0116] in To include (horizontal) and (vertical) gradient, I i is the illumination diagram, λ g is the coefficient of balancing the perceived strength of the structure, R i is the reflectivity map, and ||·|| is the L2 norm. The smoothness constraint is relaxed where reflectance gradients are steep, i.e. where image structures are located and where illumination should be discontinuous.
[0117] The key points of the present invention are:
[0118] (1) The present invention is a low-light enhancement method based on a sliding layered converter. First, a dual-branch convolutional neural network is constructed to learn image decomposition and generate reflectance and illumination maps. Then, the enhancement network is used to adjust the illumination map to maintain consistency in a large area, and a sliding layered converter is used to learn the global illumination distribution and the Bneck module to extract local features. Finally, the illumination-enhanced image is reconstructed based on the Retinex theory.
[0119] (2) The present invention is a low-light enhancement method based on a sliding layered converter. A network based on MobileNetV3 is designed as a feature extraction and learning network, and an attention mechanism is introduced to give stronger attention to key features. MobileNetV3 has the characteristics of an advanced lightweight network, which not only reduces the number of parameters to ensure network speed, but also realizes fast and stable local feature extraction.
[0120] (3) The present invention is a low-illuminance light enhancement method based on a sliding layered transformer. Swin Transformer is designed to realize global feature connection modeling in feature space, Swin Transformer is introduced in the skip connection of the U-shaped convolutional network, and a new network architecture of hybrid Transformer-CNN is constructed to construct global illumination distribution for multi-scale feature maps, thereby improving the representation ability of complex scenes.
[0121] Although the specific embodiments of the present invention have been described in a specific order, each action or step should be understood to require that such action or step be performed in the specific order shown or in a sequential order, or require that all illustrated actions or steps should be performed to obtain the desired result. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of a separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable sub-combination.
[0122] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A low-light enhancement method based on a sliding layered converter, characterized in that: The following steps are involved: Step S1, decomposing the input normal light image and low illumination image based on a dual-branch convolutional neural network to obtain an illumination map and a reflectivity map; Step S2: Based on the illumination map and the reflectance map, a sliding hierarchical converter is used to adjust the illumination in layers using a multi-scale feature map to obtain an adjusted illumination map; Step S3, performing denoising processing on the reflectivity image to obtain a denoised reflectivity image; Step S4: reconstructing an image based on the adjusted illumination map and the denoised reflectance map to obtain a low-illuminance light enhanced image.
2. The low-illuminance light enhancement method based on sliding layered converter according to claim 1, characterized in that: Step S1 specifically includes: The dual-branch convolutional neural network receives paired low-light images and normal-light images respectively, wherein the weights of the decomposition network of the low-light image branch and the decomposition network of the normal-light image branch are shared to perform image decomposition and obtain illumination maps and reflectance maps of the low-light image and the normal-light image respectively.
3. The low-illuminance light enhancement method based on sliding layered converter according to claim 2, characterized in that: The decomposition network structure of the low-light image branch and the normal-light image branch includes 2 convolution layers and 5 Bneck layers, and the specific order is: the attention mechanism is no, the activation function is H-swish, the 3×3 two-dimensional convolution layer with a step size of 2, the attention mechanism is no, the activation function is ReLU, the 3×3 Bneck layer with a step size of 1, the attention mechanism is no, the activation function is ReLU, the 3×3 Bneck layer with a step size of 2, the attention mechanism is yes, the activation function is ReLU, the 3×3 Bneck layer with a step size of 1, the attention mechanism is yes, the activation function is ReLU, the 3×3 Bneck layer with a step size of 2, the attention mechanism is yes, the activation function is ReLU, the 3×3 Bneck layer with a step size of 2, the attention mechanism is yes, the activation function is H-swish, the 5×5 Bneck layer with a step size of 1 and the attention mechanism is no, no activation function, and a 1×1 two-dimensional convolution layer with a step size of 1; obtain the reflectance map R and the illumination map I, and use the sigmoid function to constrain R and I to be in the range of [0,1].
4. The low-illuminance light enhancement method based on sliding layered converter according to claim 3 is characterized in that: The structure of the Bneck layer is as follows: first, 1×1 convolution is used for dimensionality increase, then 3×3 convolution is used for feature extraction, the inverted residual structure based on the attention mechanism is used to reduce the information loss caused by the activation function, and finally 1×1 convolution is used for dimensionality reduction; the formula of the H-swish activation function is as follows: Where ReLU(·) refers to the rectified linear unit activation function and x refers to the input feature of the Bneck module.
5. The low-illuminance light enhancement method based on a sliding layered converter according to any one of claims 2 to 4, characterized in that: Step S2 specifically includes: Step S2-1, downsampling the illumination map and reflectance map of the low-illuminance image multiple times to obtain a multi-scale feature map; Step S2-2, globally linking the multi-scale feature maps, modeling based on the self-attention mechanism, and forming an enhanced network; Step S2-3: using the enhancement network to adjust the illumination of the low-illuminance image in layers to obtain an adjusted illumination map of the low-illuminance image.
6. The low-illuminance light enhancement method based on sliding layered converter according to claim 5, characterized in that: The structure of the enhanced network in step S2-2 includes 3 convolutional MaxPool layers, 3 splicing UP layers, 1 Bneck convolutional layer, and two Transformer modules, and the specific order is: convolutional MaxPool layer, convolutional MaxPool layer, convolutional MaxPool layer, splicing UP layer, splicing UP layer, splicing UP layer and Bneck convolutional layer; the two Transformer modules are respectively connected to the primary and secondary convolutional MaxPool layers and splicing UP layers; the Bneck layer is connected to the feature map of C×M channels, where C is the basic number of channels, and M is the multiple of the channels increased by the Bneck layer, and then through the 1×1 convolutional layer, the connected features are reduced to C channels to complete the reconstruction of the illumination map and obtain the adjusted illumination map of the low-illuminance image.
7. The low-illuminance light enhancement method based on sliding layered converter according to claim 6, characterized in that: The Transformer module adopts the Swin Transformer module, which consists of a LayerNorm layer, a multi-head self-attention module, a multi-layer perceptron with a nonlinear activation function GELU, and two residual connections between the LayerNorm layers; The self-attention learning process of Swin Transformer is expressed as: Where W-MSA(·), SW-MSA(·), MLP(·), and LN(·) refer to window-based multi-head self-attention, sliding window-based multi-head self-attention, multi-layer perceptron, and layer normalization function, respectively. and z l They refer to the output features of W-MSA(·) at the lth layer and the output features of SW-MSA(·) at the l-1th layer respectively; The calculation formula of the self-attention mechanism based on the sliding window is: Where Q, K, and V refer to the query, key, and value matrices, respectively; d and B refer to the feature dimension and bias term; softmax(·) is a normalized exponential function; and the attention score matrix Attention is finally calculated, which is used to model global feature connections at the pixel level.
8. The low-illuminance light enhancement method based on sliding layered converter according to claim 5, characterized in that: Step S3 specifically includes: The reflectivity map is denoised using the BM3D algorithm to obtain a denoised reflectivity map.
9. The low-illuminance light enhancement method based on sliding layered converter according to claim 8, characterized in that: Step S4 specifically includes: Based on the adjusted illumination map and the denoised reflectance map, the Retinex algorithm is used to reconstruct the image to obtain a low-illuminance enhanced image. The calculation method is: in represents the reflectivity after denoising, represents the illumination after adjustment by the sliding layered converter, and o represents element-by-element multiplication.
10. The low-illuminance light enhancement method based on sliding layered converter according to claim 6, characterized in that: Also includes: Training an illumination adjustment network of a Transformer-CNN hybrid architecture composed of the dual-branch convolutional neural network and the sliding layered transformer; Among them, a multi-objective loss function is set for the illumination adjustment network of the Transformer-CNN hybrid architecture. During training, the minimum multi-objective loss function is used as the optimization goal to continuously reduce the model loss and finally complete the training process; The multi-objective loss function is composed of the reconstruction loss function Invariant reflection loss function Lighting Smoothness Loss Function It consists of three parts: where λ ir and λ is A coefficient that represents the balance between reflectivity consistency and lighting smoothness; Reconstruction loss function It is expressed as: Among them, i and j are the pairing numbers of low-light and normal images, low is the low-light image, normal is the normal image, and λ ij is the weight coefficient of each paired image, R i is the reflectivity map, I j is the illumination diagram, S j is the original image, ||·||1 is the L1 norm; The invariant reflection loss function is expressed as: Among them, R low and R normal It is the reflectivity map of low illumination image and normal image; Lighting Smoothness Loss Function It is expressed as: in For gradients that include horizontal and vertical directions, I i is the illumination diagram, λ g is the coefficient of balancing the perceived strength of the structure, R i is the reflectivity map, and ||·|| is the L2 norm.
Citation Information
Cited By
Target detection method in dark light environment
CN119339139A
Image enhancement method suitable for underground coal mine low-illumination image
CN119515717A
Image enhancement method suitable for low-illumination images in coal mines
CN119515717B
