A Fast and Clear Method for Low-Light Images Based on Depthwise Separable Convolution
Through the fast clarification method of low-light images based on depth separation convolution, a low-light image sharpening network model is constructed and parameters are optimized, which solves the problem of image quality degradation in low-light environments, and achieves rapid clarification and image quality improvement.
Patent Information
- Application Number
- CN202410977473.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2044-07-19
AI Technical Summary
In low-light environments, the brightness of the drone images decreases, resulting in difficult image details and overall quality declines. It is difficult for the prior art to achieve rapid clarity without relying on paired data.
A fast clarification method of low-light images based on depth separable convolution is adopted. By constructing a low-light image clarification network model, including an encoder, feature extraction module, decoder and adjustment curve module, and using spatial consistency loss, exposure control loss, color constancy loss and lighting smoothness loss, training using only low-light images.
It realizes rapid clarity of low-light images without the need for additional reference images, improving the contrast and quality of the images, and avoiding excessive noise and overexposure.
Smart Images

Figure CN118781001B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a fast and clear method for low-light images based on depthwise separable convolution. Background Art
[0002] For a long time, due to the high flight altitude, drones have a larger field of view compared to ground images and can capture more information. They have been widely used in military and civilian applications. When performing tasks at night, the low-light environmental conditions limit the efficient image acquisition and processing of drones. At night, the number of photons entering the sensor is greatly reduced, resulting in a lower image brightness. When most areas in the image have a very low brightness, the detailed information in the image is difficult to detect, leading to a reduction in the overall image quality. Therefore, low-light image enhancement has become an important research content in the field of image enhancement.
[0003] Currently, the commonly used low-light image enhancement methods mainly include image enhancement algorithms based on traditional methods and image enhancement algorithms based on deep learning.
[0004] Image enhancement algorithms based on traditional methods are mainly based on the Retinex theory, which decomposes an image into an illumination map and a reflection map and enhances the illumination map. They mainly include the basic histogram equalization algorithm, the histogram equalization algorithm with limited contrast, the algorithm for adjusting image exposure by estimating the camera response model, etc. However, traditional methods cannot be accelerated by hardware, and their speed is often very low when processing large images, making them unsuitable for scenarios that require real-time image enhancement.
[0005] Image enhancement algorithms based on deep learning mainly use a convolutional neural network (CNN) to decompose the illumination map and the reflection map, and combine deep learning methods to process the illumination map and the reflection map respectively to achieve image enhancement. Some methods use the method of image conversion without using an additional physical model. Deep learning algorithms mainly include RetinexNet, LightenNet, DCE-Net, and the Transformer model IAT, etc. However, many current low-light image clarification algorithms mainly rely on paired data or positive and negative samples for training. Due to the particularity of the drone platform, it is impossible to ensure that the detailed pixels in the images taken at different time points can be completely matched, so it is impossible to provide paired data for training. Summary of the Invention
[0006] The purpose of the present invention is to provide a fast and clear method for low-light images based on depthwise separable convolution, which is designed in a zero-reference manner, trains the network only using low-light images, and finally obtains a low-light fast and clear image.
[0007] To achieve the above object, the present invention provides a fast image enhancement method for low-light images based on depthwise separable convolution, comprising the following steps:
[0008] S1: Using a number of low-brightness images as the image set to be processed, and randomly dividing them into a training set and a validation set
[0009] S2: Constructing a low-light image enhancement network model, including an encoder, a feature extraction module, a decoder, and an adjustment curve module;
[0010] S3: Constructing a loss function for training, including spatial consistency loss, exposure control loss, color constancy loss, and illumination smoothness loss;
[0011] S4: Inputting the training set into the low-light image enhancement network model for training, and optimizing the parameters of the low-light image enhancement network model through the loss function in step S3 to obtain a trained processing model;
[0012] S5: Inputting the validation set into the processing model to obtain the enhanced images.
[0013] Preferably, in step S2, the encoder has the following structure:
[0014] It includes a basic 3×3 convolution and several 3×3 convolutions with a stride of 2. The output end of each 3×3 convolution with a stride of 2 is connected to a multi-scale module;
[0015] In the multi-scale module, first passing through a batch normalization module, then respectively connecting three DW convolution modules with different kernel sizes to calculate features of different scales, then splicing the calculated features of different scales, reducing the dimension of the splicing result to the original number of channels through a PW convolution, and finally adding the result element-wise to the original input after passing through a ReLU activation function to obtain the output result.
[0016] Preferably, in step S2, the feature extraction module has the following structure:
[0017] The feature extraction module includes several class attention convolution modules. The structure of the class attention convolution module is as follows: taking the output of the encoder as the input, successively passing through a batch normalization module and a PW convolution module, and respectively passing through a Sigmoid activation function and a DW convolution, multiplying the obtained results element-wise, then adjusting the number of channels using a PW convolution, and adding the processed result to the original input pixel-wise using a residual structure to obtain the output result.
[0018] Preferably, in step S2, the decoder has the following structure:
[0019] It includes several upsampling blocks. An upsampling block includes a differentiable bilinear interpolation layer with a magnification factor of two. A processing module is connected to the back of each upsampling block. The processing module includes a convolutional layer with a convolutional kernel size set to 3*3. The output end of the convolutional layer is connected to a batch normalization module and a ReLU activation layer, and then connected to a softmax layer to obtain the final output result. The output result of the decoder is connected to the input of the adjustment curve module.
[0020] Preferably, in step S2, the structure of the adjustment curve module is as follows:
[0021] The adjustment curve module adopts the second-order adjustment curve in Zero-DCE, and the formula is as follows:
[0022] LE(I(x); α) = I(x) + αI(x)(1 - I(x))
[0023] In the above formula, I(x) represents the input image, LE(I(x); α) is the output image, and α is a trainable hyperparameter;
[0024] Perform iterative processing on the above second-order adjustment curve, using the output of the previous-level second-order adjustment curve as the input of the next-level adjustment curve. The formula is as follows:
[0025] LE n (x) = LE n-1 (x) + A n LE n-1 (x)(1 - LE n-1 (x))
[0026] In the above formula, n is the number of iterations, A n is a pixel-level adjustment parameter, and each pixel in the image is set with an independent adjustment curve.
[0027] Preferably, in step S3, the specific content of the loss function is as follows:
[0028] The formula for the spatial consistency loss is as follows:
[0029]
[0030] In the above formula, K is the number of regions selected by the algorithm, Y is the brightness value of each pixel after the algorithm processing, Ω(i) is the four adjacent regions centered on pixel i, including up, down, left, and right, and Y and I respectively represent the average brightness values of the local regions in the enhanced image and the input image;
[0031] The formula for the exposure control loss is as follows:
[0032]
[0033] In the above formula, M is the number of pixels in the processing area, Y is the brightness value of each pixel after algorithm processing, and E is the median value of brightness;
[0034] The formula for color constancy loss is as follows:
[0035]
[0036] In the above formula, J p represents the average gray value of the p-channel of the image after algorithm enhancement, and J q represents the average gray value of the q-channel of the image after algorithm enhancement, and R, G, and B are the red, green, and blue channels corresponding to the three primary colors;
[0037] The formula for illumination smoothness loss is as follows:
[0038]
[0039] In the above formula, A represents each curve parameter map, N represents the number of iterations, ξ represents the channel index of the image, and respectively represent the gradient operation for solving the horizontal and vertical directions of the curve parameter map, and respectively represent the gradient magnitudes of the horizontal and vertical directions of the curve parameter map;
[0040] In summary, the formula for the loss function is: L total = L spa + L exp + ω col L col + ω tvA L tvA
[0041] In the above formula, ω col and ω tvA respectively represent the corresponding loss weights.
[0042] Preferably, in step S4, the training process is as follows:
[0043] S41: For the low-illumination images in the training set, data augmentation is performed by means of up-down flipping, horizontal flipping, and random cropping;
[0044] S42: The images after data augmentation are input into the low-light image enhancement network model for training, and the model is continuously optimized through the loss function constructed in step S3 to obtain the final weight parameters of the model, which is the trained processing model.
[0045] Therefore, the present invention adopts the above-mentioned method for fast enhancement of low-light images based on depthwise separable convolution, which has the following advantages:
[0046] (1) In the present invention, without the need for additional reference images, the training of the model network can be completed only by using the unprocessed low-light raw images, thereby achieving the effect of quickly clarifying the pictures taken in real time.
[0047] (2) In the present invention, on the basis of the original Zero-DCE algorithm, a feature extraction network similar to U-Net is replaced, and a multi-scale feature extraction module and a class attention convolution module are adopted, which greatly improves the feature extraction ability of the model network. By introducing depthwise separable convolutions, the feature learning speed and inference speed of the network are accelerated.
[0048] (3) In the present invention, by optimizing the network with an output adjustment curve and a variety of loss functions while training the network, the phenomenon that the original Zero-DCE algorithm has too much noise, many overexposed areas, and low picture quality is effectively avoided.
[0049] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Description of the Drawings
[0050] Figure 1 It is the overall flowchart of a method for quickly clarifying low-light images based on depthwise separable convolutions according to the present invention;
[0051] Figure 2 It is the structural diagram of the low-light image clarification network model in a method for quickly clarifying low-light images based on depthwise separable convolutions according to the present invention;
[0052] Figure 3 It is the structural diagram of the multi-scale feature extraction module in a method for quickly clarifying low-light images based on depthwise separable convolutions according to the present invention;
[0053] Figure 4 It is the structural diagram of the class attention convolution module in a method for quickly clarifying low-light images based on depthwise separable convolutions according to the present invention;
[0054] Figure 5 It is the adjustment curve diagram corresponding to different α of the output adjustment curve in a method for quickly clarifying low-light images based on depthwise separable convolutions according to the present invention;
[0055] Figure 6 It is the night low-light image collected in a method for quickly clarifying low-light images based on depthwise separable convolutions according to the present invention;
[0056] Figure 7 It is the comparison diagram of the processing results in a method for quickly clarifying low-light images based on depthwise separable convolutions according to the present invention. Detailed Embodiments
[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, rather than all, of the embodiments of the present invention. The components of the embodiments of the present invention usually described and shown in the accompanying drawings here can be arranged and designed in various different configurations. The specific model specifications need to be selected according to the actual specifications of the device, etc. The specific selection calculation method adopts the existing technology in the art, so it will not be elaborated in detail.
[0058] Embodiment
[0059] As Figures 1 - 5 shown, the present invention provides a fast low-light image enhancement method based on depthwise separable convolution, including the following steps:
[0060] S1: A drone was used to capture a low-light video from evening to night. The flight altitude of the drone was in the range of 50 meters to 100 meters. The video captured by the drone was frame-extracted to obtain the original images under low-light conditions, and they were randomly divided into a training set and a test set.
[0061] S2: A low-light image enhancement network model was constructed. As Figure 2 shown, the overall structure of the model adopted a feature extraction network similar to the U-Net network, including an encoder, a feature extraction module, a decoder, and an adjustment curve module;
[0062] For the encoder, in order to capture deeper features of the low-light image, 3×3 convolutions with a stride of 2 were used in the encoder part. Each time the image features passed through this convolution, the spatial resolution was reduced to half of the original. A multi-scale module was also added, mainly including depthwise (DW) convolution and pointwise (PW) convolution operations. First, feature extraction operations were performed on each channel separately, and then the features of each channel were fused along the channel dimension with a pixel point as the reference;
[0063] The structure of the encoder was as follows: It included a basic 3×3 convolution and three 3×3 convolutions with a stride of 2, and a multi-scale module was connected to the output end of each 3×3 convolution with a stride of 2;
[0064] As Figure 3 , in the multi-scale module, first, it passed through a batch normalization (BatchNorm) module, and then was respectively connected to three DW convolution modules with different kernel sizes to calculate features of different scales. Then, the features of different scales calculated were concatenated. The concatenation result passed through a PW convolution to reduce the dimension to the original number of channels. Finally, after passing through a ReLU activation function, it was element-wise added to the original input to obtain the output result.
[0065] In the multi-scale module, the input features will first undergo batch normalization module operations for regularization to reduce the risk of overfitting. Then, they are respectively input into three DW convolution modules with different convolution kernel sizes to calculate features of different scales.
[0066] The DW (Depthwise Convolution) convolution modules with convolution kernel sizes of 1*1, 3*3, and 5*5 respectively. Among them, the padding of the convolution with convolution kernel sizes of 3*3 and 5*5 is 1 and 2 respectively, aiming to ensure that the spatial size of the output feature map remains unchanged. Using different-sized convolution kernels can capture information of different scales. The 1*1 convolution can better capture local detail information, while the 5*5 convolution can capture information in a larger range.
[0067] Finally, the features of different scales are fused together, which can provide a richer feature representation and help the model extract feature information of different scales. After the different features are concatenated in the channel dimension, a PW (Pointwise Convolution) convolution is used to reduce the dimension to the original number of channels. After passing through the ReLU activation function, it is element-wise added to the original input features to obtain the output feature map;
[0068] The feature extraction module includes several class attention convolution modules. The structure of the class attention convolution module is as follows. Figure 4 , taking the output feature map of the encoder as the input, and successively passing through the batch normalization module and the PW convolution module to standardize the data, and respectively passing through the Sigmoid activation function and the DW convolution. After being processed by the Sigmoid activation function, the weight of each pixel can be calculated; after passing through the DW convolution, each input channel will be processed separately, enabling the independent extraction of feature information of different channels, thereby capturing the local features and texture information of the image. Here, it can be understood as obtaining the position relationship coefficient between each pixel in a single channel and other pixels in the feature map.
[0069] Depthwise separable convolution decomposes the complete convolution operation into DW convolution and PW convolution. One convolution kernel of DW convolution is only responsible for one channel, and one channel will only be convolved by one channel, while the convolution kernels of ordinary convolution operations will calculate all channels simultaneously, and each channel will be calculated by all convolution kernels. Compared with ordinary convolution, DW convolution greatly reduces the computational amount.
[0070] Integrating the results of PW convolution and DW convolution here can achieve the effect of ordinary convolution, reduce the amount of convolution calculation, better meet the requirements of real-time performance. Finally, after element-wise multiplication of the obtained results, element-wise multiplication can obtain the weighted average value of each pixel and integrate it into the same feature map, thereby realizing the enhancement of pixel-level attention for the image. Then, perform PW convolution on the result map to adjust the number of channels, and add the above processing results to the input feature map pixel by pixel, that is, element-wise addition, to retain the detailed information of the feature map. Finally, the output feature map is obtained. The convolution module designed above is similar to the pixel attention module, which can strengthen the features of a certain area while extracting features. Obtain the output result.
[0071] For the decoder, after the feature map passes through the encoder and the feature extraction module, the length and width of the feature map become 1 / 8 of the length and width of the original input image, and the number of channels reaches 128. The role of the decoder is to restore the feature map to the size of the original input image, that is, the decoder is generally divided into three stages, and the length and width of the feature map are doubled in each stage. The operations adopted in the three stages are the same. First, use a differentiable bilinear interpolation layer with a magnification factor of two to reasonably fit the pixel value of each pixel point in the expanded feature map through the pixel values around the pixel point in the previous stage. The specific process is as follows:
[0072] The structure of the decoder is as follows, including three upsampling blocks. The upsampling block includes a differentiable bilinear interpolation layer with a magnification factor of two. A processing module is connected behind each upsampling block. The processing module includes a convolutional layer with a kernel size of 3*3. The output end of the convolutional layer is connected to a batch normalization module and a ReLU activation layer, and then connected to the softmax layer to obtain the final output result, and connect the output result of the decoder to the input of the adjustment curve module.
[0073] For the structure of the adjustment curve module, the second-order adjustment curve in Zero-DCE is adopted, and the formula is as follows:
[0074] LE(I(x); α) = I(x) + αI(x)(1 - I(x))
[0075] In the above formula, I(x) represents the input image, LE(I(x); α) is the output image, α is a trainable hyperparameter, and its value range is [-1, 1], which is used to adjust the exposure level. The curves corresponding to different α parameters are as Figure 5 shown. Iterate the second-order adjustment curve, and use the output of the previous-level function as the input of the next-level function. The formula is as follows:
[0076] LE n (x) = LE n-1 (x) + A n LE n-1(x)(1 - LE n-1 (x))
[0077] In the above formula, n is the number of iterations, which is selected as 8 in this embodiment, and A n is an adjustment parameter at the pixel level, and each pixel in the image has an independent adjustment curve.
[0078] Using the adjustment curve module, Zero-DCE predicts the adjustment curves of the RGB three channels respectively, and predicts 8 A n parameters for each channel. The size of A n is the same as the size of the image. The network needs to predict a total of 24 adjustment parameters, and these 24 adjustment parameters are shared for each test image. The network designed by the present invention will finally output 24 adjustment curve parameters and complete the clarification of low-light images.
[0079] Using the iterated high-order curve can fit more adjustment curves in various situations, can effectively adjust the pixel values in the image, and can better output low-light clarified images.
[0080] S3: Construct a loss function for training, including spatial consistency loss, exposure control loss, color constancy loss, and illumination smoothness loss. The specific content is as follows:
[0081] Retain the difference between adjacent regions of the input image and the enhanced image to enhance the spatial consistency of the image. The formula for the spatial consistency loss is as follows:
[0082]
[0083] In the above formula, K is the number of regions selected by the algorithm, Y is the brightness value of each pixel after the algorithm processes, Ω(i) is the four adjacent regions centered on the i-th pixel, including up, down, left, and right, and Y and I respectively represent the average brightness values of the local regions in the enhanced image and the input image;
[0084] To reduce the over-dark or over-bright regions in the enhanced image, an exposure control loss is set to make the brightness of each pixel close to the middle value. The formula for the exposure control loss is as follows:
[0085]
[0086] In the above formula, M is the number of pixels in the processing region, Y is the brightness value of each pixel after the algorithm processes, and E is the middle value of the brightness;
[0087] To ensure that the color of the image does not shift significantly after enhancement, the formula for the color constancy loss is set as follows:
[0088]
[0089] In the above formula, J p represents the average gray value of the p-channel of the image after algorithm enhancement, and J q represents the average gray value of the q-channel of the image after algorithm enhancement. R, G, and B are the red, green, and blue channels corresponding to the three primary colors;
[0090] To maintain the monotonic relationship between adjacent pixels, the present invention adds an illumination smoothing loss to each curve parameter map. The formula for the illumination smoothness loss is as follows:
[0091]
[0092] In the above formula, A represents each curve parameter map, N represents the number of iterations, and respectively represent the gradient operation for solving the horizontal and vertical directions of the curve parameter map, and respectively represent the gradient magnitudes of the horizontal and vertical directions of the curve parameter map;
[0093] In summary, the formula for the total loss function is: L total = L spa + L exp + ω col L col + ω tvA L tvA
[0094] In the above formula, ω col and ω tvA respectively represent the corresponding loss weights.
[0095] S4: Input the training set into the low-light image enhancement network model for training, and optimize the parameters of the low-light image enhancement network model through the loss function in step S3 to obtain a trained processing model
[0096] S41: For the low-illumination images in the training set, perform data enhancement using the methods of up-down flipping, horizontal flipping, and random cropping;
[0097] S42: Input the images after data enhancement into the low-light image enhancement network model for training, and continuously optimize the model through the loss function constructed in step S3 to obtain the final weight parameters of the model.
[0098] S5: Input the validation set into the processing model to obtain the enhanced pictures.
[0099] Specific simulation experiments were carried out using the low-light image datasets LOL, LSRW, and low-light images captured during the actual night flight of drones. The LOL dataset contains 500 pairs of low-light and normal-light image data pairs, of which 485 image pairs are used for training and 15 image pairs are used for testing. Most of the images in the LOL dataset are indoor images with a resolution of 400*600. The LSRW dataset is a large-scale real-world low-light and normal-light image paired dataset containing image pairs captured by multiple different cameras, of which 5600 image pairs are used for training and 50 image pairs are used for testing. In subsequent experiments, 500 image pairs were randomly selected from the training data of LSRW for training.
[0100] The image set to be processed was selected, with 782 images for training and 196 images for testing. The resolution of the images is 1920*1080. The images cover different levels of lighting conditions, such as Figure 6 shown. The left figure shows a stronger lighting condition, and the right figure shows a weaker lighting condition.
[0101] As Figure 7 shown, the first column is the low-light image, and the second column is the sharpened image. By observing the images, it can be found that the algorithm proposed in the present invention can better recover a relatively clear normal-light image from the low-light image, improving the contrast of the image. At the same time, it can better process the low-light area and the light area existing simultaneously in the real drone image, and there is less overexposure in the light area.
[0102] Therefore, the present invention adopts a fast low-light image sharpening method based on depthwise separable convolution, which is designed in a zero-reference manner, only using low-light images to train the network, and finally obtaining the sharpened low-light image.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that they can still modify or equivalently replace the technical solutions of the present invention, and these modifications or equivalent replacements do not make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for fast low-light image sharpening based on deep separable convolution, characterized by: The following steps are involved: S1: Use several low-brightness images as the image set to be processed and randomly divide them into training set and validation set S2: Build a low-light image sharpening network model, including an encoder, a feature extraction module, a decoder, and an adjustment curve module; S3: Construct loss functions for training, including spatial consistency loss, exposure control loss, color constancy loss, and lighting smoothness loss; S4: inputting the training set into the low-light image sharpening network model for training, and optimizing the parameters of the low-light image sharpening network model through the loss function in step S3 to obtain a trained processing model; S5: Input the validation set into the processing model to obtain a cleared image; In step S2, the structure of the encoder is as follows: It includes a basic 3*3 convolution and several 3*3 convolutions with a stride of 2. The output of each 3*3 convolution with a stride of 2 is connected to a multi-scale module. In the multi-scale module, the batch normalization module is first used, and then three DW convolution modules with different convolution kernel sizes are connected to calculate features of different scales. The features of different scales are then concatenated, and the concatenated results are reduced to the original number of channels through PW convolution. Finally, after the ReLU activation function, the output result is obtained by element-wise addition with the original input. In step S2, the structure of the feature extraction module is as follows: The feature extraction module includes several attention-like convolution modules. The structure of the attention-like convolution module is as follows: the output of the encoder is used as input, and it passes through the batch normalization module and the PW convolution module in sequence, and then passes through the Sigmoid activation function and DW convolution respectively. After the results are element-wise multiplied, the PW convolution is used to adjust the number of channels, and the processed results are added pixel by pixel with the original input using the residual structure to obtain the output result; In step S2, the structure of the decoder is as follows: It includes several upsampling blocks, each of which includes a differentiable bilinear interpolation layer with a magnification of twice. Each upsampling block is connected to a processing module, which includes a convolution layer. The size of the convolution kernel is set to 3*3. The output end of the convolution layer is connected to a batch normalization module and a ReLU activation layer, and then connected to the softmax layer to obtain the final output result, and the output result of the decoder is connected to the input of the adjustment curve module.
2. The method for fast low-light image sharpening based on depthwise separable convolution according to claim 1, characterized in that: In step S2, the structure of the curve adjustment module is as follows: The adjustment curve module adopts the second-order adjustment curve in Zero-DCE, and the formula is as follows: LE(I(x);α)=I(x)+αI(x)(1-I(x)) In the above formula, I(x) represents the input image, LE(I(x); α) is the output image, and α is a trainable hyperparameter; The above second-order adjustment curve is iterated, and the output of the previous second-order adjustment curve is used as the input of the next-order adjustment curve. The formula is as follows: THE n (x)=THE n-1 (x)+A n THE n-1 (x)(1-LE n-1 (x)) In the above formula, n is the number of iterations, A n It is a pixel-level adjustment parameter, and each pixel in the image is set with an independent adjustment curve.
3. The method for fast low-light image sharpening based on depthwise separable convolution according to claim 2, characterized in that: In step S3, the specific content of the loss function is as follows: The formula for spatial consistency loss is as follows: In the above formula, K is the number of regions selected by the algorithm, Y is the brightness value of each pixel after the algorithm is processed, Ω(i) is the four adjacent regions centered on the i pixel, including top, bottom, left, and right, and Y and I represent the average brightness values of the local areas in the enhanced image and the input image, respectively; The exposure control loss formula is as follows: In the above formula, M is the number of pixels in the processing area, Y is the brightness value of each pixel after algorithm processing, and E is the median value of brightness; The formula for color constancy loss is as follows: In the above formula, J p represents the average gray value of the p channel of the image after algorithm enhancement, J q It represents the average gray value of the q channel of the image after algorithm enhancement, and R, G, and B are the red, green, and blue channels corresponding to the three primary colors; The formula for lighting smoothness loss is as follows: In the above formula, A represents each curve parameter map, N represents the number of iterations, ξ represents the channel index of the image, and Respectively represent the gradient operation of solving the curve parameter graph in the horizontal and vertical directions, and Respectively represent the gradient size in the horizontal and vertical directions of the curve parameter graph; In summary, the formula of the loss function is: L total =L spa +L exp +ω col L col +ω tvA L tvA In the above formula, ω col and ω tvA They represent the corresponding loss weights respectively.
4. The method for fast low-light image sharpening based on depthwise separable convolution according to claim 3, characterized in that: In step S4, the training process is as follows: S41: For the low-light images in the training set, data enhancement is performed using upside-down flipping, horizontal flipping, and random cropping. S42: Input the data-enhanced image into the low-light image sharpening network model for training, and continuously optimize the model through the loss function constructed in step S3 to obtain the final weight parameters of the model, which is a trained processing model.
Citation Information
Patent Citations
DCE-based low-illumination image enhancement method and system, and related equipment
CN114663300A
Lightweight low-illumination image enhancement method based on convolutional neural network
CN118351041A