Face recognition algorithm adaptive to illumination change

Through the face recognition algorithm that adapts to illumination changes, Gaussian filtering, adaptive histogram equalization and deep learning methods are used to solve the problem of recognition failure of traditional face recognition technology under variable lighting conditions, and real-time and accurate recognition effects under different lighting conditions are achieved.

CN119942622AInactive Publication Date: 2025-05-06BEIJING ZHONGSHITONG TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

Traditional facial recognition technology is difficult to adapt to the changing natural lighting conditions, resulting in the failure of recognition, limiting its widespread application.

Method used

Adaptive lighting changes are used to reduce lighting noise through Gaussian filtering, and the global lighting conditions are estimated through adaptive histogram equalization. Deep learning methods are used to extract lighting robustness features, and multiple lighting data sets are introduced for data augmentation training.

Benefits of technology

It realizes real-time and accurate recognition of face features under different lighting conditions, significantly improving the robustness and adaptability of the face recognition system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119942622A_ABST
    Figure CN119942622A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of face recognition, and particularly relates to a face recognition algorithm adaptive to illumination variation, which uses Gaussian filtering to reduce noise caused by illumination variation, convert a color image into a grey-scale image, reduce calculation complexity, perform adaptive histogram equalization, estimate global illumination conditions in the image and improve the face recognition accuracy. Calculating the main direction and intensity of illumination in the image, predicting the current illumination condition, and enabling the image brightness to adapt to different environment illumination; identifying a face region in the image, using a deep learning method to position face related points, using an LBP to extract local features insensitive to illumination variation, and using a deep convolutional neural network to extract global features; introducing a multi-illumination data set; the Euclidean distance is used for comparing the extracted feature vectors, the similarity between the extracted feature vectors and known faces in a database is recognized, according to the similarity score, threshold judgment is adopted for AQW to obtain a final recognition decision, and the method has the effect of being capable of accurately adapting to facial features under different illumination conditions in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of face recognition, and in particular to a face recognition algorithm that is adaptive to illumination changes. Background Art

[0002] In a challenging field of face recognition technology, traditional facial recognition methods often rely on fixed or limited lighting conditions, which are often difficult to meet in real-world environments. Especially under changing natural lighting conditions, such as different time periods indoors, different weather conditions outdoors, and even flickering lights, these factors can cause face recognition to fail, greatly limiting its widespread application. Traditional algorithms usually compensate for lighting by using complex preprocessing methods, such as adjusting contrast, brightness, or using color correction techniques. However, these methods often depend on specific circumstances, are time-consuming, and are difficult to apply in real time, especially in dynamic environments.

[0003] With the rapid development of smart devices and computer vision technology, the demand for face recognition algorithms that can adapt to a variety of lighting conditions is increasing. An adaptive face recognition algorithm for lighting changes has emerged, which can automatically adjust algorithm parameters according to lighting changes in the environment to achieve the best recognition effect. This algorithm can effectively solve the problem of recognition failure caused by lighting changes while maintaining computational efficiency, significantly improving the robustness of the face recognition system. Through innovative technical means, the algorithm can adapt to facial features under different lighting conditions in real time and accurately, providing operability for the application of facial recognition technology in a wider range of scenarios.

[0004] In response to the above technical defects, a face recognition algorithm solution with adaptive illumination changes is proposed. Summary of the invention

[0005] To solve the above problems, the present invention provides the following technical solutions: A face recognition algorithm that is adaptive to illumination changes, comprising: Use Gaussian filtering to reduce the noise caused by illumination changes, convert color images into grayscale images, and reduce computational complexity; Based on the brightness of the local area, use adaptive histogram equalization to estimate the global lighting conditions in the image. By calculating the main direction and intensity of the lighting in the image, predict the current lighting conditions. Based on the lighting estimation, apply adaptive brightness adjustment to adapt the image brightness to different ambient lighting conditions. Identify the face area in the image and use deep learning methods to locate facial related points. Use LBP to extract local features that are insensitive to illumination changes, and use deep convolutional neural networks to extract global features; Introducing multi-illumination datasets, training models through data enhancement, and using deep learning technology, training models to recognize facial features under different illuminations. By adding an illumination normalization layer to the network structure, the illumination changes in the input image are automatically corrected. The extracted feature vectors are compared using Euclidean distance to identify the similarity with known faces in the database. Based on the similarity score, a threshold is used to make the final recognition decision.

[0006] Furthermore, the use of Gaussian filtering to reduce noise caused by illumination changes includes obtaining a color image to be processed, setting it to RGB format, selecting the size and standard deviation of the Gaussian kernel, selecting an appropriate Gaussian kernel size and standard deviation based on the resolution and noise level of the image, calculating the Gaussian weight of each position based on the selected kernel size and σ, forming a two-dimensional Gaussian matrix, convolving the Gaussian kernel with the image pixel by pixel, calculating a new value for each pixel, smoothing the image, and reducing noise. When the input image is color, performing Gaussian filtering on each color channel separately, converting the smoothed color image into a grayscale image: applying the selected grayscale conversion method to the smoothed color image by weighted averaging, equal-weighted averaging, maximum value method, and minimum value method, calculating the grayscale value of each pixel, and obtaining a grayscale image, and using the grayscale image as input for subsequent processing for further analysis and recognition tasks.

[0007] Furthermore, the use of adaptive histogram equalization based on the brightness of the local area includes dividing the input image into multiple local areas so as to process the brightness information of each area separately, applying histogram equalization to each local area to enhance the contrast of the area and reduce the impact of lighting changes, calculating the brightness statistics of each local area, such as average brightness and standard deviation, for subsequent lighting estimation, and estimating the global lighting conditions of the entire image by integrating the brightness information of all local areas, including analyzing the direction and intensity of the lighting to infer the overall lighting distribution.

[0008] Furthermore, the use of adaptive histogram equalization based on the brightness of the local area also includes using the gradient, edge or other features of the image to calculate the main direction and intensity of the lighting, further refining the estimation of the lighting conditions, and predicting the current lighting state based on the estimated global illumination parameters, involving a machine learning model or a rule-based reasoning method, and adjusting the brightness of the image according to the predicted lighting conditions, including global brightness correction or local brightness compensation, so that the image maintains a consistent brightness level in different lighting environments, and using the brightness-adjusted image for subsequent face recognition or other image processing tasks to improve the accuracy and robustness of the processing.

[0009] Furthermore, the use of LBP to extract local features that are insensitive to illumination changes encodes the texture information of the image into a binary string by comparing the brightness of a pixel with its surrounding pixels, thereby capturing the texture features in the image. A pixel is selected as the center point through local relative brightness changes rather than absolute brightness values, and the brightness of the center point is compared with that of the surrounding pixels to generate a binary string. The binary string is converted into a decimal number as the LBP value of the center point, and the entire image is traversed to generate an LBP feature map. A deep convolutional neural network extracts global features. Through multi-layer convolution and pooling operations, high-level features of the image are automatically extracted, and the structure and shape information of the entire image can be captured. The input image is preprocessed by normalization and resizing to meet the input requirements of CNN, and a suitable CNN network structure is designed, including convolutional layers, pooling layers, activation functions and fully connected layers. CNN is trained using annotated data sets, and network parameters are optimized so that it can effectively extract global features. The processed image is input into the trained CNN model to extract its global features.

[0010] Furthermore, the introduction of multi-illumination datasets, training models through data enhancement, and utilizing deep learning techniques include obtaining a facial image dataset containing multiple illumination conditions to ensure the diversity and balance of the dataset, covering various illumination changes, checking data quality, removing blurred, unclear, or extremely abnormal illumination images, ensuring data reliability, adjusting the brightness, contrast, saturation, and color temperature of the original images, simulating images under different illumination conditions, applying random cropping, rotation, and flipping geometric transformations to increase data diversity, adding Gaussian noise and salt and pepper noise to the images to simulate noise interference in real scenes, generating a large number of enhanced images through the above-mentioned enhancement methods, expanding the dataset size, and improving the generalization ability of the model, selecting deep learning models suitable for image recognition tasks, such as ResNet, VGG, and Inception, and introducing illumination normalization in the model. Layer, used to standardize the illumination of the input image, adjust the brightness and contrast of the image, etc., so that images under different illumination conditions have similar illumination characteristics to some extent, adjust the overall brightness of the image according to the average brightness of the image to make it close to a certain benchmark value, adjust the contrast of the image, enhance or weaken the contrast of the image to adapt it to the input requirements of the model, convert the image to different color spaces, and make more detailed illumination adjustments, design or select a suitable feature extraction layer to extract facial features that are not related to illumination changes, select a suitable loss function, such as cross entropy loss, mean square error, etc., to measure the difference between the model output and the true label, select a suitable optimizer, such as Adam, SGD, to update the model parameters, minimize the loss function, determine the learning rate, batch size, number of training rounds and other hyperparameters, to ensure that the model effectively learns features while avoiding overfitting.

[0011] According to one aspect of the present invention, there is provided a face recognition system that is adaptive to illumination changes, comprising: Image acquisition module: used to collect original images or video streams containing faces; Lighting preprocessing module: performs lighting compensation and noise suppression on the original image, eliminates lighting unevenness based on histogram equalization or Retinex algorithm, and dynamically adjusts the contrast according to the brightness of the local area of ​​the image; Feature extraction module: uses deep convolutional neural network to extract lighting-robust facial features; Dynamic adjustment module: dynamically optimizes preprocessing parameters and feature extraction weights according to real-time ambient lighting conditions; Face database: stores face feature templates under standard lighting conditions; Recognition module: matches the extracted features with the templates in the database and outputs the recognition results.

[0012] Furthermore, the illumination preprocessing module includes decomposing the image into low-frequency illumination components and high-frequency detail components, and performing enhancement and denoising respectively. The adaptive parameter adjustment formula is as follows: , in, is the local contrast enhancement coefficient, is the pixel brightness, is the overall brightness mean of the image, is the adaptive adjustment factor; Jointly train face recognition tasks and illumination condition classification tasks, and generate illumination-independent deep features through adversarial training; The dynamic feature fusion formula is as follows: , in, Output features, is the global face feature, is the local detail feature, is the fusion weight related to the light intensity.

[0013] According to one aspect of the present invention, there is provided a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned face recognition algorithm for adaptive illumination changes when executing the computer program.

[0014] According to one aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the above-mentioned face recognition algorithm for adaptive illumination changes are implemented.

[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. In the face recognition algorithm of the present invention that is adaptive to illumination changes, Gaussian filtering is used to reduce the noise caused by illumination changes, and the color image is converted into a grayscale image to reduce the computational complexity; adaptive histogram equalization is used to estimate the global illumination conditions in the image, and the current illumination conditions are predicted by calculating the main direction and intensity of the illumination in the image, so that the image brightness can adapt to different ambient illuminations; the face area in the image is identified, and the face-related points are located using a deep learning method, and local features that are insensitive to illumination changes are extracted using LBP, and global features are extracted using a deep convolutional neural network; a multi-illumination data set is introduced; the extracted feature vectors are compared using the Euclidean distance to identify the similarity between the features and the known faces in the database, and the final recognition decision is made using a threshold judgment based on the similarity score, which has the effect of being able to adapt to facial features under different illumination conditions in real time and accurately.

[0016] 2. In the face recognition algorithm of the present invention that is self-adaptive to illumination changes, an image acquisition module is used to collect original images or video streams containing faces; an illumination preprocessing module is used to perform illumination compensation and noise suppression on the original image, eliminate illumination non-uniformity based on histogram equalization or Retinex algorithm, and dynamically adjust the contrast according to the brightness of the local area of ​​the image; a feature extraction module is used to extract illumination-robust facial features using a deep convolutional neural network; a dynamic adjustment module is used to dynamically optimize preprocessing parameters and feature extraction weights according to real-time ambient illumination conditions; a face database is used to store facial feature templates under standard illumination conditions; and a recognition module is used to perform similarity matching between the extracted features and the templates in the database and output recognition results, which has the effect of widely applying facial recognition and intelligently supervising it. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to facilitate understanding by those skilled in the art, the present invention is further described below in conjunction with the accompanying drawings; Figure 1 It is a schematic diagram of the overall framework of the face recognition algorithm of the present invention that is adaptive to illumination changes; Figure 2 A schematic diagram of the process of the face recognition system that is adaptive to illumination changes of the present invention; Figure 3 A schematic diagram of a computer device in the face recognition system that is adaptive to illumination changes of the present invention. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] like Figure 1-Figure 3 As shown, the present application provides a face recognition algorithm that is adaptive to illumination changes, including: S1: Use Gaussian filtering to reduce the noise caused by illumination changes, convert color images into grayscale images, and reduce computational complexity; S2: Based on the brightness of the local area, use adaptive histogram equalization to estimate the global illumination conditions in the image, predict the current illumination conditions by calculating the main direction and intensity of the illumination in the image, and apply adaptive brightness adjustment based on the illumination estimation to adapt the image brightness to different ambient lighting conditions; S3: Identify the face area in the image and locate the facial related points using deep learning methods. S4: Use LBP to extract local features that are insensitive to illumination changes, and use deep convolutional neural networks to extract global features; S5: Introduce a multi-illumination dataset, train the model through data enhancement, use deep learning technology to train the model to recognize facial features under different illuminations, and automatically correct illumination changes in the input image by adding an illumination normalization layer to the network structure; S6: Use Euclidean distance to compare the extracted feature vectors to identify the similarity with known faces in the database, and use threshold judgment to make the final recognition decision based on the similarity score.

[0020] Specifically, the use of Gaussian filtering to reduce noise caused by illumination changes includes obtaining a color image to be processed, setting it to RGB format, selecting the size and standard deviation of the Gaussian kernel, selecting an appropriate Gaussian kernel size and standard deviation according to the resolution and noise level of the image, calculating the Gaussian weight of each position according to the selected kernel size and σ, forming a two-dimensional Gaussian matrix, convolving the Gaussian kernel with the image pixel by pixel, calculating the new value of each pixel, smoothing the image, reducing noise, and when the input image is color, performing Gaussian filtering on each color channel respectively, converting the smoothed color image into a grayscale image: applying the selected grayscale conversion method to the smoothed color image through weighted averaging, equal weighted averaging, maximum value method and minimum value method, calculating the grayscale value of each pixel, obtaining a grayscale image, and using the grayscale image as input for subsequent processing for specific analysis and recognition tasks.

[0021] Specifically, the method of using adaptive histogram equalization based on the brightness of local areas includes dividing the input image into multiple local areas so as to process the brightness information of each area separately, applying histogram equalization to each local area to enhance the contrast of the area and reduce the impact of lighting changes, calculating the brightness statistics of each local area, such as average brightness and standard deviation, for subsequent lighting estimation, and estimating the global lighting conditions of the entire image by integrating the brightness information of all local areas, including analyzing the direction and intensity of the lighting to infer the overall lighting distribution.

[0022] Specifically, the use of adaptive histogram equalization based on the brightness of the local area also includes using the gradient, edge or other features of the image to calculate the main direction and intensity of the lighting, specifically refining the estimation of the lighting conditions, and predicting the current lighting state based on the estimated global illumination parameters, involving a machine learning model or a rule-based reasoning method, and adjusting the brightness of the image according to the predicted lighting conditions, including global brightness correction or local brightness compensation, so that the image maintains a consistent brightness level in different lighting environments, and using the brightness-adjusted image for subsequent face recognition or other image processing tasks to improve the accuracy and robustness of the processing.

[0023] Specifically, the use of LBP to extract local features that are insensitive to illumination changes encodes the texture information of the image into a binary string by comparing the brightness of a pixel with its surrounding pixels, thereby capturing the texture features in the image, and selecting a pixel as the center point through local relative brightness changes rather than absolute brightness values, and comparing the brightness of the center point with surrounding pixels to generate a binary string, converting the binary string into a decimal number as the LBP value of the center point, traversing the entire image, and generating an LBP feature map, and a deep convolutional neural network extracts global features, and automatically extracts high-level features of the image through multi-layer convolution and pooling operations, and can capture the structure and shape information of the entire image, and performs preprocessing such as normalization and resizing on the input image to meet the input requirements of CNN, and designs a suitable CNN network structure, including convolutional layers, pooling layers, activation functions, and fully connected layers, and uses a labeled data set to train CNN, optimize network parameters, so that it can effectively extract global features, and input the processed image into the trained CNN model to extract its global features.

[0024] Specifically, the introduction of multi-illumination datasets, training models through data enhancement, and the use of deep learning technology include obtaining a face image dataset containing multiple illumination conditions to ensure the diversity and balance of the dataset, covering various illumination changes, checking data quality, removing blurred, unclear or extremely abnormal illumination images, ensuring data reliability, adjusting the brightness, contrast, saturation, and color temperature of the original images, simulating images under different illumination conditions, applying random cropping, rotation, and flipping geometric transformations to increase data diversity, adding Gaussian noise and salt and pepper noise to the images to simulate noise interference in real scenes, generating a large number of enhanced images through the above-mentioned enhancement methods, expanding the scale of the dataset, and improving the generalization ability of the model. A deep learning model suitable for image recognition tasks, such as ResNet, VGG, and Inception, is selected, and illumination normalization is introduced into the model. Layer, used to standardize the illumination of the input image, adjust the brightness and contrast of the image, etc., so that images under different illumination conditions have similar illumination characteristics to some extent, adjust the overall brightness of the image according to the average brightness of the image to make it close to a certain benchmark value, adjust the contrast of the image, enhance or weaken the contrast of the image to adapt it to the input requirements of the model, convert the image to different color spaces, and make more detailed illumination adjustments, design or select a suitable feature extraction layer to extract facial features that are not related to illumination changes, select a suitable loss function, such as cross entropy loss, mean square error, etc., to measure the difference between the model output and the true label, select a suitable optimizer, such as Adam, SGD, to update the model parameters, minimize the loss function, determine the learning rate, batch size, number of training rounds and other hyperparameters, to ensure that the model effectively learns features while avoiding overfitting.

[0025] In one embodiment, the enhanced data is input into the model, forward propagated, and the output is calculated.

[0026] Calculate the loss function to evaluate the model performance.

[0027] Back propagation, updating model parameters.

[0028] Repeat the above steps until the model converges or reaches the predetermined number of training rounds.

[0029] Split into validation and test sets: Split the dataset into training, validation, and test sets to ensure that the model is evaluated based on independent data.

[0030] Evaluation metrics: Use accuracy, precision, recall, F1 score, and other metrics to evaluate the performance of the model under different lighting conditions.

[0031] Analysis results: Based on the evaluation results, analyze the advantages and disadvantages of the model under different lighting conditions to guide the optimization and adjustment of the model.

[0032] Hyperparameter tuning: Optimize hyperparameters such as learning rate and batch size through grid search, random search and other methods to improve model performance.

[0033] Model structure adjustment: According to the evaluation results, adjust the model structure, such as adding or reducing certain layers, improving the design of the illumination normalization layer, and improving the adaptability of the model.

[0034] Data enhancement strategy adjustment: According to the model performance, adjust the data enhancement strategy, increase or decrease certain enhancement methods, and ensure the effectiveness of data enhancement.

[0035] Model compression and optimization: compress and optimize the trained model to reduce the storage and computing requirements of the model and adapt it to the actual application environment.

[0036] Real-time application: Deploy the model to actual applications, process real-time input images, and perform facial feature recognition and lighting correction.

[0037] Monitoring and feedback: In practical applications, the performance of the model is continuously monitored and feedback data is collected for further optimization and updating of the model.

[0038] Data update: Regularly update the dataset, add more images under more lighting conditions, and improve the adaptability of the model.

[0039] Algorithm improvement: Track the latest deep learning algorithms and technologies, improve model structure and training methods, and enhance model performance and robustness.

[0040] User feedback: Collect user feedback to understand the performance and requirements of the model in actual applications and guide further optimization and improvement.

[0041] Through the above steps, we can effectively utilize multi-illumination datasets and data augmentation techniques, combine deep learning models and illumination normalization layers, and train a model that can adapt to different illumination conditions and accurately recognize facial features. This not only improves the generalization ability of the model, but also enhances its stability and reliability in practical applications.

[0042] According to one aspect of the present invention, there is provided a face recognition system that is adaptive to illumination changes, comprising: Image acquisition module: used to collect original images or video streams containing faces; Lighting preprocessing module: performs lighting compensation and noise suppression on the original image, eliminates lighting unevenness based on histogram equalization or Retinex algorithm, and dynamically adjusts the contrast according to the brightness of the local area of ​​the image; Feature extraction module: uses deep convolutional neural network to extract lighting-robust facial features; Dynamic adjustment module: dynamically optimizes preprocessing parameters and feature extraction weights according to real-time ambient lighting conditions; Face database: stores face feature templates under standard lighting conditions; Recognition module: matches the extracted features with the templates in the database and outputs the recognition results.

[0043] In one embodiment, data preparation and collection: Collect multi-lighting datasets: Obtain a dataset of face images under various lighting conditions (e.g., indoors, outdoors, at different time periods, and with different light sources). Ensure that the dataset is diverse and balanced, covering a variety of lighting changes.

[0044] Data cleaning: Check data quality and remove blurry, unclear or extremely abnormal lighting images to ensure data reliability.

[0045] Data Augmentation: Image adjustment: adjust the brightness, contrast, saturation, color temperature, etc. of the original image to simulate images under different lighting conditions.

[0046] Geometric transformation: Apply geometric transformations such as random cropping, rotation, and flipping to increase the diversity of the data.

[0047] Noise addition: Add Gaussian noise, salt and pepper noise, etc. to the image to simulate noise interference in real scenes.

[0048] Data expansion: Through the above enhancement methods, a large number of enhanced images are generated to expand the size of the data set and improve the generalization ability of the model.

[0049] Model design: Choose a network architecture: Choose a deep learning model suitable for image recognition tasks, such as ResNet, VGG, Inception, etc. These models have powerful feature extraction capabilities and are suitable for handling complex lighting changes.

[0050] Adding an illumination normalization layer: Introduce an illumination normalization layer in the model to normalize the illumination of the input image. This layer can adjust the brightness, contrast, etc. of the image so that images under different lighting conditions have similar illumination characteristics to some extent. Specific implementations may include: Brightness adjustment: According to the average brightness of the image, adjust the overall brightness of the image to make it close to a certain reference value.

[0051] Contrast adjustment: Adjust the contrast of the image to enhance or weaken the contrast of the image to adapt it to the input requirements of the model.

[0052] Color space conversion: Convert images to different color spaces (such as HSV, LAB) for more detailed lighting adjustments.

[0053] Feature extraction layer: Design or select a suitable feature extraction layer to extract facial features that are independent of lighting changes. These features should be highly robust and stable under different lighting conditions.

[0054] Model training: Define the loss function: Choose an appropriate loss function, such as cross entropy loss, mean square error, etc., to measure the difference between the model output and the true label. The loss function should be able to reflect the performance of the model under different lighting conditions.

[0055] Select optimizer: Choose a suitable optimizer, such as Adam, SGD, etc., to update model parameters and minimize the loss function.

[0056] Set training parameters: Determine hyperparameters such as learning rate, batch size, and number of training rounds to ensure that the model can effectively learn features while avoiding overfitting.

[0057] Training process: The enhanced data is input into the model, forward propagated, and the output is calculated.

[0058] Calculate the loss function to evaluate the model performance.

[0059] Back propagation, updating model parameters.

[0060] Repeat the above steps until the model converges or reaches the predetermined number of training rounds.

[0061] Model Evaluation: Split into validation and test sets: Split the dataset into training, validation, and test sets to ensure that the model is evaluated based on independent data.

[0062] Evaluation metrics: Use accuracy, precision, recall, F1 score, and other metrics to evaluate the performance of the model under different lighting conditions.

[0063] Analysis results: Based on the evaluation results, analyze the advantages and disadvantages of the model under different lighting conditions to guide the optimization and adjustment of the model.

[0064] Model optimization and adjustment; Hyperparameter tuning: Optimize hyperparameters such as learning rate and batch size through grid search, random search and other methods to improve model performance.

[0065] Model structure adjustment: According to the evaluation results, adjust the model structure, such as adding or reducing certain layers, improving the design of the illumination normalization layer, and improving the adaptability of the model.

[0066] Data enhancement strategy adjustment: According to the model performance, adjust the data enhancement strategy, increase or decrease certain enhancement methods, and ensure the effectiveness of data enhancement.

[0067] Model deployment and application; Model compression and optimization: compress and optimize the trained model to reduce the storage and computing requirements of the model and adapt it to the actual application environment.

[0068] Real-time application: Deploy the model to actual applications, process real-time input images, and perform facial feature recognition and lighting correction.

[0069] Monitoring and feedback: In practical applications, the performance of the model is continuously monitored and feedback data is collected for further optimization and updating of the model.

[0070] Continuous Improvement: Data update: Regularly update the dataset, add more images under more lighting conditions, and improve the adaptability of the model.

[0071] Algorithm improvement: Track the latest deep learning algorithms and technologies, improve model structure and training methods, and enhance model performance and robustness.

[0072] User feedback: Collect user feedback to understand the performance and requirements of the model in actual applications and guide further optimization and improvement.

[0073] Through the above steps, we can effectively utilize multi-illumination datasets and data augmentation techniques, combine deep learning models and illumination normalization layers, and train a model that can adapt to different illumination conditions and accurately recognize facial features. This not only improves the generalization ability of the model, but also enhances its stability and reliability in practical applications.

[0074] Specifically, the illumination preprocessing module includes decomposing the image into low-frequency illumination components and high-frequency detail components, and performing enhancement and denoising respectively. The adaptive parameter adjustment formula is as follows: , in, is the local contrast enhancement coefficient, is the pixel brightness, is the overall brightness mean of the image, is the adaptive adjustment factor; Jointly train face recognition tasks and illumination condition classification tasks, and generate illumination-independent deep features through adversarial training; The dynamic feature fusion formula is as follows: , in, Output features, is the global face feature, is the local detail feature, is the fusion weight related to the light intensity.

[0075] In a face recognition algorithm that is adaptive to illumination changes, the present application uses Gaussian filtering to reduce noise caused by illumination changes, converts color images into grayscale images, and reduces computational complexity; adaptive histogram equalization is used to estimate global illumination conditions in the image, and the current illumination conditions are predicted by calculating the main direction and intensity of illumination in the image, so that the image brightness adapts to different ambient illuminations; the face area in the image is identified, and a deep learning method is used to locate facial related points, and local features that are insensitive to illumination changes are extracted using LBP, and global features are extracted using a deep convolutional neural network; a multi-illumination data set is introduced; the extracted feature vectors are compared using Euclidean distance to identify the similarity between the features and the known faces in the database, and a threshold judgment is used to make a final recognition decision based on the similarity score, so as to achieve the effect of being able to adapt to facial features under different illumination conditions in real time and accurately. Through the image acquisition module: used to collect original images or video streams containing faces; the illumination preprocessing module: performs illumination compensation and noise suppression on the original image, eliminates illumination unevenness based on histogram equalization or Retinex algorithm, and dynamically adjusts the contrast according to the brightness of the local area of ​​the image; the feature extraction module: uses a deep convolutional neural network to extract illumination-robust facial features; the dynamic adjustment module: dynamically optimizes preprocessing parameters and feature extraction weights according to real-time ambient lighting conditions; the face database: stores facial feature templates under standard lighting conditions; the recognition module: matches the extracted features with the templates in the database for similarity, and outputs the recognition results, which has the effect of widely applying facial recognition and intelligent supervision.

[0076] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned face recognition algorithm that is adaptive to light changes when executing the computer program.

[0077] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned face recognition algorithm for adaptive illumination changes are implemented.

[0078] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0079] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0080] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A face recognition algorithm that is adaptive to illumination changes, characterized in that: include: Use Gaussian filtering to reduce the noise caused by illumination changes, convert color images into grayscale images, and reduce computational complexity; Based on the brightness of the local area, adaptive histogram equalization is used to estimate the global illumination conditions in the image. The current illumination conditions are predicted by calculating the main direction and intensity of the illumination in the image. Based on the illumination estimation, adaptive brightness adjustment is applied to adapt the image brightness to different ambient lighting conditions. Identify the face area in the image and use deep learning methods to locate facial related points. Use LBP to extract local features that are insensitive to illumination changes, and use deep convolutional neural networks to extract global features; Introducing multi-illumination datasets, training models through data enhancement, and using deep learning technology, training models to recognize facial features under different illuminations. By adding an illumination normalization layer to the network structure, the illumination changes in the input image are automatically corrected. The extracted feature vectors are compared using Euclidean distance to identify the similarity with known faces in the database. Based on the similarity score, a threshold is used to make the final recognition decision.

2. The face recognition algorithm according to claim 1, characterized in that: The method of using Gaussian filtering to reduce noise caused by illumination changes includes obtaining a color image to be processed, setting it to RGB format, selecting the size and standard deviation of the Gaussian kernel, selecting the Gaussian kernel size and standard deviation according to the resolution and noise level of the image, calculating the Gaussian weight of each position according to the selected kernel size and σ, forming a two-dimensional Gaussian matrix, convolving the Gaussian kernel with the image pixel by pixel, calculating the new value of each pixel, smoothing the image, reducing noise, and when the input image is color, performing Gaussian filtering on each color channel respectively, converting the smoothed color image into a grayscale image: applying the selected grayscale conversion method to the smoothed color image through weighted averaging, equal weighted averaging, maximum value method and minimum value method, calculating the grayscale value of each pixel, obtaining a grayscale image, and using the grayscale image as input for subsequent processing for further analysis and recognition tasks.

3. The face recognition algorithm according to claim 2, characterized in that: The method of using adaptive histogram equalization according to the brightness of local areas includes dividing the input image into multiple local areas so as to process the brightness information of each area separately, applying histogram equalization to each local area to enhance the contrast of the area and reduce the impact of lighting changes, calculating the brightness statistics of each local area, including the average brightness and standard deviation, for subsequent lighting estimation, and estimating the global lighting conditions of the entire image by integrating the brightness information of all local areas, including analyzing the direction and intensity of the lighting to infer the overall lighting distribution.

4. The face recognition algorithm according to claim 3, characterized in that: The use of adaptive histogram equalization based on the brightness of the local area also includes using the gradient, edge or other features of the image to calculate the main direction and intensity of the lighting, refine the estimation of the lighting conditions, and predict the current lighting state based on the estimated global lighting parameters, involving a machine learning model or a rule-based reasoning method, and adjusting the brightness of the image according to the predicted lighting conditions, including global brightness correction or local brightness compensation, so that the image maintains a consistent brightness level under different lighting environments, and using the brightness-adjusted image for subsequent face recognition or other image processing tasks to improve the accuracy and robustness of the processing.

5. The face recognition algorithm according to claim 1, characterized in that: The method uses LBP to extract local features that are insensitive to illumination changes. By comparing the brightness of a pixel with its surrounding pixels, the texture information of the image is encoded into a binary string, thereby capturing the texture features in the image. A pixel is selected as the center point through local relative brightness changes rather than absolute brightness values. The brightness of the center point and surrounding pixels is compared to generate a binary string. The binary string is converted into a decimal number as the LBP value of the center point. The entire image is traversed to generate an LBP feature map. A deep convolutional neural network extracts global features. Through multi-layer convolution and pooling operations, high-level features of the image are automatically extracted to capture the structure and shape information of the entire image. The input image is normalized and resized for preprocessing to meet the input requirements of CNN. A CNN network structure is designed, including a convolutional layer, a pooling layer, an activation function and a fully connected layer. The CNN is trained using a labeled data set, the network parameters are optimized, the global features are extracted, and the processed image is input into the trained CNN model to extract the global features.

6. The face recognition algorithm according to claim 5, characterized in that: The multi-illumination dataset is introduced, and the face image dataset containing multiple illumination conditions is obtained by using the deep learning technology through the data enhancement training model to ensure the diversity and balance of the dataset, cover various illumination changes, check the data quality, remove blurry, unclear or extremely abnormal illumination images to ensure data reliability, adjust the brightness, contrast, saturation and color temperature of the original image, simulate images under different illumination conditions, and apply random cropping, rotation and flipping geometric transformations to increase the diversity of the data; Gaussian noise and salt and pepper noise are added to the image to simulate the noise interference in the real scene. A large number of enhanced images are generated through enhancement methods to expand the data set size and improve the generalization ability of the model. Deep learning models for image recognition tasks are selected, including ResNet, VGG, and Inception. An illumination normalization layer is introduced into the model to standardize the illumination of the input image and adjust the brightness and contrast of the image so that images under different lighting conditions have similar illumination characteristics to some extent. According to the average brightness of the image, adjust the overall brightness of the image and approach the benchmark value, adjust the contrast of the image, enhance or weaken the contrast of the image to adapt it to the input requirements of the model, convert the image to a different color space, make more detailed lighting adjustments, and design or select a feature extraction layer to extract facial features that are not related to lighting changes; Select loss functions, including cross entropy loss and mean square error, to measure the difference between model output and true label; select optimizers, including Adam and SGD, to update model parameters and minimize loss functions; determine learning rate, batch size, and number of training rounds hyperparameters to ensure that the model effectively learns features while avoiding overfitting.

7. A face recognition system that is adaptive to illumination changes, characterized in that: include: Image acquisition module: used to collect original images or video streams containing faces; Lighting preprocessing module: performs lighting compensation and noise suppression on the original image, eliminates lighting unevenness based on histogram equalization or Retinex algorithm, and dynamically adjusts the contrast according to the brightness of the local area of ​​the image; Feature extraction module: uses deep convolutional neural network to extract lighting-robust facial features; Dynamic adjustment module: dynamically optimizes preprocessing parameters and feature extraction weights according to real-time ambient lighting conditions; Face database: stores face feature templates under standard lighting conditions; Recognition module: matches the extracted features with the templates in the database and outputs the recognition results.

8. The face recognition system according to claim 7, characterized in that: The illumination preprocessing module includes decomposing the image into low-frequency illumination components and high-frequency detail components, and performing enhancement and denoising respectively. The adaptive parameter adjustment formula is as follows: , in, is the local contrast enhancement coefficient, is the pixel brightness, is the overall brightness mean of the image, is the adaptive adjustment factor; Jointly train face recognition tasks and illumination condition classification tasks, and generate illumination-independent deep features through adversarial training; The dynamic feature fusion formula is as follows: , in, Output features, is the global face feature, is the local detail feature, is the fusion weight related to the light intensity.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the face recognition algorithm for adaptive illumination changes according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the face recognition algorithm for adaptive illumination changes according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Face detection and recognition method, device and system

    CN108416291A

  • Face recognition method, device and system and computer readable medium

    CN108875452A

  • Efficient image processing algorithm and application thereof in face recognition

    CN116884070A

  • Forensics method for synthesized face image based on local binary pattern and deep learning

    WO2021134871A1

Cited By

  • Duck shed intelligent monitoring method and system based on image recognition

    CN120472397A

  • Identity recognition method and system based on image processing

    CN121033919A

  • An identity recognition method and system based on image processing

    CN121033919B

  • Road ecological landscape dynamic classification method and system based on landscape visual features

    CN121686114A

  • Highway ecological landscape dynamic classification method and system based on landscape visual features

    CN121686114B