CN112241674A - Face recognition method and system - Google Patents

Face recognition method and system Download PDF

Info

Publication number
CN112241674A
CN112241674A CN201910656933.9A CN201910656933A CN112241674A CN 112241674 A CN112241674 A CN 112241674A CN 201910656933 A CN201910656933 A CN 201910656933A CN 112241674 A CN112241674 A CN 112241674A
Authority
CN
China
Prior art keywords
face
face image
certificate
image
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910656933.9A
Other languages
Chinese (zh)
Inventor
孙庆南
于汇江
刘旅
张江辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Chuangpu Technology Co ltd
Original Assignee
Beijing Chuangpu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Chuangpu Technology Co ltd filed Critical Beijing Chuangpu Technology Co ltd
Priority to CN201910656933.9A priority Critical patent/CN112241674A/en
Publication of CN112241674A publication Critical patent/CN112241674A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Collating Specific Patterns (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a face recognition method, a face recognition system and electronic equipment, wherein the face recognition method comprises the following steps: a pre-extraction stage: collecting a first face image in a shooting range; a card reading stage: reading a certificate card of a user to be identified to obtain certificate information of the user to be identified, wherein the certificate information comprises a second face image on a certificate photo, and a third face image in a camera shooting range is collected; and (3) identification: matching the second face image with the first face image and the third face image to obtain similarity scores of the second face image and the first face image and the third face image; a verification stage: and verifying whether the user to be identified is consistent with the certificate card or not according to the similarity score. By the method, whether the testimony of the witness is consistent or not can be quickly verified, the method is suitable for scenes with large pedestrian flow needing to be verified, response speed is high, operation is convenient, and the method can be applied in a large scale.

Description

Face recognition method and system
Technical Field
The invention belongs to the technical field of face recognition, and particularly relates to a face recognition method and a face recognition system.
Background
In recent years, the capability of a face recognition algorithm is rapidly improved, and particularly for a 1:1 face verification scene, the algorithm capability is far higher than the capability of manual discrimination, so that the face recognition algorithm is widely applied to social scenes such as finance, airports, railway stations, hotels and the like.
This kind of scene of face recognition verification usually needs the user to provide the RFID card that can mark the personal identity, such as the second generation resident identification card, reads the personal information including the certificate photo on the special face recognition equipment, later the equipment starts the camera to gather the face image, carries on the face recognition algorithm of multiple steps, including face detection, feature extraction, feature matching, etc., finally obtains whether the scene face photo and the certificate face photo are the same person's affirmation.
At present, a deep learning method is adopted in a mainstream face recognition algorithm, the algorithm is highly dependent on computing capacity, although a fast algorithm execution speed can be realized under the hardware acceleration capacity based on a GPU (graphics processing unit), in an actual application scene, in consideration of equipment purchase cost, a high-performance scheme is often not adopted in all scenes.
For common Android platform equipment based on schemes such as Ramsung micro RK3368 and RK3288, a face recognition algorithm processes and recognizes a single face image, the whole process of face detection and feature extraction to feature matching at least needs more than 200-300 milliseconds, even more than 500-600 milliseconds, and due to the consideration of algorithm accuracy, the features of a plurality of face images are often required to be collected and extracted in a field face photo video stream sequence, and the time for reading an identity information RFID card in the verification process is added, so that the whole verification process is more than 2 seconds, and the queuing time is undoubtedly greatly delayed for occasions with dense people flow, such as station entrance and the like.
Disclosure of Invention
In order to overcome the above problems, the present inventors have conducted intensive studies to develop a face recognition method, including: a pre-extraction stage: collecting a first face image in a shooting range; a card reading stage: reading a certificate card of a user to be identified to obtain certificate information of the user to be identified, wherein the certificate information comprises a second face image on a certificate photo, and a third face image in a camera shooting range is collected; and (3) identification: matching the second face image with the first face image and the third face image to obtain similarity scores of the second face image and the first face image and the third face image; a verification stage: and verifying whether the user to be identified is consistent with the certificate card or not according to the similarity score. By the method, whether the testimony of the witness is consistent or not can be quickly verified, the method is suitable for scenes with large pedestrian flow needing to be verified, response speed is high, operation is convenient, and the method can be applied in a large scale, so that the method is completed.
One aspect of the present invention is to provide a face recognition method, which includes the following steps:
a pre-extraction stage: collecting a first face image in a shooting range;
a card reading stage: reading a certificate card of a user to be identified to obtain certificate information of the user to be identified, wherein the certificate information comprises a second face image on a certificate photo, and a third face image in a camera shooting range is collected;
and (3) identification: matching the second face image with the first face image and the third face image to obtain a similarity score of the second face image and the first face image;
a verification stage: and verifying whether the user to be identified is consistent with the certificate card or not according to the similarity score.
In the pre-extraction stage, an image acquisition module acquires a first face image in advance before card reading, the image acquisition module is a camera, and the first face image is all face images within a shooting range of the image acquisition module.
In the pre-extraction stage, first face features in the collected first face image are extracted, and the first face features and a timestamp corresponding to the extracted first face image are stored in a pre-extraction buffer area.
Wherein, in the card reading stage, include:
after the certificate card starts to read signals, an image acquisition module acquires a third face image and extracts third face features of the third face image;
and comparing the third face features with the first face features in the pre-extraction buffer area to judge whether the third face features are the face features of the same person.
Wherein, in the card reading stage, the third face characteristic is compared with the first face characteristic to obtain the score of the third face characteristic and the first face characteristic, the face characteristics of other people except the user to be identified are deleted according to the comparison judgment of the score and the set threshold value,
in the verification stage, according to the similarity score obtained by the face recognition algorithm, a verification result is obtained, and the method comprises the following steps:
and 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 value to obtain a verification result, wherein if the similarity score is greater than the preset threshold value, the second face image is the same person, and otherwise, the second face image is different persons.
Selecting two or three-gear threshold values according to the performance of the algorithm, wherein the three-gear threshold values respectively correspond to high, medium and low precision, and the high-precision threshold value is marked as A0Middle precision B0Low precision C0
Setting m face images of the user to be identified in the pre-extraction buffer area, and respectively recording similarity scores of the m face images and the second face image as N1,N2,……,Nm
If N is present1,N2,……,NmAt least one of which is greater than A0Or at least two are greater than B0Or at least three are greater than C0When the people and the certificate are consistent, the verification is successful,
preferably, a0 is a threshold corresponding to a case where the false positive rate is one hundred thousandth, B0 is a threshold corresponding to a case where the false positive rate is one ten thousandth, and C0 is a threshold corresponding to a case where the false positive rate is one thousandth.
When the user to be identified and the certificate card are different persons after verification, the following processes are repeated:
continuously collecting a third face image in the camera shooting range, and sequentially carrying out an identification stage and a verification stage
Preferably, the acquisition of the third face image is continued, the third face image is matched with the second face image, the identification stage and the verification stage are executed, the preset verification time is set, and if the verification time of the user to be identified exceeds the preset verification time, the verification result is different people.
Another aspect of the present invention provides a face recognition system, wherein the system includes:
the image acquisition module is used for acquiring a first face image and a third face image within the shot range;
the certificate reading module is used for reading a certificate card of a user to be identified so as to obtain certificate information of the user to be identified, and the certificate information comprises a second face image on a certificate photo;
and the face recognition module is used for comparing the second face image with the first face image and the third face image to obtain a verification result.
A further aspect of the invention provides an electronic device, wherein the electronic device comprises a memory for storing a computer program and a processor for reading and executing the computer program from the memory to perform the method of the first aspect of the invention.
The invention has the following beneficial effects:
(1) the face recognition method provided by the invention has the advantages that the face image is extracted already at the face image pre-extraction stage before certificate reading, so that the matching can be carried out quickly;
(2) the face recognition method provided by the invention can collect the face images of a plurality of licensees and extract the face characteristics in the pre-extraction stage, and can take part in the matching of the recognition stage by extracting the face images in the certificate card reading stage, thereby improving the verification efficiency;
(3) in the face recognition method provided by the invention, under most conditions, all verification time only depends on the reading time of the certificate card and the execution time of the face recognition algorithm on the certificate card, the verification time can be controlled within one second, the verification process is correspondingly fast, and the verification time and the waiting time of people are shortened to the maximum extent, regardless of the execution time and times of the algorithm of the field photo;
(4) the invention judges whether the certificate is consistent or not through the similarity score of the face features in the scene and the certificate photo, has high response speed, can be used in occasions with increased pedestrian flow density, such as railway stations, airports and the like, can greatly shorten queuing time and improve verification efficiency, is convenient to operate and can be applied in large scale.
Drawings
Fig. 1 is a flow chart illustrating a face recognition method according to a preferred embodiment of the present invention;
fig. 2 shows a block diagram of a face recognition system according to a preferred embodiment of the present invention.
Detailed Description
The invention is explained in more detail below with reference to the drawings and preferred embodiments. The features and advantages of the present invention will become more apparent from the description.
In the invention, a rapid verification mode is required to shorten the waiting time and the queuing time of the crowd for the occasion of people verification and the occasion of large flow and large personnel density.
One aspect of the present invention provides a face recognition method, including the steps of:
a pre-extraction stage: and collecting a first face image in a shooting range.
According to the invention, in the pre-extraction stage, the human face features in the human face image in the scene shooting picture are collected, and the extracted human face features and the corresponding time stamps are stored.
In the invention, on the occasion of needing the people's identity verification, verification equipment is needed to be adopted to verify the certificate card, the verification equipment such as a ticket gate machine of a railway station and the like is needed to verify whether the current person is consistent with the certificate card or not, namely whether the people's identity is consistent or not is needed to be verified, and whether the holder and the certificate are the same person is judged.
According to the invention, in the pre-extraction stage, an image acquisition module is adopted to acquire a first face image in a camera shooting range, and the image acquisition module is preferably a camera, and is more preferably a high-definition camera.
According to the invention, the first face image is a face image in a shooting picture of a shooting range of the image acquisition module in the pre-extraction stage.
According to the invention, in the pre-extraction stage, when the verification device is idle or is not used by people, the image acquisition module on the verification device is also in an open state, the image acquisition module performs shooting within a shooting range, acquires the first face image of each frame or each moment, extracts the first face features in the first face image, stores the extracted first face features, and preferably stores the extracted first face features and the time stamps corresponding to the frame of face image in the pre-extraction buffer.
In the invention, the area where the face image is located is detected in a common image, the coordinates of the face and key points of the face in the image are accurately positioned, and a face detection and positioning algorithm is adopted, such as the traditional Adaboost, SDM (Supervised Description Method) and ERT (Embedded of Regression Trees) algorithms, and a Deep learning-based Method, such as cascade CNN (cascaded Convolutional neural Network), TCDCN (Tasks-Constrained Deep Convolutional Network) and the like.
In the invention, after the position of the face in the image and the accurate positioning are obtained, the face image is converted into the face feature with fixed length by using a face feature extraction algorithm, and preferably, the face feature extraction algorithm based on a deep learning framework is adopted.
The time stamp is the moment corresponding to the face image shot by the image acquisition module.
In the present invention, the pre-storage buffer is a data structure used in computer programming, and is essentially a First Input First Output (FIFO), and in the present invention, the pre-storage buffer is used for storing each of the pre-extracted face features and the time stamp.
In the invention, the first face feature and the timestamp in the pre-extraction buffer area are pre-stored and are used for matching with the certificate photo, thereby realizing face recognition and verifying whether the certificate is consistent or not.
In the invention, in the pre-extraction stage, compared with a mode of acquiring the face image by starting a camera after reading the certificate card, the mode of extracting and matching the face features in the face image under the idle state of the verification equipment can shorten the verification time of the certificate and improve the verification efficiency.
According to a preferred embodiment of the present invention, in the pre-fetching stage, each time a new face feature and a timestamp are stored in the pre-storage buffer, the pre-storage buffer needs to be cleared, that is, the face feature whose timestamp is earlier than a certain time needs to be deleted from the pre-storage buffer.
In the invention, due to the limitation of memory space and the limitation of the quantity of data to be processed, the data (human face characteristics and time stamps) entering the buffer area within a specific time before the current time is set to be stored in the pre-storage buffer area, and the data entering the buffer area earlier than the specific time needs to be deleted from the pre-extraction buffer area in time, namely, the pre-extraction buffer area queue is removed and the memory is released so as to store new data.
According to the invention, when verification is required, the user to be identified places the certificate card held by the user on verification equipment, and after the verification equipment receives a signal that the certificate card starts to be read, the pre-extraction stage is finished.
The inventor finds that, generally speaking, the typical human face detection positioning plus feature extraction time is 300-400 milliseconds, 2-3 human face images can be extracted in one second, and a licensee needs at least 1-2 seconds to approach and stand in front of verification equipment, find the position of a card reader and swipe a card, so that 3-4 licensees can be collected and extracted in the pre-extraction stage.
A card reading stage: and reading the certificate card of the user to be identified to obtain the certificate information of the user to be identified, wherein the certificate information comprises a second face image on the certificate photo.
According to the invention, after the user to be identified places the certificate card on the verification equipment, the card reading starting signal is received from the verification equipment until the card reading is completed, namely the card reading stage.
According to the invention, in the card reading stage, the certificate card is an RFID card capable of identifying the identity of a person, such as a second generation resident identification card.
According to a preferred embodiment of the present invention, the verification device is provided with a certificate reading module for reading a certificate card of a user to be identified, and preferably, the verification device receives a card reading start signal, that is, a signal that the certificate reading module starts reading the certificate card.
According to the invention, in the card reading stage, when the verification device is in a use state, the user to be identified places the certificate card on the verification device, and the verification device receives a certificate card reading signal and reads the certificate card to obtain the certificate information of the user to be identified.
According to the invention, in the card reading stage, the obtained certificate information comprises a second face image on the certificate photo, namely the second face image is the face image on the certificate photo on the certificate card held by the user to be identified.
According to the preferred embodiment of the invention, during the card reading stage, the verification device simultaneously collects the face images, the image collection module collects the face images in the pictures within the shooting range of the image collection module, the collected face images are called as third face images, and third face features in the third face images are extracted.
According to the invention, the acquired third face image is compared with the first face image, specifically, the extracted third face feature is compared with the first face feature in the pre-extraction buffer, and the face feature with the score lower than the set threshold value is deleted from the pre-extraction buffer.
According to the invention, a threshold value of the score is set, in the card reading stage, the face features of which the score is lower than a certain threshold value are deleted, so that the face features of other people except the card reader in the pre-storage buffer area are deleted, and the newly extracted third face features and the timestamp are added into the pre-storage buffer area.
In the invention, because the similarity ranges of the face images in different acquisition modes are different, the threshold needs to be set reasonably according to the recognition characteristics of the algorithm, for example, the similarity threshold is set as a high-precision threshold A0Is 0.8, medium precision threshold B00.7, low precision threshold C0At 0.6, the closer the value is to 1, the more the two images resemble the same person.
In the invention, the third face feature obtained in the card reading stage is compared with all the first face features stored in the pre-storage buffer area, if the similarity score is lower than the set threshold value, the first face feature is removed from the pre-storage buffer area, and meanwhile, the third face feature is added into the pre-storage buffer area. Therefore, after the card reading is finished, the face features of the current verification personnel are stored in the pre-storage buffer area.
In the invention, through the pre-extraction stage and the card reading stage, a plurality of live photos of the user to be identified, namely the face image and the extracted face features, can be obtained.
In the invention, taking a second-generation identity card as an example, the typical card reading time is about 700-1000 milliseconds, the feature extraction of the on-site face photos can still be completed 2-3 times in the card reading process, and the face images collected in the pre-extraction stage are added, so that about 5-6 on-site face photo features can participate in the matching of the recognition stage, and can be sufficiently used for the matching of the recognition stage in most cases.
In the invention, the extraction of the face image and the face characteristics is carried out at the same time in the pre-extraction stage and the card reading stage, so that a large number of face images of the user to be identified can be extracted to the maximum extent, thereby enabling a large number of face images to be matched with the face images on the certificate card in the identification stage, and improving the matching efficiency and accuracy.
And (3) identification: and matching the second face image with the first face image and the third face image to obtain the similarity scores of 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-extraction buffer are both face images of the user to be identified in the verification site, and can be recorded as face images of the user to be identified, and the extracted face features are called as face features of the user to be identified. Preferably, the number of the face images of the user to be recognized in the pre-extracting buffer area is more than 3.
According to the invention, after the field photo of the user to be identified is obtained, the field photo of the user to be identified needs to be compared with the certificate photo on the certificate card, and whether the certificate is consistent or not is verified, so that whether verification is successful or not is determined.
According to the invention, the reading of the certificate card is completed, the identification stage is entered after the certificate photo information is obtained, and in the identification stage, the verification equipment extracts the second face feature in the second face image on the certificate photo.
According to the invention, in the recognition stage, after the second face image is obtained, the second face image needs to be compared with the first face image and the third face image, preferably, the second face image is matched with the first face image and the third face image through a face recognition module, and specifically, the similarity score between the face image of each user to be recognized in the pre-stored buffer area and the second face image is obtained through matching the second face feature with the first face feature and the third face feature.
In the invention, after the face features corresponding to the face images are obtained, the similarity between the face features corresponding to the other face image is calculated through a face comparison algorithm. The method is suitable for comparison of the first face image and the third face image and comparison of the second face image and the first face image and the third face image.
In the invention, because the human face features are of fixed length, each human face feature can be regarded as a point coordinate in a high-dimensional space, wherein the dimension of the high-dimensional space is the length of the feature. The similarity score between two face features is the distance between two points represented by the two face features in the high-dimensional space. The closer the distance is, the higher the similarity is, and finally the similarity between the face features is normalized to a number between 0 and 1, and the closer the similarity is to 1, the more the two images resemble the same person.
In the invention, the obtained one or more similarity scores need to be compared with a preset threshold value so as to determine whether the user to be identified is consistent with the certificate photo or not, thereby completing verification.
A verification stage: and verifying whether the user to be identified is consistent with the certificate card or not according to the similarity score, if the user to be identified is the same person, successfully verifying, and otherwise, repeating the following process: and continuously acquiring a third face image in the shooting range, and sequentially performing an identification stage and a verification stage. .
According to the invention, the certificate photo and the face photo are verified, and when the similarity score exceeds a set threshold value, the certificate holder and the certificate card are the same person.
According to the invention, in the verification stage, two or three-gear threshold values are selected according to the performance of the algorithm, wherein the two-gear threshold values correspond to high precision and low precision respectively, the three-gear threshold values correspond to high precision, medium precision and low precision respectively, and the high-precision threshold value is marked as A0Middle precision B0Low precision C0
According to a preferred embodiment of the invention, a high-precision threshold value a is set0A threshold value corresponding to the error recognition rate of one hundred thousand, namely a middle precision threshold value B0A threshold value corresponding to the error rate of ten-thousandth and a low-precision threshold value C0The false rate is a threshold value corresponding to one thousandth of the identification rate.
According to the preferred embodiment of the invention, m face images of a user to be identified are obtained in the pre-extraction buffer area, m is more than or equal to 3, and the similarity scores of the obtained m face images and the second face image are respectively marked as N1,N2,……,NmThe verification process is as follows:
if N is present1,N2,……,NmAt least one of which is greater than A0If the user to be identified and the certificate card are the same person, namely the person and the certificate are consistent, the verification is finished;
if N is present1,N2,……,NmAt least two of which are greater than B0Then, the person isIf the certificates are consistent, the verification is completed;
if N is present1,N2,……,NmAt least three of them are greater than C0And then the testimony is consistent, and the verification is finished.
According to another preferred embodiment of the invention, for N1,N2,……,NmThe m similarity scores are sorted from big to small, and whether the maximum value is larger than A or not is judged0If yes, the testimony of the people is consistent, the verification is finished, and if not, whether the values of the first two sorted are both larger than B is judged0If yes, the testimony of the people is consistent, the verification is finished, and if not, whether the values of the first three in the sequence are all larger than C is judged0If not, continuously collecting the pictures of the users to be identified on site, and carrying out an identification stage and a verification stage.
According to a preferred embodiment of the invention, the threshold A is of high precision0Is 0.8, medium precision threshold B00.7, low precision threshold C0Is 0.6.
According to the invention, if the above conditions are not met or the number of photos in the pre-extraction buffer area is insufficient, the card reading stage, the identification stage and the verification stage are continuously executed, namely, the third face image of the user to be identified on site is continuously collected and matched with the face image characteristics on the certificate photo to obtain the similarity score, then the verification is carried out, if the verification cannot be completed after a certain set time, the two persons are considered to be different persons, and the verification fails.
In the invention, if the verification is carried out for the self certification, because the pre-extraction stage is carried out firstly, after the certificate card is read and the face features on the certificate photo are extracted, the matching of a large number of certificate photos and field face photos can be rapidly completed, and the verification of the personal certification can be rapidly completed.
Therefore, in the whole verification process of the invention, the card swiping time of the certificate card placed on the verification equipment by the verifier is controlled within the card swiping time and the face feature extraction time in the face image in the certificate card.
According to the preferred embodiment of the invention, the certificate card reader with higher reading and identifying speed is selected, so that the whole verification time can be controlled within 1 second, and the verification time is shortened to the maximum extent.
The invention can acquire the face pictures of a plurality of users to be identified by acquiring the face pictures in the on-site state when the verification equipment is vacant or not used and acquiring the face pictures at the card reading stage at the same time, and the face pictures are used for matching with the face pictures in the certificate cards, and whether the identity of the people and the certificate are consistent or not is obtained according to the matching similarity scores, so that the verification result is obtained.
Another aspect of the present invention provides a face recognition system, including:
the image acquisition module is used for acquiring a first face image and a third face image within the shot range;
the certificate reading module is used for reading a certificate card of a user to be identified so as to obtain certificate information of the user to be identified, and the certificate information comprises a second face image on a certificate photo;
and the face recognition module is used for comparing the second face image with the first face image to obtain a verification result.
According to a preferred embodiment of the present invention, in the face recognition system, the image capturing module is a camera, preferably a high-definition camera, and has a Logitech C920 model, the certificate reading module is preferably a certificate reader, preferably has an ICR-100U model, and a face recognition algorithm adopted by the face recognition module runs on a general platform, such as an x86 platform or an ARM platform.
In the invention, the module schematic diagram of the face recognition system is shown in fig. 2, an image acquisition module acquires images in a camera shooting range, a face detection module acquires face images, a face positioning module positions a face, and a feature extraction module extracts face features; the certificate reading module reads certificate information, the face detection module detects face images on the certificates, the face is positioned through the face positioning module, the face features on the certificate photos are extracted through the feature extraction module, the face verification module verifies the face features obtained in the image acquisition module mode and the face features obtained by the certificate reading module to obtain similarity scores, and a result of whether the certificate is the same person or not is obtained through the comparison processing module.
A third aspect of the invention provides an electronic device comprising a memory for storing a computer program and a processor for reading the computer program from the memory and executing the computer program to perform the method of the first aspect of the invention. The face recognition method provided by the invention has the advantages that the pre-extraction stage of the face image is carried out before the certificate is read, and the extraction of the face image of the certificate photo is carried out, so that the matching can be carried out quickly, the face images of a plurality of certificate holders can be collected and the face characteristics can be extracted in the pre-extraction stage, and the extraction of the face image is carried out in the certificate card reading stage, so that a plurality of photos can participate in the matching of the recognition stage, thereby improving the verification efficiency; in most cases, the total verification time only depends on the reading time of the certificate card and the execution time of the face recognition algorithm on the certificate card, the verification process is fast, the verification process is independent of the execution time and times of the algorithm of the on-site photos, and the verification time and the waiting time of people are shortened to the maximum extent; whether the testimony of a person is consistent or not is judged through similarity scores of the face features of the scene and the face features in the certificate photo, the response speed is high, the face recognition method can be used in occasions with increased pedestrian flow density, such as railway stations, airports and the like, the queuing time can be greatly shortened, the checking efficiency is improved, the operation is convenient, and the face recognition method can be applied in a large scale.
Examples
Example 1
Referring to fig. 1, fig. 1 is a schematic flow chart of a face recognition method according to the present embodiment.
As shown in fig. 1, the face recognition method includes the following steps:
s1, a pre-extracting stage, namely, collecting a first face image in a shooting range, extracting first face features from the first face image, and storing the first face features and the time stamps into a pre-storing buffer area;
the execution subject in the pre-extraction stage can be a checking device based on a face recognition device or other electronic devices with high-definition cameras, such as a gate of a train ticket entrance or a staff needing checking.
The user to be identified is a passenger who needs to check tickets and enters a railway station, and the certificate card held by the user to be identified is a second-generation resident identification card.
And S2, reading the certificate card of the user to be identified to obtain the certificate information of the user to be identified, simultaneously acquiring a third face image, extracting third face features and storing the time stamp in a pre-extraction buffer area.
The user to be identified swipes the card on the certificate card reader, and the reader reads the certificate information. The certificate information comprises a second face image on the certificate photo, the user to be identified places the certificate card on the certificate reader, and the certificate reader reads the information of the certificate card to obtain the certificate photo information. Meanwhile, when the certificate reader reads certificate information, the image acquisition module acquires a third face image of a user to be identified on site.
And extracting the third face features in the third face image, comparing the third face image with the first face image, deleting the face images of other people except the card swiping person, and storing the third face features and the time stamp into a pre-extraction buffer area.
S3, identification stage: matching the second face image with the first face image and the third face image to obtain similarity scores of the second face image and the first face image and the third face image,
s4, verification stage: verifying whether the user to be identified is consistent with the certificate card or not according to the similarity score,
setting m face images of the user to be identified in the pre-extraction buffer area, wherein m is more than or equal to 3, and respectively recording similarity scores of the m face images and a second face image as N1,N2,……,NmThe verification process is as follows:
to N1,N2,……,NmThe m similarity scores are sorted from big to small, and whether the maximum value is larger than A or not is judged0If yes, the testimony of the people is consistent, the verification is finished, and if not, whether the values of the first two sorted are both larger than B is judged0If yes, the testimony of the people is consistent, the verification is finished, and if not, whether the values of the first three in the sequence are all larger than C is judged0If yes, the testimony of the people is consistent, and the verification is finished.
If not, the following processes are repeated: and carrying out the third face image acquisition, identification and verification stages.
If the verification is not successful after the set time is exceeded, the user to be recognized is proved to be inconsistent with the certificate card, the person certificate is displayed on the verification equipment to be inconsistent, and the user to be recognized is not allowed to pass through the verification equipment.
In the embodiments provided in the present application, it should be understood that the disclosed modules and methods may be implemented in other ways. The above-described module embodiments are merely illustrative, and the flowcharts and block diagrams in the figures, for example, illustrate the architecture, functionality, and operation of possible implementations of modules, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The described functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium.
Based on such understanding, the technical solution of the present invention or a part of the technical solution that contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present invention.
The invention has been described in detail with reference to the preferred embodiments and illustrative examples. It should be noted, however, that these specific embodiments are only illustrative of the present invention and do not limit the scope of the present invention in any way. Various modifications, equivalent substitutions and alterations can be made to the technical content and embodiments of the present invention without departing from the spirit and scope of the present invention, and these are within the scope of the present invention. The scope of the invention is defined by the appended claims.

Claims (10)

1. A face recognition method, characterized in that the method comprises the following steps:
a pre-extraction stage: collecting a first face image in a shooting range;
a card reading stage: reading a certificate card of a user to be identified to obtain certificate information of the user to be identified, wherein the certificate information comprises a second face image on a certificate photo, and a third face image in a camera shooting range is collected;
and (3) identification: matching the second face image with the first face image and the third face image to obtain similarity scores of the second face image and the first face image and the third face image;
a verification stage: and verifying whether the user to be identified is consistent with the certificate card or not according to the similarity score.
2. The face recognition method according to claim 1, wherein in a pre-extraction stage, an image acquisition module acquires a first face image in advance before card reading, the image acquisition module is a camera, and the first face image is all face images within a range shot by the image acquisition module.
3. The face recognition method according to claim 2, wherein in the pre-extraction stage, the first facial features in the acquired first facial image are extracted, and the first facial features and the time stamps corresponding to the extracted first facial image are saved in a pre-extraction buffer.
4. The face recognition method according to claim 1, wherein in the card reading stage, the face recognition method comprises the following steps:
after the certificate card starts to read signals, an image acquisition module acquires a third face image and extracts third face features of the third face image;
and comparing the third face features with the first face features in the pre-extraction buffer area to judge whether the third face features are the face features of the same person.
5. The face recognition algorithm according to claim 4, wherein in the card reading stage, the third face feature is compared with the first face feature to obtain a score therebetween, the face features of the other people than the user to be recognized are deleted according to the comparison and judgment between the score and the set threshold, and the third face feature and a timestamp corresponding to a third face image corresponding to the third face feature are stored in a pre-storage buffer area.
6. The face recognition method of claim 1, wherein in the verification stage, obtaining a verification result according to the similarity score obtained by the face recognition algorithm comprises:
and 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 value to obtain a verification result, wherein if the similarity score is greater than the preset threshold value, the second face image is the same person, and otherwise, the second face image is different persons.
7. The face recognition method of claim 6,
selecting two or three-gear threshold values according to the performance of the algorithm, wherein the three-gear threshold values respectively correspond to high, medium and low precision, and the high-precision threshold value is marked as A0Middle precision B0Low precision C0
Setting m face images of the user to be identified in the pre-extraction buffer area, and respectively recording similarity scores of the m face images and the second face image as N1,N2,……,Nm
If N is present1,N2,……,NmAt least one of which is greater than A0Or at least two are greater than B0Or at least three are greater than C0When the people and the certificate are consistent, the verification is successful,
preferably, a0 is a threshold corresponding to a case where the false positive rate is one hundred thousandth, B0 is a threshold corresponding to a case where the false positive rate is one ten thousandth, and C0 is a threshold corresponding to a case where the false positive rate is one thousandth.
8. The face recognition method of claim 7, wherein after the verification stage, if the verification result is that the user to be recognized and the certificate card are different, the following process is repeated: continuing to collect a third face image in the shooting range, and sequentially carrying out an identification stage and a verification stage:
preferably, the acquisition of the third face image is continued, the third face image is matched with the second face image, the identification stage and the verification stage are executed, the preset verification time is set, and if the verification time of the user to be identified exceeds the preset verification time, the verification result is different people.
9. A face recognition system, the system comprising:
the image acquisition module is used for acquiring a first face image and a third face image within the shot range;
the certificate reading module is used for reading a certificate card of a user to be identified so as to obtain certificate information of the user to be identified, and the certificate information comprises a second face image on a certificate photo;
and the face recognition module is used for comparing the second face image with the first face image and the third face image to obtain a verification result.
10. An electronic device, comprising a memory for storing a computer program and a processor for reading and executing the computer program from the memory to perform the method of one of claims 1 to 8.
CN201910656933.9A 2019-07-19 2019-07-19 Face recognition method and system Pending CN112241674A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910656933.9A CN112241674A (en) 2019-07-19 2019-07-19 Face recognition method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910656933.9A CN112241674A (en) 2019-07-19 2019-07-19 Face recognition method and system

Publications (1)

Publication Number Publication Date
CN112241674A true CN112241674A (en) 2021-01-19

Family

ID=74168345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910656933.9A Pending CN112241674A (en) 2019-07-19 2019-07-19 Face recognition method and system

Country Status (1)

Country Link
CN (1) CN112241674A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113780228A (en) * 2021-09-18 2021-12-10 中科海微(北京)科技有限公司 Method, system, terminal and medium for comparing testimony of a witness

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280919A (en) * 2017-04-18 2018-07-13 北京中科奥森科技有限公司 The testimony of a witness veritifies speed passage through customs gate and its control method
CN108492417A (en) * 2017-04-18 2018-09-04 北京中科奥森科技有限公司 Quick testimony of a witness checking method and testimony of a witness verifying system
CN108875478A (en) * 2017-08-14 2018-11-23 北京旷视科技有限公司 The testimony of a witness unifies checking method, device and system and storage medium
CN109326009A (en) * 2017-08-01 2019-02-12 深圳市永达电子信息股份有限公司 A kind of system and method that speeds passage through customs based on recognition of face

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280919A (en) * 2017-04-18 2018-07-13 北京中科奥森科技有限公司 The testimony of a witness veritifies speed passage through customs gate and its control method
CN108492417A (en) * 2017-04-18 2018-09-04 北京中科奥森科技有限公司 Quick testimony of a witness checking method and testimony of a witness verifying system
CN109326009A (en) * 2017-08-01 2019-02-12 深圳市永达电子信息股份有限公司 A kind of system and method that speeds passage through customs based on recognition of face
CN108875478A (en) * 2017-08-14 2018-11-23 北京旷视科技有限公司 The testimony of a witness unifies checking method, device and system and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113780228A (en) * 2021-09-18 2021-12-10 中科海微(北京)科技有限公司 Method, system, terminal and medium for comparing testimony of a witness
CN113780228B (en) * 2021-09-18 2023-07-11 中科海微(北京)科技有限公司 Person evidence comparison method, system, terminal and medium

Similar Documents

Publication Publication Date Title
US11074436B1 (en) Method and apparatus for face recognition
WO2019120115A1 (en) Facial recognition method, apparatus, and computer apparatus
CN102332093B (en) Identity authentication method and device adopting palmprint and human face fusion recognition
CN103426016B (en) Method and device for authenticating second-generation identity card
US7006671B2 (en) Personal identification apparatus and method
US20170262472A1 (en) Systems and methods for recognition of faces e.g. from mobile-device-generated images of faces
US20070183634A1 (en) Auto Individualization process based on a facial biometric anonymous ID Assignment
CN112364827B (en) Face recognition method, device, computer equipment and storage medium
WO2020248780A1 (en) Living body testing method and apparatus, electronic device and readable storage medium
CN102945366A (en) Method and device for face recognition
CN108108711B (en) Face control method, electronic device and storage medium
CN103294986B (en) A kind of recognition methods of biological characteristic and device
JP2016031679A (en) Object identification device, object identification method, and program
US10915739B2 (en) Face recognition device, face recognition method, and computer readable storage medium
Haji et al. Real time face recognition system (RTFRS)
CN111985400A (en) Face living body identification method, device, equipment and storage medium
CN114218543A (en) Encryption and unlocking system and method based on multi-scene expression recognition
CN110443577A (en) A kind of campus attendance checking system based on recognition of face
CN113837006A (en) Face recognition method and device, storage medium and electronic equipment
CN103984415B (en) A kind of information processing method and electronic equipment
CN112241674A (en) Face recognition method and system
CN112149517A (en) Face attendance checking method and system, computer equipment and storage medium
CN109886084B (en) Face authentication method based on gyroscope, electronic equipment and storage medium
CN106650363A (en) Identity recognition method and system
CN113780228B (en) Person evidence comparison method, system, terminal and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination