Low-light image enhancement method and system based on angular exid optimization algorithm

By applying improved horned lizard optimization algorithm and multi-module model in low-light image enhancement, the problem of difficulty in retaining details and repairing hidden degradation in the existing technology is solved, which significantly improves the visual quality and sense of reality of the image.

CN120182152AInactive Publication Date: 2025-06-20NANJING NORMAL UNIVERSITY

Patent Information

Application Number
CN202510645182.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-06-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing low-light image enhancement algorithms are difficult to retain details during denoising, difficult to effectively repair hidden degradation in low-light scenes, and the realism and visual quality of the reconstruction image are poor. At the same time, it is easy to fall into local optimization by using manual parameter adjustment method or existing intelligent optimization methods to adjust hyperparameters.

Method used

A low-light image enhancement method based on the horned lizard optimization algorithm is adopted to build a model including preprocessing module, low-light enhancement module and refinement module. Through the improved horned lizard optimization algorithm, the optimal hyperparameter combination is found and the low-light enhancement model is trained to optimize the feature extraction ability and the enhancement effect of the model in complex low-light environments.

Benefits of technology

It significantly improves the visual quality of low-light images in complex low-light environments, enhances the brightness, contrast and detail recovery capabilities of the image, and improves the realistic feeling of the image and the overall visual quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120182152A_ABST
    Figure CN120182152A_ABST
Patent Text Reader

Abstract

The invention discloses a low-light image enhancement method and system based on an angular exid optimization algorithm, and relates to the technical field of image processing. According to the method, firstly, a low-light image enhancement model is constructed, the low-light image enhancement model comprises a preprocessing module, a low-light enhancement module and a refining module, the preprocessing module is used for removing noise, the low-light enhancement module is used for improving brightness and contrast and recovering details, and the refining module is used for improving the overall visual quality; secondly, searching an optimal model hyper-parameter and weight on the basis of a corner exid optimization algorithm so as to enhance the feature extraction capability of the network and improve the enhancement effect and the detail reduction quality in a complex low-light environment; and finally, inputting an image to be processed into the trained low-light image enhancement model to obtain an enhanced image, and completing low-light image enhancement. According to the method, the visibility and contrast of the image can be effectively improved, noise is fully removed, hidden degradation in the low-light image is repaired, and the enhanced visual effect of the low-light image is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and specifically, to a low-light image enhancement method and system based on the horned lizard optimization algorithm. Background Art

[0002] Images taken under low-light conditions usually suffer from extremely dark regions, unexpected noise, and blurred details, especially when compared with well-lit images. This often occurs when the environment is very dim, such as at night or in light-restricted situations, or simply because the camera is not properly adjusted, such as improper aperture or exposure time settings. Therefore, improving the quality of images taken in low-light environments to make them more in line with the visual needs of the human eye and the requirements of subsequent computer vision tasks in terms of brightness, contrast, and details is a highly valuable technical direction.

[0003] Previous low-light image enhancement algorithms have extensively explored the field of low-light enhancement. However, these algorithms often fail to retain details while fully removing noise, cannot effectively repair hidden degradations in low-light scenarios, and are prone to losing key features during the enhancement process, resulting in unrealistic images. In addition, for a well-designed model architecture, the hyperparameters of the model directly affect the model's ability to enhance brightness and restore details, thereby affecting the visual quality of the enhanced image. The manual hyperparameter tuning method or existing intelligent optimization methods are prone to falling into local optimal solutions and are difficult to find the optimal hyperparameter combination. Therefore, there is an urgent need to design a low-light enhancement model that can retain and restore details while fully denoising, and design a hyperparameter optimization method to explore the optimal hyperparameter combination, thereby significantly improving the visual quality of low-light images enhanced in complex low-light environments. Summary of the Invention

[0004] The technical problem to be solved by the present invention is: aiming at the problems that existing low-light image enhancement algorithms are difficult to retain details during denoising, difficult to effectively repair hidden degradations in low-light scenarios, and the realism and visual quality of the reconstructed images are poor, and the problem that it is easy to fall into local optima when using manual hyperparameter tuning methods or existing intelligent optimization methods to adjust hyperparameters, to provide a low-light image enhancement method and system based on the horned lizard optimization algorithm, which significantly improves the visual quality of low-light image enhancement in complex low-light environments.

[0005] The present invention adopts the following technical solutions to solve the above technical problems:

[0006] The present invention first proposes a low-light image enhancement method based on the horned lizard optimization algorithm, which includes the following steps:

[0007] S1. Construct a low-light image enhancement model. The low-light image enhancement model includes three modules in series, namely a preprocessing module, a low-light enhancement module, and a refinement module. The preprocessing module is used to remove the noise of the input image. The low-light enhancement module is used to enhance the brightness and contrast and restore details. The refinement module is used to restore the key features lost during the image processing and improve the overall visual quality and realism.

[0008] S2. Improve the population initialization, blood-spurting strategy, and movement and escape strategy of the horned lizard optimization algorithm. Based on the improved horned lizard optimization algorithm, iteratively search for the optimal hyperparameter combination and train the low-light enhancement model to optimize the feature extraction ability and improve the enhancement effect and detail restoration quality of the model in complex low-light environments. During the iterative training of the model, the optimization process of the feature extraction ability is similar to the environmental perception of horned lizards. In the early stage, a larger search range (global search) is adopted, and in the later stage, it focuses on the local optimum (local search), enabling the model to automatically learn important features, pay attention to key targets, and improve the effect of low-light image enhancement.

[0009] S3. Input the image to be processed into the low-light image enhancement model trained in step S2 to obtain the enhanced image.

[0010] Further, the preprocessing module in step S1 is specifically:

[0011] Use deep convolution to capture local features and context features, and use dense cross-layer connections to merge features at different levels. The cross-layer connection method is not only beneficial to balancing multi-level features, improving the model's ability to filter noise and retain details, but also helpful for alleviating the problem of gradient disappearance during training. Finally, use the ClippedReLU activation function to limit the output features of the deep convolution within the interval [0, 1] to obtain the denoised image. The denoised image is used as the input of the low-light enhancement module, which can reduce the task difficulty and complexity of the low-light enhancement module, improve the quality and efficiency of low-light enhancement. The calculation formula of the preprocessing module is as follows:

[0012] = ,

[0013] = ,

[0014] = ,

[0015] = ,

[0016] Among them, and respectively represent the input image and the denoised image output by the preprocessing module, represent the intermediate feature map, represent the convolution operation, represent the ClippedReLU activation operation with a limit of [0, 1].

[0017] Furthermore, the low-light enhancement module described in step S1 is specifically as follows:

[0018] The low-light enhancement module includes the following processing steps:

[0019] Perform five parallel convolution operations on the denoised image to learn different types of local features, enhance the model's ability to improve brightness, contrast, and restore details, and use the channel concatenation operation to combine the local features with to obtain the local feature map ;

[0020] Perform two convolution and max pooling operations on the local feature map to obtain the global feature map , where the convolution operation is used to integrate and compress the channel information, and the pooling operation is used to expand the receptive field, which is beneficial to capturing the global illumination distribution;

[0021] Perform two deconvolution operations on the global feature map to obtain a gain map with the same size as the input image, and multiply the gain map element-wise with the denoised image to obtain the low-light enhanced image .

[0022] Furthermore, the refinement module described in step S1 is specifically as follows:

[0023] The refinement module is divided into an attention unit and a correction unit;

[0024] The attention unit performs spatial attention operations on the initial input image to generate a single-channel attention weight, and multiply the single-channel attention weight with the RGB three channels of the low-light enhanced image respectively to obtain the attention image ;

[0025] The correction unit concatenates the attention image with the initial input image to introduce the key features of the input image lost during the processing, and then uses two convolution operations and one fully connected operation to integrate the features, improve the detail performance and realism of the image, and output the refined enhanced image .

[0026] Furthermore, step S2 is specifically as follows:

[0027] S201. Set the initialization parameters of the horned lizard optimization algorithm, including the number of horned lizard individuals , dimension D, and maximum number of iterations , and set the value range of the hyperparameter group to be optimized as the solution space of the search agent. The hyperparameter group includes the convolution kernel sizes of all convolutional layers in the preprocessing module , the number of convolution kernels in the parallel convolutional layer of the low-light enhancement module , the size of the convolution kernels in the parallel convolutional layer of the low-light enhancement module , the convolution kernel sizes of all convolutional layers in the correction unit of the refinement module , the initial learning rate for training , the training batch size , the two proportional coefficients of the loss function and .

[0028] S202. Improve the random initialization in the horned lizard optimization algorithm based on Latin hypercube sampling. The expression is as follows:

[0029] ,

[0030] where is the position of the population individual in the solution space, and are the lower and upper limits of a certain solution space respectively; is an integer in , indicating the sub-interval index corresponding to the th individual in the th dimension. And for each dimension, all form a random permutation to ensure that each sub-interval is sampled only once; is a uniform random number in the interval [0, 1) for random sampling within the corresponding sub-interval.

[0031] S203. Use the hyperparameter group of each individual in the search agent population to perform multi-stage training and validation of the model. Calculate the peak signal-to-noise ratio PSNR of the validation set as the fitness value of the individual, select the maximum fitness value of the current iteration as the optimal fitness value, and select the minimum fitness value of the current iteration as the worst fitness value.

[0032] Furthermore, the multi-stage training specifically includes the following steps:

[0033] First, set the combined loss function for model training , which is composed of L2 loss and structural similarity loss, and the calculation method is as follows:

[0034] ,

[0035] Among them, and represent the proportionality coefficients, represents the L2 norm, ( ) represents the structural similarity loss, represents the reference standard image, represents the image output by the module;

[0036] Secondly, set in the loss function as the denoised image output by the preprocessing module , and train the preprocessing module separately;

[0037] Again, set in the loss function as the low-light enhanced image output by the low-light enhancement module , and fix the weights of the preprocessing module, and train the low-light enhancement module separately;

[0038] Then, set in the loss function as the refined enhanced image output by the refinement module , and fix the weights of the preprocessing module and the low-light enhancement module, and train the refinement module separately;

[0039] Finally, set in the loss function as the refined enhanced image output by the refinement module , and co-train the three modules to complete one training.

[0040] S204. Simulate the defense process of the horned lizard to update the positions of the search agent population, including the hiding behavior, the improved blood-spurting behavior, and the improved moving and escaping behavior.

[0041] Furthermore, the hiding behavior is specifically:

[0042] If the random probability is less than 0.5, then simulate the hiding behavior of the horned lizard to update the positions of the horned lizard population. The expression of the hiding behavior is as follows:

[0043] ,

[0044] Among them, represents the position of the i-th search agent in the search space at the (t + 1)-th iteration, represents the best agent at the t-th iteration; r1, r2, r3, and r4 are integer random numbers between [1, N], where N represents the population size, and r1 ≠ r2 ≠ r3 ≠ r4; , , and For the selected r1, r2, r3, and r4 search agents; T represents the maximum number of iterations, α is set to 2, σ is a random binary value, and both c1 and c2 are random numbers, and c1 ≠ c2.

[0045] Furthermore, the improved blood-squirting behavior is specifically as follows:

[0046] When the random probability is greater than 0.5 and the current iteration number t is even, the momentum memory blood-squirting behavior is used to update the positions of the horned lizard population.

[0047] The blood-squirting strategy of the original algorithm updates the position based on the state of the current iteration, without making full use of historical motion information. This not only causes the favorable information obtained in the initial stage to be unable to be continuously utilized but also causes the individuals to change directions too frequently when escaping from local traps, making it difficult to jump out of the local optimal region, ultimately affecting the overall convergence speed and stability. The improved momentum memory blood-squirting behavior introduces a momentum memory term, and the update of the individual position will refer to the moving direction of the previous blood-squirting behavior, making the search more continuous and smooth, and enhancing the efficiency of jumping out of the local optimal region. At the same time, a memory weight coefficient that decays with the increase of the iteration number is also introduced to balance the global exploration ability in the early stage and the local exploitation ability in the later stage. The momentum memory term has the following expression:

[0048] ,

[0049] where is the maximum memory weight, is the minimum memory weight, is the current iteration number, is the position of the i-th search agent before the previous blood-squirting behavior, is the position of the i-th search agent after the previous blood-squirting behavior. The expression of the improved blood-squirting strategy is as follows:

[0050] ,

[0051] In the formula represents the position of the i-th search agent in the search space in the (t + 1)-th iteration, represents the best agent in the t-th iteration; represents the initial blood velocity, represents the angle of the horned lizard's squirt, set to , represents the current iteration number, represents the maximum iteration number, takes a very small constant value , represents the earth's gravity acting on the blood in the vertical direction, with a value of , is the momentum memory term.

[0052] Furthermore, the improved mobile escape behavior is specifically as follows:

[0053] When the random probability is greater than 0.5 and the current iteration number t is odd, the mobile escape behavior of dynamic Lévy flight is used to update the position of the horned lizard population.

[0054] The mobile escape strategy of the original algorithm introduces a random variable that follows the standard Cauchy distribution , to increase the probability of generating a larger step size, thereby enhancing the global exploration ability and helping the search agent to jump out of the local optimal region. However, the randomness of generating a large step size in the original strategy does not change with the increase of the iteration number. When fine local development is required in the later stage of optimization, there is still a high probability of generating a large step size random number, making it difficult for the optimization algorithm to achieve stable convergence.

[0055] The mobile escape behavior based on dynamic Lévy flight changes the distribution of the random variable from the Cauchy distribution to the Lévy distribution, and sets the shape parameter in the Lévy distribution as a dynamic shape parameter that increases with the increase of the iteration number (1 ≤ ≤ 1.7). In the early stage of optimization is small, 's distribution is closer to the Cauchy distribution, and the probability of generating a large step size is large, which is beneficial to the global exploration of the algorithm; in the later stage of optimization is large, and the probability of generating a large step size is small, which is beneficial to the algorithm to perform fine development with small step sizes. The expression of the mobile escape behavior based on dynamic Lévy flight is as follows:

[0056] ,

[0057] where, represents the best agent in the t-th iteration, is a random number within [-1, 1], is a random variable that follows the dynamic Lévy distribution, 's expression is as follows:

[0058] ,

[0059] where, and are normal distributions that satisfy the following conditions:

[0060] ,

[0061] ,

[0062] where, is the gamma function, is the dynamic shape parameter, The expression of is as follows: ,

[0063] wherein, is the minimum shape parameter, set to 1; is the maximum shape parameter, set to 1.7; is the current iteration number, is the maximum iteration number.

[0064] S205. Simulate the behavior of the horned lizard's skin darkening or lightening, and replace the position of the worst individual in the current search agent population. The expressions for the horned lizard's skin darkening and lightening are as follows:

[0065] ,

[0066] ,

[0067] wherein, and respectively represent the positions of the best and worst search agents in the t-th iteration; r1, r2, r3, and r4 are integer random numbers between [1, N], where N represents the population size, and r1 ≠ r2 ≠ r3 ≠ r4; , , and are the r1-th, r2-th, r3-th, and r4-th selected search agents; is a binary value, and represent random numbers between , and represent random numbers between .

[0068] S206. Repeat steps S203, S204, and S205 until the maximum iteration number is reached, stop the optimization, output the hyperparameter group of the individual with the optimal fitness during the iteration, and the weights of the low-light image enhancement model fine-tuned and trained based on this hyperparameter group.

[0069] Meanwhile, the present invention also proposes an electronic system, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method steps of the present invention.

[0070] Finally, the present invention proposes a computer-readable storage medium storing computer instructions, and the computer instructions are used to cause the computer to execute the method steps of the present invention.

[0071] The present invention adopts the above technical solutions and has the following technical effects compared with the prior art:

[0072] The present invention proposes a low-light image enhancement method and system based on the horned lizard optimization algorithm. First, a low-light image enhancement model including a preprocessing module, a low-light enhancement module, and a refinement module is constructed. The preprocessing module can fully remove noise while retaining details, solving the problem of difficult balance between denoising and retaining details. The low-light enhancement module can improve brightness and contrast and repair hidden degradation in low-light scenes, solving the problem of difficult recovery of low-light details. The refinement module can restore key features lost during the processing, solving the problem of easy distortion of enhanced images. Secondly, Latin hypercube sampling, a momentum memory blood-spurting behavior, and a moving escape behavior based on dynamic Lévy flight are used to improve the population initialization, blood-spurting behavior, and moving escape behavior of the original horned lizard optimization algorithm respectively, enhancing the ability of the algorithm to jump out of the local optimal region and find the global optimal solution. In summary, the low-light image enhancement method and system based on the horned lizard optimization algorithm proposed by the present invention can significantly enhance the visual effect of low-light image enhancement. Description of the Drawings

[0073] Figure 1 is the flowchart of the low-light image enhancement method proposed by the present invention.

[0074] Figure 2 is the overall structure diagram of the low-light image enhancement model proposed by the present invention.

[0075] Figure 3 is the structure diagram of the preprocessing module proposed by the present invention.

[0076] Figure 4 is the structure diagram of the low-light enhancement module proposed by the present invention.

[0077] Figure 5 is the structure diagram of the refinement module proposed by the present invention.

[0078] Figure 6 is the flowchart of the improved horned lizard optimization algorithm proposed by the present invention. Detailed Embodiments

[0079] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in combination with specific embodiments and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts belong to the scope of protection of this application:

[0080] As Figure 1 shown, the present invention proposes a low-light image enhancement method based on the horned lizard optimization algorithm, which specifically includes the following steps:

[0081] S1. Construct a low-light image enhancement model. As Figure 2 shown, the low-light image enhancement model includes three cascaded modules, namely a preprocessing module, a low-light enhancement module, and a refinement module. The preprocessing module is used to remove the noise of the input image. The low-light enhancement module is used to enhance the brightness and contrast and restore details. The refinement module is used to restore the key features lost during the image processing process and improve the overall visual quality and realism;

[0082] S2. Improve the population initialization, blood-spurting strategy, and movement and escape strategy of the horned lizard optimization algorithm. Based on the improved horned lizard optimization algorithm, iteratively search for the optimal combination of hyperparameters, and train the low-light enhancement model to optimize the feature extraction ability and improve the enhancement effect and detail restoration quality of the model in complex low-light environments. In the iterative training of the model, the optimization process of the feature extraction ability is similar to the environmental perception of the horned lizard. In the early stage, a larger search range (global search) is adopted, and in the later stage, it focuses on the local optimum (local search), enabling the model to automatically learn important features, focus on key targets, and improve the effect of low-light image enhancement;

[0083] S3. Input the image to be processed into the low-light image enhancement model trained in step S2 to obtain the enhanced image.

[0084] Further, as Figure 3 shown, the preprocessing module in step S1 is specifically:

[0085] Use deep convolution to capture local features and context features, and use dense cross-layer connections to merge features at different levels. The cross-layer connection method is not only beneficial to balancing multi-level features, improving the model's ability to filter noise and retain details, but also beneficial to alleviating the problem of gradient disappearance during the training process. Finally, the ClippedReLU activation function is used to limit the output features of the deep convolution within the interval [0, 1] to obtain the denoised image. The denoised image is used as the input of the low-light enhancement module, which can reduce the task difficulty and complexity of the low-light enhancement module, improve the quality and efficiency of low-light enhancement. The calculation formula of the preprocessing module is as follows:

[0086] = ,

[0087] = ,

[0088] = ,

[0089] = ,

[0090] Among them, and respectively represent the input image and the denoised image output by the preprocessing module, represents the intermediate feature map, represents the convolution operation, represents the ClippedReLU activation operation with clipping range [0, 1].

[0091] Furthermore, as shown in Figure 4 , the low-light enhancement module described in step S1 is specifically as follows:

[0092] The low-light enhancement module includes the following processing steps:

[0093] Perform five parallel convolution operations on the denoised image to learn different types of local features, enhance the model's ability to improve brightness, contrast, and restore details, and use the channel splicing operation to merge the local features with to obtain the local feature map ;

[0094] Perform two convolution and max pooling operations on the local feature map to obtain the global feature map . The convolution operation is used to integrate and compress the channel information, and the pooling operation is used to expand the receptive field, which is beneficial to capturing the global illumination distribution;

[0095] Perform two transposed convolution operations on the global feature map to obtain a gain map with the same size as the input image, and multiply the gain map and the denoised image element-wise to obtain the low-light enhanced image .

[0096] Furthermore, as shown in Figure 5 , the refinement module described in step S1 is specifically as follows:

[0097] The refinement module is divided into an attention unit and a correction unit;

[0098] The attention unit performs spatial attention operation on the initial input image to generate a single-channel attention weight, and multiplies the single-channel attention weight with the RGB three channels of the low-light enhanced image respectively to obtain an attention image ;

[0099] The correction unit splices the attention image with the initial input image to introduce the key features of the input image lost during the processing, and then uses two convolutional operations and one fully connected operation to integrate the features, enhancing the detail performance and realism of the image, and outputting a refined enhanced image .

[0100] Furthermore, as Figure 6 shown, step S2 is specifically as follows:

[0101] S201. Set the initialization parameters of the horned lizard optimization algorithm, including the number of horned lizard individuals , dimension D, maximum number of iterations , and set the value range of the hyperparameter group to be optimized as the solution space of the search agent. The hyperparameter group includes the convolution kernel sizes of all convolutional layers in the preprocessing module , the number of convolution kernels in the parallel convolutional layer of the low-light enhancement module , the convolution kernel sizes in the parallel convolutional layer of the low-light enhancement module , the convolution kernel sizes of all convolutional layers in the correction unit of the refinement module , the initial learning rate for training , the training batch size , and the two proportionality coefficients of the loss function and .

[0102] S202. Improve the random initialization in the horned lizard optimization algorithm based on Latin hypercube sampling, and the expression is as follows:

[0103] ,

[0104] where is the position of the population individual in the solution space, and are the lower and upper limits of a certain solution space respectively; is an integer in , representing the sub-interval index corresponding to the th individual in the th dimension, and for each dimension all form a random permutation to ensure that each sub-interval is sampled only once; is a uniform random number in the interval [0, 1), which is used for random sampling within the corresponding sub-interval.

[0105] S203. Use the hyperparameter group of each individual in the search agent population to perform multi-stage training and validation of the model, calculate the peak signal-to-noise ratio PSNR of the validation set as the fitness value of the individual, select the maximum fitness value of the current iteration as the optimal fitness value, and select the minimum fitness value of the current iteration as the worst fitness value.

[0106] Furthermore, the multi-stage training specifically includes the following steps:

[0107] First, set the joint loss function for model training , which is composed of L2 loss and structural similarity loss, and the calculation method is as follows:

[0108] ,

[0109] where and represent the proportionality coefficients, represents the L2 norm, ( ) represents the structural similarity loss, represents the reference standard image, represents the image output by the module;

[0110] Secondly, set in the loss function as the denoised image output by the preprocessing module, and train the preprocessing module separately;

[0111] Thirdly, set in the loss function as the low-light enhanced image output by the low-light enhancement module, and fix the weights of the preprocessing module and train the low-light enhancement module separately;

[0112] Then, set in the loss function as the refined enhanced image output by the refinement module, and fix the weights of the preprocessing module and the low-light enhancement module and train the refinement module separately;

[0113] Finally, set in the loss function as the refined enhanced image output by the refinement module, and co-train the three modules to complete one training.

[0114] ​​​​​​​​​In this embodiment, data augmentation is performed using random flipping and rotation during the training phase. The entire network is optimized using the Adam optimizer, and the initial learning rate, batch size, and proportional coefficient of the loss function for each training are determined by the improved horned lizard optimization algorithm. Each stage in the multi-stage training is trained for 200 epochs. The learning rate remains the initial learning rate in the first 100 epochs, and then the learning rate is adjusted to 0.5 times the original every 10 epochs.

[0115] S204. Simulate the defense process of the horned lizard to update the positions of the search agent population, including the hiding behavior, improved blood-squirting behavior, and improved moving and escaping behavior.

[0116] Furthermore, the hiding behavior is specifically as follows:

[0117] If the random probability is less than 0.5, simulate the hiding behavior of the horned lizard to update the positions of the horned lizard population. The expression of the hiding behavior is as follows:

[0118] ,

[0119] where represents the position of the i-th search agent in the search space at the (t + 1)-th iteration, represents the best agent at the t-th iteration; r1, r2, r3, and r4 are integer random numbers between [1, N], where N represents the population size, and r1 ≠ r2 ≠ r3 ≠ r4; , , and are the selected r1-th, r2-th, r3-th, and r4-th search agents; T represents the maximum number of iterations, α is set to 2, σ is a random binary value, and c1 and c2 are both random numbers, and c1 ≠ c2.

[0120] Furthermore, the improved blood-squirting behavior is specifically as follows:

[0121] When the random probability is greater than 0.5 and the current iteration number t is even, use the momentum memory blood-squirting behavior to update the positions of the horned lizard population.

[0122] The blood ejection strategy of the original algorithm updates the position based on the state of the current iteration and does not make full use of historical motion information. This not only causes the favorable information obtained in the initial stage to be unable to be continuously utilized but also causes the individual to change directions too frequently when escaping from local traps, making it difficult to jump out of the local optimal region, ultimately affecting the overall convergence speed and stability. The improved momentum memory blood ejection behavior introduces a momentum memory term, and the update of the individual position will refer to the moving direction of the previous blood ejection behavior, making the search more continuous and smooth, and enhancing the efficiency of jumping out of the local optimal region. At the same time, a memory weight coefficient that decays with the increase in the number of iterations is also introduced to balance the global exploration ability in the early stage and the local exploitation ability in the later stage. The momentum memory term is expressed as follows:

[0123] ,

[0124] where is the maximum memory weight, is the minimum memory weight, is the current iteration number, is the position of the i-th search agent before the previous blood ejection behavior, is the position of the i-th search agent after the previous blood ejection behavior. The expression of the improved blood ejection strategy is as follows:

[0125] ,

[0126] In the formula represents the position of the i-th search agent in the search space at the (t + 1)-th iteration, represents the best agent at the t-th iteration; represents the initial blood velocity, represents the angle of the horned lizard's ejection, set as , represents the current iteration number, represents the maximum iteration number, takes a very small constant value , represents the earth's gravity acting on the blood in the vertical direction, with a value of , is the said momentum memory term.

[0127] Furthermore, the improved moving escape behavior is specifically as follows:

[0128] When the random probability is greater than 0.5 and the current iteration number t is odd, the moving escape behavior of dynamic Lévy flight is used to update the position of the horned lizard population.

[0129] The moving escape strategy of the original algorithm introduces a random variable , to increase the probability of generating a larger step size, thereby enhancing the global exploration ability and helping the search agent jump out of the local optimal region. However, the randomness of generating a large step size in the original strategy does not change with the increase in the number of iterations. As a result, when fine local development is required in the later stage of optimization, there is still a high probability of generating a large step size random number, making it difficult for the optimization algorithm to achieve stable convergence.

[0130] The mobile escape behavior based on dynamic Lévy flight changes the distribution of the random variable from the Cauchy distribution to the Lévy distribution, and sets the shape parameter in the Lévy distribution as a dynamic shape parameter that increases with the increase in the number of iterations (1 ≤ ≤ 1.7). In the early stage of optimization is small, the distribution is closer to the Cauchy distribution, and the probability of generating a large step size is large, which is beneficial to the global exploration of the algorithm; in the later stage of optimization is large, and the probability of generating a large step size is small, which is beneficial to the algorithm to perform fine development with a small step size. The expression of the mobile escape behavior based on dynamic Lévy flight is as follows:

[0131] ,

[0132] where, represents the best agent in the t-th iteration, is a random number within [-1, 1], is a random variable subject to the dynamic Lévy distribution, The expression of

[0133] is as follows:

[0134] where, and are normal distributions that satisfy the following conditions:

[0135] ,

[0136] ,

[0137] where, is the gamma function, is the dynamic shape parameter, The expression of

[0138] is as follows:

[0139] where, is the minimum shape parameter, set to 1; is the maximum shape parameter, set to 1.7; is the current number of iterations, is the maximum number of iterations.

[0140] S205. Simulate the behavior of the horned lizard's skin darkening or lightening, and replace the position of the worst individual in the current search agent population. The expressions for the horned lizard's skin darkening and lightening are as follows:

[0141] ,

[0142] ,

[0143] where, and respectively represent the positions of the best and worst search agents in the t-th iteration; r1, r2, r3, and r4 are integer random numbers between [1, N], where N represents the population size, and r1 ≠ r2 ≠ r3 ≠ r4; , , and are the r1-th, r2-th, r3-th, and r4-th selected search agents; is a binary value, and represent random numbers between , and represent random numbers between .

[0144] S206. Repeat steps S203, S204, and S205 until the maximum number of iterations is reached, stop the optimization, and output the hyperparameter group of the individual with the optimal fitness during the iteration, as well as the weights of the low-light image enhancement model fine-tuned and trained based on this hyperparameter group.

[0145] To further test the implementation of the present invention, quantitative analysis is performed on the present invention and compared with other models. The LOL image dataset is selected as the test dataset, and four common image quality evaluation metrics: PSNR, SSIM, LPIPS, and MSE are used to evaluate the image enhancement effect and the performance of the model. The larger the PSNR and SSIM, the higher the image quality, and the smaller the LPIPS and MSE, the higher the image quality. The test results are shown in Table 1.

[0146] Table 1: Comparison of test results between the present invention and other models

[0147] Embodiment 2: This embodiment provides an electronic system, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method steps of the present invention.

[0148] Embodiment 3: This embodiment provides a computer-readable storage medium storing computer instructions, and the computer instructions are used to cause the computer to execute the method steps of the present invention.

[0149] It should be noted that the processing flows of Embodiment 2 to Embodiment 3 correspond to the specific steps of the method provided by the embodiments of the present invention, and have the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, reference may be made to the method provided by the embodiments of the present invention.

[0150] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, so that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.

[0151] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0152] In the description of this specification, the descriptions referring to terms such as "one embodiment", "example", "specific example", etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in a suitable manner in any one or more embodiments or examples.

[0153] The above has shown and described the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and the above embodiments and the descriptions in the specification only illustrate the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed.

Claims

1. A low-light image enhancement method based on the horned lizard optimization algorithm, characterized in that: The steps include: S1. Build a low-light image enhancement model, including: A preprocessing module for removing noise from input images; Low-light enhancement module to boost brightness and contrast and recover details; The refinement module is used to restore key features lost during image processing and improve overall visual quality and realism; S2. Iteratively optimize the low-light image enhancement model based on the horned lizard optimization algorithm to obtain the optimal model hyperparameters and weights, including: Initialization step: set the initialization parameters of the horned lizard optimization algorithm, and adjust the random initialization in the horned lizard optimization algorithm based on Latin hypercube sampling; Optimization iteration steps: First, use the hyperparameter group of each individual in the search agent population to perform multi-stage training and verification of the model; second, simulate the defense process of horned lizards to update the position of the search agent population; then simulate the behavior of horned lizards' skin darkening or lightening to replace the position of the worst individual in the current search agent population; Repeat the optimization iteration steps until the maximum number of iterations is reached, output the hyperparameter group corresponding to the individual with the best fitness during the iteration, and fine-tune the network weights after training based on the hyperparameter group; S3. Input the image to be processed into the low-light image enhancement model trained in step S2 to obtain an enhanced image.

2. The method according to claim 1, characterized in that The specific execution steps of the preprocessing module in step S1 are: first, use deep convolution to capture local features and context features, and use dense cross-layer connections to merge features at different levels; then use ClippedReLU activation function to limit the output features of the deep convolution to the interval [0, 1] to obtain a denoised image; The calculation formula of the preprocessing module is as follows: = , = , = , = , in, and Represent the input image and the denoised image output by the preprocessing module, respectively. represents the intermediate feature map, represents the convolution operation, Represents a ClippedReLU activation operation with clipping to [0, 1].

3. The method according to claim 1, characterized in that: The specific execution steps of the low light enhancement module in step S1 are: For denoised images Perform five parallel convolution operations to learn different types of local features and use channel concatenation to combine the local features with Merge to get local feature map ; For local feature maps Perform two convolution and maximum pooling operations to obtain the global feature map ; For the global feature map Perform two deconvolution operations to obtain a gain map with the same size as the input image, and add the gain map to the denoised image. Multiply element by element to get the low-light enhanced image .

4. The method according to claim 1, characterized in that: The specific execution steps of the refinement module in step S1 are: Attention image acquisition step, for the initial input image Perform spatial attention operation to generate single-channel attention weights, and combine the single-channel attention weights with the low-light enhanced image Multiply the RGB channels of the image separately to get the attention image ; Image correction step, focus image With the initial input image Splicing, introducing key features of the input image that were lost during processing, then integrating the features using two convolution operations and one full connection operation, outputting a refined and enhanced image .

5. The method according to claim 1, characterized in that: Step S2 specifically includes the following sub-steps: S201. Set the initialization parameters of the horned lizard optimization algorithm: including the number of horned lizard individuals , dimension D, maximum number of iterations , and set the value range of the hyperparameter group to be optimized as the solution space of the search agent; S202. Adjust the random initialization in the horned lizard optimization algorithm based on Latin hypercube sampling. The expression is as follows: , in, is the position of individuals in the solution space, and They are the lower and upper limits of a certain dimension of the solution space; is An integer in The individual in The corresponding subinterval index on the dimensions, and for each dimension all Form a random permutation to ensure that each subinterval is sampled only once; is a uniform random number in the interval [0,1) and is used for random sampling in the corresponding subinterval; S203, using the hyperparameter group of each individual in the search agent group to perform multi-stage training and verification of the model, calculating the peak signal-to-noise ratio (PSNR) of the verification set as the fitness value of the individual, selecting the maximum fitness value of the current iteration as the optimal fitness value, and selecting the minimum fitness value of the current iteration as the worst fitness value; S204, simulating the horned lizard's defense process to update the position of the search agent population; S205, simulate the behavior of the horned lizard's skin becoming darker or brighter, replace the position of the worst individual in the current search agent population, and the expressions for the horned lizard's skin becoming darker and brighter are as follows: , , in, and denote the positions of the best and worst search agents in the tth iteration, respectively; r1, r2, r3, and r4 are integer random numbers between [1, N], where r1 ≠ r2 ≠ r3 ≠ r4; , , and for the selected search agents r1, r2, r3 and r4; is a random binary value, and Indicated in A random number between and Indicated in A random number between S206, repeat steps S203, S204 and S205 until the maximum number of iterations is reached , stop optimizing, output the hyperparameter group of the individual with the best fitness in the iteration process, and the weights of the low-light image enhancement model after fine-tuning the training based on the hyperparameter group.

6. The method according to claim 5, characterized in that: The hyperparameter group in step S201 includes the convolution kernel sizes of all convolutional layers in the preprocessing module. , the number of convolution kernels in the parallel convolutional layer of the low-light enhancement module , the size of the convolution kernel in the parallel convolution layer of the low-light enhancement module , the convolution kernel size of all convolutional layers in the image correction step of the refinement module , initial learning rate for training , training batch size , two proportional coefficients of the loss function and .

7. The method according to claim 5, characterized in that: In step S203, the hyperparameter group of each individual in the search agent group is used to perform multi-stage training and verification of the model, and the multi-stage training specifically includes the following steps: S203-1. Setting the joint loss function for model training , Depend on The loss and structural similarity loss are composed and are calculated as follows: , in, and represents the proportionality coefficient, express norm, ( ) represents the structural similarity loss, represents the reference standard image, An image representing the output of the module; S203-2. Change the loss function Set as the denoised image output by the preprocessing module , train the preprocessing module separately; S203-3. Change the loss function Set to the low-light enhancement image output by the low-light enhancement module , and fix the weights of the preprocessing module and train the low-light enhancement module separately; S203-4. Change the loss function Set as the refined enhanced image output by the refinement module , and fix the weights of the preprocessing module and the low-light enhancement module, and train the refinement module separately; S203-5. Change the loss function Set as the refined enhanced image output by the refinement module , collaboratively train three modules to complete one training session.

8. The method according to claim 5, characterized in that: Step S204 includes adopting three strategies to simulate the horned lizard defense process to update the position of the search agent population, specifically: A. If the random probability is less than 0.5, simulate the hiding behavior of the horned lizard to update the position of the horned lizard population. The expression of the hiding behavior is as follows: , in, represents the position of the i-th search agent in the search space in the t+1th iteration, T represents the maximum number of iterations, is the current iteration number, α is set to 2, c1 and c2 are both random numbers, and c1 ≠ c2; B. When the random probability is greater than 0.5 and the current iteration number t is an even number, simulate the blood spraying behavior of the horned lizard to update the position of the horned lizard population, specifically; The momentum memory term is introduced, and the update of the individual position will refer to the moving direction of the last blood spraying behavior. At the same time, a memory weight coefficient that decays with the number of iterations is also introduced. The momentum memory term The expression is as follows: , in, is the maximum memory weight, is the minimum memory weight, is a constant that controls the decay rate of memory weights, are the positions of the i-th search agent before and after the last blood spraying behavior, respectively. The expression of the blood spraying strategy is as follows: , In the formula, represents the initial blood velocity, represents the angle of the horned lizard's spray, set , Take the smallest constant value , Indicates the vertical force of gravity on the blood; C. When the random probability is greater than 0.5 and the current iteration number t is an odd number, simulate the horned lizard's movement and escape behavior to update the position of the horned lizard population, specifically; Based on the mobile escape behavior of dynamic Levi flight, the random variable The distribution of is set to Levy distribution, and the shape parameter in the Levy distribution is set to a dynamic shape parameter that increases with the number of iterations. , the expression of the mobile escape behavior based on dynamic Levy flight is as follows: , in, is a random number in [-1, 1], is a random variable that follows a dynamic Levy distribution, The expression is as follows: , in, and is a normal distribution that satisfies the following conditions: , , in, is the gamma function, is the dynamic shape parameter, The expression is as follows: , in, is the minimum shape parameter, set to 1; is the maximum shape parameter and is set to 1.

7.

9. A computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 8.

10. An electronic system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • A low-light image enhancement method and apparatus

    CN109087269A

  • Deep network camera image processing method, system and application

    CN113301221A

  • Pressure vessel design method, device and medium based on multi-strategy improved corner exid algorithm

    CN119647288A

  • A surveillance system and a method for detecting a foreign object, debris, or damage in an airfield

    WO2012115594A1

  • AU2020101832A4

Cited By

  • Air pressure compensation structure of laser spectrum gas sensor and concentration prediction method

    CN120927611A