Image processing method, device, equipment and readable storage medium

By acquiring the illumination feature data of images and performing root cause analysis, the weights of target interference elements are obtained using Bayesian, graph neural networks and decision tree inference, and reinforcement learning is combined to adjust the parameters of the image enhancement algorithm. This solves the problem of accuracy and reliability of face liveness detection under different lighting scenarios and realizes adaptive illumination correction for image detection.

CN122416501APending Publication Date: 2026-07-17CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD
Filing Date
2026-03-16
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing technologies cannot guarantee the accuracy and reliability of face liveness detection under different lighting conditions, especially in low light or strong backlighting scenarios where noise amplification or overexposure distortion problems are likely to occur.

Method used

By acquiring multiple illumination feature data of the image to be detected, root cause analysis is performed. The weights of target interference elements are obtained using Bayesian inference, graph neural networks, and decision tree inference. Combined with reinforcement learning algorithms, the parameter values ​​of the image enhancement algorithm are dynamically adjusted, including Retinex, CLAHE, and Gamma correction, to achieve adaptive illumination correction.

Benefits of technology

It improves the accuracy and reliability of face liveness detection under different lighting conditions, enhances the adaptability of image enhancement algorithms, and improves image detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122416501A_ABST
    Figure CN122416501A_ABST
Patent Text Reader

Abstract

This application discloses an image processing method, apparatus, device, and readable storage medium, relating to the field of information processing technology, to solve the problem that the accuracy and reliability of face liveness detection cannot be guaranteed under different lighting scenarios. The image processing method includes: acquiring multiple illumination feature data of an image to be detected; performing root cause analysis on the illumination feature data to obtain the target interference element weight corresponding to each illumination feature data, the target interference element weight being used to indicate the impact of image detection event failure; obtaining parameter values ​​corresponding to an image enhancement algorithm based on the illumination feature data and the target interference element weights; and applying the image enhancement algorithm to perform illumination adaptive correction on the image to be detected based on the parameter values. The technical solution disclosed in this application can be applied to fields such as intelligent security, mobile payment, autonomous driving, and social media filters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of information processing technology, specifically relating to an image processing method, apparatus, device, and readable storage medium. Background Technology

[0002] In the process of performing face liveness detection on actual captured images, the first step is to detect the face region from the image, and then perform a realism detection on the face region. The accuracy of face region detection is the foundation of the accuracy of face liveness detection.

[0003] To avoid poor face recognition accuracy due to factors such as low light, backlight, or shadows, existing technologies generally employ Contrast-Limited Adaptive Histogram Equalization (CLAHE) with fixed parameters to enhance the image of the actual captured image.

[0004] However, fixed parameters have poor adaptability and may cause noise amplification or overexposure distortion in low-light or strong backlight scenes, thus affecting the accuracy and reliability of face liveness detection. Summary of the Invention

[0005] This application provides an image processing method, apparatus, device, and readable storage medium to solve the problem that the accuracy and reliability of face liveness detection cannot be guaranteed under different lighting conditions.

[0006] In a first aspect, embodiments of this application provide an image processing method, including:

[0007] Acquire multiple illumination feature data of the image to be detected;

[0008] Root cause analysis is performed on the illumination feature data to obtain the target interference element weight corresponding to each illumination feature data. The target interference element weight is used to indicate the impact of image detection event detection failure.

[0009] Based on the illumination feature data and the target interference element weights, obtain the parameter values ​​corresponding to the image enhancement algorithm;

[0010] Based on the parameter values, the image enhancement algorithm is used to perform illumination adaptive correction on the image to be detected.

[0011] Optionally, when the root cause analysis includes Bayesian inference, graph neural network inference, and decision tree inference, the step of performing root cause analysis on the illumination feature data to obtain the target interference element weights corresponding to each illumination feature data includes:

[0012] Using a Bayesian network, the impact of each illumination feature data on the failure of the image detection event is detected, and the weight of the first interference element corresponding to each illumination feature data is obtained.

[0013] Using a graph neural network, the higher-order interaction effects between the illumination feature data are captured, and the weight of the second interference element corresponding to each illumination feature data is obtained.

[0014] Using a decision tree model, the importance weight of each of the illumination feature data is calculated, and the weight of the third interference element corresponding to each of the illumination feature data is obtained.

[0015] Based on the first interference element weight, the second interference element weight, and the third interference element weight, the target interference element weight corresponding to each illumination feature data is obtained.

[0016] Optionally, obtaining the parameter values ​​corresponding to the image enhancement algorithm based on the illumination feature data and the target interference element weights includes:

[0017] Based on the illumination feature data and the target interference element weights, a reinforcement learning algorithm is used to obtain the parameter values ​​corresponding to the image enhancement algorithm.

[0018] Optionally, when the image enhancement algorithm includes Retinex (retina-cortex theory), CLAHE (contrast-limited adaptive histogram equalization), and gamma correction, the step of obtaining the parameter values ​​corresponding to the image enhancement algorithm using a reinforcement learning algorithm based on the illumination feature data and the target interference element weights includes:

[0019] Obtain the set of enhancement parameters for Retinex, the set of clipLimit parameters for CLAHE, the set of tileGridSiz parameters for CLAHE, and the set of coefficients for Gamma correction, respectively.

[0020] A reward function is set based on the improvement in the success rate of the image detection event;

[0021] Based on the illumination feature data, the target interference element weights, and the reward function, a reinforcement learning algorithm is used to obtain the target enhancement parameters, target clipLimit parameters, target tileGridSiz parameters, and target coefficient values ​​from the enhancement parameter value set of Retinex, the clipLimit parameter value set of CLAHE, the tileGridSiz parameter value set of CLAHE, and the coefficient value set of Gamma correction, respectively, as the parameter values ​​corresponding to the image enhancement algorithm.

[0022] Optionally, acquiring multiple illumination feature data of the image to be detected includes:

[0023] Image processing techniques are used to extract multiple illumination feature data from the image to be detected; or,

[0024] The ambient light intensity of the image to be detected is measured by an independent photoelectric sensor, and multiple illumination feature data of the image to be detected are obtained based on the ambient light intensity.

[0025] Optionally, the illumination feature data includes: global brightness, grayscale contrast, shadow coverage, and illumination depth feature values ​​at multiple scales.

[0026] Secondly, embodiments of this application also provide an image processing apparatus, comprising:

[0027] The first module is used to acquire multiple illumination feature data of the image to be detected;

[0028] The second module is used to perform root cause analysis on the illumination feature data and obtain the target interference element weight corresponding to each illumination feature data. The target interference element weight is used to indicate the impact of image detection event detection failure.

[0029] The third module is used to obtain the parameter values ​​corresponding to the image enhancement algorithm based on the illumination feature data and the target interference element weights;

[0030] The fourth module is used to perform illumination adaptive correction on the image to be detected based on the parameter values ​​and the image enhancement algorithm.

[0031] Optionally, the second module is further configured to use a Bayesian network to detect the impact of each of the illumination feature data on the failure of the image detection event, and to obtain the weight of the first interference element corresponding to each of the illumination feature data.

[0032] Using a graph neural network, the higher-order interaction effects between the illumination feature data are captured, and the weight of the second interference element corresponding to each illumination feature data is obtained.

[0033] Using a decision tree model, the importance weight of each of the illumination feature data is calculated, and the weight of the third interference element corresponding to each of the illumination feature data is obtained.

[0034] Based on the first interference element weight, the second interference element weight, and the third interference element weight, the target interference element weight corresponding to each illumination feature data is obtained.

[0035] Optionally, the third module is further configured to obtain the parameter values ​​corresponding to the image enhancement algorithm by using a reinforcement learning algorithm based on the illumination feature data and the target interference element weights.

[0036] Optionally, the third module is further configured to, when the image enhancement algorithm includes Retinex, CLAHE, and Gamma correction, respectively obtain the enhancement parameter value set of Retinex, the clip limit parameter value set of CLAHE, the tile grid size parameter value set of CLAHE, and the coefficient value set of Gamma correction.

[0037] A reward function is set based on the degree of improvement in the success rate of the image detection event.

[0038] Based on the illumination feature data, the target interference element weights, and the reward function, a reinforcement learning algorithm is used to obtain the target enhancement parameters, target clipLimit parameters, target tileGridSiz parameters, and target coefficient values ​​from the enhancement parameter value set of Retinex, the clipLimit parameter value set of CLAHE, the tileGridSiz parameter value set of CLAHE, and the coefficient value set of Gamma correction, respectively, as the parameter values ​​corresponding to the image enhancement algorithm.

[0039] Optionally, the first module is further configured to use image processing technology to extract multiple illumination feature data from the image to be detected; or,

[0040] The ambient light intensity of the image to be detected is measured by an independent photoelectric sensor, and multiple illumination feature data of the image to be detected are obtained based on the ambient light intensity.

[0041] Optionally, the illumination feature data includes: global brightness, grayscale contrast, shadow coverage, and illumination depth feature values ​​at multiple scales.

[0042] Thirdly, embodiments of this application also provide a communication device, including: a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the image processing method described above.

[0043] Fourthly, embodiments of this application also provide a readable storage medium storing a program that, when executed by a processor, implements the steps in the image processing method described above.

[0044] Fifthly, embodiments of this application also provide a computer program product, including computer instructions, which, when executed by a processor, implement the steps in the image processing method described above.

[0045] In this embodiment, the parameter values ​​of the image enhancement algorithm are obtained in real time based on illumination feature data and target interference element weights. This makes the technical solution provided in this embodiment more adaptable to illumination correction of the image to be detected under different lighting scenarios. When the image detection event is face liveness detection, the technical solution provided in this embodiment can improve the accuracy and reliability of face liveness detection under different lighting scenarios. Attached Figure Description

[0046] Figure 1 This is a flowchart of the image processing method provided in the embodiments of this application;

[0047] Figure 2 yes Figure 1 The flowchart shown is a step 102 of the image processing method provided in the embodiment of this application;

[0048] Figure 3 yes Figure 1 The flowchart shown is a step 103 of the image processing method provided in the embodiment of this application;

[0049] Figure 4 This is a structural diagram of the image processing apparatus provided in the embodiments of this application. Detailed Implementation

[0050] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0051] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and are not used to describe a specified order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, not limited in number; for example, a first object can be one or more. Furthermore, in the specification and claims, "and" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0052] It is worth noting that the technologies described in this application are not limited to Long Term Evolution (LTE) / LTE-Advanced (LTE-A) systems, but can also be used in other wireless communication systems, such as Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Frequency Division Multiple Access (FDMA), Orthogonal Frequency Division Multiple Access (OFDMA), Single-carrier Frequency-Division Multiple Access (SC-FDMA), and other systems. The terms "system" and "network" in this application are often used interchangeably, and the described technologies can be used with the systems and radio technologies mentioned above, as well as with other systems and radio technologies. However, the following description describes New Radio (NR) systems for illustrative purposes, and NR terminology is used in most of the following description. These technologies can also be applied to applications beyond NR systems, such as 6th generation (6G) radio systems. th Generation 6G communication system.

[0053] See Figure 1 , Figure 1 This is a flowchart of the image processing method provided in the embodiments of this application, such as... Figure 1 As shown, it includes the following steps:

[0054] Step 101: Obtain multiple illumination feature data of the image to be detected.

[0055] In this embodiment, the illumination feature data may include: global brightness, grayscale contrast, shadow coverage, and illumination depth feature values ​​at multiple scales.

[0056] In this embodiment, step 101 can be implemented in two ways:

[0057] One approach is to use image processing techniques to extract multiple illumination feature data from the image to be detected.

[0058] Another method involves measuring the ambient light intensity of the image being captured using an independent photoelectric sensor, and then acquiring multiple illumination feature data of the image based on the ambient light intensity.

[0059] To enable those skilled in the art to better understand the technical solution provided in this embodiment, the following description uses image processing technology to extract multiple illumination feature data from an image to be detected as an example.

[0060] In this embodiment, the method for calculating global brightness may include:

[0061] The arithmetic mean of all gray values ​​of the image to be detected is calculated using the following formula (1):

[0062] ; (1)

[0063] Where N is the total number of pixels in the image to be detected; Let be the grayscale value of the i-th pixel in the 8-bit quantization space.

[0064] Because there is a linear or quadratic calibration relationship between image grayscale and real lighting, a set of measurements can be performed in advance using a photometer under various typical conditions. Where is the average gray level under true illumination. Linear regression was performed, and the global brightness consistent with the actual light intensity was obtained using the following formula (2). :

[0065] ; (2)

[0066] Where 'a' is the grayscale-to-luminance scaling factor (slope) used to map the average grayscale value to the actual illumination intensity proportionally; and 'b' is the intercept (bias), used to compensate for baseline luminance or system errors when the grayscale value is zero. For example, 'a' can be 0.18 and 'b' can be 1.2.

[0067] In this embodiment, the method for calculating grayscale contrast may include:

[0068] The grayscale contrast C is obtained using the following formula (3):

[0069] ; (3)

[0070] In this embodiment, the method for calculating shadow coverage may include:

[0071] First, the local shadow threshold is calculated using the following formula (4). :

[0072] ; (4)

[0073] Secondly, the threshold below the local shadow threshold is obtained using the following formula (5). Shadow coverage ;

[0074] ; (5)

[0075] in, The cardinality of the set (pixel count).

[0076] When shadow coverage A higher value indicates that the image to be detected has large areas of shadow or occlusion.

[0077] In this embodiment, the method for calculating illumination depth feature values ​​at multiple scales may include: using a lightweight convolutional network to obtain illumination depth feature values ​​at multiple scales.

[0078] In this embodiment, the backbone structure of the quantized convolutional network includes: layer-by-layer depthwise separable convolutions, with output channels ranging from 16 to 32 to 64.

[0079] After the last convolutional layer, The spatial average of each channel is used to obtain the length shown in formula (6) below. vector:

[0080] ; (6)

[0081] Through a fully connected layer 1–2 network, The dimensional vector is compressed or expanded to the following formula (7), which is a light depth feature vector λ of length M:

[0082] ; (7)

[0083] For example, the value of M can be 8.

[0084] In this embodiment, step 101 can use multi-task mean squared error loss, which is calculated using the following formula (8). With illumination depth feature values ​​at multiple scales Simultaneous supervision:

[0085] ; (8)

[0086] in, These are the model predictions and their corresponding true (or labeled) values, respectively. . and These are the predicted and labeled values ​​of the k-th dimension illumination depth feature, respectively; is a weighting coefficient used to balance the loss contribution of illumination quantization and depth feature fitting.

[0087] In this embodiment, step 101 can be represented by the illumination feature data F using the following formula (9):

[0088] ; (9)

[0089] The illumination feature F integrates information from multiple aspects such as brightness, contrast, shadow and depth distribution, providing sufficient input features for subsequent root cause analysis and adaptive preprocessing.

[0090] Step 102: Perform root cause analysis on the illumination feature data to obtain the target interference element weights corresponding to each illumination feature data. The target interference element weights are used to indicate the impact of image detection event failure.

[0091] In this embodiment, the image detection event can be any type of event that needs to be detected. To enable those skilled in the art to more clearly understand the technical solution provided in this embodiment, this embodiment uses the face liveness detection event as an example for explanation.

[0092] In this embodiment, root cause analysis may include Bayesian inference, graph neural network (GNN) inference, and decision tree inference, etc. Of course, the above are merely specific examples; in actual use, other methods may also be included, but each case will not be elaborated upon here.

[0093] In root cause analysis involving Bayesian inference, graph neural network inference, and decision tree inference, a causal graph can be pre-built, including:

[0094] First, define the nodes. Nodes include:

[0095] 1. Illumination Feature Nodes: .

[0096] 2. Output Result Node: Face Liveness Detection Success Rate or failure probability .

[0097] Secondly, edge structure learning is performed, including:

[0098] Structure learning was performed on tens of thousands of collected face image samples (including corresponding F and detection success / failure labels). The K2 algorithm or greedy search was used in conjunction with the Bayesian Information Criterion (BIC) scoring function to obtain the directed acyclic graph (DAG) structure shown below:

[0099]

[0100] In this embodiment, in the above directed acyclic graph (DAG) structure, each directed edge represents a conditional dependency relationship from a parent node to a child node. Specifically:

[0101] The global brightness L represents the success rate of face liveness detection. One of the direct influencing factors. That is: in the conditional probability table, L will be used as one of the parent nodes (conditions) in the calculation.

[0102] The shadow coverage Sh represents the success rate of face liveness detection. Another direct influencing factor. The larger the shadow area, the higher the risk of failure in face liveness detection. Therefore, Sh, as the parent node, participates in the process. Modeling.

[0103] This indicates a causal (conditional) dependency between the second-dimensional illumination depth feature and the grayscale contrast (f).

[0104] Under the above directed acyclic graph (DAG) structure, the accurate conditional probability table (CPT) can be estimated for each node and its parent node relationship using the following formula (10):

[0105] ; (10)

[0106] in, .

[0107] Based on a pre-built cause-effect graph and CPT, such as Figure 2 As shown, step 102 may include the following steps:

[0108] Step 201: Using a Bayesian network, detect the impact of each illumination feature data on the failure of image detection events, and obtain the weight of the first interference element corresponding to each illumination feature data.

[0109] In this embodiment, the image detection event is the face liveness detection event.

[0110] Step 201 can obtain the weight of the first interference element using the following formula (11). :

[0111] ; (11)

[0112] in, ; i is the i-th node, and j is the j-th node.

[0113] right Normalization is performed to make .

[0114] Step 202: Use GNN to capture the high-order interaction between illumination feature data and obtain the weight of the second interference element corresponding to each illumination feature data.

[0115] In this embodiment, step 202 uses the causal graph described above as the GNN topology and structure, with nodes... Possessing initial characteristics .

[0116] For each layer l=0, …,L−1, where L is the total number of layers in the GNN, the following formula (12) is executed:

[0117] ;(12)

[0118] in, For nodes Eigenvalues ​​at layer l+1; Is with The set of connected neighboring nodes; This is the linear mapping weight matrix of the node's own features from the current layer to the next layer; This is the linear mapping weight matrix used when aggregating the features of neighboring nodes onto the central node; This is a bias term that ensures the network is activated even when there is no input or the input is all zeros. These are element-wise nonlinear activation functions, such as ReLU and sigmoid.

[0119] After the last layer (L-1) is output, the node The final representation is Map all node representations to a scoring vector. Calculate the normalized weights and obtain the weights of the second interference element using the following formula (13). :

[0120] ; (13)

[0121] in, For the first Scoring of each node; For the first Scoring of each node; .

[0122] Step 203: Using the decision tree model, calculate the importance weight of each illumination feature data and obtain the weight of the third interference element corresponding to each illumination feature data.

[0123] In this embodiment, the importance weights of decision tree branches are obtained by statistically analyzing the gains brought by feature splitting during the training process of each tree. To balance inference speed, lightweight models such as Gradient Boosting Tree (XGBoost) are used as supplementary methods.

[0124] In this embodiment, a gradient boosting tree model based on Classification and Regression Tree (CART), such as XGBoost, is used to efficiently utilize illumination feature data. The classification or regression can be performed. The gain measure can be the sum of the decreases in information gain or the Gini index, which is statistically denoted as... .

[0125] In this embodiment, the gain within a single tree can be calculated using the following method:

[0126] For the t-th tree (out of a total of T trees, t During its generation process, whenever illumination feature data is selected... For each node split, the gain ΔGaint resulting from that split is calculated. If there are multiple splits for the same feature within the same tree, these gains can be summed to obtain the total gain of the tree for Xi.

[0127] All of them can be obtained through the following formula (14) Among the trees Gain summation:

[0128] = ;(14)

[0129] Reflects the overall performance of the model during the training phase The dependence strength. In order to fuse the weights of the Bayesian and GNN branch outputs under the condition that they are all in [0, 1] and the sum is 1, the gain is normalized by the following formula (15) to obtain the weight of the third interference element. :

[0130] ; (15)

[0131] Wherein ΔGain i (t) represents the gain from splitting using feature i in the t-th tree. A larger ΔGain i (t) means that during the growth of the t-th tree, when splitting nodes, select... This leads to a significant improvement in purity, indicating that this feature contributes considerably to distinguishing between live and non-live samples. Therefore, The greater the relative importance, the more critical the feature is to the liveness detection results.

[0132] Step 204: Based on the weights of the first interference element, the second interference element, and the third interference element, obtain the target interference element weights corresponding to each illumination feature data.

[0133] The weighted average of the weights of the first interference element, the second interference element, and the third interference element is calculated using the following formula (16):

[0134] ; (16)

[0135] Where α, β, and γ are fusion coefficients, which can be searched or set according to the prediction performance on the validation set or the business focus. For example, α=0.4, β=0.4, γ=0.2.

[0136] The result obtained from formula (16) is normalized using the following formula (17) to obtain the target interference element weight corresponding to each illumination feature data:

[0137] ; (17)

[0138] Sort according to the calculated interference element weight vector w, if A higher level indicates that overall dimness contributes significantly to the risk of detection failure; if A higher value indicates that local shadows / occlusions are the main interfering factors; if A higher value indicates that the distribution pattern corresponding to the M-th dimension depth illumination feature is particularly crucial.

[0139] Step 103: Obtain the parameter values ​​corresponding to the image enhancement algorithm based on the illumination feature data and the target interference element weights.

[0140] In this embodiment, the image enhancement algorithm may include, but is not limited to: Retinex, CLAHE, and Gamma correction.

[0141] In this embodiment, step 103 can use a reinforcement learning algorithm to obtain the parameter values ​​corresponding to the image enhancement algorithm based on the image feature data and the target interference element weights.

[0142] To enable those skilled in the art to better understand the technical solution provided in this embodiment, step 103 will be described in detail below using Deep Q-Network (DQN) as an example of reinforcement learning algorithm.

[0143] like Figure 3 As shown, when the image enhancement algorithm includes Retinex, CLAHE, and Gamma correction, step 103 may include:

[0144] Step 301: Obtain the set of enhancement parameters for Retinex, the set of clipLimit parameters for CLAHE, the set of tileGridSiz parameters for CLAHE, and the set of coefficients for Gamma correction.

[0145] In this embodiment, the set of enhanced parameter values ​​for Retinex There are a total of 3 values; the set of clipLimit parameter values ​​for CLAHE. There are a total of 4 values; the set of tileGridSiz parameter values ​​for CLAHE. There are a total of 3 values; the set of coefficients for Gamma correction. There are a total of 3 values.

[0146] In this embodiment, for ease of subsequent processing, step 301 can list all combinations of the above parameter set as follows: There are approximately 3 × 4 × 3 × 3 = 108 discrete actions, each action corresponding to a set. This defined action space covers commonly used image enhancement strategies and ensures the discrete and enumerable characteristics of online decision-making, facilitating efficient searching for optimal operator combinations within a reinforcement learning framework.

[0147] Step 302: Set the reward function based on the improvement in the success rate of image detection events.

[0148] To guide reinforcement learning in intelligently selecting enhancement operators and parameters, this embodiment defines an immediate reward based on the improvement in liveness detection performance after each action is executed. And produce enhanced results Then, the sample was sent to a liveness detector to obtain the success rate. .

[0149] The above frame's unenhanced baseline success rate Using the baseline success rate as a reference, the inherent differences in scene conditions can be eliminated, making rewards comparable under different lighting conditions. Among these, ;

[0150] Obtain instant rewards using the following formula (18) :

[0151] ; (18)

[0152] when When the reward is positive, it encourages the reinforcing strategy; conversely, when it is negative, it inhibits the decision.

[0153] Step 303: Based on the illumination feature data, target interference element weights, and reward function, a reinforcement learning algorithm is used to obtain the target enhancement parameters, target clipLimit parameters, target tileGridSiz parameters, and target coefficient values ​​from the Retinex enhancement parameter value set, the CLAHE clipLimit parameter value set, the CLAHE tileGridSiz parameter value set, and the Gamma correction coefficient value set, respectively, as the corresponding parameter values ​​for the image enhancement algorithm.

[0154] This embodiment uses DQN to approximate the state-action value function, thereby quickly outputting the optimal decision during the online phase. DQN is used to learn the optimal decision-making strategy. ,in, State; For action; This is used as an optimality identifier.

[0155] The network structure includes:

[0156] Input layer: Dimensional state s;

[0157] Hidden layer: Two fully connected layers, number of nodes [128, 64], ReLU activation;

[0158] Output layer: Q value corresponding to each action .

[0159] Utilize instant rewards after each interaction with the environment. The Q-network parameters are updated using formula (19) based on the next maximum Q value:

[0160] ; (19)

[0161] in, The learning rate; Discount factor; This is the immediate reward for step t; Estimate the Q-value for the current state and action pair; Candidate actions for the next moment; Action for the next state The optimal Q-value estimate.

[0162] In this embodiment, the sampling strategy of DQN may include:

[0163] During the training phase, ε-greedy was used (ε decreased linearly from 0.9 to 0.1).

[0164] The reasoning phase uses fixed methods .

[0165] In this embodiment, the DQN training process may include:

[0166] On an offline lighting simulation dataset, the experience replay buffer is filled with random initial parameters; each iteration samples a mini-batch from the buffer and updates the network weights in large batches; the online policy network parameters are periodically copied to the target network to stabilize training.

[0167] Step 104: Based on the parameter values, use an image enhancement algorithm to perform adaptive illumination correction on the image to be detected.

[0168] In this embodiment, step 104 may include:

[0169] First, the state vector s is obtained using the following formula (20):

[0170] ; (20)

[0171] Second, load the pre-trained DQN onto the NPU or CPU, and input the state. Reasoning to obtain the optimal parameter combination .

[0172] Third, multi-scale fuzzing and logarithmic domain differencing are performed in parallel on GPUs / FPGAs, based on... Adjust the enhancement parameter values ​​of Retinex; in CLAHE, perform contrast stretching in blocks, partitioning by block size t×t, applying adaptive histogram equalization with contrast limiting c, and performing histogram calculation and mapping for each block in parallel or pipelined manner; during Gamma correction, perform pixel-wise power-law transformation. Through this power-law transformation, Gamma correction can finely control the brightness distribution of an image without complex calculations.

[0173] Optionally, step 104 can also send the enhanced image to be detected to the liveness detection module at a rate of 32ms / frame for detection.

[0174] In this embodiment, the parameter values ​​of the image enhancement algorithm are obtained in real time based on illumination feature data and target interference element weights. This makes the technical solution provided in this embodiment more adaptable to illumination correction of the image to be detected under different lighting scenarios. When the image detection event is face liveness detection, the technical solution provided in this embodiment can improve the accuracy and reliability of face liveness detection under different lighting scenarios.

[0175] See Figure 4 , Figure 4 This is a structural diagram of the image processing apparatus provided in an embodiment of this application. Figure 3 As shown, the image processing apparatus includes:

[0176] The first module 401 is used to acquire multiple illumination feature data of the image to be detected;

[0177] The second module 402 is used to perform root cause analysis on the illumination feature data and obtain the target interference element weight corresponding to each illumination feature data. The target interference element weight is used to indicate the impact of image detection event detection failure.

[0178] The third module 403 is used to obtain the parameter values ​​corresponding to the image enhancement algorithm based on the illumination feature data and the target interference element weights;

[0179] The fourth module 404 is used to perform illumination adaptive correction on the image to be detected based on the parameter values ​​and the image enhancement algorithm.

[0180] Optionally, the second module 402 is further configured to use a Bayesian network to detect the impact of each of the illumination feature data on the failure of the image detection event, and to obtain the weight of the first interference element corresponding to each of the illumination feature data.

[0181] Using a graph neural network, the higher-order interaction effects between the illumination feature data are captured, and the weight of the second interference element corresponding to each illumination feature data is obtained.

[0182] Using a decision tree model, the importance weight of each of the illumination feature data is calculated, and the weight of the third interference element corresponding to each of the illumination feature data is obtained.

[0183] Based on the first interference element weight, the second interference element weight, and the third interference element weight, the target interference element weight corresponding to each illumination feature data is obtained.

[0184] Optionally, the third module 403 is further configured to obtain the parameter values ​​corresponding to the image enhancement algorithm by using a reinforcement learning algorithm based on the illumination feature data and the target interference element weights.

[0185] Optionally, the third module 403 is further configured to, when the image enhancement algorithm includes Retinex, CLAHE and Gamma correction, respectively obtain the enhancement parameter value set of Retinex, the clip limit parameter value set of CLAHE, the tile grid size parameter value set of CLAHE and the coefficient value set of Gamma correction;

[0186] A reward function is set based on the degree of improvement in the success rate of the image detection event.

[0187] Based on the illumination feature data, the target interference element weights, and the reward function, a reinforcement learning algorithm is used to obtain the target enhancement parameters, target clipLimit parameters, target tileGridSiz parameters, and target coefficient values ​​from the enhancement parameter value set of Retinex, the clipLimit parameter value set of CLAHE, the tileGridSiz parameter value set of CLAHE, and the coefficient value set of Gamma correction, respectively, as the parameter values ​​corresponding to the image enhancement algorithm.

[0188] Optionally, the first module 401 is further configured to use image processing technology to extract multiple illumination feature data from the image to be detected; or,

[0189] The ambient light intensity of the image to be detected is measured by an independent photoelectric sensor, and multiple illumination feature data of the image to be detected are obtained based on the ambient light intensity.

[0190] Optionally, the illumination feature data includes: global brightness, grayscale contrast, shadow coverage, and illumination depth feature values ​​at multiple scales.

[0191] The image processing apparatus provided in this application embodiment can execute the above-described image processing method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.

[0192] In this embodiment, the parameter values ​​of the image enhancement algorithm are obtained in real time based on illumination feature data and target interference element weights. This makes the technical solution provided in this embodiment more adaptable to illumination correction of the image to be detected under different lighting scenarios. When the image detection event is face liveness detection, the technical solution provided in this embodiment can improve the accuracy and reliability of face liveness detection under different lighting scenarios.

[0193] It should be noted that the division of units in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.

[0194] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0195] This application provides a communication device, including: a memory, a processor, and a program stored in the memory and executable on the processor; the processor is configured to read the program in the memory to implement the steps in the image processing method described above.

[0196] This application also provides a readable storage medium storing a program. When executed by a processor, this program implements the various processes of the above-described image processing method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).

[0197] This application also provides a computer program product, including computer instructions. When executed by a processor, the computer instructions implement the various processes of the above-described image processing method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0198] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0199] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0200] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An image processing method, characterized in that, include: Acquire multiple illumination feature data of the image to be detected; Root cause analysis is performed on the illumination feature data to obtain the target interference element weight corresponding to each illumination feature data. The target interference element weight is used to indicate the impact of image detection event detection failure. Based on the illumination feature data and the target interference element weights, obtain the parameter values ​​corresponding to the image enhancement algorithm; Based on the parameter values, the image enhancement algorithm is used to perform illumination adaptive correction on the image to be detected.

2. The method according to claim 1, characterized in that, When the root cause analysis includes Bayesian inference, graph neural network inference, and decision tree inference, the step of performing root cause analysis on the illumination feature data to obtain the target interference element weights corresponding to each illumination feature data includes: Using a Bayesian network, the impact of each illumination feature data on the failure of the image detection event is detected, and the weight of the first interference element corresponding to each illumination feature data is obtained. Using a graph neural network, the higher-order interaction effects between the illumination feature data are captured, and the weight of the second interference element corresponding to each illumination feature data is obtained. Using a decision tree model, the importance weight of each of the illumination feature data is calculated, and the weight of the third interference element corresponding to each of the illumination feature data is obtained. Based on the first interference element weight, the second interference element weight, and the third interference element weight, the target interference element weight corresponding to each illumination feature data is obtained.

3. The method according to claim 1, characterized in that, The step of obtaining the parameter values ​​corresponding to the image enhancement algorithm based on the illumination feature data and the target interference element weights includes: Based on the illumination feature data and the target interference element weights, a reinforcement learning algorithm is used to obtain the parameter values ​​corresponding to the image enhancement algorithm.

4. The method according to claim 3, characterized in that, When the image enhancement algorithm includes Retinex (retina-cortex theory), CLAHE (contrast-limited adaptive histogram equalization), and gamma correction, the step of obtaining the parameter values ​​corresponding to the image enhancement algorithm using a reinforcement learning algorithm based on the illumination feature data and the target interference element weights includes: Obtain the set of enhancement parameters for Retinex, the set of clipLimit parameters for CLAHE, the set of tileGridSiz parameters for CLAHE, and the set of coefficients for Gamma correction, respectively. A reward function is set based on the degree of improvement in the success rate of the image detection event. Based on the illumination feature data, the target interference element weights, and the reward function, a reinforcement learning algorithm is used to obtain the target enhancement parameters, target clipLimit parameters, target tileGridSiz parameters, and target coefficient values ​​from the enhancement parameter value set of Retinex, the clipLimit parameter value set of CLAHE, the tileGridSiz parameter value set of CLAHE, and the coefficient value set of Gamma correction, respectively, as the parameter values ​​corresponding to the image enhancement algorithm.

5. The method according to claim 1, characterized in that, The acquisition of multiple illumination feature data of the image to be detected includes: Image processing techniques are used to extract multiple illumination feature data from the image to be detected; or, The ambient light intensity of the image to be detected is measured by an independent photoelectric sensor, and multiple illumination feature data of the image to be detected are obtained based on the ambient light intensity.

6. The method according to any one of claims 1-5, characterized in that, The illumination feature data includes: global brightness, grayscale contrast, shadow coverage, and illumination depth feature values ​​at multiple scales.

7. An image processing apparatus, characterized in that, include: The first module is used to acquire multiple illumination feature data of the image to be detected; The second module is used to perform root cause analysis on the illumination feature data and obtain the target interference element weight corresponding to each illumination feature data. The target interference element weight is used to indicate the impact of image detection event detection failure. The third module is used to obtain the parameter values ​​corresponding to the image enhancement algorithm based on the illumination feature data and the target interference element weights; The fourth module is used to perform illumination adaptive correction on the image to be detected based on the parameter values ​​and the image enhancement algorithm.

8. A communication device, comprising: A memory, a processor, and a program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program in the memory to implement the steps of the image processing method as described in any one of claims 1 to 6.

9. A computer-readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps of the image processing method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps in the image processing method as described in any one of claims 1 to 6.