CN109635770A - Biopsy method, device, storage medium and electronic equipment - Google Patents
Biopsy method, device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN109635770A CN109635770A CN201811565579.0A CN201811565579A CN109635770A CN 109635770 A CN109635770 A CN 109635770A CN 201811565579 A CN201811565579 A CN 201811565579A CN 109635770 A CN109635770 A CN 109635770A
- Authority
- CN
- China
- Prior art keywords
- image
- dimensional color
- depth
- living body
- face
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/40—Spoof detection, e.g. liveness detection
- G06V40/45—Detection of the body part being alive
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Image Analysis (AREA)
Abstract
The embodiment of the present application discloses a kind of biopsy method, device, storage medium and electronic equipment, wherein, it can shoot to obtain the Two-dimensional Color Image of face to be detected by the monocular cam configured first, then the Two-dimensional Color Image that shooting obtains is input to estimation of Depth model trained in advance and carries out estimation of Depth, obtain the depth image of corresponding Two-dimensional Color Image, the Two-dimensional Color Image obtained before and its input of corresponding depth image In vivo detection model trained in advance are finally subjected to In vivo detection, obtain testing result.As a result, electronic equipment is without the depth camera that additionally configures, but In vivo detection can be realized using the monocular cam of common configuration, reduces the hardware cost that electronic equipment realizes In vivo detection.
Description
Technical field
This application involves technical field of face recognition, and in particular to a kind of biopsy method, device, storage medium and electricity
Sub- equipment.
Background technique
Currently, electronic equipment can not only distinguish user's individual using related face recognition technology, additionally it is possible to user into
Row In vivo detection, for example, electronic equipment passes through the structure light video camera head or flight time camera even depth camera configured
Obtain the RGB-D image of user's face (such as user's facial image of shooting), it can be determined that whether user's face is living body faces.
However, the realization of the relevant technologies needs electronic equipment to be equipped with additional depth camera, increases electronic equipment and realize living body inspection
The cost of survey.
Summary of the invention
The embodiment of the present application provides a kind of biopsy method, device, storage medium and electronic equipment, can reduce electricity
Sub- equipment realizes the hardware cost of In vivo detection.
In a first aspect, the embodiment of the present application provides a kind of biopsy method, it is applied to electronic equipment, the electronics is set
Standby includes monocular cam, and the biopsy method includes:
Face to be detected is shot by the monocular cam, obtains the two-dimensional color figure of the face to be detected
Picture;
By Two-dimensional Color Image input estimation of Depth model trained in advance, obtain corresponding to the Two-dimensional Color Image
Depth image;
By the Two-dimensional Color Image and the depth image input In vivo detection model trained in advance, detection knot is obtained
Fruit.
Second aspect, the embodiment of the present application provide a kind of living body detection device, are applied to electronic equipment, and the electronics is set
Standby includes monocular cam, and the living body detection device includes:
Color image obtains module, for being shot by the monocular cam to face to be detected, obtains described
The Two-dimensional Color Image of face to be detected;
Depth image obtains module, for the estimation of Depth model that Two-dimensional Color Image input is trained in advance, obtains
To the depth image of the correspondence Two-dimensional Color Image;
Living body faces detection module examines the Two-dimensional Color Image and the depth image input living body trained in advance
Model is surveyed, testing result is obtained.
The third aspect, the embodiment of the present application provide a kind of storage medium, are stored thereon with computer program, when the meter
When calculation machine program is run on computers, so that the computer is executed as in biopsy method provided by the embodiments of the present application
The step of.
Fourth aspect, the embodiment of the present application provide a kind of electronic equipment, including processor, memory and monocular camera shooting
Head, the memory have computer program, and the processor is by calling the computer program, for executing as the application is real
Step in the biopsy method of example offer is provided.
In the embodiment of the present application, electronic equipment can shoot to obtain face to be detected by the monocular cam configured first
Two-dimensional Color Image, then will the obtained Two-dimensional Color Image of shooting be input to estimation of Depth model trained in advance carry out it is deep
Degree estimation, obtains the depth image of corresponding Two-dimensional Color Image, finally by the Two-dimensional Color Image obtained before and its corresponding
Depth image input In vivo detection model trained in advance carries out In vivo detection, obtains testing result.As a result, electronic equipment
Without the depth camera additionally configured, but In vivo detection can be realized using the monocular cam of common configuration, drops
Low electronic equipment realizes the hardware cost of In vivo detection.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for
For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is a flow diagram of biopsy method provided by the embodiments of the present application.
Fig. 2 is the schematic diagram that electronic equipment carries out In vivo detection by In vivo detection model in the embodiment of the present application.
Fig. 3 is another flow diagram of biopsy method provided by the embodiments of the present application.
Fig. 4 is the schematic diagram that training sample set is constructed in the embodiment of the present application.
Fig. 5 is a structural schematic diagram of living body detection device provided by the embodiments of the present application.
Fig. 6 is a structural schematic diagram of electronic equipment provided by the embodiments of the present application.
Fig. 7 is another structural schematic diagram of electronic equipment provided by the embodiments of the present application.
Specific embodiment
Schema is please referred to, wherein identical component symbol represents identical component, the principle of the application is to implement one
It is illustrated in computing environment appropriate.The following description be based on illustrated by the application specific embodiment, should not be by
It is considered as limitation the application other specific embodiments not detailed herein.
Currently, face recognition technology is widely used in unlock and secure payment of electronic equipment etc., but utilize non-live
Body facial image, non-living body face video, face mask or headform etc. can easy personation, user is caused
Loss.To solve this defect in face recognition technology, proposed in the related technology based on structure light video camera head or flight
The In vivo detection technology of time camera even depth camera, however its realization needs electronic equipment to be equipped with additional depth camera
Head increases the cost that electronic equipment realizes In vivo detection.For this purpose, the embodiment of the present application provides a kind of In vivo detection side first
Method, the biopsy method realize In vivo detection based on the monocular cam of electronic equipment common configuration, not will increase electronics and set
Standby hardware cost.Wherein, the executing subject of the biopsy method can be In vivo detection dress provided by the embodiments of the present application
It sets, being perhaps integrated with the electronic equipment of the living body detection device living body detection device can be using the side of hardware or software
Formula realizes that electronic equipment can be the configuration such as smart phone, tablet computer, palm PC, laptop or desktop computer
There is a processor and the equipment with processing capacity.
Fig. 1 is please referred to, Fig. 1 is the flow diagram of biopsy method provided by the embodiments of the present application.As shown in Figure 1,
The process of biopsy method provided by the embodiments of the present application can be such that
In 101, face to be detected is shot by monocular cam, obtains the two-dimensional color figure of face to be detected
Picture.
In the embodiment of the present application, electronic equipment can operate or based on face receiving the unlock based on recognition of face
When the delivery operation etc. of identification needs to carry out the operation of user identity detection using recognition of face, pass through the monocular cam configured
Face to be detected is shot, since monocular cam is only sensitive to two-dimensional colouring information, shooting is obtained into people to be detected
The Two-dimensional Color Image of face.
It should be noted that respectively preposition monocular images currently, electronic equipment is commonly configured with two monocular cams
Head (that is to say the front camera being commonly called as) and postposition monocular cam (that is to say the rear camera being commonly called as), and postposition monocular
The imaging capability of camera is higher than the imaging capability of preposition monocular cam, in this way, electronic equipment is passing through monocular cam pair
When face to be detected is shot, it can default through preposition monocular cam and execute shooting operation, to face to be detected
It is shot;It can also default through postposition monocular cam and execute shooting operation, to be shot to face to be detected;Also
It can be according to real-time posture information, to predict in preposition monocular cam and postposition monocular cam towards face to be detected
Monocular cam, to be taken the photograph automatically by preposition monocular cam and postposition monocular cam towards the monocular of face to be detected
Shooting operation is executed as head, to shoot to face to be detected.
For example, the currently employed unlocking manner of electronic equipment is " face unlock ", then when electronic equipment receives face solution
When the trigger action of lock, default shoots face to be detected by preposition monocular cam, thus obtains face to be detected
Two-dimensional Color Image.
For another example, the currently employed means of payment of electronic equipment is " payment of brush face ", then when electronic equipment receives brush face
When the trigger action of payment, default shoots face to be detected by preposition monocular cam, thus obtains people to be detected
The Two-dimensional Color Image of face.
In 102, the estimation of Depth model that the Two-dimensional Color Image input that shooting obtains is trained in advance is subjected to depth and is estimated
Meter obtains the depth image of corresponding Two-dimensional Color Image.
It should be noted that training has the estimation of Depth model for estimation of Depth in advance in the embodiment of the present application,
In, which can store in electronic equipment local, also can store in server at the far end.In this way, electronics
Equipment calls depth trained in advance after the Two-dimensional Color Image for getting face to be detected by monocular cam, from local
Estimation model or the estimation of Depth model trained in advance from the server calls of distal end, and by the two-dimensional color of face to be detected
Image is input to estimation of Depth model trained in advance, carries out depth to Two-dimensional Color Image by the estimation of Depth model and estimates
Meter obtains the depth image of corresponding Two-dimensional Color Image.
It should be noted that the resolution ratio that estimation obtains depth image is identical as the resolution ratio of Two-dimensional Color Image, depth
In image the pixel value of each pixel for describe its in Two-dimensional Color Image corresponding pixel to aforementioned monocular cam
The distance of (i.e. shooting obtains the monocular cam of Two-dimensional Color Image).
For example, electronic equipment the Two-dimensional Color Image for shooting to obtain face to be detected by preposition monocular cam it
Afterwards, estimation of Depth model being locally stored, trained in advance is called, Two-dimensional Color Image is carried out by the estimation of Depth model
Estimation of Depth obtains the depth image of corresponding Two-dimensional Color Image.
In 103, by Two-dimensional Color Image and its input of corresponding depth image In vivo detection model trained in advance into
Row In vivo detection, obtains testing result.
It should be noted that in the embodiment of the present application, in addition to training has the estimation of Depth mould for estimation of Depth in advance
Except type, also training has the In vivo detection model for In vivo detection in advance, wherein the In vivo detection model can store in electricity
Sub- equipment is local, also can store in server at the far end.In this way, electronic equipment will shoot to obtain by monocular cam
Two-dimensional Color Image be input in advance trained estimation of Depth model, and obtain corresponding Two-dimensional Color Image depth image it
Afterwards, the In vivo detection model trained in advance or the In vivo detection mould trained in advance from the server calls of distal end are called from local
Type, and the Two-dimensional Color Image got before and its corresponding depth image are input to In vivo detection mould trained in advance
Type, Two-dimensional Color Image and its corresponding depth image by the In vivo detection model based on input carry out face to be detected
In vivo detection obtains face to be detected and is the testing result of living body faces, or obtaining face to be detected is non-living body face
Testing result.
For example, referring to figure 2., electronic equipment is color in the two dimension for shooting to obtain face to be detected by preposition monocular cam
After chromatic graph picture, estimation of Depth model being locally stored, trained in advance is called, by the estimation of Depth model to two-dimensional color
Image carries out estimation of Depth, obtains the depth image of corresponding Two-dimensional Color Image, then, calls be locally stored, training in advance
In vivo detection model, and will before obtain Two-dimensional Color Image and its corresponding depth image be input to In vivo detection model into
Row In vivo detection, obtains testing result, wherein if obtaining the testing result that face to be detected is living body faces, illustrates to be checked
It surveys face and is the real human face of the people with vital sign, if obtaining the testing result that face to be detected is non-living body face,
Illustrate face to be detected not and be the real human face of the people with vital sign, it may be possible to which shooting obtains facial image or people in advance
Face video etc..
From the foregoing, it will be observed that the electronic equipment in the embodiment of the present application, can be shot by the monocular cam configured first
To the Two-dimensional Color Image of face to be detected, the Two-dimensional Color Image that shooting obtains then is input to depth trained in advance and is estimated
It counts model and carries out estimation of Depth, obtain the depth image of corresponding Two-dimensional Color Image, the two-dimensional color figure that will finally obtain before
The In vivo detection model that picture and its input of corresponding depth image are trained in advance carries out In vivo detection, obtains testing result.As a result,
So that electronic equipment is without the depth camera that additionally configures, but can be realized using the monocular cam of common configuration
In vivo detection reduces the hardware cost that electronic equipment realizes In vivo detection.
Referring to figure 3., Fig. 3 is another flow diagram of biopsy method provided by the embodiments of the present application.The work
Body detecting method can be applied to electronic equipment, and the process of the biopsy method may include:
In 201, electronic equipment obtains estimation of Depth model and In vivo detection model using machine learning algorithm training,
In, In vivo detection model is convolutional neural networks model.
In the embodiment of the present application, electronic equipment uses machine learning algorithm training to obtain estimation of Depth model and living body in advance
Detection model.It, can be with it should be noted that electronic equipment is after training obtained estimation of Depth model and In vivo detection model
Estimation of Depth model and In vivo detection model are stored in electronic equipment local, it can also be by estimation of Depth model and In vivo detection
Model stores server at the far end, one in estimation of Depth model and In vivo detection model can also be stored in electronics and set
It is standby locally, by another to store server at the far end.
Wherein, machine learning algorithm may include: decision-tree model, Logic Regression Models, Bayesian model, neural network
Model, Clustering Model etc..
The algorithm types of machine learning algorithm can be divided according to various situations, for example, can be with based on mode of learning
Machine learning algorithm is divided into: supervised learning algorithm, non-supervised formula learning algorithm, semi-supervised learning algorithm, extensive chemical
Practise algorithm etc..
Under supervised study, input data is referred to as " training data ", and every group of training data has a specific mark
Or as a result, such as to " spam " " non-spam email " in Anti-Spam, to " 1,2,3,4 " in Handwritten Digit Recognition
Deng.Common the application scenarios such as classification problem and regression problem of supervised study.Common algorithms have logistic regression (Logistic
) and back transfer neural network (Back Propagation Neural Network) Regression.
In the study of non-supervisory formula, data are not particularly identified, and model is some inherent knots in order to be inferred to data
Structure.Common application scenarios include study and cluster of correlation rule etc..Common algorithms include Apriori algorithm and k-
Means algorithm etc..
Semi-supervised learning algorithm, under this mode of learning, input data can be used by portion identification, this learning model
Carry out type identification, but model is pre- to carry out reasonably to organize organization data firstly the need of the immanent structure of learning data
It surveys.Application scenarios include classification and return, and algorithm includes some extensions to common supervised learning algorithm, these algorithms are first
Attempt to model non-mark data, the data of mark are predicted again on this basis.Such as graph theory reasoning algorithm
(Graph Inference) or Laplce's support vector machines (Laplacian SVM) etc..
Nitrification enhancement, under this mode of learning, input data as the feedback to model, unlike monitor model that
Sample, input data are merely possible to an inspection model to wrong mode, and under intensified learning, input data is directly fed back to mould
Type, model must make adjustment at once to this.Common application scenarios include dynamical system and robot control etc..Common calculation
Method includes Q-Learning and time difference study (Temporal difference learning).
Further, it is also possible to based on machine learning algorithm is divided into according to the function of algorithm and the similarity of form:
Regression algorithm, common regression algorithm include: least square method (Ordinary Least Square), and logic is returned
Return (Logistic Regression), multi step format returns (Stepwise Regression), Multivariate adaptive regression splines batten
(Multivariate Adaptive Regression Splines) and local scatterplot smoothly estimate (Locally
Estimated Scatterplot Smoothing)。
The algorithm of Case-based Reasoning, including k-Nearest Neighbor (KNN), learning vector quantizations (Learning
Vector Quantization, LVQ) and Self-organizing Maps algorithm (Self-Organizing Map, SOM).
Regularization method, common algorithm include: Ridge Regression, Least Absolute Shrinkage
And Selection Operator (LASSO) and elastomeric network (Elastic Net).
Decision Tree algorithms, common algorithm include: classification and regression tree (Classification And Regression
Tree, CART), ID3 (Iterative Dichotomiser 3), C4.5, Chi-squared Automatic
Interaction Detection (CHAID), Decision Stump, random forest (Random Forest) are polynary adaptive
Answer regression spline (MARS) and Gradient Propulsion machine (Gradient Boosting Machine, GBM).
Bayes method algorithm, comprising: NB Algorithm, average single rely on estimate (Averaged One-
Dependence Estimators, AODE) and Bayesian Belief Network (BBN).
For example, that is to say In vivo detection using convolutional neural networks in the embodiment of the present application come training living body detection model
Model be convolutional neural networks model, wherein the convolutional neural networks model include convolutional layer, pond layer, full articulamentum and
Classifier.
In 202, electronic equipment shoots face to be detected by monocular cam, obtains the two of face to be detected
Tie up color image.
In the embodiment of the present application, electronic equipment can operate or based on face receiving the unlock based on recognition of face
When the delivery operation etc. of identification needs to carry out the operation of user identity detection using recognition of face, pass through the monocular cam configured
Face to be detected is shot, since monocular cam is only sensitive to two-dimensional colouring information, shooting is obtained into people to be detected
The Two-dimensional Color Image of face.
It should be noted that respectively preposition monocular images currently, electronic equipment is commonly configured with two monocular cams
Head (that is to say the front camera being commonly called as) and postposition monocular cam (that is to say the rear camera being commonly called as), and postposition monocular
The imaging capability of camera is higher than the imaging capability of preposition monocular cam, in this way, electronic equipment is passing through monocular cam pair
When face to be detected is shot, it can default through preposition monocular cam and execute shooting operation, to face to be detected
It is shot;It can also default through postposition monocular cam and execute shooting operation, to be shot to face to be detected;Also
It can be according to real-time posture information, to predict in preposition monocular cam and postposition monocular cam towards face to be detected
Monocular cam, to be taken the photograph automatically by preposition monocular cam and postposition monocular cam towards the monocular of face to be detected
Shooting operation is executed as head, to shoot to face to be detected.
For example, the currently employed unlocking manner of electronic equipment is " face unlock ", then when electronic equipment receives face solution
When the trigger action of lock, default shoots face to be detected by preposition monocular cam, thus obtains face to be detected
Two-dimensional Color Image.
For another example, the currently employed means of payment of electronic equipment is " payment of brush face ", then when electronic equipment receives brush face
When the trigger action of payment, default shoots face to be detected by preposition monocular cam, thus obtains people to be detected
The Two-dimensional Color Image of face.
In 203, the Two-dimensional Color Image input that electronic equipment obtains shooting estimation of Depth model trained in advance into
Row estimation of Depth obtains the depth image of corresponding Two-dimensional Color Image.
Wherein, electronic equipment is after the Two-dimensional Color Image for getting face to be detected by monocular cam, from local
The estimation of Depth model for calling estimation of Depth model trained in advance or being trained in advance from the server calls of distal end, and will be to
The Two-dimensional Color Image of detection face is input to estimation of Depth model trained in advance, by the estimation of Depth model to two-dimentional color
Chromatic graph picture carries out estimation of Depth, obtains the depth image of corresponding Two-dimensional Color Image.
It should be noted that the resolution ratio that estimation obtains depth image is identical as the resolution ratio of Two-dimensional Color Image, depth
In image the pixel value of each pixel for describe its in Two-dimensional Color Image corresponding pixel to aforementioned monocular cam
The distance of (i.e. shooting obtains the monocular cam of Two-dimensional Color Image).
For example, electronic equipment the Two-dimensional Color Image for shooting to obtain face to be detected by preposition monocular cam it
Afterwards, estimation of Depth model being locally stored, trained in advance is called, Two-dimensional Color Image is carried out by the estimation of Depth model
Estimation of Depth obtains the depth image of corresponding Two-dimensional Color Image.
In 204, aforementioned Two-dimensional Color Image and its corresponding depth image are inputted convolutional neural networks by electronic equipment
The convolutional layer of model carries out feature extraction, obtains the joint global characteristics of aforementioned Two-dimensional Color Image and aforementioned depth image.
In the embodiment of the present application, electronic equipment is input to by the Two-dimensional Color Image shot by monocular cam
Estimation of Depth model trained in advance, and after obtaining the depth image of corresponding Two-dimensional Color Image, instruction in advance is called from local
Experienced In vivo detection model or the In vivo detection model trained in advance from the server calls of distal end, utilize the In vivo detection mould
The convolutional neural networks model realization In vivo detection of training before type that is to say.
Firstly, aforementioned Two-dimensional Color Image and its corresponding depth image are inputted convolutional neural networks model by electronic equipment
Convolutional layer carry out feature extraction (feature extraction, which that is to say, is mapped to hidden layer feature space for original image data, thus come
Obtain corresponding global characteristics), obtain the global characteristics of Two-dimensional Color Image and the global characteristics of depth image.Later, it is rolling up
Lamination carries out characteristic binding to the global characteristics of Two-dimensional Color Image and the global characteristics of depth image, obtains aforementioned two-dimensional color
The joint global characteristics of image and aforementioned depth image.
In 205, electronic equipment carries out the pond layer for obtaining joint global characteristics input convolutional neural networks model special
Levy dimensionality reduction, the joint global characteristics after obtaining dimensionality reduction.
In the embodiment of the present application, in order to reduce calculation amount, the efficiency of In vivo detection is promoted, by aforementioned the two of convolutional layer output
The joint global characteristics of dimension color image and aforementioned depth image carry out down the pond layer for being entered convolutional neural networks model
Sampling that is to say the notable feature retained in joint global characteristics, realize the Feature Dimension Reduction to joint global characteristics.Wherein, under
Sampling can be realized by the modes such as maximum pond or mean value pond.
Such as, it is assumed that the joint global characteristics that convolutional layer output is 20*20, by pond layer to the joint global characteristics
Carry out Feature Dimension Reduction, the joint global characteristics after obtaining the dimensionality reduction of 10*10.
In 206, the joint global characteristics after dimensionality reduction are inputted the full articulamentum of convolutional neural networks model by electronic equipment
Classification processing is carried out, face to be detected is obtained and is the testing result of living body faces, or obtaining face to be detected is non-living body people
The testing result of face.
Wherein, full articulamentum for realizing classifier function, each of which node all with all output knots of pond layer
Point is connected, and a node of full articulamentum is a neuron being known as in full articulamentum, the quantity of neuron in full articulamentum
It can be depending on the demand of practical application, for example, 4096, etc. can be set by the neuronal quantity of full articulamentum.
In the embodiment of the present application, the joint global characteristics after the dimensionality reduction that pond layer is exported will be input into full articulamentum into
Row classification processing obtains face to be detected and is the testing result of living body faces, or obtaining face to be detected is non-living body face
Testing result.
In one embodiment, aforementioned Two-dimensional Color Image and its corresponding depth image are being inputted into convolutional neural networks
The convolutional layer of model carries out feature extraction, when obtaining the joint global characteristics of aforementioned Two-dimensional Color Image and aforementioned depth image,
It can execute:
(1) electronic equipment pre-processes aforementioned Two-dimensional Color Image, obtains the face in aforementioned Two-dimensional Color Image
Area image;
(2) electronic equipment pre-processes aforementioned depth image, obtains the human face region image in aforementioned depth image;
(3) electronic equipment is by the face area in the human face region image and aforementioned depth image in aforementioned Two-dimensional Color Image
Area image inputs aforementioned convolutional layer and carries out feature extraction, and the joint for obtaining aforementioned Two-dimensional Color Image and aforementioned depth image is global
Feature.
For the efficiency for further promoting In vivo detection, electronic equipment is by aforementioned Two-dimensional Color Image and its corresponding depth
It is not by original aforementioned Two-dimensional Color Image when the convolutional layer that image inputs convolutional neural networks model carries out feature extraction
The convolutional layer for being input to convolutional neural networks with original aforementioned depth image carries out feature extraction, but first respectively to aforementioned two
Dimension color image and aforementioned depth image are pre-processed, and human face region image in aforementioned Two-dimensional Color Image and preceding is obtained
State the human face region image in depth image.
Wherein, electronic equipment can be used when pre-processing to aforementioned Two-dimensional Color Image and aforementioned depth image
The modes such as oval template, circular shuttering or rectangle template are mentioned from aforementioned Two-dimensional Color Image and aforementioned depth image respectively
Human face region image is taken, the face in the human face region image and aforementioned depth image in aforementioned Two-dimensional Color Image is thus obtained
Area image.
In one embodiment, it when obtaining In vivo detection model using machine learning algorithm training, can execute:
(1) electronic equipment shoots multiple and different living body faces by monocular cam, obtains multiple two-dimensional colors
Living body faces sample image, and the corresponding depth image of each two-dimensional color living body faces sample image is obtained, obtain multiple first
Depth image;
(2) electronic equipment shoots multiple and different non-living body faces by monocular cam, and it is color to obtain multiple two dimensions
Color non-living body face sample image, and the corresponding depth image of each two-dimensional color non-living body face sample image is obtained, it obtains more
A second depth image;
(3) electronic equipment is using each two-dimensional color living body faces sample image and its corresponding first depth image as positive sample
Originally, using each two-dimensional color non-living body face sample image and its corresponding second depth image as negative sample, training sample is constructed
This collection;
(4) electronic equipment carries out model training to training sample set using convolutional neural networks, obtains convolutional neural networks
Model, as In vivo detection model.
Wherein, on the one hand, electronic equipment can by its configuration monocular cam to the different colours of skin, different sexes and
The face (i.e. living body faces) of the user of different age group is shot, and obtains multiple two-dimensional color living body faces sample images,
In addition, electronic equipment also obtains the corresponding depth image of each two-dimensional color non-living body face sample image, it is deep to obtain multiple first
Spend image.
For example, electronic equipment can carry out any living body faces by monocular cam with external depth camera
When shooting, synchronization is shot by external depth camera, in this way, electronic equipment will shoot to obtain by monocular cam
The two-dimensional color living body faces sample image of the living body faces, shoots to obtain the living body faces by external depth camera
Then depth image and two-dimensional color living body faces sample image that shooting obtains are aligned, after alignment by depth image
Depth image be denoted as the first depth image of two-dimensional color living body faces sample image.
On the other hand, electronic equipment can also by its configuration monocular cam to different faces image, face video,
The non-living bodies face such as face mask and headform is shot, and obtains multiple two-dimensional color non-living body face sample images,
In addition, electronic equipment also obtains the corresponding depth image of each two-dimensional color non-living body face sample image, it is deep to obtain multiple second
Spend image.
For example, electronic equipment can with external depth camera, by monocular cam to any non-living body face into
When row shooting, synchronization is shot by external depth camera, in this way, electronic equipment will be shot by monocular cam
To the two-dimensional color non-living body face sample image of the non-living body face, shoot to obtain this by external depth camera non-live
Then the depth image of body face carries out the obtained depth image of shooting and two-dimensional color non-living body face sample image pair
Together, the depth image after alignment is denoted as to the second depth image of two-dimensional color non-living body face sample image.
Electronic equipment in the multiple two-dimensional color living body faces sample images and its corresponding first depth image got,
It is and after getting multiple two-dimensional color non-living body face sample images and its corresponding second depth image, each two dimension is color
Color living body faces sample image and its corresponding first depth image as positive sample, by each two-dimensional color non-living body face sample
Image and its corresponding second depth image construct training sample set, as shown in Figure 4 as negative sample.
Electronic equipment is after the building for completing training sample set, using convolutional neural networks to the training sample set of building
Model training is carried out, convolutional neural networks model is obtained, as the In vivo detection model for In vivo detection.
It, can be with it should be noted that when carrying out model training to the training sample set of building using convolutional neural networks
Using supervised learning method, unsupervised learning method can also be used, it specifically can be by those of ordinary skill in the art according to reality
It is chosen.
In one embodiment, model training is being carried out to training sample set using convolutional neural networks, is obtaining convolution mind
Through network model, before In vivo detection model, further includes:
Electronic equipment expands strategy according to preset sample and carries out sample expansion processing to training sample set.
In the embodiment of the present application, the diversity of sample can be increased by carrying out sample expansion to training sample set, so that
The convolutional neural networks model that training obtains has stronger robustness.Wherein, sample expands strategy and can be set to training
Positive sample in sample set/negative sample carries out one of rotation by a small margin, scaling, reversion or a variety of.
For example, for training sample concentration by a two-dimensional color living body faces sample image and its corresponding first depth
The positive sample for spending image composition, can be to two-dimensional color living body faces sample image therein and its corresponding first depth image
The rotation for carrying out same magnitude, obtains postrotational two-dimensional color living body faces sample image and postrotational first depth map
Picture forms a new positive sample by postrotational two-dimensional color living body faces sample image and postrotational first depth image
This.
In one embodiment, the corresponding depth image of each two-dimensional color living body faces sample image is being obtained, obtained more
When a first depth image, it can execute:
(1) electronic equipment receives in each two-dimensional color living body faces sample image of calibration each pixel to monocular cam
Distance;
(2) electronic equipment according to each pixel in each two-dimensional color living body faces sample image to monocular cam away from
From generating the corresponding depth image of each two-dimensional color living body faces sample image, obtain multiple first depth images.
Wherein, any two-dimensional color living body faces sample graph obtained captured by monocular cam is passed through for electronic equipment
Picture, can demarcate by hand each pixel in the two-dimensional color living body faces sample image to monocular cam distance, and by electricity
Sub- equipment according to the distance of each pixel in the two-dimensional color living body faces sample image for receiving calibration to monocular cam,
The corresponding depth image of two-dimensional color living body faces sample image is generated, the first depth image is denoted as.
Electronic equipment can receive in each two-dimensional color living body faces sample image of calibration each pixel to monocular as a result,
The distance of camera, and according to the distance of each pixel in each two-dimensional color living body faces sample image to monocular cam, it is raw
At the corresponding depth image of each two-dimensional color living body faces sample image, multiple first depth images are obtained.
In one embodiment, the corresponding depth image of each two-dimensional color non-living body face sample image is being obtained, obtained
When multiple second depth images, it can execute:
Electronic equipment receives in each two-dimensional color non-living body face sample image of calibration each pixel to monocular cam
Distance;
Electronic equipment according to the distance of each pixel in each two-dimensional color non-living body face sample image to monocular cam,
The corresponding depth image of each two-dimensional color non-living body face sample image is generated, multiple second depth images are obtained.
In one embodiment, it when obtaining estimation of Depth model using machine learning algorithm training, can execute:
Electronic equipment makees each two-dimensional color living body faces sample image and each two-dimensional color non-living body face sample image
For training input, by corresponding first depth image of each two-dimensional color living body faces sample image and each two-dimensional color non-living body people
Corresponding second depth image of face sample image is exported as target, has been carried out monitor model training, has been obtained estimation of Depth model.
It should be noted that in the embodiment of the present application, electronic equipment is in addition to utilizing the multiple two-dimensional color living bodies obtained
Face sample image and its corresponding multiple first depth images and multiple two-dimensional color non-living body face sample images and its
Corresponding multiple second depth image training come except training living body detection model, can also utilize the multiple two-dimensional colors obtained
Living body faces sample image and its corresponding multiple first depth images and multiple two-dimensional color non-living body face sample images
And its corresponding multiple second depth images, Lai Xunlian obtain estimation of Depth model.Wherein, electronic equipment can be directly by each two
Tie up colored living body faces sample image and each two-dimensional color non-living body face sample image as training input, by each two-dimensional color
Corresponding first depth image of living body faces sample image and each two-dimensional color non-living body face sample image corresponding second are deeply
It spends image to export as target, has carried out monitor model training, obtained estimation of Depth model.
For example, for any two-dimensional color living body faces sample image, electronic equipment is by the two-dimensional color living body faces sample
This image is defeated as corresponding target using the first depth image of the two-dimensional color living body faces sample image as training input
Out;Likewise, for any two-dimensional color non-living body face sample image, electronic equipment is by the two-dimensional color non-living body face sample
This image is exported as training input using the two-dimensional color non-living body face sample image as corresponding target.
The embodiment of the present application also provides a kind of living body detection device.Referring to figure 5., Fig. 5 is provided by the embodiments of the present application
The structural schematic diagram of living body detection device.Wherein the living body detection device is applied to electronic equipment, which includes monocular
Camera, the living body detection device include that color image obtains module 501, depth image obtains module 502 and living body faces
Detection module 503, as follows:
Color image obtains module 501 and obtains to be detected for being shot by monocular cam to face to be detected
The Two-dimensional Color Image of face;
Depth image obtains module 502, and the depth trained in advance of the Two-dimensional Color Image input for obtaining shooting is estimated
It counts model and carries out estimation of Depth, obtain the depth image of corresponding Two-dimensional Color Image;
Living body faces detection module 503, for training Two-dimensional Color Image and its input of corresponding depth image in advance
In vivo detection model carry out In vivo detection, obtain testing result.
In one embodiment, In vivo detection model is convolutional neural networks model, including sequentially connected convolutional layer, pond
Change layer and full articulamentum, by Two-dimensional Color Image and its input of corresponding depth image In vivo detection model trained in advance into
Row In vivo detection, when obtaining testing result, living body faces detection module 503 can be used for:
Aforementioned Two-dimensional Color Image and its corresponding depth image input convolutional layer are subjected to feature extraction, obtain aforementioned two
Tie up the joint global characteristics of color image and aforementioned depth image;
It will obtain joint global characteristics input pond layer and carry out Feature Dimension Reduction, the joint global characteristics after obtaining dimensionality reduction;
Joint global characteristics after dimensionality reduction are inputted into full articulamentum and carry out classification processing, obtaining face to be detected is living body people
The testing result of face, or obtain the testing result that face to be detected is non-living body face.
In one embodiment, aforementioned Two-dimensional Color Image and its corresponding depth image input convolutional layer are being subjected to spy
Sign is extracted, when obtaining the joint global characteristics of aforementioned Two-dimensional Color Image and aforementioned depth image, living body faces detection module 503
It can be used for:
Aforementioned Two-dimensional Color Image is pre-processed, the human face region image in aforementioned Two-dimensional Color Image is obtained;
Aforementioned depth image is pre-processed, the human face region image in aforementioned depth image is obtained;
By the human face region image input in the human face region image and aforementioned depth image in aforementioned Two-dimensional Color Image
Aforementioned convolutional layer carries out feature extraction, obtains the joint global characteristics of aforementioned Two-dimensional Color Image and aforementioned depth image.
In one embodiment, living body detection device further includes model training module, is used for:
Face to be detected is being shot by monocular cam, obtain face to be detected Two-dimensional Color Image it
Before, multiple and different living body faces are shot by monocular cam, obtain multiple two-dimensional color living body faces sample images,
And the corresponding depth image of each two-dimensional color living body faces sample image is obtained, obtain multiple first depth images;
Multiple and different non-living body faces are shot by monocular cam, obtain multiple two-dimensional color non-living body faces
Sample image, and the corresponding depth image of each two-dimensional color non-living body face sample image is obtained, obtain multiple second depth maps
Picture;
Using each two-dimensional color living body faces sample image and its corresponding first depth image as positive sample, by each two dimension
Colored non-living body face sample image and its corresponding second depth image construct training sample set as negative sample;
Model training is carried out to training sample set using convolutional neural networks, convolutional neural networks model is obtained, as work
Body detection model.
In one embodiment, before carrying out model training to training sample set using convolutional neural networks, model instruction
Practice module:
Expand strategy according to preset sample and sample expansion processing is carried out to training sample set.
In one embodiment, the corresponding depth image of each two-dimensional color living body faces sample image is being obtained, obtained more
When a first depth image, model training module can be used for:
Distance of each pixel to monocular cam in each two-dimensional color living body faces sample image of reception calibration;
Each two dimension is generated to the distance of monocular cam according to each pixel in each two-dimensional color living body faces sample image
The corresponding depth image of colored living body faces sample image, obtains multiple first depth images.
In one embodiment, the corresponding depth image of each two-dimensional color non-living body face sample image is being obtained, obtained
When multiple second depth images, model training module can be used for:
Distance of each pixel to monocular cam in each two-dimensional color non-living body face sample image of reception calibration;
According to the distance of each pixel in each two-dimensional color non-living body face sample image to monocular cam, each two are generated
The corresponding depth image of colored non-living body face sample image is tieed up, multiple second depth images are obtained.
In one embodiment, model training module can be also used for:
Each two-dimensional color living body faces sample image and each two-dimensional color non-living body face sample image is defeated as training
Enter, by corresponding first depth image of each two-dimensional color living body faces sample image and each two-dimensional color non-living body face sample graph
As corresponding second depth image as target export, carried out monitor model training, obtain estimation of Depth model.
The embodiment of the present application provides a kind of computer-readable storage medium, is stored thereon with computer program, when it is deposited
When the computer program of storage executes on computers, so that computer is executed as in biopsy method provided in this embodiment
Step, or computer is executed such as the step in model training method provided in this embodiment.Wherein, storage medium can be with
It is magnetic disk, CD, read-only memory (Read Only Memory, ROM) or random access device (Random Access
Memory, RAM) etc..
The embodiment of the present application also provides a kind of electronic equipment, including memory, and processor, processor is by calling memory
The computer program of middle storage executes the step in biopsy method provided in this embodiment, or executes such as the present embodiment
Step in the model training method of offer.
In one embodiment, a kind of electronic equipment is also provided.Fig. 6 is please referred to, electronic equipment includes processor 701, storage
Device 702 and monocular cam 703.Wherein, processor 701 and memory 702 and monocular cam 703 are electrically connected.
Processor 701 is the control centre of electronic equipment, utilizes each of various interfaces and the entire electronic equipment of connection
A part by the computer program of operation or load store in memory 702, and is called and is stored in memory 702
Data, execute the various functions of electronic equipment and handle data.
Memory 702 can be used for storing software program and module, and processor 701 is stored in memory 702 by operation
Computer program and module, thereby executing various function application and data processing.Memory 702 can mainly include storage
Program area and storage data area, wherein storing program area can computer program needed for storage program area, at least one function
(such as sound-playing function, image player function etc.) etc.;Storage data area can be stored to be created according to using for electronic equipment
Data etc..In addition, memory 702 may include high-speed random access memory, it can also include nonvolatile memory, example
Such as at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memory 702 may be used also
To include Memory Controller, to provide access of the processor 701 to memory 702.
Monocular cam 703 may include the camera with one or more lens and imaging sensor, can capture
External image data.
In the embodiment of the present application, processor 701 in electronic equipment can according to following step, by one or one with
On computer program process it is corresponding instruction be loaded into memory 702, and by processor 701 operation be stored in memory
Computer program in 702, thus realize various functions, it is as follows:
Face to be detected is shot by monocular cam 703, obtains the Two-dimensional Color Image of face to be detected;
The Two-dimensional Color Image input that shooting is obtained estimation of Depth model trained in advance carries out estimation of Depth, obtains pair
Answer the depth image of Two-dimensional Color Image;
Two-dimensional Color Image and its input of corresponding depth image In vivo detection model trained in advance are subjected to living body inspection
It surveys, obtains testing result.
Fig. 7 is please referred to, Fig. 7 is another structural schematic diagram of electronic equipment provided by the embodiments of the present application, with electricity shown in Fig. 6
The difference of sub- equipment is that electronic equipment further includes the components such as input unit 704 and output unit 705.
Wherein, input unit 704 can be used for receiving the number of input, character information or user's characteristic information (for example refer to
Line), and to generate related with user setting and function control keyboard, mouse, operating stick, optics or trackball signal defeated
Enter.
Output unit 705 can be used for showing information input by user or the information for being supplied to user, such as screen.
In the embodiment of the present application, processor 701 in electronic equipment can according to following step, by one or one with
On computer program process it is corresponding instruction be loaded into memory 702, and by processor 701 operation be stored in memory
Computer program in 702, thus realize various functions, it is as follows:
Face to be detected is shot by monocular cam 703, obtains the Two-dimensional Color Image of face to be detected;
The Two-dimensional Color Image input that shooting is obtained estimation of Depth model trained in advance carries out estimation of Depth, obtains pair
Answer the depth image of Two-dimensional Color Image;
Two-dimensional Color Image and its input of corresponding depth image In vivo detection model trained in advance are subjected to living body inspection
It surveys, obtains testing result.
In one embodiment, In vivo detection model is convolutional neural networks model, including sequentially connected convolutional layer, pond
Change layer and full articulamentum, by Two-dimensional Color Image and its input of corresponding depth image In vivo detection model trained in advance into
Row In vivo detection, when obtaining testing result, processor 701 can be executed:
Aforementioned Two-dimensional Color Image and its corresponding depth image input convolutional layer are subjected to feature extraction, obtain aforementioned two
Tie up the joint global characteristics of color image and aforementioned depth image;
It will obtain joint global characteristics input pond layer and carry out Feature Dimension Reduction, the joint global characteristics after obtaining dimensionality reduction;
Joint global characteristics after dimensionality reduction are inputted into full articulamentum and carry out classification processing, obtaining face to be detected is living body people
The testing result of face, or obtain the testing result that face to be detected is non-living body face.
In one embodiment, aforementioned Two-dimensional Color Image and its corresponding depth image input convolutional layer are being subjected to spy
Sign is extracted, and when obtaining the joint global characteristics of aforementioned Two-dimensional Color Image and aforementioned depth image, processor 701 can be executed:
Aforementioned Two-dimensional Color Image is pre-processed, the human face region image in aforementioned Two-dimensional Color Image is obtained;
Aforementioned depth image is pre-processed, the human face region image in aforementioned depth image is obtained;
By the human face region image input in the human face region image and aforementioned depth image in aforementioned Two-dimensional Color Image
Aforementioned convolutional layer carries out feature extraction, obtains the joint global characteristics of aforementioned Two-dimensional Color Image and aforementioned depth image.
In one embodiment, face to be detected is being shot by monocular cam 703703, is being obtained to be detected
Before the Two-dimensional Color Image of face, processor 701 can be executed:
Face to be detected is being shot by monocular cam 703, is obtaining the Two-dimensional Color Image of face to be detected
Before, multiple and different living body faces are shot by monocular cam 703, obtains multiple two-dimensional color living body faces samples
Image, and the corresponding depth image of each two-dimensional color living body faces sample image is obtained, obtain multiple first depth images;
Multiple and different non-living body faces are shot by monocular cam 703, obtain multiple two-dimensional color non-living bodies
Face sample image, and the corresponding depth image of each two-dimensional color non-living body face sample image is obtained, it is deep to obtain multiple second
Spend image;
Using each two-dimensional color living body faces sample image and its corresponding first depth image as positive sample, by each two dimension
Colored non-living body face sample image and its corresponding second depth image construct training sample set as negative sample;
Model training is carried out to training sample set using convolutional neural networks, convolutional neural networks model is obtained, as work
Body detection model.
In one embodiment, before carrying out model training to training sample set using convolutional neural networks, processor
701 can execute:
Expand strategy according to preset sample and sample expansion processing is carried out to training sample set.
In one embodiment, the corresponding depth image of each two-dimensional color living body faces sample image is being obtained, obtained more
When a first depth image, processor 701 can be executed:
Distance of each pixel to monocular cam 703 in each two-dimensional color living body faces sample image of reception calibration;
According to the distance of each pixel in each two-dimensional color living body faces sample image to monocular cam 703, generate each
The corresponding depth image of two-dimensional color living body faces sample image obtains multiple first depth images.
In one embodiment, the corresponding depth image of each two-dimensional color non-living body face sample image is being obtained, obtained
When multiple second depth images, processor 701 can be executed:
Receive in each two-dimensional color non-living body face sample image of calibration each pixel to monocular cam 703 away from
From;
According to the distance of each pixel in each two-dimensional color non-living body face sample image to monocular cam 703, generate
The corresponding depth image of each two-dimensional color non-living body face sample image, obtains multiple second depth images.
In one embodiment, processor 701 can also be performed:
Each two-dimensional color living body faces sample image and each two-dimensional color non-living body face sample image is defeated as training
Enter, by corresponding first depth image of each two-dimensional color living body faces sample image and each two-dimensional color non-living body face sample graph
As corresponding second depth image as target export, carried out monitor model training, obtain estimation of Depth model.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, reference can be made to the related descriptions of other embodiments.
It should be noted that for the biopsy method of the embodiment of the present application, this field common test personnel can be with
Understand all or part of the process for realizing the biopsy method of the embodiment of the present application, is that can be controlled by computer program
Relevant hardware is completed, and the computer program can be stored in a computer-readable storage medium, be such as stored in electronics
It in the memory of equipment, and is executed by least one processor in the electronic equipment, in the process of implementation may include such as living body
The process of the embodiment of detection method.Wherein, the storage medium can be magnetic disk, CD, read-only memory, arbitrary access note
Recall body etc..
For the living body detection device of the embodiment of the present application, each functional module be can integrate in a processing chip
In, it is also possible to modules and physically exists alone, can also be integrated in two or more modules in a module.It is above-mentioned
Integrated module both can take the form of hardware realization, can also be realized in the form of software function module.It is described integrated
If module realized in the form of software function module and when sold or used as an independent product, also can store one
In a computer-readable storage medium, the storage medium is for example read-only memory, disk or CD etc..
Above to a kind of biopsy method, device, storage medium and electronic equipment provided by the embodiment of the present application into
It has gone and has been discussed in detail, specific examples are used herein to illustrate the principle and implementation manner of the present application, the above implementation
The explanation of example is merely used to help understand the present processes and its core concept;Meanwhile for those skilled in the art, according to
According to the thought of the application, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification
It should not be construed as the limitation to the application.
Claims (10)
1. a kind of biopsy method is applied to electronic equipment, the electronic equipment includes monocular cam, which is characterized in that
Include:
Face to be detected is shot by the monocular cam, obtains the Two-dimensional Color Image of the face to be detected;
Two-dimensional Color Image input estimation of Depth model trained in advance is subjected to estimation of Depth, obtains corresponding to the two dimension
The depth image of color image;
The Two-dimensional Color Image and the depth image input In vivo detection model trained in advance are subjected to In vivo detection, obtained
To testing result.
2. biopsy method according to claim 1, which is characterized in that the In vivo detection model is convolutional Neural net
Network model, including sequentially connected convolutional layer, pond layer and full articulamentum, it is described by the Two-dimensional Color Image and the depth
Image input In vivo detection model trained in advance, obtains testing result, comprising:
The Two-dimensional Color Image and the depth image are inputted into the convolutional layer and carry out feature extraction, it is color to obtain the two dimension
The joint global characteristics of chromatic graph picture and the depth image;
The joint global characteristics are inputted into the pond layer and carry out Feature Dimension Reduction, the joint global characteristics after obtaining dimensionality reduction;
Joint global characteristics after the dimensionality reduction are inputted in the full articulamentum and carry out classification processing, obtain the people to be detected
Face is the testing result of living body faces, or obtains the testing result that the face to be detected is non-living body face.
3. biopsy method according to claim 2, which is characterized in that described by the Two-dimensional Color Image and described
Depth image inputs the convolutional layer and carries out feature extraction, and the joint for obtaining the Two-dimensional Color Image and the depth image is complete
Office's feature, comprising:
The Two-dimensional Color Image is pre-processed, the human face region image in the Two-dimensional Color Image is obtained;
The depth image is pre-processed, the human face region image in the depth image is obtained;
It will be described in the human face region image input in the human face region image and the depth image in the Two-dimensional Color Image
Convolutional layer carries out feature extraction, obtains the joint global characteristics of the Two-dimensional Color Image and the depth image.
4. biopsy method according to claim 2, which is characterized in that it is described by the monocular cam to be checked
It surveys face to be shot, before obtaining the Two-dimensional Color Image of the face to be detected, further includes:
Multiple and different living body faces are shot by the monocular cam, obtain multiple two-dimensional color living body faces samples
Image, and the corresponding depth image of each two-dimensional color living body faces sample image is obtained, obtain multiple first depth images;
Multiple and different non-living body faces are shot by the monocular cam, obtain multiple two-dimensional color non-living body faces
Sample image, and the corresponding depth image of each two-dimensional color non-living body face sample image is obtained, it is deep to obtain multiple second
Spend image;
Using each two-dimensional color living body faces sample image and its corresponding first depth image as positive sample, will be each described
Two-dimensional color non-living body face sample image and its corresponding second depth image construct training sample set as negative sample;
Model training is carried out to the training sample set using convolutional neural networks, obtains the convolutional neural networks model.
5. biopsy method according to claim 4, which is characterized in that described to use convolutional neural networks to the instruction
Practice sample set and carry out model training, before obtaining the convolutional neural networks model, further includes:
Expand strategy according to preset sample and sample expansion processing is carried out to the training sample set.
6. biopsy method according to claim 4, which is characterized in that described to obtain each two-dimensional color living body people
The corresponding depth image of face sample image obtains multiple first depth images, comprising:
Distance of each pixel to the monocular cam in each two-dimensional color living body faces sample image of reception calibration;
According to the distance of each pixel in each two-dimensional color living body faces sample image to the monocular cam, generate each
The corresponding depth image of the two-dimensional color living body faces sample image, obtains multiple first depth images.
7. biopsy method according to claim 4, the biopsy method further include:
Using each two-dimensional color living body faces sample image and each two-dimensional color non-living body face sample image as instruction
Practice and inputs, each corresponding first depth image of two-dimensional color living body faces sample image and each two-dimensional color is non-live
Corresponding second depth image of body face sample image is exported as target, has been carried out monitor model training, has been obtained the depth
Estimate model.
8. a kind of living body detection device is applied to electronic equipment characterized by comprising
Color image obtains module and obtains described to be checked for being shot by the monocular cam to face to be detected
Survey the Two-dimensional Color Image of face;
Depth image obtains module, for the estimation of Depth model that Two-dimensional Color Image input is trained in advance, obtains pair
Answer the depth image of the Two-dimensional Color Image;
Living body faces detection module, for examining the Two-dimensional Color Image and the depth image input living body trained in advance
Model is surveyed, testing result is obtained.
9. a kind of storage medium, is stored thereon with computer program, which is characterized in that when the computer program on computers
When operation, so that the computer executes biopsy method as described in any one of claim 1 to 7.
10. a kind of electronic equipment, including processor, memory and monocular cam, the memory storage have computer program,
It is characterized in that, the processor is used to execute as described in any one of claim 1 to 7 by calling the computer program
Biopsy method.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811565579.0A CN109635770A (en) | 2018-12-20 | 2018-12-20 | Biopsy method, device, storage medium and electronic equipment |
PCT/CN2019/125957 WO2020125623A1 (en) | 2018-12-20 | 2019-12-17 | Method and device for live body detection, storage medium, and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811565579.0A CN109635770A (en) | 2018-12-20 | 2018-12-20 | Biopsy method, device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109635770A true CN109635770A (en) | 2019-04-16 |
Family
ID=66075992
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811565579.0A Pending CN109635770A (en) | 2018-12-20 | 2018-12-20 | Biopsy method, device, storage medium and electronic equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109635770A (en) |
WO (1) | WO2020125623A1 (en) |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110245645A (en) * | 2019-06-21 | 2019-09-17 | 北京字节跳动网络技术有限公司 | Face vivo identification method, device, equipment and storage medium |
CN110334628A (en) * | 2019-06-26 | 2019-10-15 | 华中科技大学 | A kind of outdoor monocular image depth estimation method based on structuring random forest |
CN110674759A (en) * | 2019-09-26 | 2020-01-10 | 深圳市捷顺科技实业股份有限公司 | Monocular face in-vivo detection method, device and equipment based on depth map |
CN111046845A (en) * | 2019-12-25 | 2020-04-21 | 上海骏聿数码科技有限公司 | Living body detection method, device and system |
CN111091063A (en) * | 2019-11-20 | 2020-05-01 | 北京迈格威科技有限公司 | Living body detection method, device and system |
CN111191521A (en) * | 2019-12-11 | 2020-05-22 | 智慧眼科技股份有限公司 | Face living body detection method and device, computer equipment and storage medium |
WO2020125623A1 (en) * | 2018-12-20 | 2020-06-25 | 上海瑾盛通信科技有限公司 | Method and device for live body detection, storage medium, and electronic device |
CN111753658A (en) * | 2020-05-20 | 2020-10-09 | 高新兴科技集团股份有限公司 | Post sleep warning method and device and computer equipment |
CN111881706A (en) * | 2019-11-27 | 2020-11-03 | 马上消费金融股份有限公司 | Living body detection, image classification and model training method, device, equipment and medium |
CN112036331A (en) * | 2020-09-03 | 2020-12-04 | 腾讯科技(深圳)有限公司 | Training method, device and equipment of living body detection model and storage medium |
CN112115831A (en) * | 2020-09-10 | 2020-12-22 | 深圳印像数据科技有限公司 | Living body detection image preprocessing method |
CN112270303A (en) * | 2020-11-17 | 2021-01-26 | 北京百度网讯科技有限公司 | Image recognition method and device and electronic equipment |
CN112434647A (en) * | 2020-12-09 | 2021-03-02 | 浙江光珀智能科技有限公司 | Human face living body detection method |
CN112508812A (en) * | 2020-12-01 | 2021-03-16 | 厦门美图之家科技有限公司 | Image color cast correction method, model training method, device and equipment |
TWI722872B (en) * | 2020-04-17 | 2021-03-21 | 技嘉科技股份有限公司 | Face recognition device and face recognition method |
CN112699811A (en) * | 2020-12-31 | 2021-04-23 | 中国联合网络通信集团有限公司 | Living body detection method, apparatus, device, storage medium, and program product |
CN112861586A (en) * | 2019-11-27 | 2021-05-28 | 马上消费金融股份有限公司 | Living body detection, image classification and model training method, device, equipment and medium |
CN113435408A (en) * | 2021-07-21 | 2021-09-24 | 北京百度网讯科技有限公司 | Face living body detection method and device, electronic equipment and storage medium |
WO2021218695A1 (en) * | 2020-04-26 | 2021-11-04 | 华为技术有限公司 | Monocular camera-based liveness detection method, device, and readable storage medium |
CN113705428A (en) * | 2021-08-26 | 2021-11-26 | 北京市商汤科技开发有限公司 | Living body detection method and apparatus, electronic device, and computer-readable storage medium |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20210128274A (en) * | 2020-04-16 | 2021-10-26 | 삼성전자주식회사 | Method and apparatus for testing liveness |
CN111797745B (en) * | 2020-06-28 | 2024-08-13 | 中嘉锦诚(北京)科技有限公司 | Training and predicting method, device, equipment and medium for object detection model |
CN111914758A (en) * | 2020-08-04 | 2020-11-10 | 成都奥快科技有限公司 | Face in-vivo detection method and device based on convolutional neural network |
CN112069936A (en) * | 2020-08-21 | 2020-12-11 | 深圳市商汤科技有限公司 | Attack point testing method and related device, electronic equipment and storage medium |
CN112183357B (en) * | 2020-09-29 | 2024-03-26 | 深圳龙岗智能视听研究院 | Multi-scale living body detection method and system based on deep learning |
CN112200057B (en) * | 2020-09-30 | 2023-10-31 | 汉王科技股份有限公司 | Face living body detection method and device, electronic equipment and storage medium |
CN113542527B (en) * | 2020-11-26 | 2023-08-18 | 腾讯科技(深圳)有限公司 | Face image transmission method and device, electronic equipment and storage medium |
CN113378715B (en) * | 2021-06-10 | 2024-01-05 | 北京华捷艾米科技有限公司 | Living body detection method based on color face image and related equipment |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1648934A (en) * | 2004-01-27 | 2005-08-03 | 佳能株式会社 | Face detecting apparatus and method |
JP2016066177A (en) * | 2014-09-24 | 2016-04-28 | 富士フイルム株式会社 | Area detection device, area detection method, image processing apparatus, image processing method, program and recording medium |
US9691152B1 (en) * | 2015-08-14 | 2017-06-27 | A9.Com, Inc. | Minimizing variations in camera height to estimate distance to objects |
US20180068540A1 (en) * | 2015-05-12 | 2018-03-08 | Apical Ltd | Image processing method |
CN107871134A (en) * | 2016-09-23 | 2018-04-03 | 北京眼神科技有限公司 | A kind of method for detecting human face and device |
CN108171204A (en) * | 2018-01-17 | 2018-06-15 | 百度在线网络技术(北京)有限公司 | Detection method and device |
CN108537152A (en) * | 2018-03-27 | 2018-09-14 | 百度在线网络技术(北京)有限公司 | Method and apparatus for detecting live body |
CN108764024A (en) * | 2018-04-09 | 2018-11-06 | 平安科技(深圳)有限公司 | Generating means, method and the computer readable storage medium of human face recognition model |
CN108898112A (en) * | 2018-07-03 | 2018-11-27 | 东北大学 | A kind of near-infrared human face in-vivo detection method and system |
CN108960127A (en) * | 2018-06-29 | 2018-12-07 | 厦门大学 | Pedestrian's recognition methods again is blocked based on the study of adaptive depth measure |
CN109003297A (en) * | 2018-07-18 | 2018-12-14 | 亮风台(上海)信息科技有限公司 | A kind of monocular depth estimation method, device, terminal and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10657424B2 (en) * | 2016-12-07 | 2020-05-19 | Samsung Electronics Co., Ltd. | Target detection method and apparatus |
CN108876833A (en) * | 2018-03-29 | 2018-11-23 | 北京旷视科技有限公司 | Image processing method, image processing apparatus and computer readable storage medium |
CN109034102B (en) * | 2018-08-14 | 2023-06-16 | 腾讯科技(深圳)有限公司 | Face living body detection method, device, equipment and storage medium |
CN109635770A (en) * | 2018-12-20 | 2019-04-16 | 上海瑾盛通信科技有限公司 | Biopsy method, device, storage medium and electronic equipment |
-
2018
- 2018-12-20 CN CN201811565579.0A patent/CN109635770A/en active Pending
-
2019
- 2019-12-17 WO PCT/CN2019/125957 patent/WO2020125623A1/en active Application Filing
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1648934A (en) * | 2004-01-27 | 2005-08-03 | 佳能株式会社 | Face detecting apparatus and method |
JP2016066177A (en) * | 2014-09-24 | 2016-04-28 | 富士フイルム株式会社 | Area detection device, area detection method, image processing apparatus, image processing method, program and recording medium |
US20180068540A1 (en) * | 2015-05-12 | 2018-03-08 | Apical Ltd | Image processing method |
US9691152B1 (en) * | 2015-08-14 | 2017-06-27 | A9.Com, Inc. | Minimizing variations in camera height to estimate distance to objects |
CN107871134A (en) * | 2016-09-23 | 2018-04-03 | 北京眼神科技有限公司 | A kind of method for detecting human face and device |
CN108171204A (en) * | 2018-01-17 | 2018-06-15 | 百度在线网络技术(北京)有限公司 | Detection method and device |
CN108537152A (en) * | 2018-03-27 | 2018-09-14 | 百度在线网络技术(北京)有限公司 | Method and apparatus for detecting live body |
CN108764024A (en) * | 2018-04-09 | 2018-11-06 | 平安科技(深圳)有限公司 | Generating means, method and the computer readable storage medium of human face recognition model |
CN108960127A (en) * | 2018-06-29 | 2018-12-07 | 厦门大学 | Pedestrian's recognition methods again is blocked based on the study of adaptive depth measure |
CN108898112A (en) * | 2018-07-03 | 2018-11-27 | 东北大学 | A kind of near-infrared human face in-vivo detection method and system |
CN109003297A (en) * | 2018-07-18 | 2018-12-14 | 亮风台(上海)信息科技有限公司 | A kind of monocular depth estimation method, device, terminal and storage medium |
Cited By (31)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020125623A1 (en) * | 2018-12-20 | 2020-06-25 | 上海瑾盛通信科技有限公司 | Method and device for live body detection, storage medium, and electronic device |
CN110245645B (en) * | 2019-06-21 | 2021-06-08 | 北京字节跳动网络技术有限公司 | Face living body identification method, device, equipment and storage medium |
CN110245645A (en) * | 2019-06-21 | 2019-09-17 | 北京字节跳动网络技术有限公司 | Face vivo identification method, device, equipment and storage medium |
CN110334628B (en) * | 2019-06-26 | 2021-07-27 | 华中科技大学 | Outdoor monocular image depth estimation method based on structured random forest |
CN110334628A (en) * | 2019-06-26 | 2019-10-15 | 华中科技大学 | A kind of outdoor monocular image depth estimation method based on structuring random forest |
CN110674759A (en) * | 2019-09-26 | 2020-01-10 | 深圳市捷顺科技实业股份有限公司 | Monocular face in-vivo detection method, device and equipment based on depth map |
CN111091063A (en) * | 2019-11-20 | 2020-05-01 | 北京迈格威科技有限公司 | Living body detection method, device and system |
CN111091063B (en) * | 2019-11-20 | 2023-12-29 | 北京迈格威科技有限公司 | Living body detection method, device and system |
CN111881706A (en) * | 2019-11-27 | 2020-11-03 | 马上消费金融股份有限公司 | Living body detection, image classification and model training method, device, equipment and medium |
CN113642466B (en) * | 2019-11-27 | 2022-11-01 | 马上消费金融股份有限公司 | Living body detection and model training method, apparatus and medium |
CN113642466A (en) * | 2019-11-27 | 2021-11-12 | 马上消费金融股份有限公司 | Living body detection and model training method, apparatus and medium |
CN111881706B (en) * | 2019-11-27 | 2021-09-03 | 马上消费金融股份有限公司 | Living body detection, image classification and model training method, device, equipment and medium |
CN112861586A (en) * | 2019-11-27 | 2021-05-28 | 马上消费金融股份有限公司 | Living body detection, image classification and model training method, device, equipment and medium |
CN111191521B (en) * | 2019-12-11 | 2022-08-12 | 智慧眼科技股份有限公司 | Face living body detection method and device, computer equipment and storage medium |
CN111191521A (en) * | 2019-12-11 | 2020-05-22 | 智慧眼科技股份有限公司 | Face living body detection method and device, computer equipment and storage medium |
CN111046845A (en) * | 2019-12-25 | 2020-04-21 | 上海骏聿数码科技有限公司 | Living body detection method, device and system |
US11417149B2 (en) | 2020-04-17 | 2022-08-16 | Giga-Byte Technology Co., Ltd. | Face recognition device and face recognition method |
TWI722872B (en) * | 2020-04-17 | 2021-03-21 | 技嘉科技股份有限公司 | Face recognition device and face recognition method |
WO2021218695A1 (en) * | 2020-04-26 | 2021-11-04 | 华为技术有限公司 | Monocular camera-based liveness detection method, device, and readable storage medium |
CN111753658A (en) * | 2020-05-20 | 2020-10-09 | 高新兴科技集团股份有限公司 | Post sleep warning method and device and computer equipment |
CN112036331A (en) * | 2020-09-03 | 2020-12-04 | 腾讯科技(深圳)有限公司 | Training method, device and equipment of living body detection model and storage medium |
CN112036331B (en) * | 2020-09-03 | 2024-04-09 | 腾讯科技(深圳)有限公司 | Living body detection model training method, device, equipment and storage medium |
CN112115831A (en) * | 2020-09-10 | 2020-12-22 | 深圳印像数据科技有限公司 | Living body detection image preprocessing method |
CN112115831B (en) * | 2020-09-10 | 2024-03-15 | 深圳印像数据科技有限公司 | Living body detection image preprocessing method |
CN112270303A (en) * | 2020-11-17 | 2021-01-26 | 北京百度网讯科技有限公司 | Image recognition method and device and electronic equipment |
CN112508812A (en) * | 2020-12-01 | 2021-03-16 | 厦门美图之家科技有限公司 | Image color cast correction method, model training method, device and equipment |
CN112434647A (en) * | 2020-12-09 | 2021-03-02 | 浙江光珀智能科技有限公司 | Human face living body detection method |
CN112699811A (en) * | 2020-12-31 | 2021-04-23 | 中国联合网络通信集团有限公司 | Living body detection method, apparatus, device, storage medium, and program product |
CN112699811B (en) * | 2020-12-31 | 2023-11-03 | 中国联合网络通信集团有限公司 | Living body detection method, living body detection device, living body detection apparatus, living body detection storage medium, and program product |
CN113435408A (en) * | 2021-07-21 | 2021-09-24 | 北京百度网讯科技有限公司 | Face living body detection method and device, electronic equipment and storage medium |
CN113705428A (en) * | 2021-08-26 | 2021-11-26 | 北京市商汤科技开发有限公司 | Living body detection method and apparatus, electronic device, and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2020125623A1 (en) | 2020-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109635770A (en) | Biopsy method, device, storage medium and electronic equipment | |
US11710299B2 (en) | Method and apparatus for employing specialist belief propagation networks | |
Han et al. | CNNs-based RGB-D saliency detection via cross-view transfer and multiview fusion | |
Long et al. | Learning multiple tasks with multilinear relationship networks | |
US10002313B2 (en) | Deeply learned convolutional neural networks (CNNS) for object localization and classification | |
US11704907B2 (en) | Depth-based object re-identification | |
CN110555481B (en) | Portrait style recognition method, device and computer readable storage medium | |
CN111819568B (en) | Face rotation image generation method and device | |
US20200272888A1 (en) | Neural network for skeletons from input images | |
CN110309856A (en) | Image classification method, the training method of neural network and device | |
Rust et al. | Ambiguity and invariance: two fundamental challenges for visual processing | |
Alonso‐Fernandez et al. | Facial masks and soft‐biometrics: Leveraging face recognition CNNs for age and gender prediction on mobile ocular images | |
CN109963072A (en) | Focusing method, device, storage medium and electronic equipment | |
Silwal et al. | A novel deep learning system for facial feature extraction by fusing CNN and MB-LBP and using enhanced loss function | |
Mehraj et al. | A multi-biometric system based on multi-level hybrid feature fusion | |
US20220277579A1 (en) | Clustered dynamic graph convolutional neural network (cnn) for biometric three-dimensional (3d) hand recognition | |
Wang et al. | Semantic feature based multi-spectral saliency detection | |
Dou et al. | Converting thermal infrared face images into normal gray-level images | |
Kumari et al. | BIAS-3D: Brain inspired attentional search model fashioned after what and where/how pathways for target search in 3D environment | |
Savitha et al. | Deep learning-based face hallucination: a survey | |
Hu et al. | Vision-based human activity recognition | |
Miqdad | Illuminant Estimation By Deep Learning | |
Fan et al. | Two-stream siamese network with contrastive-center losses for RGB-D action recognition | |
Zhou et al. | Recognizing Gestures from Videos using a Network with Two-branch Structure and Additional Motion Cues | |
Wang | Cross Domain Face Synthesis |
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: 20190416 |