CN110705454A - Face recognition method with living body detection function - Google Patents

Face recognition method with living body detection function Download PDF

Info

Publication number
CN110705454A
CN110705454A CN201910930008.0A CN201910930008A CN110705454A CN 110705454 A CN110705454 A CN 110705454A CN 201910930008 A CN201910930008 A CN 201910930008A CN 110705454 A CN110705454 A CN 110705454A
Authority
CN
China
Prior art keywords
face
living body
face recognition
eye region
detection function
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
CN201910930008.0A
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.)
Donghua University
National Dong Hwa University
Original Assignee
Donghua University
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 Donghua University filed Critical Donghua University
Priority to CN201910930008.0A priority Critical patent/CN110705454A/en
Publication of CN110705454A publication Critical patent/CN110705454A/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
    • 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
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • 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/18Eye characteristics, e.g. of the iris
    • G06V40/19Sensors therefor
    • 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/18Eye characteristics, e.g. of the iris
    • G06V40/193Preprocessing; Feature extraction
    • 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/40Spoof detection, e.g. liveness detection
    • G06V40/45Detection of the body part being alive

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Ophthalmology & Optometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The invention relates to a face recognition method with a living body detection function, which comprises the following steps: carrying out face detection on the acquired image by using image acquisition equipment, carrying out blink detection in a face area when a face is detected, and judging whether the detected face is a living body; and when the detected face is a living body, identifying the face by using the face identification model. The invention has simple calculation and easy realization, and improves the reliability and the safety of face recognition by adding a layer of protection mechanism.

Description

Face recognition method with living body detection function
Technical Field
The invention relates to the technical field of face recognition, in particular to a face recognition method with a living body detection function.
Background
Identity authentication is always an important link in all aspects of human life, and particularly in the modern society developing at a high speed, "quick, convenient and safe" becomes a pronoun of the contemporary society. With the rapid development of computer vision technology and artificial intelligence, identity authentication technology changes in daily commuting card punching systems, access control systems and the like. The accuracy of the identity authentication method from fingerprint identification, iris identification to face identification is higher and higher, and the face identification is most suitable for the recognition of the public due to the aspects of manufacturing cost and stability. But face identification has remote identification, has avoided the contact identification of similar fingerprint identification, and only need the camera gather data people's image can, can not be like iris identification the data set is difficult to gather to the cost is higher. By combining the reasons, the face recognition technology is widely recognized and applied, and the face recognition technology is widely applied to the aspects of mobile payment authentication, access control system authentication, bank account authentication and the like.
In recent years, with the continuous development of research in related subject fields such as image processing, computer vision, machine learning and the like, the face recognition technology is greatly improved in both academic research and engineering application, but the hidden danger exists along with the progress, because the face recognition is to recognize images, people who cannot recognize can pass authentication by holding pictures capable of recognizing people, and the hidden safety danger needs to be solved urgently.
Recently, blink recognition technology in vivo detection is mature and applied in various fields, and academic research and engineering application related to the technology are also endless. The living body detection technology is generated for identifying the deception of illegal users to the identity authentication system based on the face images. According to research and development, the conventional blink detection method is generally used for detecting the ratio change of the white part of eyes to eyes before and after blinking, and the method is complex in calculation and low in accuracy.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a face recognition method with a living body detection function, which is simple in calculation and easy to implement.
The technical scheme adopted by the invention for solving the technical problems is as follows: the face recognition method with the living body detection function comprises the following steps:
(1) carrying out face detection on the acquired image by using image acquisition equipment, carrying out blink detection in a face area when a face is detected, and judging whether the detected face is a living body;
(2) and when the detected face is a living body, identifying the face by using the face identification model.
When blink detection is performed in the step (1), firstly, an eye area of a human face is obtained, and 6 face feature points are arranged around an eyeglass area in a clockwise mode by taking the left corner of the eye area as a starting point; and calculating the length-width ratio of the eyes based on the 6 facial feature points, and judging whether the eyes blink according to the change condition of the length-width ratio of the eyes.
The eye length-width ratio is calculated in the mode of
Figure BDA0002219975420000021
Wherein p is1Is the position of the feature point of the left corner face of the eye region, p2Is the position of the top left feature point of the eye region, p3Is the position of the feature point of the upper right of the eye region, p4Is the position of the feature point of the right-angle face of the eye region, p5Is the position of the lower right feature point of the eye region, p6The position of the lower left hand feature point of the eye region.
The face recognition model in the step (2) adopts MTCNN to detect and cut the face; the MTCNN is a cascade structure of three parts, wherein the first part is used for generating a candidate frame possibly having a face, the second part is used for taking the result of the first part as input, removing part of the candidate frame according to a non-maximum suppression method, and the third part is used for taking the result of the second part as input, further screening the candidate frame to obtain an accurate candidate frame and outputting face key points.
And (3) when the face recognition model in the step (2) is trained, sending the cut image with the face frame and the face key point into a pre-trained deep Facenet face recognition neural network, and training the face recognition model by adopting the pre-trained model.
When the human face is identified in the step (2), the human face is matched in an Annoy index mode, in the human face matching, the obtained human face feature vectors form a plurality of binary tree structures in an Annoy mode, when the human face is required to be identified for the new collected feature vectors, the binary trees are only required to be traversed respectively to obtain the feature vectors nearest to the target, and threshold control judgment is set, so that comparison and identity judgment are carried out.
Advantageous effects
Due to the adoption of the technical scheme, compared with the prior art, the invention has the following advantages and positive effects: the invention carries out living body detection before face recognition, carries out face recognition only under the condition that a detection object is a living body, and improves the reliability and safety of face recognition by adding a layer of protection mechanism. In addition, when the living body detection is carried out, the method adopts the key points of the human eyes to judge the blink, the blink detection method avoids using an image processing technology, and the blink detection method can be realized only by calculating the length-width ratio of the key points of the human eyes.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a diagram of human eye feature point selection in the present invention;
fig. 3 is a schematic diagram of blink determination using EAR calculation formula in the present invention.
Detailed Description
The invention will be further illustrated with reference to the following specific examples. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and such equivalents may fall within the scope of the present invention as defined in the appended claims.
The embodiment of the invention relates to a face recognition method with a living body detection function, which comprises the following steps as shown in figure 1: carrying out face detection on the acquired image by using image acquisition equipment, carrying out blink detection in a face area when a face is detected, and judging whether the detected face is a living body; and when the detected face is a living body, identifying the face by using the face identification model. The method comprises the following specific steps:
step 1: first, a face recognition model is trained. The method specifically comprises the following steps: preparing a data set, if an available face recognition model needs to be trained, firstly preparing a data set used for training the model, and performing a series of preprocessing including multi-scale change, rotation, brightness and darkness on a face photo to achieve the effect of data enhancement, improve the generalization capability of model training and prepare for a face detection part.
Step 2: face cropping, namely performing face detection on a large amount of face data sets by using an MTCNN (multiple-transmission-network) which is a cascade structure of three parts, wherein the first part is a candidate frame for generating a possible face, the number of the first layer of frames is very large, and the accuracy is not very high in the layer, so that a second layer of cascade is accessed, the second part is a candidate frame which takes the result of the first part as input, and redundant accuracy is not very high in the second layer of frames is removed according to methods such as non-maximum value inhibition and the like, so that the number of frames can be greatly reduced in the layer; and the last part is to take the result of the second part as input, further screen the candidate frame to obtain a more accurate candidate frame and output the key points of the human face.
And step 3: and model training, namely sending the cut image with the face frame and the face key point into a pre-trained deep Facenet face recognition neural network, and migrating a relatively mature pre-trained model.
And 4, step 4: live body detection, at first the camera of calling personal computer, use the cv2.videoCapture function in the opencv can call leading camera, in addition opencv is from taking the face detection model, direct call can carry out face detection, when detecting the face, can carry out blink detection in the face region, the benefit of detecting the face at first is, provides a guarantee before blink detection, double-fixing makes the effect more accurate.
And 5: and (4) blink detection, as shown in fig. 2, selecting six feature points of the eye images A to E. The distance between A, B remained substantially constant while the distance between C, D and E, F decreased rapidly to a small value when blinking of the human eye occurred, and the distance between A, E plus E, B was substantially equal to A, B. Based on this, the present embodiment can detect whether a blinking motion occurs or not based on the distance variation values between the six feature points.
For blink detection, the present embodiment only cares about the two eye regions of the human face. Each eye area is represented as 6 coordinates, i.e. starting from the left corner of the eye area, 6 facial feature points are arranged around the spectacle area in a clockwise manner based on the 6 facial feature points passing
Figure BDA0002219975420000041
Calculating the aspect ratio of the eye, wherein p1Is the position of the feature point of the left corner face of the eye region, p2Is the position of the top left feature point of the eye region, p3Is the position of the feature point of the upper right of the eye region, p4Is the position of the feature point of the right-angle face of the eye region, p5Is the position of the lower right feature point of the eye region, p6The position of the lower left hand feature point of the eye region. As shown in fig. 3, the numerator of the EAR calculation formula is to calculate the distance between vertical eye landmarks and the denominator is to calculate the distance between horizontal eye landmarks, since there is only one set of horizontal points, but two sets of vertical points, the denominator is weighted. The EAR calculation remains approximately constant when the eye is open, but changes rapidly to zero when the eye blinks. Therefore, by using the EAR calculation formula, the image processing technology can be avoided, and only the length-width ratio of the eye feature key points needs to be calculated to judge whether a person blinks or not.
When the judgment is carried out, the distance between the two groups of vertical eye marks is firstly calculated according to an EAR calculation formula, and then the distance between the horizontal eye marks is calculated. Finally, the numerator and denominator are combined to arrive at the final eye aspect ratio. A threshold value is then set for the eye aspect ratio as is the case, and the eye aspect ratio in the case of a normal blink begins to fall below the set threshold value and then exceeds the set threshold value, then a "blink" will be recorded.
Step 6: if the living body detects blinking actions, namely the living body is acquired by default, then the trained face recognition model is called to perform face recognition. If no blinking motion is detected, namely the living body is not detected, the protection mechanism does not pass the subsequent face recognition operation, and the default recognition does not pass.
And 7: and when the living body detection and identification are finished and the living body is judged to be the living body, face matching is carried out in an Annoy index mode, and then comparison and identity judgment are carried out. The method specifically comprises the following steps: and in the face matching, a plurality of binary tree structures are formed by the obtained face characteristic vectors in an Annoy mode, when the face identification needs to be carried out on the collected new characteristic vectors, the binary trees are only required to be traversed respectively to obtain the characteristic vectors closest to the target, and threshold control judgment is set, so that comparison and identity judgment are carried out. Thus, the task of face recognition can be completed.
The invention can easily find that the living body detection is carried out before the face recognition, and the face recognition is carried out only under the condition that the detection object is a living body, thereby improving the reliability and the safety of the face recognition by adding a layer of protection mechanism. In addition, when the living body detection is carried out, the method adopts the key points of the human eyes to judge the blink, the blink detection method avoids using an image processing technology, and the blink detection method can be realized only by calculating the length-width ratio of the key points of the human eyes.

Claims (6)

1. A face recognition method with a living body detection function is characterized by comprising the following steps:
(1) carrying out face detection on the acquired image by using image acquisition equipment, carrying out blink detection in a face area when a face is detected, and judging whether the detected face is a living body;
(2) and when the detected face is a living body, identifying the face by using the face identification model.
2. The face recognition method with a living body detection function according to claim 1, wherein in the step (1), when performing the blink detection, the eye region of the face is first acquired, and 6 face feature points are set around the eyeglass region in a clockwise manner with the left corner of the eye region as a starting point; and calculating the length-width ratio of the eyes based on the 6 facial feature points, and judging whether the eyes blink according to the change condition of the length-width ratio of the eyes.
3. The face recognition method with liveness detection function according to claim 2, wherein the eye aspect ratio is calculated in such a manner thatWherein p is1Is the position of the feature point of the left corner face of the eye region, p2Is the position of the top left feature point of the eye region, p3Is the position of the feature point of the upper right of the eye region, p4Is the position of the feature point of the right-angle face of the eye region, p5Is the position of the lower right feature point of the eye region, p6The position of the lower left hand feature point of the eye region.
4. The face recognition method with living body detection function according to claim 1, wherein the face recognition model in the step (2) adopts MTCNN for face detection and cropping; the MTCNN is a cascade structure of three parts, wherein the first part is used for generating a candidate frame possibly having a face, the second part is used for taking the result of the first part as input, removing part of the candidate frame according to a non-maximum suppression method, and the third part is used for taking the result of the second part as input, further screening the candidate frame to obtain an accurate candidate frame and outputting face key points.
5. The method for recognizing a human face with a living body detection function according to claim 1, wherein during the training of the human face recognition model in the step (2), the cut image with the human face frame and the human face key point is sent to a pre-trained deep Facenet human face recognition neural network, and the pre-trained model is adopted to realize the training of the human face recognition model.
6. The face recognition method with a living body detection function according to claim 1, wherein in the step (2), when face recognition is performed, face matching is performed in an Annoy index manner, in the face matching, a plurality of binary tree structures are formed by using the obtained face feature vectors in an Annoy manner, and when face recognition is required for a new collected feature vector, only the binary trees need to be traversed respectively to obtain a feature vector nearest to a target, and threshold control judgment is set, so that comparison and identity judgment are performed.
CN201910930008.0A 2019-09-29 2019-09-29 Face recognition method with living body detection function Pending CN110705454A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910930008.0A CN110705454A (en) 2019-09-29 2019-09-29 Face recognition method with living body detection function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910930008.0A CN110705454A (en) 2019-09-29 2019-09-29 Face recognition method with living body detection function

Publications (1)

Publication Number Publication Date
CN110705454A true CN110705454A (en) 2020-01-17

Family

ID=69196448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910930008.0A Pending CN110705454A (en) 2019-09-29 2019-09-29 Face recognition method with living body detection function

Country Status (1)

Country Link
CN (1) CN110705454A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325185A (en) * 2020-03-20 2020-06-23 上海看看智能科技有限公司 Face fraud prevention method and system
CN113052087A (en) * 2021-03-29 2021-06-29 杭州京威盛智能科技有限公司 Face recognition method based on YOLOV5 model
CN113345177A (en) * 2021-05-11 2021-09-03 深圳市海恒智能科技有限公司 Self-service book borrowing and returning system based on face recognition
CN113760097A (en) * 2021-09-16 2021-12-07 Oppo广东移动通信有限公司 Method and device for controlling volume, terminal and computer readable storage medium
WO2024045350A1 (en) * 2022-08-29 2024-03-07 天翼数字生活科技有限公司 Eye movement based liveness detection method and system based on deep learning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107346422A (en) * 2017-06-30 2017-11-14 成都大学 A kind of living body faces recognition methods based on blink detection
CN109003346A (en) * 2018-07-13 2018-12-14 河海大学 A kind of campus Work attendance method and its system based on face recognition technology
CN109784313A (en) * 2019-02-18 2019-05-21 上海骏聿数码科技有限公司 A kind of blink detection method and device
CN109840565A (en) * 2019-01-31 2019-06-04 成都大学 A kind of blink detection method based on eye contour feature point aspect ratio
CN109948568A (en) * 2019-03-26 2019-06-28 东华大学 Embedded human face identifying system based on ARM microprocessor and deep learning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107346422A (en) * 2017-06-30 2017-11-14 成都大学 A kind of living body faces recognition methods based on blink detection
CN109003346A (en) * 2018-07-13 2018-12-14 河海大学 A kind of campus Work attendance method and its system based on face recognition technology
CN109840565A (en) * 2019-01-31 2019-06-04 成都大学 A kind of blink detection method based on eye contour feature point aspect ratio
CN109784313A (en) * 2019-02-18 2019-05-21 上海骏聿数码科技有限公司 A kind of blink detection method and device
CN109948568A (en) * 2019-03-26 2019-06-28 东华大学 Embedded human face identifying system based on ARM microprocessor and deep learning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄骏: "基于文本特征提取的相似科研项目文档检索系统研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325185A (en) * 2020-03-20 2020-06-23 上海看看智能科技有限公司 Face fraud prevention method and system
CN111325185B (en) * 2020-03-20 2023-06-23 上海看看智能科技有限公司 Face fraud prevention method and system
CN113052087A (en) * 2021-03-29 2021-06-29 杭州京威盛智能科技有限公司 Face recognition method based on YOLOV5 model
CN113345177A (en) * 2021-05-11 2021-09-03 深圳市海恒智能科技有限公司 Self-service book borrowing and returning system based on face recognition
CN113760097A (en) * 2021-09-16 2021-12-07 Oppo广东移动通信有限公司 Method and device for controlling volume, terminal and computer readable storage medium
WO2024045350A1 (en) * 2022-08-29 2024-03-07 天翼数字生活科技有限公司 Eye movement based liveness detection method and system based on deep learning

Similar Documents

Publication Publication Date Title
Yuan et al. Fingerprint liveness detection using an improved CNN with image scale equalization
CN110705454A (en) Face recognition method with living body detection function
Ko et al. A novel and efficient feature extraction method for iris recognition
KR101901591B1 (en) Face recognition apparatus and control method for the same
US10922399B2 (en) Authentication verification using soft biometric traits
CN108537131B (en) Face recognition living body detection method based on face characteristic points and optical flow field
KR20190016733A (en) Method for recognizing partial obscured face by specifying partial area based on facial feature point, recording medium and apparatus for performing the method
CN111344703A (en) User authentication device and method based on iris recognition
CN110796101A (en) Face recognition method and system of embedded platform
Paul et al. Extraction of facial feature points using cumulative histogram
CN111862413A (en) Method and system for realizing epidemic situation resistant non-contact multidimensional identity rapid identification
CN111178130A (en) Face recognition method, system and readable storage medium based on deep learning
Das et al. Multi-angle based lively sclera biometrics at a distance
CN113627256A (en) Method and system for detecting counterfeit video based on blink synchronization and binocular movement detection
CN107862298B (en) Winking living body detection method based on infrared camera device
CN100495427C (en) Human ear detection under complex background and method for syncretizing various information
CN109003367A (en) Control method and device, storage medium, the terminal of gate inhibition
RU2316051C2 (en) Method and system for automatically checking presence of a living human face in biometric safety systems
CN114299569A (en) Safe face authentication method based on eyeball motion
Mohamed et al. Automated face recogntion system: Multi-input databases
Chu et al. Study of eye blinking to improve face recognition for screen unlock on mobile devices
CN107977622A (en) Eyes detection method based on pupil feature
CN110135362A (en) A kind of fast face recognition method based under infrared camera
JP2022141940A (en) Method and apparatus for detecting live face, electronic device, and storage medium
CN113553890A (en) Multi-modal biological feature fusion method and device, storage medium and equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200117