A face recognition method based on artificial intelligence model
By obtaining distance and temperature information in the face image, screening the living model and calculating the similarity rate, the problem of insufficient accuracy of living detection in the prior art is solved, and efficiently distinguishing real faces from attack media is achieved, and the accuracy and reliability of face recognition are improved.
Patent Information
- Application Number
- CN202510644856.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-05-20
AI Technical Summary
In the existing face recognition system, live detection technology is easily affected by environmental conditions, the detection accuracy rate is reduced and it is easy to be deceived, making it difficult to effectively distinguish between real faces and attack media.
By obtaining the distance and temperature information between the acquisition point in the face image and the camera, setting the living attributes, filtering the living model and the non-living model, and using ultrasound and three primary colors and grayscale values to calculate the comparison data, establishing a spatial coordinate system, calculating the similarity rate and filtering the similar model, improving the accuracy of living detection.
It improves the security and reliability of the face recognition system, effectively distinguishes real faces from attack media, reduces the risk of misidentification, and enhances the accuracy and reliability of recognition.
Smart Images

Figure CN120183020B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of face recognition technology, and in particular to a face recognition method based on an artificial intelligence model. Background Art
[0002] An AI model is a mathematical model that uses machine learning algorithms to learn from training data and predict new data. It is a simplified and abstract description of a specific aspect of the real world or a specific problem to achieve a specific goal or task. AI models are composed of data, algorithms, and computing resources. Data is the foundation for model training and operation, and includes training data, validation data, and test data. Data must be sufficiently rich, accurate, and cover a wide range of possible scenarios. Algorithms are the core method used to learn features and patterns from data.
[0003] In facial recognition methods using AI models, liveness detection is the ability to distinguish between real faces and attack vectors (such as photos and videos). In facial recognition systems, liveness detection is a key step in preventing spoofing attacks. Although several liveness detection technologies have been proposed and applied, they still have limitations. For example, some liveness detection methods may be affected by environmental conditions, resulting in reduced accuracy; others can be easily deceived or bypassed.
[0004] In the existing technology, it is necessary to design a face recognition method based on an artificial intelligence model to improve the accuracy of the artificial intelligence model liveness detection technology, distinguish between real faces and attack media, and thus improve the accuracy of face recognition. Summary of the Invention
[0005] The purpose of the present invention is to provide a face recognition method based on an artificial intelligence model to solve the above technical problems.
[0006] The purpose of the present invention can be achieved through the following technical solutions:
[0007] A face recognition method based on an artificial intelligence model comprises the following steps:
[0008] S1: Capture a face image and generate a face model. Preset N collection points in the face model, obtain the distance L between the collection point and the camera and the temperature W at the collection point, and set the liveness attribute for the collection point based on the distance L and the temperature W.
[0009] S2: Screening living models and non-living models based on living body attributes, marking characteristic regions of the living models and obtaining collection points within the characteristic regions. The characteristic regions refer to the facial features of the living models, and calculating comparison data S of the collection points within the characteristic regions.
[0010] S3: Sort the feature regions in the living body model in a preset order and obtain {M1, M2, ..., M n}, where M n Represents the number of collection points in the nth feature area, and calculates the difference , if the difference C = 0, then the corresponding face model in the database is recorded as the first similarity model, where I represents the number of feature regions, MS i Represents the number of collection points in the i-th feature area of the face model in the database;
[0011] S4: Establishing a spatial coordinate system and generating a living body model and a first similar model, recording the collection points in the feature area as comparison points, and screening a second similar model based on the comparison points;
[0012] S5: Calculate the similarity K between the live model and the second similar model, select the second similar model with a similarity K greater than 90%, and sort the second similar models in descending order of similarity K. The second similar model that comes first in the sorting is the face corresponding to the live model.
[0013] As a further solution of the present invention: in step S1, setting the living body attributes for the collection point based on the distance L and the temperature W includes:
[0014] Get the current outside temperature Ws, calculate the temperature difference ΔW=W-Ws at the collection point and the mean temperature difference ΔW ave , and calculate the temperature difference ratio BW=ΔW / ΔW ave ;
[0015] Get the mean value L of the distance between the acquisition point and the camera ave , calculate the distance ratio of the collection points BL=L / L ave , set the living attribute (BW:BL) for the collection point.
[0016] As a further solution of the present invention, the steps of screening living models and non-living models based on living body attributes include:
[0017] Place the ultrasonic transmitter at the camera position, operate it at the preset power, and receive the intensity Q of the ultrasonic wave after rebound. Calculate the theoretical intensity of the ultrasonic wave after rebound. , among which BW n Represents the temperature difference ratio of the nth collection point, BL n Represents the distance ratio of the nth collection point. If the ultrasonic intensity Q after rebound is in the interval [QL-λ, QL+λ], it is recorded as a living body model, and λ represents the preset fluctuation value.
[0018] As a further solution of the present invention: in step S2, comparing the living body model with the database model to obtain comparison data includes:
[0019] Get the collection points in the feature area, which refers to the facial features and cheeks in the face model, get the red channel intensity R, green channel intensity G and blue channel intensity B of the collection points in the feature area, and calculate the comparison data , where H represents the grayscale value of the corresponding acquisition point.
[0020] As a further solution of the present invention: in the step 2, if the model is not a living body, the staff is prompted to check the object photographed by the camera.
[0021] As a further solution of the present invention: in the step S3, if the first similar model does not exist in the database, the person is marked as an outsider and identity verification is performed.
[0022] As a further solution of the present invention: in the step S4, screening the second similarity model based on the comparison points specifically includes:
[0023] The comparison point of the living model is recorded as the reference point, and the distance S between the collection point and the reference point in the first similar model in the same feature area is calculated, and the mean value S of the distance is calculated. ave , if the mean value of the distance S ave If the distance is less than a preset distance judgment value S, the corresponding first similarity model is recorded as the second similarity model.
[0024] As a further solution of the present invention: in the step S4, calculating the similarity K between the living body model and the second similar model specifically includes:
[0025] Select the comparison points of the same part in the living model and the second similar model, connect the comparison points with the origin of the spatial coordinate system and generate a feature vector, the direction of the feature vector points from the origin to the comparison point, and calculate the similarity ,in, represents the i-th eigenvector in the living model, Represents the i-th eigenvector in the second similarity model.
[0026] The beneficial effects of the present invention are as follows: the present invention screens out a living model by obtaining the distance between the collection point and the camera and the temperature at the collection point, and compares the attributes of the collection point in the characteristic area of the living model with the existing data in the database, thereby screening out the face model with the highest similarity thereto, thereby realizing a face recognition method based on an artificial intelligence model for improving the accuracy of the artificial intelligence model liveness detection technology, distinguishing between real faces and attack media, and thus improving the accuracy of face recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention will be further described below with reference to the accompanying drawings.
[0028] Figure 1 It is a flow chart of a face recognition method based on an artificial intelligence model of the present invention. DETAILED DESCRIPTION
[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making any creative efforts shall fall within the scope of protection of the present invention.
[0030] See also Figure 1 As shown, the present invention is a face recognition method based on an artificial intelligence model, comprising the following steps:
[0031] S1: Capture a face image and generate a face model. Preset N collection points in the face model, obtain the distance L between the collection point and the camera and the temperature W at the collection point, and set the liveness attribute for the collection point based on the distance L and the temperature W.
[0032] S2: Screening living models and non-living models based on living body attributes, marking characteristic regions of the living models and obtaining collection points within the characteristic regions. The characteristic regions refer to the facial features of the living models, and calculating comparison data S of the collection points within the characteristic regions.
[0033] S3: Sort the feature regions in the living body model in a preset order and obtain {M1, M2, ..., M n}, where M n Represents the number of collection points in the nth feature area, and calculates the difference , if the difference C = 0, then the corresponding face model in the database is recorded as the first similarity model, where I represents the number of feature regions, MS i Represents the number of collection points in the i-th feature area of the face model in the database;
[0034] S4: Establishing a spatial coordinate system and generating a living body model and a first similar model, recording the collection points in the feature area as comparison points, and screening a second similar model based on the comparison points;
[0035] S5: Calculate the similarity K between the live model and the second similar model, select the second similar model with a similarity K greater than 90%, and sort the second similar models in descending order of similarity K. The second similar model that comes first in the sorting is the face corresponding to the live model.
[0036] It's important to note that effectively distinguishing living individuals from non-living objects like photos and models relies heavily on the distance between the camera and the capture point. The human face possesses characteristic regions rich in information. The presence of facial features like eyes, nose, mouth, and eyebrows creates a naturally contoured surface.
[0037] This unique physiological structure means that the distance between the camera and the acquisition point is not fixed when capturing facial images. As factors such as acquisition angle, lighting conditions, and facial pose change, the camera needs to flexibly adjust the distance to the acquisition point to clearly capture every detail of the face.
[0038] As a living organism, the human body generates heat through metabolic activity. This is a fundamental characteristic of life, and this heat generation is relatively stable and detectable. Specialized thermal imaging equipment or other temperature sensors can accurately detect the distribution of heat emitted by the human body.
[0039] However, in stark contrast to the human body, a photograph is merely a two-dimensional record of a real scene. It is essentially two-dimensional image information and lacks the properties of a real physical entity, so it does not generate heat. Similarly, models, whether they are art models for exhibitions or simulation models for other purposes, are mostly made of various non-living materials and similarly lack the metabolic functions of living organisms, so they do not generate heat.
[0040] Based on these significant differences, the system can accurately identify and distinguish between living and non-living individuals based on the changing patterns of the distance between the camera and the collection point, as well as the temperature information at the collection point. This effectively ensures the security and reliability of the system and avoids potential risks and losses caused by problems such as identity impersonation.
[0041] Next, living models are screened based on their unique properties. This step not only accurately selects living models with life characteristics, but also cleverly distinguishes them from non-living models that lack life attributes.
[0042] After successfully identifying a living model, we focus on each collection point within the characteristic region and calculate the information contained in these collection points to generate valuable comparison data. When coordinating between collection points, this comparison data helps us more accurately determine the correlations and differences between them. This allows each collection point to no longer exist in isolation, but rather to connect and verify each other, forming a complete recognition system.
[0043] In terms of optimization, comparison data provides detailed information about acquisition points. By analyzing this data, we can make targeted adjustments and optimizations to these acquisition points, thereby improving the accuracy and reliability of the entire facial recognition system. To gain a deeper understanding of the unique characteristics of each acquisition point, we use two important image feature parameters, the three primary colors and grayscale value, for precise calculations.
[0044] The three primary colors, as the fundamental elements of color, can reflect the color characteristics of the collection point. Different skin tones, lighting conditions, and other factors affect the three primary color values of the collection point. By accurately measuring and analyzing these values, the three primary colors and grayscale values are combined to calculate the unique characteristics of each collection point. These unique characteristics are like the unique "fingerprint" of each face and are an important basis for determining facial similarity. In actual operation, these characteristic information of different collection points is compared one by one to quantify the degree of similarity between them. This comparison method based on multi-dimensional feature information can more accurately reflect the similarity between two faces, thereby providing more reliable and accurate results for facial recognition technology.
[0045] Next, a spatial coordinate system must be constructed to characterize the morphological and positional features of the living model and the first similar model. This spatial coordinate system allows for efficient generation of the living model and the first similar model, and intuitive comparative analysis between the models within the same coordinate framework. This simplifies the traditional recognition process and significantly improves processing efficiency by transforming complex model comparison problems into data calculations and analysis within a coordinate system.
[0046] Crucially, when establishing facial feature collection points, the comparison points should cover key facial features such as the eyes, nose, mouth, and eyebrows. These areas contain rich facial feature information and are crucial for distinguishing individual faces. By focusing on these facial feature collection points, we can not only more deeply explore subtle differences in faces, but also provide strong data support for subsequent second-level similarity model screening.
[0047] Next, the algorithm and model are used to calculate the similarity K between the live model and the second similar model. This similarity K is calculated based on an in-depth comparison and analysis of the two models across multiple dimensions, including but not limited to the shape, position, and proportion of facial features, as well as the overall characteristics of the facial contour. To ensure a basic success rate, a 90% threshold is initially set. This means that only when the similarity K between the live model and the second similar model is greater than 90% will the second similar model be considered for further screening.
[0048] This step ensures that only those second-similar models with a high degree of similarity to the living model are selected, effectively reducing the risk of misidentification. After completing the initial screening, the second-similar models are sorted in descending order based on their similarity ratio K. This sorting process is based on the principle that the higher the similarity ratio, the higher the match degree with the human face.
[0049] Therefore, the second-most similar model ranked first in the ranking, that is, the one with the highest similarity to the live model, is identified as the face corresponding to the live model. This selection method not only improves the success rate of face recognition, but also further enhances the accuracy and reliability of recognition by ensuring that the selected model is highly similar to the live model in multiple dimensions.
[0050] In another preferred embodiment of the present invention, setting the living body attributes for the collection point based on the distance L and the temperature W includes:
[0051] Get the current outside temperature Ws, calculate the temperature difference ΔW=W-Ws at the collection point and the mean temperature difference ΔW ave , and calculate the temperature difference ratio BW=ΔW / ΔW ave ;
[0052] Get the mean value L of the distance between the acquisition point and the camera ave , calculate the distance ratio of the collection points BL=L / L ave , set the living attribute (BW:BL) for the collection point.
[0053] It is worth noting that in order to effectively distinguish between living people and non-living objects such as photos and models, the human face has feature areas that are rich in information. Due to the presence of facial features such as eyes, nose, mouth and eyebrows, the surface of the face naturally presents a concave and convex contour.
[0054] This unique physiological structure means that the distance between the camera and the acquisition point is not fixed when capturing facial images. As factors such as acquisition angle, lighting conditions, and facial pose change, the camera needs to flexibly adjust the distance to the acquisition point to clearly capture every detail of the face.
[0055] The metabolic activity of the human body generates heat, and thermal imaging equipment can sense the distribution of heat emitted by the human body. However, in stark contrast to the human body, a photo is only a flat record of the real scene and therefore does not generate heat.
[0056] Based on these significant differences, the system can accurately identify and distinguish between living and non-living individuals based on the changing patterns of the distance between the camera and the collection point, as well as the temperature information at the collection point. This effectively ensures the security and reliability of the system and avoids potential risks and losses caused by problems such as identity impersonation.
[0057] In another preferred embodiment of the present invention, the step of screening living models and non-living models based on living body attributes includes:
[0058] Place the ultrasonic transmitter at the camera position, operate it at the preset power, and receive the intensity Q of the ultrasonic wave after rebound. Calculate the theoretical intensity of the ultrasonic wave after rebound. , among which BW n Represents the temperature difference ratio of the nth collection point, BL n Represents the distance ratio of the nth collection point. If the ultrasonic intensity Q after rebound is in the interval [QL-λ, QL+λ], it is recorded as a living body model, and λ represents the preset fluctuation value.
[0059] It's understandable that when ultrasound waves are used to detect living organisms, due to the specific acoustic properties of living tissue, they encounter different interfaces and tissue structures during propagation, resulting in reflection, refraction, and scattering. However, since non-living objects have relatively uniform internal structures and lack the hallmarks of life, the echo signal characteristics also differ. By comparing the echo signal characteristics of living and non-living objects, it's possible to distinguish the two. By analyzing and processing these echo signals, effective distinction and identification of living and non-living objects can be achieved.
[0060] In another preferred embodiment of the present invention, comparing the living body model with the database model to obtain comparison data includes:
[0061] Get the collection points in the feature area, which refers to the facial features and cheeks in the face model, get the red channel intensity R, green channel intensity G and blue channel intensity B of the collection points in the feature area, and calculate the comparison data , where H represents the grayscale value of the corresponding acquisition point.
[0062] It's important to note that the three primary colors (RGB) contain image color information. Different races have unique distribution patterns for skin color, eye color, lip color, and other characteristics within the three primary color space. Grayscale reflects the brightness of an image. Details like facial features and wrinkles are better displayed in grayscale images. Combining the three primary colors with grayscale allows for both preliminary screening using color information and in-depth analysis of detailed features like facial features, leveraging grayscale information. This fully integrates information and improves recognition accuracy.
[0063] In another preferred embodiment of the present invention, if the model is non-living, the staff is prompted to check the object photographed by the camera.
[0064] It should be noted that the prompt indicates that the detected object is not living and may contain potential problems or anomalies, such as the object being a replica, a prop, or a substitute that does not meet work requirements. At the same time, the necessity and urgency of inspecting such non-living models should be emphasized, as they may adversely affect subsequent work processes, data analysis, and final results.
[0065] In another preferred embodiment of the present invention, if the first similar model does not exist in the database, the person is marked as an outsider and identity verification is performed.
[0066] Understandably, the system will record the outsider's relevant information and the identity verification process for subsequent query and analysis. If the identity verification is successful, a decision will be made based on the specific circumstances regarding whether to release the person or to further manage and monitor the person. If the identity verification fails or there is any suspicion, further measures will be taken.
[0067] In another preferred embodiment of the present invention, screening the second similarity model based on the comparison points specifically includes:
[0068] The comparison point of the living model is recorded as the reference point, and the distance S between the collection point and the reference point in the first similar model in the same feature area is calculated, and the mean value S of the distance is calculated. ave , if the mean value of the distance S ave If the distance is less than a preset distance judgment value S, the corresponding first similarity model is recorded as the second similarity model.
[0069] It is worth noting that in the face comparison process, the comparison point of the living model is recorded as the reference point. For the first similar model in the same feature area, the distance between the acquisition point and the reference point is calculated. Specifically, for each acquisition point, the distance between it and the corresponding reference point is measured to obtain multiple distance values. The average of these distance values is then calculated. If the mean of the distance is less than the preset distance judgment value, the corresponding first similar model is recorded as the second similar model. Models similar to the living model can be screened out more accurately, thereby improving the accuracy and reliability of recognition. At the same time, by setting the preset distance judgment value, the similarity standard can be adjusted according to the specific situation to adapt to different application scenarios and needs.
[0070] In another preferred embodiment of the present invention, calculating the similarity K between the living body model and the second similar model specifically includes:
[0071] Select the comparison points of the same part in the living model and the second similar model, connect the comparison points with the origin of the spatial coordinate system and generate a feature vector, the direction of the feature vector points from the origin to the comparison point, and calculate the similarity ,in, represents the i-th eigenvector in the living model, Represents the i-th eigenvector in the second similarity model.
[0072] Notably, vectors can accurately represent various facial features. By converting key facial information, such as the shape, position, and size of facial features, into vector form, facial details can be more precisely captured. Compared to traditional methods based on intuitive observation or simple comparison, vector representation captures richer information, thereby improving the accuracy of similarity calculations.
[0073] Facial similarity calculations can consider features from multiple dimensions. The vectors can encompass not only the geometric characteristics of facial features but also dynamic features such as skin texture, skin tone, and facial expression, enabling a more comprehensive assessment of facial similarity. Furthermore, vector calculation methods are highly robust to noise and interference.
[0074] The solutions described in this invention are intended for use in legal situations. The data generated during the facial recognition process involves user privacy, and any unauthorized access, disclosure, or commercial abuse is strictly prohibited.
[0075] The above is a detailed description of an embodiment of the present invention. However, the content described is only a preferred embodiment of the present invention and should not be considered to limit the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A face recognition method based on an artificial intelligence model, characterized in that: The following steps are involved: S1: Capture a face image and generate a face model. Preset N collection points in the face model, obtain the distance L between the collection point and the camera and the temperature W at the collection point, and set the liveness attributes for the collection point based on the distance L and the temperature W, including: Get the current outside temperature Ws, calculate the temperature difference ΔW=W-Ws at the collection point and the mean temperature difference ΔW ave , and calculate the temperature difference ratio BW=ΔW / ΔW ave ; Get the mean value L of the distance between the acquisition point and the camera ave , calculate the distance ratio of the collection points BL=L / L ave , set the liveness attribute (BW:BL) for the collection point; S2: The steps for screening living models and non-living models based on living attributes include: Place the ultrasonic transmitter at the camera position, operate it at the preset power, and receive the intensity Q of the ultrasonic wave after rebound. Calculate the theoretical intensity of the ultrasonic wave after rebound. , among which BW n Represents the temperature difference ratio of the nth collection point, BL n Represents the distance ratio of the nth collection point. If the ultrasonic intensity Q after rebound is in the interval [QL-λ, QL+λ], it is recorded as a living body model, and λ represents the preset fluctuation value; Mark the characteristic area of the living model and obtain the collection points in the characteristic area, where the characteristic area refers to the facial features of the living model, and calculate the comparison data S of the collection points in the characteristic area; S3: Sort the feature regions in the living body model in a preset order and obtain {M1, M2, ..., M n }, where M n Represents the number of collection points in the nth feature area, and calculates the difference , if the difference C = 0, then the corresponding face model in the database is recorded as the first similarity model, where I represents the number of feature regions, MS i Represents the number of collection points in the i-th feature area of the face model in the database; S4: Establishing a spatial coordinate system and generating a living body model and a first similar model, recording the collection points in the feature area as comparison points, and selecting a second similar model based on the comparison points specifically includes: The comparison point of the living model is recorded as the reference point, and the distance S between the collection point and the reference point in the first similar model in the same feature area is calculated, and the mean value S of the distance is calculated. ave , if the mean value of the distance S ave If the distance is less than the preset distance judgment value S, the corresponding first similarity model is recorded as the second similarity model; S5: Calculating the similarity K between the living body model and the second similarity model specifically includes: Select the comparison points of the same part in the living model and the second similar model, connect the comparison points with the origin of the spatial coordinate system and generate a feature vector. The direction of the feature vector points from the origin to the comparison point, and calculate the similarity. ,in, represents the i-th eigenvector in the living model, Represents the i-th eigenvector in the second similarity model, selects the second similarity models with a similarity K greater than 90%, and sorts the second similarity models in descending order according to the similarity K. The second similarity model that ranks first in the sorting is the face corresponding to the living model.
2. The face recognition method based on an artificial intelligence model according to claim 1, characterized in that: In step S2, comparing the living body model with the database model to obtain comparison data includes: Get the collection points in the feature area, which refers to the facial features and cheeks in the face model, get the red channel intensity R, green channel intensity G and blue channel intensity B of the collection points in the feature area, and calculate the comparison data , where H represents the grayscale value of the corresponding acquisition point.
3. The face recognition method based on an artificial intelligence model according to claim 1, characterized in that: In step 2, if the model is not a living body, the staff is prompted to check the object photographed by the camera.
4. The face recognition method based on an artificial intelligence model according to claim 1, characterized in that: In step S3, if the first similar model does not exist in the database, the person is marked as an outsider and identity verification is performed.
Citation Information
Patent Citations
Three-section type face recognition method based on dual-spectrum fusion
CN115188054A
Artificial intelligence system based on face recognition technology
CN115311726A