CN110633647A - Living body detection method and device - Google Patents

Living body detection method and device Download PDF

Info

Publication number
CN110633647A
CN110633647A CN201910773428.2A CN201910773428A CN110633647A CN 110633647 A CN110633647 A CN 110633647A CN 201910773428 A CN201910773428 A CN 201910773428A CN 110633647 A CN110633647 A CN 110633647A
Authority
CN
China
Prior art keywords
characteristic
attack sample
attack
feature
sample
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
CN201910773428.2A
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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910773428.2A priority Critical patent/CN110633647A/en
Publication of CN110633647A publication Critical patent/CN110633647A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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/40Spoof detection, e.g. liveness detection
    • G06V40/45Detection of the body part being alive

Abstract

One or more embodiments of the present disclosure disclose a method and an apparatus for detecting a living body, so as to achieve high efficiency and high accuracy of living body detection. The method comprises the following steps: extracting characteristic information of an object to be detected by using a pre-trained living body characteristic model; matching the characteristic information with a first attack sample characteristic in an attack sample set to determine the matching degree between the characteristic information and the first attack sample characteristic; the first attack sample characteristic refers to a sample characteristic of a first sample attack object extracted by the living body characteristic model in advance; and judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information and the first attack sample characteristic.

Description

Living body detection method and device
Technical Field
The document relates to the technical field of information detection, in particular to a living body detection method and a living body detection device.
Background
The popularization of face recognition makes people have higher requirements on the safety of face recognition systems. In order to prevent the face recognition system from being broken by the modes of photos, videos and the like and improve the safety of the face recognition system, a living body detection algorithm becomes an essential link in the face recognition system.
Most of the current living body detection algorithms are based on classification, for example, given an input picture sample, the algorithm gives the classification probability of the sample, and when the probability of the sample being classified as an attack is greater than the probability of the sample being classified as a living body, the face recognition is regarded as an attack treatment. The algorithm is usually obtained by performing two-class training on a large number of labeled living body-attack data sets, so that the performance of the algorithm depends on a large number of training data seriously, and the algorithm cannot intercept the attack types which are few or do not appear in the training data well. In addition, when the face recognition system is attacked by a new attack, such algorithms require long retraining and optimization to cover the new attack that attacked the recognition system before. Therefore, the existing in-vivo detection algorithm cannot be updated quickly, so that the detection accuracy of new attacks is low.
Disclosure of Invention
An object of one or more embodiments of the present disclosure is to provide a method and an apparatus for living body detection, which can achieve high efficiency and high accuracy of living body detection.
To solve the above technical problem, one or more embodiments of the present specification are implemented as follows:
in one aspect, one or more embodiments of the present disclosure provide a method of in vivo detection, comprising:
extracting characteristic information of an object to be detected by using a pre-trained living body characteristic model;
matching the characteristic information with a first attack sample characteristic in an attack sample set to determine the matching degree between the characteristic information and the first attack sample characteristic; the first attack sample characteristic refers to a sample characteristic of a first attack sample extracted by the living body characteristic model in advance;
and judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information and the first attack sample characteristic.
In another aspect, one or more embodiments of the present disclosure provide a living body detecting device including:
the first extraction module is used for extracting the characteristic information of the object to be detected by utilizing a pre-trained living body characteristic model;
the matching module is used for matching the characteristic information with a first attack sample characteristic in an attack sample set so as to determine the matching degree between the characteristic information and the first attack sample characteristic; the first attack sample characteristic refers to a sample characteristic of a first attack sample extracted by the living body characteristic model in advance;
and the judging module is used for judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information and the first attack sample characteristic.
In yet another aspect, one or more embodiments of the present specification provide a live subject detection apparatus comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
extracting characteristic information of an object to be detected by using a pre-trained living body characteristic model;
matching the characteristic information with a first attack sample characteristic in an attack sample set to determine the matching degree between the characteristic information and the first attack sample characteristic; the first attack sample characteristic refers to a sample characteristic of a first sample attack object extracted by the living body characteristic model in advance;
and judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information and the first attack sample characteristic.
In yet another aspect, one or more embodiments of the present specification provide a storage medium storing computer-executable instructions that, when executed, implement the following:
extracting characteristic information of an object to be detected by using a pre-trained living body characteristic model;
matching the characteristic information with a first attack sample characteristic in an attack sample set to determine the matching degree between the characteristic information and the first attack sample characteristic; the first attack sample characteristic refers to a sample characteristic of a first attack sample extracted by the living body characteristic model in advance;
and judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information and the first attack sample characteristic.
By adopting the technical scheme of one embodiment of the specification, the characteristic information of the object to be detected is directly matched with the characteristics of the attack sample in the attack sample set, and the establishment or the update of the attack sample set only needs to extract the sample characteristics of the attack sample, so that compared with the characteristics that a binary algorithm needs to rely on a large amount of sample data for training and has low update speed, the update speed of the attack sample set is high, the update process is simple, the result of in-vivo detection is more accurate, and the problem that the in-vivo detection cannot be detected due to the fact that a new attack type cannot be trained in time is solved.
Drawings
In order to more clearly illustrate one or more embodiments or technical solutions in the prior art in the present specification, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in one or more embodiments of the present specification, and other drawings can be obtained by those skilled in the art without inventive exercise.
FIG. 1 is a schematic flow chart diagram of a method of active detection according to one embodiment of the present description;
FIG. 2 is a schematic flow chart diagram of a method of active detection according to one embodiment of the present disclosure;
FIG. 3 is a schematic representation of characteristic information in a method of in vivo detection according to an embodiment of the present description;
FIG. 4 is a schematic block diagram of a living body detection apparatus according to one embodiment of the present description;
FIG. 5 is a schematic block diagram of a living organism detection apparatus in accordance with an embodiment of the present description.
Detailed Description
One or more embodiments of the present disclosure provide a method and an apparatus for detecting a living body, which are used to achieve high efficiency and high accuracy of living body detection.
In order to make those skilled in the art better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in one or more embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all embodiments. All other embodiments that can be derived by a person skilled in the art from one or more of the embodiments described herein without making any inventive step shall fall within the scope of protection of this document.
Fig. 1 is a schematic flow diagram of a method of detecting a living organism according to an embodiment of the present disclosure, as shown in fig. 1, the method comprising:
and S102, extracting the characteristic information of the object to be detected by using the pre-trained living body characteristic model.
The living body feature model can be used for extracting feature information of an object to be detected and extracting feature information of each sample (including a living body sample and/or an attack sample). The training method of the living body feature model will be described in detail in the following examples.
Living bodies, namely non-attack objects, such as real certificates, dynamic face images located in a specified shooting area and the like; the attack object pointer is used for forging the living body, such as an electronic forged certificate and a physical forged certificate forged for a real certificate; face photos or videos forged by the dynamic face images, and the like.
And S104, matching the characteristic information of the object to be detected with the first attack sample characteristic in the attack sample set to determine the matching degree between the characteristic information of the object to be detected and the first attack sample characteristic.
The first attack sample characteristic refers to a sample characteristic of a first attack sample extracted by using a living body characteristic model in advance.
And S106, judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information of the object to be detected and the first attack sample characteristic.
Since the attack sample set includes a plurality of first attack sample features, a plurality of matching degrees between the feature information of the object to be detected and the first attack sample features can be determined. Aiming at the matching degrees, the highest matching degree can be selected, the highest matching degree is compared with a preset threshold value, and if the highest matching degree between the characteristic information of the object to be detected and the characteristics of the first attack sample is larger than or equal to the preset threshold value, the object to be detected is determined to be an attack object; on the contrary, if the highest matching degree between the feature information of the object to be detected and the first attack sample feature is smaller than the preset threshold, the object to be detected is determined to be a living body.
By adopting the technical scheme of one or more embodiments of the specification, the characteristic information of the object to be detected is extracted by utilizing a pre-trained living body characteristic model; matching the characteristic information with the first attack sample characteristics in the attack sample set to determine the matching degree between the characteristic information and the first attack sample characteristics; and then judging whether the object to be detected is a living body according to the matching degree between the characteristic information and the first attack sample characteristic. According to the technical scheme, the characteristic information of the object to be detected is directly matched with the characteristics of the attack sample in the attack sample set, and the attack sample set is established or updated only by extracting the sample characteristics of the attack sample, so that compared with the characteristics that a binary algorithm needs to depend on a large amount of sample data for training and is slow in updating, the updating speed of the attack sample set is high, the updating process is simple, the result of in vivo detection is more accurate, and the problem that the in-vivo detection cannot be detected due to the fact that a new attack type cannot be trained in time is solved.
In one embodiment, the live-feature model may be trained as follows:
first, a second attack sample and a living body sample are collected. The second attack sample used for training the living body feature model and the first attack sample used for establishing the attack sample set can be the same or different. The second attack sample can cover various types corresponding to the living body, for example, when the living body is a face image, the second attack sample comprises a face photo, a face video and the like; when the living body is a certificate, the second attack sample comprises an electronic counterfeit certificate (such as a certificate picture copied by a mobile phone or a computer) and a physical counterfeit certificate (such as a printed paper certificate).
And secondly, performing feature learning based on the second attack sample and the living body sample to obtain a living body feature model.
When feature learning is performed based on the collected second attack sample and the collected living body sample, the two-classification training model can be determined firstly, and then the second attack sample and the living body sample are respectively used as two types of input data of the two-classification training model for training; and when the training result reaches a preset convergence condition, obtaining a living body characteristic model. In this embodiment, the two-classification training model may select any existing neural network structure, and learn features of the acquired sample data (including the second attack sample and the living body sample) by using the two-classification loss function. In order to make the collected sample data conform to the input rule of the binary function, the sample data may be pre-processed, for example, the sample data may be normalized as follows: firstly, calculating the mean value and the variance of sample data, then carrying out normalization processing on the sample data according to the mean value and the variance of the sample data to obtain normalized sample data, and taking the normalized sample data as input data of a binary classification loss function.
When the determined neural network structure is utilized and the binary classification loss function is utilized to perform feature learning on the sample data, each second attack sample can be used as one class, and the living body sample can be used as the other class, and when the neural network is completely converged (for example, a preset loss condition is reached), the living body feature model can be trained.
In the present embodiment, the biometric model is obtained by training using a binary loss function, but the output of the biometric model is a sample feature. For example, when the object to be detected is input as the living body feature model, the output is the feature information of the object to be detected; and when the attack sample is used as the input of the living body feature model, the output is the feature information of the attack sample.
In this embodiment, based on the difference in characteristics between the second attack sample and the living body sample, the trained living body characteristic model can accurately extract the characteristics of the object (such as the object or the sample to be detected), and compared with a conventional method of directly extracting all the characteristics of the object, the embodiment can extract the characteristics that can more represent the object, so that the matching result between the object to be detected and each attack sample is more accurate, and the living body detection efficiency is higher.
In one embodiment, the set of attack samples may be built as follows:
first, a plurality of first attack sample objects are collected. For example, when the living body is a face image, the first attack sample includes a face photo, a face video and the like; when the living body is a certificate, the first attack sample object comprises an electronic counterfeit certificate (such as a certificate picture copied by a mobile phone or a computer) and a physical counterfeit certificate (such as a printed paper certificate).
Secondly, extracting the sample characteristics of the first attack sample by using the living body characteristic model.
And finally, collecting the sample characteristics of the first attack sample to obtain an attack sample set.
For example, when the first attack sample a and the first attack sample B are acquired, the living body feature model is used to extract feature information (assumed as feature a) of the first attack sample a and feature information (assumed as feature B) of the first attack sample B, and the feature a and the feature B are combined to obtain an attack sample set.
In the embodiment, the attack sample set is formed by combining the sample characteristics of a plurality of attack samples, so that the establishment of the attack sample set does not need a complicated and long-time training and learning process, and only needs to extract the characteristics of each attack sample, thereby greatly saving the establishment process of the attack sample set and further improving the efficiency of in-vivo detection.
In one embodiment, the matching degree between the characteristic information of the object to be detected and the first attack sample characteristic can be characterized by similarity. Therefore, when the matching degree between the feature information of the object to be detected and the first attack sample features is determined, the vector distance between the feature information of the object to be detected and each first attack sample feature can be calculated by using a specified vector distance algorithm; then according to the vector distance, determining the similarity between the characteristic information of the object to be detected and the first attack sample characteristic; and then screening the highest similarity between the characteristic information of the object to be detected and the first attack sample characteristic, and determining whether the object to be detected is a living body according to the size relationship between the highest similarity and a preset threshold value. Specifically, if the highest similarity between the feature information of the object to be detected and the first attack sample feature is greater than or equal to a preset threshold value, determining that the object to be detected is an attack object; on the contrary, if the highest similarity between the feature information of the object to be detected and the first attack sample feature is smaller than the preset threshold, the object to be detected is determined to be a living body.
In this embodiment, the vector distance may be an euclidean distance, a cosine distance, a mahalanobis distance, a hybrid distance, or the like; the specified vector distance algorithm corresponds to the vector distance, and may be any one of the existing distance algorithms, such as an euclidean distance algorithm, a manhattan distance algorithm, a cosine similarity algorithm, and the like.
In this embodiment, the higher the similarity between the feature information of the object to be detected and the first attack sample feature is, the closer the feature of the object to be detected to the feature of the attack sample is, that is, the more likely the object to be detected is to be an attack object, so that the highest similarity between the feature information of the object to be detected and the first attack sample feature is screened out, and it is only necessary to determine the magnitude relationship between the highest similarity between the feature information of the object to be detected and the first attack sample feature and the preset threshold, and it is possible to determine whether the object to be detected is a living body. The similarity between the characteristic information of the object to be detected and the first attack sample characteristic does not need to be compared with a preset threshold respectively, so that a large amount of workload is reduced for the living body detection equipment, and the living body detection efficiency is improved.
In one embodiment, the set of attack samples may be updated. The attack sample set may be updated in any of the following ways.
Firstly, collecting a third attack sample according to a preset collection frequency; secondly, extracting the sample characteristics of a third attack sample by using the living body characteristic model; third, the sample characteristics of the third attack sample are added to the attack sample set to update the attack sample set.
For example, the preset acquisition frequency is one week, that is, a new attack sample is acquired once every week, and the sample characteristics of the new attack sample are extracted and added to the attack sample set, so that the attack sample set is updated. It can be seen that the update time cost of the attack sample set is only the time for extracting the features by using the living body feature model, and compared with the update process of the two classification models, the update time cost of the attack sample set is greatly reduced.
And secondly, if the object to be detected is determined to be the attack object, adding the characteristic information of the object to be detected to the attack sample set to update the attack sample set.
In the embodiment, the updated attack sample set can be immediately used online, and due to the fact that the updating speed of the attack sample set is high, the living body detection can cover a new attack object at a higher speed, and therefore the problem that the new attack type cannot be trained in time and cannot be detected is solved.
The method for detecting a living body according to an embodiment of the present invention will be described with reference to an embodiment.
FIG. 2 is a schematic flow chart diagram of a method of active detection according to a specific embodiment of the present description. In this embodiment, the object to be detected is a face image to be detected, the living body is a dynamic face image located in a designated shooting area, and the attack object is a face photograph or a face video. As shown in fig. 2, the method includes:
s201, collecting a plurality of first human face attack samples and a plurality of dynamic human face image samples.
The first face attack sample refers to a face object obtained by copying a face photo and/or a face video; the dynamic face image sample refers to a face image obtained by shooting a dynamic real face.
S202, feature learning is carried out on the basis of the first face attack samples and the dynamic face image samples, and a living body feature model is obtained.
In the step, any one of the existing neural network structures can be selected, and the characteristics of the collected multiple first face attack samples and the multiple dynamic face image samples are learned by utilizing a classification loss function. In order to make the collected sample data (including a plurality of first face attack samples and a plurality of dynamic face image samples) conform to the input rule of the two classification functions, the sample data may be preprocessed, for example, the following normalization processing is performed on the sample data: firstly, calculating the mean value and the variance of each sample data, then carrying out normalization processing on each sample data according to the mean value and the variance of each sample data to obtain normalized sample data, and taking the normalized sample data as input data of a binary classification loss function.
When the determined neural network structure is utilized and the two-classification loss function is utilized to carry out feature learning on each sample data, a plurality of first human face attack samples can be used as one class, a plurality of dynamic human face image samples can be used as the other class, and when the neural network is completely converged (if a preset loss condition is reached), a living body feature model can be trained.
And S203, collecting a plurality of second face attack samples.
And the second face attack sample refers to a face object obtained by copying the face photo and/or the face video. The second face attack sample may or may not be the same as the first face attack sample.
And S204, extracting the characteristic information of each second face attack sample by using the living body characteristic model, and collecting the characteristic information of each second face attack sample to obtain an attack sample set.
For example, the second face attack samples include a face attack sample a, a face attack sample B, a face attack sample C, a face attack sample D, and a face attack sample E, and feature information of each second face attack sample is extracted by using the living body feature model to obtain a feature a of the face attack sample a, a feature B of the face attack sample B, a feature C of the face attack sample C, a feature D of the face attack sample D, and a feature E of the face attack sample E. The feature a, the feature b, the feature c, the feature d and the feature e form an attack sample set.
And S205, extracting the feature information of the face image to be detected by using the living body feature model aiming at the face image to be detected.
And S206, matching the characteristic information of the facial image to be detected with the characteristics of each attack sample in the attack sample set, and calculating the similarity between the characteristic information of the facial image to be detected and the characteristics of each attack sample in the attack sample set.
And the characteristics of each attack sample in the attack sample set comprise the characteristic information of each second face attack sample.
Following the above example, as shown in fig. 3, the feature information of the face image to be detected is assumed to be a feature x, and the attack sample set includes feature information of a face attack sample a, a face attack sample B, a face attack sample C, a face attack sample D, and a face attack sample E, that is, a feature a, a feature B, a feature C, a feature D, and a feature E. And respectively matching the feature x with the feature a, the feature b, the feature c, the feature d and the feature e, and respectively calculating the similarity between the feature x and the feature a, the feature b, the feature c, the feature d and the feature e by using a preset similarity algorithm. The dashed connecting lines between feature x and the features in the attack sample set in fig. 3 indicate that feature x is matched to the features in the attack sample set, respectively.
If the preset similarity algorithm is an algorithm for determining the similarity by adopting Euclidean distance, the similarity S between the feature x and each attack samplenCan be calculated by using the following formula (1):
Sn=-||FX-Fn||2 (1)
wherein, FXFeature vectors representing the face image to be detected, FnRepresenting the feature vector, | F, corresponding to the attack sample nX-Fn||2And representing the Euclidean distance between the feature vector of the face image to be detected and the feature vector corresponding to the attack sample n. As expressed by the above-mentioned formula (1),the Euclidean distance between the feature vector of the face image to be detected and the feature vector corresponding to the features of the attack sample is larger, and the similarity between the feature vector and the feature vector is smaller.
Assume that the similarity between feature x and feature a is denoted as SaxAnd the similarity between the feature x and the feature b is recorded as SbxAnd the similarity between the feature x and the feature c is recorded as ScxAnd the similarity between the feature x and the feature d is recorded as SaxAnd the similarity between the feature x and the feature e is recorded as Sex. Then, through the above calculation, the following similarity sets can be obtained: { Sax,Sbx,Scx,Sdx,Sex}。
S207, screening out the highest similarity between the feature information of the face image to be detected and the features of each attack sample, and judging whether the highest similarity is greater than or equal to a preset threshold value. If yes, go to step S208; if not, S209 is executed.
Continuing with the above example, the similarity set between the feature information of the face image to be detected and the features of each attack sample is as follows: { Sax,Sbx,Scx,Sdx,Sex}. Then, when performing this step, the similarities in the similarity set may be sorted according to the magnitude of the similarity value, and the highest similarity among the similarities may be selected.
And S208, determining the face image to be detected as an attack object.
S209, determining the face image to be detected as a living body.
In the embodiment, the living body feature model and the attack sample set are trained in advance, and the living body feature model is used for extracting the feature information of the face image to be detected, so that compared with a traditional mode of directly extracting all features of an object, the living body feature model can extract features which can represent the face image to be detected, the matching result between the face image to be detected and the features of the attack sample is more accurate, and the living body detection efficiency is higher. In addition, according to the technical scheme of the embodiment, the feature information of the face image to be detected is directly matched with the features of the attack samples in the attack sample set, and only the sample features of the attack samples need to be extracted for establishing or updating the attack sample set, so that compared with the characteristics that a binary classification algorithm needs to depend on a large amount of sample data for training and the updating speed is low, the updating speed of the attack sample set is high, the updating process is simple, the face image detection result is more accurate, and the problem that the face image cannot be detected due to the fact that a new attack type cannot be trained in time is solved.
In summary, particular embodiments of the present subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may be advantageous.
Based on the same idea, the living body detection method provided in one or more embodiments of the present specification further provides a living body detection apparatus.
Fig. 4 is a schematic flow chart of a living body detecting apparatus according to an embodiment of the present disclosure, and as shown in fig. 4, the living body detecting apparatus 400 includes:
the first extraction module 410 is used for extracting the characteristic information of the object to be detected by utilizing a pre-trained living body characteristic model;
the matching module 420 is used for matching the characteristic information with the characteristics of the first attack sample in the attack sample set so as to determine the matching degree between the characteristic information and the characteristics of the first attack sample; the first attack sample characteristic refers to a sample characteristic of a first attack sample extracted by using a living body characteristic model in advance;
the determining module 430 determines whether the object to be detected is a living body according to the matching degree between the feature information and the first attack sample feature.
In one embodiment, the determining module 430 includes:
the first determining unit is used for determining the highest matching degree between the characteristic information and the first attack sample characteristic according to the matching degree between the characteristic information and the attack sample characteristic;
the second determining unit is used for determining the object to be detected as an attack object if the highest matching degree between the characteristic information and the characteristics of the first attack sample is greater than or equal to a preset threshold value;
and the third determining unit is used for determining that the object to be detected is a living body if the highest matching degree between the characteristic information and the first attack sample characteristic is smaller than a preset threshold value.
In one embodiment, the apparatus 400 further comprises a training module for training the living body feature model;
the training module comprises:
the learning unit is used for performing feature learning based on the collected second attack sample and the living body sample to obtain a living body feature model; the living body feature model is used for extracting feature information of an object to be detected.
In one embodiment, the training module determines a two-class training model; respectively taking the second attack sample and the living body sample as two types of input data of a two-classification training model for training; and when the training result reaches a preset convergence condition, obtaining a living body characteristic model.
In one embodiment, the apparatus 400 further comprises an establishing module that establishes an attack sample set;
the establishing module comprises:
and the extraction unit is used for extracting the sample characteristics of the collected first attack sample by using the living body characteristic model to obtain an attack sample set.
In one embodiment, the degree of match includes a degree of similarity;
the matching module 420 includes:
the calculation unit is used for calculating the vector distance between the feature information and the first attack sample feature by using a specified vector distance algorithm;
and the fourth determining unit is used for determining the similarity between the feature information and the first attack sample feature according to the vector distance.
In one embodiment, the vector distance comprises at least one of a euclidean distance, a cosine distance, a mahalanobis distance, a hybrid distance.
In one embodiment, the apparatus 400 further comprises:
the acquisition module is used for acquiring a third attack sample according to a preset acquisition frequency;
the second extraction module is used for extracting the sample characteristics of the third attack sample by using the living body characteristic model;
and the first updating module is used for adding the sample characteristics of the third attack sample to the attack sample set so as to update the attack sample set.
In one embodiment, the apparatus 400 further comprises:
and the second updating module is used for adding the characteristic information of the object to be detected to the attack sample set to update the attack sample set if the object to be detected is determined to be the attack object.
By adopting the device of one or more embodiments of the specification, the characteristic information of the object to be detected is directly matched with the characteristics of the attack sample in the attack sample set, and the establishment or the update of the attack sample set only needs to extract the sample characteristics of the attack sample, so that compared with the characteristics that a binary algorithm needs to rely on a large amount of sample data for training and has low update speed, the update speed of the attack sample set is high, the update process is simple, the result of in vivo detection is more accurate, and the problem that the new attack type cannot be trained in time to cause the failure in detection is avoided.
It should be understood by those skilled in the art that the above-mentioned biopsy device can be used to implement the above-mentioned biopsy method, and the detailed description thereof should be similar to the above-mentioned method, and therefore, in order to avoid complexity, the detailed description thereof is omitted.
Based on the same idea, one or more embodiments of the present specification further provide a living body detection apparatus, as shown in fig. 5. The liveness detection device may vary significantly depending on configuration or performance, and may include one or more processors 501 and memory 502, where the memory 502 may have one or more stored applications or data stored therein. Memory 502 may be, among other things, transient or persistent storage. The application program stored in memory 502 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for a liveness detection device. Still further, the processor 501 may be configured to communicate with the memory 502 to execute a series of computer-executable instructions in the memory 502 on the liveness detection device. The liveness detection device may also include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more input-output interfaces 505, and one or more keyboards 506.
In particular, in this embodiment, the biopsy device includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the biopsy device, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
extracting characteristic information of an object to be detected by using a pre-trained living body characteristic model;
matching the characteristic information with a first attack sample characteristic in an attack sample set to determine the matching degree between the characteristic information and the first attack sample characteristic; the first attack sample characteristic refers to a sample characteristic of a first attack sample extracted by the living body characteristic model in advance;
and judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information and the first attack sample characteristic.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
determining the highest matching degree between the feature information and the first attack sample feature according to the matching degree between the feature information and the attack sample feature;
if the highest matching degree between the characteristic information and the first attack sample characteristic is larger than or equal to a preset threshold value, determining that the object to be detected is an attack object;
and if the highest matching degree between the characteristic information and the first attack sample characteristic is smaller than the preset threshold value, determining that the object to be detected is a living body.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
training the living body characteristic model according to the following steps:
performing feature learning based on the collected second attack sample and the living body sample to obtain the living body feature model; the living body feature model is used for extracting feature information of the object to be detected.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
determining a two-classification training model;
respectively taking the second attack sample and the living body sample as two types of input data of the two-classification training model for training;
and when the training result reaches a preset convergence condition, obtaining the living body characteristic model.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
and extracting the sample characteristics of the collected first attack sample by using the living body characteristic model to obtain the attack sample set.
Optionally, the matching degree comprises a similarity degree;
the computer executable instructions, when executed, may further cause the processor to:
calculating the vector distance between the feature information and the first attack sample feature by using a specified vector distance algorithm;
and determining the similarity between the feature information and the first attack sample feature according to the vector distance.
Optionally, the vector distance comprises at least one of a euclidean distance, a cosine distance, a mahalanobis distance, a hybrid distance.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
collecting a third attack sample according to a preset collection frequency;
extracting sample features of the third attack sample by using the living body feature model;
adding the sample features of the third attack sample to the attack sample set to update the attack sample set.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
and if the object to be detected is determined to be an attack object, adding the characteristic information of the object to be detected to the attack sample set to update the attack sample set.
One or more embodiments of the present specification also propose a computer-readable storage medium storing one or more programs, the one or more programs including instructions, which when executed by an electronic device including a plurality of application programs, enable the electronic device to perform the above-mentioned liveness detection method, and in particular to perform:
extracting characteristic information of an object to be detected by using a pre-trained living body characteristic model;
matching the characteristic information with a first attack sample characteristic in an attack sample set to determine the matching degree between the characteristic information and the first attack sample characteristic; the first attack sample characteristic refers to a sample characteristic of a first attack sample extracted by the living body characteristic model in advance;
and judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information and the first attack sample characteristic.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
One skilled in the art will recognize that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present specification are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only one or more embodiments of the present disclosure, and is not intended to limit the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of claims of one or more embodiments of the present specification.

Claims (16)

1. A method of in vivo detection comprising:
extracting characteristic information of an object to be detected by using a pre-trained living body characteristic model;
matching the characteristic information with a first attack sample characteristic in an attack sample set to determine the matching degree between the characteristic information and the first attack sample characteristic; the first attack sample characteristic refers to a sample characteristic of a first attack sample extracted by the living body characteristic model in advance;
and judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information and the first attack sample characteristic.
2. The method according to claim 1, wherein the determining whether the object to be detected is a living body according to the matching degree between the feature information and the first attack sample feature comprises:
determining the highest matching degree between the feature information and the first attack sample feature according to the matching degree between the feature information and the attack sample feature;
if the highest matching degree between the characteristic information and the first attack sample characteristic is larger than or equal to a preset threshold value, determining that the object to be detected is an attack object;
and if the highest matching degree between the characteristic information and the first attack sample characteristic is smaller than the preset threshold value, determining that the object to be detected is a living body.
3. The method of claim 1, training the living body feature model according to the steps of:
performing feature learning based on the collected second attack sample and the living body sample to obtain the living body feature model; the living body feature model is used for extracting feature information of the object to be detected.
4. The method of claim 3, wherein the performing feature learning based on the second attack sample and the live sample to obtain the live feature model comprises:
determining a two-classification training model;
respectively taking the second attack sample and the living body sample as two types of input data of the two-classification training model for training;
and when the training result reaches a preset convergence condition, obtaining the living body characteristic model.
5. The method of claim 1, the attack sample set is established by:
and extracting the sample characteristics of the collected first attack sample by using the living body characteristic model to obtain the attack sample set.
6. The method of claim 1, the degree of match comprising a degree of similarity;
the matching the feature information with a first attack sample feature in an attack sample set to determine a matching degree between the feature information and the first attack sample feature includes:
calculating the vector distance between the feature information and the first attack sample feature by using a specified vector distance algorithm;
and determining the similarity between the feature information and the first attack sample feature according to the vector distance.
7. The method of claim 6, the vector distance comprising at least one of a Euclidean distance, a cosine distance, a Mahalanobis distance, a hybrid distance.
8. The method of claim 1, further comprising:
collecting a third attack sample according to a preset collection frequency;
extracting sample features of the third attack sample by using the living body feature model;
adding the sample features of the third attack sample to the attack sample set to update the attack sample set.
9. The method of claim 1, further comprising:
and if the object to be detected is determined to be an attack object, adding the characteristic information of the object to be detected to the attack sample set to update the attack sample set.
10. A living body detection apparatus comprising:
the first extraction module is used for extracting the characteristic information of the object to be detected by utilizing a pre-trained living body characteristic model;
the matching module is used for matching the characteristic information with a first attack sample characteristic in an attack sample set so as to determine the matching degree between the characteristic information and the first attack sample characteristic; the first attack sample characteristic refers to a sample characteristic of a first attack sample extracted by the living body characteristic model in advance;
and the judging module is used for judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information and the first attack sample characteristic.
11. The apparatus of claim 10, the determining means comprising:
the first determining unit is used for determining the highest matching degree between the feature information and the first attack sample feature according to the matching degree between the feature information and the attack sample feature;
the second determining unit is used for determining the object to be detected as an attack object if the highest matching degree between the feature information and the first attack sample feature is greater than or equal to a preset threshold value;
and the third determining unit is used for determining that the object to be detected is a living body if the highest matching degree between the feature information and the first attack sample feature is smaller than the preset threshold value.
12. The apparatus of claim 10, further comprising a training module to train the in vivo feature model;
the training module comprises:
the learning unit is used for performing feature learning based on the collected second attack sample and the living body sample to obtain the living body feature model; the living body feature model is used for extracting feature information of the object to be detected.
13. The apparatus of claim 10, the degree of match comprising a degree of similarity;
the matching module includes:
the calculation unit is used for calculating the vector distance between the feature information and the first attack sample feature by using a specified vector distance algorithm;
and the determining unit is used for determining the similarity between the feature information and the first attack sample feature according to the vector distance.
14. The apparatus of claim 13, the vector distance comprising at least one of a euclidean distance, a cosine distance, a mahalanobis distance, a hybrid distance.
15. A living body examination apparatus comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
extracting characteristic information of an object to be detected by using a pre-trained living body characteristic model;
matching the characteristic information with a first attack sample characteristic in an attack sample set to determine the matching degree between the characteristic information and the first attack sample characteristic; the first attack sample characteristic refers to a sample characteristic of a first attack sample extracted by the living body characteristic model in advance;
and judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information and the first attack sample characteristic.
16. A storage medium storing computer-executable instructions that, when executed, implement the following:
extracting characteristic information of an object to be detected by using a pre-trained living body characteristic model;
matching the characteristic information with a first attack sample characteristic in an attack sample set to determine the matching degree between the characteristic information and the first attack sample characteristic; the first attack sample characteristic refers to a sample characteristic of a first attack sample extracted by the living body characteristic model in advance;
and judging whether the object to be detected is a living body or not according to the matching degree between the characteristic information and the first attack sample characteristic.
CN201910773428.2A 2019-08-21 2019-08-21 Living body detection method and device Pending CN110633647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910773428.2A CN110633647A (en) 2019-08-21 2019-08-21 Living body detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910773428.2A CN110633647A (en) 2019-08-21 2019-08-21 Living body detection method and device

Publications (1)

Publication Number Publication Date
CN110633647A true CN110633647A (en) 2019-12-31

Family

ID=68970659

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910773428.2A Pending CN110633647A (en) 2019-08-21 2019-08-21 Living body detection method and device

Country Status (1)

Country Link
CN (1) CN110633647A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209863A (en) * 2020-01-07 2020-05-29 北京旷视科技有限公司 Living body model training and human face living body detection method, device and electronic equipment
CN111507262A (en) * 2020-04-17 2020-08-07 北京百度网讯科技有限公司 Method and apparatus for detecting living body

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107070852A (en) * 2016-12-07 2017-08-18 东软集团股份有限公司 Network attack detecting method and device
CN107545241A (en) * 2017-07-19 2018-01-05 百度在线网络技术(北京)有限公司 Neural network model is trained and biopsy method, device and storage medium
CN108694357A (en) * 2017-04-10 2018-10-23 北京旷视科技有限公司 Method, apparatus and computer storage media for In vivo detection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107070852A (en) * 2016-12-07 2017-08-18 东软集团股份有限公司 Network attack detecting method and device
CN108694357A (en) * 2017-04-10 2018-10-23 北京旷视科技有限公司 Method, apparatus and computer storage media for In vivo detection
CN107545241A (en) * 2017-07-19 2018-01-05 百度在线网络技术(北京)有限公司 Neural network model is trained and biopsy method, device and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209863A (en) * 2020-01-07 2020-05-29 北京旷视科技有限公司 Living body model training and human face living body detection method, device and electronic equipment
CN111209863B (en) * 2020-01-07 2023-12-15 北京旷视科技有限公司 Living model training and human face living body detection method and device and electronic equipment
CN111507262A (en) * 2020-04-17 2020-08-07 北京百度网讯科技有限公司 Method and apparatus for detecting living body
CN111507262B (en) * 2020-04-17 2023-12-08 北京百度网讯科技有限公司 Method and apparatus for detecting living body

Similar Documents

Publication Publication Date Title
CN109948408B (en) Activity test method and apparatus
WO2022161286A1 (en) Image detection method, model training method, device, medium, and program product
CN109284675B (en) User identification method, device and equipment
CN110569721A (en) Recognition model training method, image recognition method, device, equipment and medium
CN111476306A (en) Object detection method, device, equipment and storage medium based on artificial intelligence
EP2869239A2 (en) Systems and methods for facial representation
CN108664526B (en) Retrieval method and device
CN109299594B (en) Identity verification method and device
WO2021137946A1 (en) Forgery detection of face image
CN112668519A (en) Abnormal face recognition living body detection method and system based on MCCAE network and Deep SVDD network
US11893497B2 (en) Method and apparatus for acquiring feature data from low-bit image
CN113240718A (en) Multi-target identification and tracking method, system, medium and computing device
CN113269010B (en) Training method and related device for human face living body detection model
CN110633647A (en) Living body detection method and device
CN113642639B (en) Living body detection method, living body detection device, living body detection equipment and storage medium
Abate et al. Smartphone enabled person authentication based on ear biometrics and arm gesture
CN113723352A (en) Text detection method, system, storage medium and electronic equipment
CN112200109A (en) Face attribute recognition method, electronic device, and computer-readable storage medium
CN111753583A (en) Identification method and device
CN115984977A (en) Living body detection method and system
US11087121B2 (en) High accuracy and volume facial recognition on mobile platforms
CN113869198A (en) Iris image processing method, iris image processing device, electronic equipment and computer readable medium
CN112883831A (en) Living body detection method and device, electronic equipment and storage medium
CN112070022A (en) Face image recognition method and device, electronic equipment and computer readable medium
Alajaji et al. Triplet-based Domain Adaptation (Triple-DARE) for Lab-to-field Human Context Recognition

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40019626

Country of ref document: HK

TA01 Transfer of patent application right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20191231

RJ01 Rejection of invention patent application after publication