A face recognition method and system
By collecting and extracting the features of multiple face images in the pre-supply stage of the face recognition system, the problem of excessively long face recognition verification in the prior art is solved, and fast and efficient human verification is achieved, which is suitable for occasions with dense crowds.
Patent Information
- Application Number
- CN201910656933.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-19
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2039-07-19
AI Technical Summary
When existing face recognition algorithms run on low-performance devices, the processing and recognition of face images takes too long, resulting in delay in verification processes, especially in situations where crowds are crowded.
The features of multiple face images are collected and extracted in the pre-supply stage, and the face images are extracted and matched in the document card reading stage, and the similarity scores of the face features in the document photo and the face features on the scene are used for verification.
By collecting and extracting facial features in advance, the verification time is shortened and the verification efficiency is improved. It is suitable for crowded occasions, such as train stations and airports, significantly shortening the queue time.
Smart Images

Figure HDA0002137117760000011 
Figure HDA0002137117760000021
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of face recognition, and in particular relates to a face recognition method and system. Background Art
[0002] In recent years, the capabilities of facial recognition algorithms have improved rapidly, especially for 1:1 facial verification scenarios. The algorithm capabilities are already far higher than the ability of manual judgment. Therefore, it has been widely used in social scenarios such as finance, airports, railway stations, and hotels.
[0003] This type of facial recognition verification scenario usually requires the user to provide an RFID card that can identify their personal identity, such as a second-generation resident ID card, and read personal information including the ID photo on a dedicated facial recognition device. The device then starts the camera to capture the facial image and performs a multi-step facial recognition algorithm, including face detection, feature extraction, feature matching, etc., to ultimately determine whether the facial photo on site and the facial photo on the ID are of the same person.
[0004] The current mainstream face recognition algorithm uses a deep learning method and is highly dependent on computing power. Although faster algorithm execution speed can be achieved under the hardware acceleration capability based on GPU (graphics processing unit), in actual application scenarios, considering the equipment procurement cost, high-performance solutions are often not available in all scenarios.
[0005] For common Android platform devices based on Rising Micro's RK3368, RK3288 and other solutions, the face recognition algorithm processes and identifies a single face image. The entire process from face detection, feature extraction to feature matching takes at least 200 to 300 milliseconds, or even more than 500 to 600 milliseconds. In consideration of the accuracy of the algorithm, it is often necessary to collect and extract features of multiple face images in the on-site face photo video stream sequence. In addition, the time it takes to read the identity information RFID card during the verification process, the entire verification process takes more than 2 seconds. For some crowded occasions, such as the entrance to a railway station, this will undoubtedly greatly delay the queuing time. Summary of the invention
[0006] In order to overcome the above problems, the inventor has conducted intensive research and developed a face recognition method, which includes: the pre-collection stage: collecting the first face image within the camera range; the card reading stage: reading the ID card of the user to be identified to obtain the ID information of the user to be identified, the ID information includes the second face image on the ID photo, and collecting the third face image within the camera range; the recognition stage: matching the second face image with the first face image and the third face image to obtain the similarity score between the second face image and the first face image and the third face image; the verification stage: verifying whether the user to be identified is consistent with the ID card according to the similarity score. Through the above method, the present invention can quickly verify whether the person and the ID card are consistent, is suitable for scenes with a large flow of people that need to be verified, has a fast response speed, and is easy to operate, and can be applied on a large scale, thereby completing the present invention.
[0007] The present invention aims to provide a method for face recognition, which comprises the following steps:
[0008] Preliminary stage: collecting the first face image within the camera range;
[0009] Card reading stage: reading the ID card of the user to be identified to obtain the ID information of the user to be identified, wherein the ID information includes the second face image on the ID photo and the third face image within the camera range;
[0010] Recognition stage: matching the second face image with the first face image and the third face image to obtain a similarity score between the second face image and the first face image;
[0011] Verification phase: Based on the similarity score, verify whether the user to be identified is consistent with the ID card.
[0012] Among them, in the pre-withdrawal stage, before reading the card, the image acquisition module pre-acquires the first face image, the image acquisition module is a camera, and the first face image is all face images within the range captured by the image acquisition module.
[0013] In the pre-withdrawal stage, the first facial features in the collected first facial image are extracted, and the first facial features and the timestamp corresponding to the extracted first facial image are saved in the pre-withdrawal buffer.
[0014] Among them, in the card reading stage, it includes:
[0015] After the ID card starts reading the signal, the image acquisition module acquires the third person's face image and extracts the third person's face features from the third person's face image;
[0016] The third facial feature is compared with the first facial feature in the pre-withdrawn buffer to determine whether they are facial features of the same person.
[0017] In the card reading stage, the third facial feature is compared with the first facial feature to obtain a score between the two. Based on the comparison between the score and the set threshold, the facial features of other people other than the user to be identified are deleted.
[0018] Wherein, in the verification stage, the verification result is obtained according to the similarity score obtained by the face recognition algorithm, including:
[0019] The second face image is matched with the first face image and the third face image to obtain a similarity score, and the similarity score is compared with a preset threshold to obtain a verification result. If the similarity score is greater than the preset threshold, they are the same person, otherwise they are different people.
[0020] Two or three thresholds are selected according to the performance of the algorithm. The three thresholds correspond to high, medium and low precision respectively. The high precision threshold is recorded as A 0 , medium precision B 0 , low precision C 0 ,
[0021] It is assumed that m face images of the user to be identified are obtained in the pre-withdrawn buffer, and the similarity scores of the m face images obtained and the second face image are recorded as N 1 , N 2 , ..., N m ,
[0022] If N 1 , N 2 , ..., N m At least one of them is greater than A 0 , or at least two greater than B 0 , or at least three greater than C 0 , the person and the evidence are consistent and the verification is successful.
[0023] Preferably, A0 is a threshold value corresponding to a false recognition rate of one in one hundred thousand, B0 is a threshold value corresponding to a false recognition rate of one in ten thousand, and C0 is a threshold value corresponding to a false recognition rate of one in one thousand.
[0024] If the verification result shows that the user to be identified and the ID card are different persons, the following process is repeated:
[0025] Continue to collect the third person's face image within the camera range, and perform the recognition stage and verification stage in sequence
[0026] Preferably, the third facial image is collected and matched with the second facial image, the identification stage and the verification stage are executed, and a preset verification time is set. If the verification time of the user to be identified exceeds the preset verification time, the verification result is a different person.
[0027] Another aspect of the present invention provides a face recognition system, wherein the system comprises:
[0028] An image acquisition module, used for acquiring a first face image and a third face image within a photographed range;
[0029] The certificate reading module is used to read the certificate card of the user to be identified to obtain the certificate information of the user to be identified, wherein the certificate information includes the second face image on the certificate photo;
[0030] The face recognition module is used to compare the second face image with the first face image and the third face image to obtain a verification result.
[0031] Another aspect of the present invention provides an electronic device, wherein the electronic device includes a memory and a processor, the memory is used to store a computer program, and the processor is used to read and run the computer program from the memory to execute the method described in the first aspect of the present invention.
[0032] The beneficial effects of the present invention are:
[0033] (1) The face recognition method provided by the present invention has already performed a preliminary phase of face image extraction before the ID card is read, and has already extracted the face image of the ID card photo, so matching can be performed quickly;
[0034] (2) The face recognition method provided by the present invention can collect multiple face images of the cardholder and extract face features in the pre-collection stage, and extract face images in the card reading stage, so that multiple photos can be involved in the matching in the recognition stage, thereby improving the verification efficiency;
[0035] (3) In the face recognition method provided by the present invention, in most cases, the entire verification time depends only on the reading time of the ID card and the execution time of the face recognition algorithm on the ID card. The verification time can be controlled within one second. The verification process has a fast response speed and is independent of the algorithm execution time and number of on-site photos, thus shortening the verification time and the waiting time of the crowd to the greatest extent.
[0036] (4) The present invention determines whether a person and an ID card are consistent by the similarity score between the facial features on site and the facial features in the ID card photo. The response speed is fast. The face recognition method can be used in places with high density of people, such as railway stations and airports. It can greatly shorten the queuing time and improve the verification efficiency. It is easy to operate and can be applied on a large scale. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram showing a flow chart of a face recognition method according to a preferred embodiment of the present invention;
[0038] Figure 2 A module diagram showing a face recognition system according to a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0039] The present invention is further described in detail below through the accompanying drawings and preferred embodiments. Through these descriptions, the characteristics and advantages of the present invention will become more clear and distinct.
[0040] In the present invention, for occasions where person-document verification is required, and for occasions with a large flow of people and a high density of people, a fast verification method needs to be adopted to shorten the waiting time and queuing time of the crowd.
[0041] One aspect of the present invention provides a face recognition method, the method comprising the following steps:
[0042] Preliminary stage: collect the first face image within the camera range.
[0043] According to the present invention, in the pre-collection stage, the facial features in the facial image in the on-site camera image are collected, and the extracted facial features and the corresponding timestamps are stored.
[0044] In the present invention, when person-ID verification is required, it is necessary to use verification equipment to verify the ID card, such as the ticket gate at a railway station, and at the same time, it is necessary to verify whether the current person is consistent with the ID card, that is, whether the person-ID is consistent, so as to determine whether the cardholder and the ID are the same person.
[0045] According to the present invention, in the pre-collection stage, an image acquisition module is used to acquire a first face image within a camera range. The image acquisition module is preferably a camera, and more preferably a high-definition camera.
[0046] According to the present invention, the first face image is a face image in a camera image captured by the image acquisition module in the pre-stage.
[0047] According to the present invention, in the pre-withdrawal stage, when the verification device is vacant or not in use, the image acquisition module on the verification device is also in an on state, and the image acquisition module takes pictures within the filmable range, collects the first face image in each frame or at each moment, extracts the first face feature in the first face image, and saves the extracted first face feature, preferably saving the extracted first face feature and the timestamp corresponding to the frame face image in the pre-withdrawal buffer.
[0048] In the present invention, the area where the face image is located is detected in an ordinary image, and the coordinates of the face and facial key points in the image are accurately located. The face detection and positioning algorithms are adopted, such as traditional Adaboost, SDM (Supervised Descent Method), ERT (Ensemble of Regression Trees) algorithms, and deep learning-based methods such as cascade CNN (cascade convolutional neural network) and TCDCN (Tasks-Constrained Deep Convolutional Network).
[0049] In the present invention, after obtaining the position and precise positioning of the face in the image, a face feature extraction algorithm is used to convert the face image into fixed-length face features, preferably a face feature extraction algorithm based on a deep learning framework.
[0050] The timestamp is the moment when the image acquisition module captures the face image.
[0051] In the present invention, the pre-storage buffer is a data structure used in computer programming, which is essentially a FIFO (First Input First Output). In the present invention, the pre-storage buffer is used to store each pre-extracted facial feature and timestamp.
[0052] In the present invention, the first facial feature and the timestamp in the pre-withdrawn buffer are pre-stored and used to match with the ID photo, thereby realizing face recognition and verifying whether the person and the ID are consistent.
[0053] In the present invention, in the pre-withdrawal stage, compared with the method of turning on the camera to collect facial images after reading the ID card, the method of extracting facial features in the facial image and then matching when the verification device is idle can shorten the time of person-document verification and improve verification efficiency.
[0054] According to a preferred embodiment of the present invention, in the pre-withdrawal stage, each time a new facial feature and a timestamp are saved in the pre-storage buffer, the pre-storage buffer needs to be cleared at the same time, that is, the facial features with a timestamp earlier than a certain time need to be deleted from the pre-storage buffer.
[0055] In the present invention, due to the limitation of memory space and the limitation of the amount of data to be processed, it is set that only the data (facial features and timestamp) that enters the buffer within a specific time before the current moment is saved in the pre-storage buffer. The data that has entered the buffer before this specific time needs to be deleted from the pre-withdrawal buffer in time, that is, removed from the pre-withdrawal buffer queue and the memory is released to save new data.
[0056] According to the present invention, when verification is required, the user to be identified places the ID card he holds on the verification device, and when the verification device receives a signal to start reading the ID card, the pre-withdrawal stage ends.
[0057] The inventors have found that, generally speaking, the typical face detection positioning plus feature extraction time is 300 to 400 milliseconds, and the features of 2 to 3 face images can be extracted in one second. Generally, the cardholder will need at least 1 to 2 seconds to approach and stand in front of the verification device, find the card reader location and swipe the card. Therefore, in the pre-withdrawal stage, 3 to 4 face images of the cardholder can be collected and features extracted.
[0058] Card reading stage: reading the ID card of the user to be identified to obtain the ID information of the user to be identified, wherein the ID information includes the second face image on the ID photo.
[0059] According to the present invention, when the user to be identified places the ID card on the verification device, the verification device receives a card reading start signal until the card reading is completed, which is the card reading stage.
[0060] According to the present invention, in the card reading stage, the certificate card is an RFID card that can identify an individual's identity, such as a second-generation resident identity card.
[0061] According to a preferred embodiment of the present invention, the verification device is provided with an ID reading module for reading the ID card of the user to be identified. Preferably, the verification device receives a card start reading signal, that is, a signal that the ID reading module starts reading the ID card.
[0062] According to the present invention, during the card reading stage, when the verification device is in use, the user to be identified places the ID card on the verification device, and the verification device receives a signal to start reading from the ID card and reads the ID card to obtain the ID information of the user to be identified.
[0063] According to the present invention, during the card reading stage, the obtained certificate information includes the second face image on the certificate photo, that is, the second face image is the face image on the certificate photo on the certificate card held by the user to be identified.
[0064] According to a preferred embodiment of the present invention, while the card reading stage is carried out, the verification device simultaneously collects facial images, and the image acquisition module collects facial images in the picture within its shooting range. The collected facial images are called third facial images, and the third facial features in the third facial images are extracted.
[0065] According to the present invention, the collected third facial image is compared with the first facial image, specifically, the extracted third facial features are compared with the first facial features in the pre-withdrawal buffer, and facial features with scores lower than a set threshold are deleted from the pre-withdrawal buffer.
[0066] According to the present invention, a score threshold is set, and during the card reading stage, facial features with scores below a certain threshold are deleted, thereby deleting facial features of other people except the card swipeer in the pre-stored buffer, and adding the newly extracted third facial features and timestamp to the pre-withdrawn buffer.
[0067] In the present invention, because the similarity ranges between face images acquired in different ways are different, the threshold value needs to be reasonably set according to the recognition characteristics of the algorithm. For example, the similarity threshold value is set to a high-precision threshold value A. 0 is 0.8, medium precision threshold B 0 is 0.7, low precision threshold C 0 The closer the value is to 1, the more the two images resemble the same person.
[0068] In the present invention, the third facial feature obtained in the card reading stage is compared with all the first facial features stored in the pre-stored buffer. If the similarity score is lower than the set threshold, the first facial feature is removed from the pre-stored buffer and the third facial feature is added to the pre-stored buffer. In this way, after the card reading is completed, the facial features of the person currently being verified are stored in the pre-stored buffer.
[0069] In the present invention, after the pre-withdrawal stage and the card reading stage, a plurality of on-site photos of the user to be identified, namely, the face images and the extracted face features, can be obtained.
[0070] In the present invention, taking the second-generation ID card as an example, the typical card reading time is about 700 to 1000 milliseconds. During the card reading process, that is, the card reading stage, the feature extraction of 2 to 3 on-site facial photos can still be completed. Together with the facial images collected in the pre-withdrawal stage, there are a total of about 5 to 6 on-site facial photo features that can participate in the matching in the recognition stage. In most cases, it is sufficient for the matching in the recognition stage.
[0071] In the present invention, facial images and facial features are extracted in both the pre-withdrawal stage and the card reading stage, which can extract a large number of facial images of users to be identified to the greatest extent, so that a large number of facial images can be matched with the facial images on the ID card in the identification stage, thereby improving the matching efficiency and accuracy.
[0072] Identification stage: Match the second face image with the first face image and the third face image to obtain the similarity score between the second face image and the first face image and the third face image. Preferably, the first face image and the third face image in the pre-withdrawal buffer are both face images of the user to be identified at the verification site, which can be recorded as the face images of the user to be identified, and the extracted face features are called the face features of the user to be identified. Preferably, the number of face images of the user to be identified in the pre-withdrawal buffer is more than 3.
[0073] After obtaining the on-site photo of the user to be identified, the present invention needs to compare the on-site photo of the user to be identified with the ID photo on the ID card to verify whether the person and the ID are consistent, thereby determining whether the verification is successful.
[0074] According to the present invention, after the ID card is read and the ID photo information is obtained, the recognition stage is entered. In the recognition stage, the verification device extracts the second facial features in the second facial image on the ID photo.
[0075] According to the present invention, in the recognition stage, after the second facial image is obtained, it is necessary to compare it with the first facial image and the third facial image, preferably by matching it through a facial recognition module. Specifically, by matching the second facial features with the first facial features and the third facial features, a similarity score between each facial image of the user to be identified in the pre-stored buffer and the second facial image is obtained.
[0076] In the present invention, after obtaining the facial features corresponding to the facial image, the similarity between the facial features corresponding to another facial image is calculated by a facial comparison algorithm. The method is applicable to the comparison between the first facial image and the third facial image, and the comparison between the second facial image and the first facial image and the third facial image.
[0077] In the present invention, since facial features are of fixed length, each facial feature can be regarded as a point coordinate in a high-dimensional space, where the dimension of the high-dimensional space is the length of the feature. Then the similarity score between two facial features is the distance between the two points represented by the two facial features in the high-dimensional space. The closer the distance, the higher the similarity. Finally, the similarity between facial features is normalized to a number between 0 and 1. The closer the similarity is to 1, the more the two images resemble the same person.
[0078] In the present invention, the obtained one or more similarity scores need to be compared with a predetermined threshold value to determine whether the user to be identified is consistent with the ID photo, thereby completing the verification.
[0079] Verification phase: Based on the similarity score, verify whether the user to be identified is consistent with the ID card. If they are the same person, the verification is successful. Otherwise, repeat the following process: continue to collect the third face image within the camera range, and perform the identification phase and verification phase in sequence.
[0080] According to the present invention, the ID photo and the face photo are verified, and when the similarity score exceeds a set threshold, the ID holder and the person on the ID card are the same person.
[0081] According to the present invention, in the verification stage, two or three thresholds are selected according to the performance of the algorithm. The two thresholds correspond to high and low precision respectively, and the three thresholds correspond to high, medium and low precision respectively. The high precision threshold is recorded as A. 0 , medium precision B 0 , low precision C 0 .
[0082] According to a preferred embodiment of the present invention, a high-precision threshold A is set. 0 The threshold corresponding to the error rate of one in one hundred thousand, the medium precision threshold B 0 is the threshold corresponding to the error rate of one in ten thousand, and the low-precision threshold C 0 is the threshold corresponding to the error rate of one thousandth.
[0083] According to a preferred embodiment of the present invention, it is assumed that m facial images of the user to be identified are obtained in the pre-withdrawn buffer, m ≥ 3, and the similarity scores of the obtained m facial images and the second facial image are respectively recorded as N 1 , N 2 , ..., N m , the verification process is as follows:
[0084] If N 1 , N 2 , ..., N m At least one of them is greater than A 0 , then the user to be identified and the ID card are the same person, that is, the person and the ID card are consistent, and the verification is completed;
[0085] If N 1 , N 2 , ..., N m There are at least two of them that are greater than B 0 When the person and the certificate are consistent, the verification is completed;
[0086] If N 1 , N 2 , ..., N m There are at least three greater than C 0 When the person and the ID are consistent, the verification is completed.
[0087] According to another preferred embodiment of the present invention, 1 , N2 , ..., N m Sort the m similarity scores from large to small and determine whether the maximum value is greater than A 0 If yes, the person and the certificate are consistent and the verification is completed. If not, determine whether the values of the first two in the sorting are both greater than B. 0 If yes, the person and the certificate are consistent and the verification is completed. If not, determine whether the values of the first three in the sorting are all greater than C. 0 If yes, the person and the ID are consistent and the verification is completed. If not, continue to collect photos of the user to be identified on site and go through the identification and verification stages.
[0088] According to a preferred embodiment of the present invention, the high-precision threshold A 0 is 0.8, medium precision threshold B 0 is 0.7, low precision threshold C 0 is 0.6.
[0089] According to the present invention, if the above conditions are not met, or the number of photos in the pre-withdrawn buffer is insufficient, the card reading stage, the recognition stage and the verification stage will continue to be executed, that is, the third face image of the user to be identified on site will continue to be collected, and matched with the face image features on the ID photo to obtain a similarity score, and then verification will be performed. If the verification cannot be completed after a certain set time, it is considered that the two are different people and the verification fails.
[0090] In the present invention, if the person is verified with his / her ID card, the pre-withdrawal stage is first performed. Therefore, after the ID card is read and the facial features on the ID photo are extracted, a large number of ID photos can be quickly matched with on-site facial photos, and the verification of the person's ID card can be completed quickly.
[0091] Therefore, the entire verification process of the present invention starts from the time when the cardholder places the ID card on the verification device and swipes the card. The total verification time can be controlled within the card swiping time and the facial feature extraction time in the facial image in the ID card.
[0092] According to a preferred embodiment of the present invention, by selecting an ID card reader with a faster reading and recognition speed, the entire verification time can be controlled within 1 second, thereby shortening the verification time to the maximum extent.
[0093] The present invention can obtain multiple facial images of users to be identified by collecting on-site facial photos when the verification equipment is vacant or not in use, and by simultaneously collecting facial photos during the card reading stage, which are used to match the facial images in the ID photos in the ID cards. Based on the matching similarity scores, it is determined whether the person and the ID are consistent, thereby obtaining a verification result.
[0094] Another aspect of the present invention provides a face recognition system, the system comprising:
[0095] An image acquisition module, used for acquiring a first face image and a third face image within a photographed range;
[0096] The certificate reading module is used to read the certificate card of the user to be identified to obtain the certificate information of the user to be identified, wherein the certificate information includes the second face image on the certificate photo;
[0097] The face recognition module is used to compare the second face image with the first face image to obtain a verification result.
[0098] According to a preferred embodiment of the present invention, in the face recognition system, the image acquisition module is a camera, preferably a high-definition camera, model Logitech C920, the document reading module is preferably a document reader, preferably model ICR-100U, and the face recognition algorithm used by the face recognition module runs on a general platform, such as an x86 platform or an ARM platform.
[0099] In the present invention, the module schematic diagram of the face recognition system is as follows Figure 2 The image acquisition module acquires images within the camera range, the face detection module acquires face images, locates the face through the face positioning module, and extracts face features through the feature extraction module; the ID reading module reads the ID information, the face detection module detects the face image on the ID, locates the face through the face positioning module, extracts the face features on the ID photo through the feature extraction module, the face verification module verifies the face features obtained by the image acquisition module with the face features obtained by the ID reading module to obtain a similarity score, and determines whether they are the same person through the comparison processing module.
[0100] A third aspect of the present invention provides an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to read and run the computer program from the memory to execute the method described in the first aspect of the present invention. The face recognition method provided by the present invention has already carried out a pre-collection stage of face images before document reading, and has already carried out extraction of face images from document photos, so matching can be performed quickly. In the pre-collection stage, multiple face images of the document holder can be collected and face features can be extracted. Face images can be extracted again in the document card reading stage, so that multiple photos can participate in the matching in the recognition stage, thereby improving the verification efficiency. In most cases, the entire verification time only depends on the reading time of the document card and the execution time of the face recognition algorithm on the document card. The verification process is fast and has nothing to do with the algorithm execution time and number of on-site photos, thus shortening the verification time and the waiting time of the crowd to the maximum extent. Whether the person and the document are consistent is determined by the similarity score between the on-site face features and the face features in the document photo, and the response speed is fast. The face recognition method can be used in places with increased crowd density, such as railway stations, airports, etc., which can greatly shorten the queuing time and improve the verification efficiency. It is easy to operate and can be applied on a large scale.
[0101] Example
[0102] Example 1
[0103] See also Figure 1 , Figure 1 It is a flowchart of a face recognition method provided in this embodiment.
[0104] like Figure 1 As shown, the face recognition method includes the following steps:
[0105] S1, pre-collection stage, collecting a first face image within the camera range, extracting a first face feature from the first face image, and saving the first face feature and a timestamp to a pre-storage buffer;
[0106] The executor in the prepayment stage can be a verification device based on facial recognition equipment or other electronic devices with high-definition cameras, such as the gate at the train ticket entrance or staff who need to verify.
[0107] The user to be identified is a passenger who needs to check his ticket to enter the train station, and the ID card held by the user to be identified is a second-generation resident ID card.
[0108] S2, card reading stage, reading the ID card of the user to be identified to obtain the ID information of the user to be identified, and at the same time collecting the third person's face image, extracting the third person's face features and the timestamp and saving them in the pre-withdrawal buffer.
[0109] The user to be identified swipes the card on the ID card reader, and the reader reads the ID information. The ID information includes the second face image on the ID photo. The user to be identified places the ID card on the ID reader, and the ID reader reads the ID card information to obtain the ID photo information. At the same time, when the ID reader reads the ID information, the image acquisition module simultaneously acquires the third face image of the user to be identified on the scene.
[0110] The third facial features in the third facial image are extracted, and the third facial image is compared with the first facial image, and facial images of other persons except the card swiper are deleted, and the third facial features and timestamp are saved in the pre-withdrawal buffer.
[0111] S3, recognition stage: matching the second face image with the first face image and the third face image to obtain a similarity score between the second face image and the first face image and the third face image,
[0112] S4, verification stage: based on the similarity score, verify whether the user to be identified is consistent with the ID card.
[0113] Assume that m face images of the user to be identified are obtained in the pre-withdrawn buffer, m ≥ 3, and the similarity scores of the m face images obtained and the second face image are recorded as N 1 , N 2 , ..., N m , the verification process is as follows:
[0114] To N 1 , N 2 , ..., N m Sort the m similarity scores from large to small and determine whether the maximum value is greater than A 0 If yes, the person and the certificate are consistent and the verification is completed. If not, determine whether the values of the first two in the sorting are both greater than B. 0 If yes, the person and the certificate are consistent and the verification is completed. If not, determine whether the values of the first three in the sorting are all greater than C. 0 , if so, the person and the evidence are consistent and the verification is completed.
[0115] If not, the following process is repeated: collecting the third face image, the recognition stage and the verification stage.
[0116] If the verification fails within the set time, it proves that the user to be identified is inconsistent with the ID card, and the verification device will display the inconsistency between the person and the ID card, and the user to be identified will not be allowed to pass the verification device.
[0117] In the embodiments provided in the present application, it should be understood that the disclosed modules and methods can also be implemented in other ways. The module embodiments described above are merely schematic, for example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the modules, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a part of a module, a program segment or a code, and a part of the above-mentioned module, program segment or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flowchart, and the combination of the boxes in the structure diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0118] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0119] If the described functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0120] Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0121] The present invention is described in detail above in combination with preferred embodiments and exemplary examples. However, it should be noted that these specific embodiments are only illustrative explanations of the present invention and do not constitute any limitation on the protection scope of the present invention. Without exceeding the spirit and protection scope of the present invention, various improvements, equivalent substitutions or modifications may be made to the technical content of the present invention and its embodiments, which all fall within the protection scope of the present invention. The protection scope of the present invention shall be subject to the attached claims.
Claims
1. A face recognition method, characterized in that: The method comprises the following steps: Preliminary stage: collecting the first face image within the camera range; In the pre-withdrawal stage, before reading the card, the image acquisition module pre-acquires the first face image, the image acquisition module is a camera, and the first face image is all face images within the range captured by the image acquisition module; In the pre-withdrawal stage, extracting the first facial features in the collected first facial image, and saving the first facial features and the timestamp corresponding to the extracted first facial image into the pre-withdrawal buffer; Card reading stage: reading the ID card of the user to be identified to obtain the ID information of the user to be identified, wherein the ID information includes the second face image on the ID photo and the third face image within the camera range; Recognition stage: matching the second face image with the first face image and the third face image to obtain a similarity score between the second face image and the first face image and the third face image; Verification stage: based on the similarity score, verify whether the user to be identified is consistent with the ID card; In the verification stage, the verification result is obtained according to the similarity score obtained by the face recognition algorithm, including: Matching the second face image with the first face image and the third face image to obtain a similarity score, comparing the similarity score with a preset threshold to obtain a verification result, if the similarity score is greater than the preset threshold, they are the same person, otherwise they are different people; According to the performance of the algorithm, three thresholds are selected, which correspond to high, medium and low precision respectively. The high precision threshold is recorded as A0, the medium precision threshold is B0, and the low precision threshold is C0. It is assumed that m face images of the user to be identified are obtained in the pre-withdrawn buffer, and the similarity scores of the m face images obtained and the second face image are recorded as N1, N2, ..., N m , If N1, N2, ..., N m If at least one of them is greater than A0, or at least two are greater than B0, or at least three are greater than C0, then the person and the certificate are consistent and the verification is successful. A0 is the threshold value corresponding to the error rate of 1 in 100,000, B0 is the threshold value corresponding to the error rate of 1 in 10,000, and C0 is the threshold value corresponding to the error rate of 1 in 1,000; The high-precision threshold A0 is 0.8, the medium-precision threshold B0 is 0.7, and the low-precision threshold C0 is 0.
6.
2. The face recognition method according to claim 1, characterized in that: In the card reading stage, including: After the ID card starts reading the signal, the image acquisition module acquires the third person's face image and extracts the third person's face features from the third person's face image; The third facial feature is compared with the first facial feature in the pre-withdrawn buffer to determine whether they are facial features of the same person.
3. The face recognition algorithm according to claim 2, characterized in that: During the card reading stage, the third facial feature is compared with the first facial feature to obtain a score between the two. Based on the comparison between the score and the set threshold, the facial features of other persons other than the user to be identified are deleted. At the same time, the third facial feature and the timestamp corresponding to the third facial image corresponding to the third facial feature are saved in a pre-stored buffer.
4. The face recognition method according to claim 1, characterized in that: After the verification phase, if the verification result is that the user to be identified and the ID card are different people, the following process is repeated: continue to collect the third person's face image within the camera range, and perform the identification phase and the verification phase in sequence: Continue to collect the third face image and match it with the second face image, execute the identification stage and the verification stage, set a preset verification time, if the verification time of the user to be identified exceeds the preset verification time, the verification result is a different person.
5. A face recognition system, characterized in that: The system includes: An image acquisition module, used for acquiring a first face image and a third face image within a photographed range; The certificate reading module is used to read the certificate card of the user to be identified to obtain the certificate information of the user to be identified, wherein the certificate information includes the second face image on the certificate photo; A face recognition module is used to compare the second face image with the first face image and the third face image to obtain a verification result. In the face recognition module, the face recognition method according to any one of claims 1 to 4 is adopted.
6. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to read and run the computer program from the memory to execute the face recognition method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method, apparatus and system for verifying face and identity consistency, and storage medium
CN108875478A
Human face identification-based rapid clearance system and method
CN109326009A