The content of the invention
The present invention is proposed in view of the problems referred to above.The invention provides a kind of method of In vivo detection, can interpolate that
Whether face to be detected is living body faces, so as to prevent attacker from using the attack of non-living body.
According to the first aspect of the invention, there is provided a kind of method of In vivo detection, including:
Obtain the face image of object to be detected;
Obtain face's thermal map of the object to be detected;
According to the face image of the object to be detected, thermal map is expected by the face for determining the object to be detected;And
Thermal map is expected according to face's thermal map and the face, judges whether the object to be detected is live body.
Exemplarily, the face image according to the object to be detected, determines face's phase of the object to be detected
Thermal map is hoped, including:
According to the Temperature Distribution of the face of the object to be detected, heat is expected by the face for determining the object to be detected
Figure.
Exemplarily, it is described that thermal map is expected according to face's thermal map and the face, judge that described to be detected pair likes
It is no for live body, including:
Face's thermal map is expected into that thermal map is compared with the face, judges whether the object to be detected is living
Body.
Exemplarily, it is described that face's thermal map is expected into that thermal map is compared with the face, judge described to be detected
Whether object is live body, including:
The corresponding characteristic point that the value and the face for calculating each characteristic point in face's thermal map is expected in thermal map
Value difference;
In all differences for being calculated, if less than or equal to the quantity of the difference of corresponding predetermined threshold value meet default
Condition, it is determined that the object to be detected is live body.
Exemplarily, the face image for obtaining object to be detected, including:
Obtain the face image of the object described to be detected gathered by visible light image sensor.
Exemplarily, the face's thermal map for obtaining the object to be detected, including:
Obtain face's thermal map of the object described to be detected gathered by medium-wave infrared thermal imaging sensor.
According to the second aspect of the invention, there is provided a kind of device of In vivo detection, including:
First acquisition module, for obtaining the face image of object to be detected;
Second acquisition module, for obtaining face's thermal map of the object to be detected;
Determining module, the face image of the object described to be detected for being obtained according to first acquisition module, it is determined that
Thermal map is expected by the face of the object to be detected;And
Judge module, the face's thermal map and the determining module for being obtained according to second acquisition module determines
The face expect thermal map, judge whether the object to be detected is live body.
Exemplarily, the determining module, is used for:
According to the Temperature Distribution of the face of the object to be detected, heat is expected by the face for determining the object to be detected
Figure.
Exemplarily, the judge module includes computing unit and live body determining unit,
The computing unit is used for:The value and the face for calculating each characteristic point in face's thermal map expects thermal map
In corresponding characteristic point value difference;
The live body determining unit is used for:In all differences for being calculated, if less than or equal to corresponding default threshold
The quantity of the difference of value meets pre-conditioned, it is determined that the object to be detected is live body.
Exemplarily, first acquisition module, is used for:
Obtain the face image of the object described to be detected gathered by visible light image sensor.
Exemplarily, second acquisition module, is used for:
Obtain face's thermal map of the object described to be detected gathered by medium-wave infrared thermal imaging sensor.
The method that the device described in second aspect is implemented for the In vivo detection of aforementioned first aspect.
According to the third aspect of the invention we, there is provided a kind of computer chip, the computer chip includes processor and deposits
Reservoir.The memory storage has instruction code, and the processor is used to perform the instruction code, and when the processor is held
During row instruction code, the method that the In vivo detection described in aforementioned first aspect can be realized.
The embodiment of the present invention can expect the comparison of thermal map according to the face's thermal map and face for collecting, and determine to be detected
Whether object is live body.The method is not only simple to operate, and can take precautions against the various camouflages such as photo, mask or three-dimensional face model
Attack.
Specific embodiment
In order that the object, technical solutions and advantages of the present invention become apparent from, root is described in detail below with reference to accompanying drawings
According to the example embodiment of the present invention.Obviously, described embodiment is only a part of embodiment of the present invention, rather than this
Bright whole embodiments, it should be appreciated that the present invention is not limited by example embodiment described herein.Described in the present invention
The embodiment of the present invention, those skilled in the art's all other embodiment resulting in the case where creative work is not paid
All should fall under the scope of the present invention.
The embodiment of the present invention can apply to electronic equipment, and Fig. 1 show of the electronic equipment of the embodiment of the present invention
Schematic block diagram.Electronic equipment 10 shown in Fig. 1 include one or more processors 102, one or more storage devices 104,
Input unit 106, output device 108, imageing sensor 110 and one or more non-image sensors 114, these components lead to
Cross bus system 112 and/or other forms interconnection.It should be noted that the component and structure of the electronic equipment 10 shown in Fig. 1 simply show
Example property, and it is nonrestrictive, and as needed, the electronic equipment can also have other assemblies and structure.
The processor 102 can include CPU 1021 and GPU 1022 or with data-handling capacity and/or instruction
The processing unit of the other forms of executive capability, and other components in the electronic equipment 10 can be controlled to perform expectation
Function.
The storage device 104 can include one or more computer programs, and the computer program can
With including various forms of computer-readable recording mediums, such as volatile memory 1041 and/or nonvolatile memory
1042.The volatile memory 1041 can for example include random access memory (Random Access Memory, RAM)
And/or cache memory (cache) etc..The nonvolatile memory 1042 can for example include read-only storage
(Read-Only Memory, ROM), hard disk, flash memory etc..One or many can be stored on the computer-readable recording medium
Individual computer program instructions, processor 102 can run described program instruction, to realize various desired functions.In the meter
Various application programs and various data can also be stored in calculation machine readable storage medium storing program for executing, such as application program use and/or
Various data for producing etc..
The input unit 106 can be device of the user for input instruction, and can include keyboard, mouse, wheat
One or more in gram wind and touch-screen etc..
The output device 108 can export various information (such as image or sound) to outside (such as user), and
One or more in display, loudspeaker etc. can be included.
Described image sensor 110 can shoot the desired image of user (such as photo, video etc.), and will be captured
Image be stored in the storage device 104 so that other components are used.
Exemplarily, imageing sensor 110 can include visible light image sensor and medium-wave infrared thermal imaging sensor.
Wherein, it is seen that optical image sensor can be used to gather facial image (visible images), and medium-wave infrared thermal imaging sensor can use
In collection face thermal map.
Exemplarily, the electronic equipment 10 may be implemented as intelligent terminal, gate control system etc..
A kind of method of existing In vivo detection is to carry out face picture collection and computing using visible light image sensor
Identification.However, the method needs detected person to carry out certain cooperation, make and just can confirm that after fixed action live body identity.
Not only complex operation, can reduce overall recognition efficiency, can also make detected person produce bad mood and mismatch detection
Behavior.And, this method can only defend the planar objects such as photo, video, for the face mould with certain 3D shape
Type etc. cannot make defence.
Fig. 2 is an indicative flowchart of the method for the In vivo detection of the embodiment of the present invention, the method bag shown in Fig. 2
Include:
S101, obtains the face image of object to be detected.
Exemplarily, the face image of the object described to be detected gathered by visible light image sensor can be obtained.
That is, the face image of object to be detected can be gathered by visible light image sensor.Wherein, face image
That is visible images.
With to be detected pair as if artificial example, the face image of object to be detected is facial image.As an example, Fig. 3
A () is of facial image.
S102, obtains face's thermal map of the object to be detected.
Exemplarily, face's heat of the object described to be detected gathered by medium-wave infrared thermal imaging sensor can be obtained
Figure.
That is, face's thermal map of object to be detected can be gathered by medium-wave infrared thermal imaging sensor.Wherein, face
Thermal map is that face is spatially distributed the temperature data that diverse location is distributed, and the higher collection image of temperature can be more warm bright, on the contrary temperature
Lower collection image can be colder dark.Exemplarily, can be by the height of different gray scale or different color table temp. displaying functions.
With to be detected pair as if artificial example, face's thermal map of object to be detected is face thermal map.As an example, Fig. 3
B () is of facial image.In Fig. 3 (b), the position such as the forehead of face, cheek and neck can warm up the most it is bright, and shoulder because
The reason for interlayer clothes plus clothes material cause inhale ripple reason can texture that is slightly dark and presenting clothes, wall, decoration etc.
The temperature lower (i.e. room temperature) of external environment condition and can present in picture cool dark color tune.
It should be noted that S102 and S101 can be performed simultaneously, or, S102 can be performed after S103, and the present invention is to this
Do not limit.As shown in figure 4, S101, S103 and S102 can be simultaneously or be performed in parallel.
S103, according to the face image of the object to be detected, thermal map is expected by the face for determining the object to be detected.
Exemplarily, the object to be detected can be determined according to the Temperature Distribution of the face of the object to be detected
Thermal map is expected by the face.
With to be detected pair as if artificial example, can be according to visible images situation (different positions of face i.e. in picture
Temperature conditions) build face's expectation thermal map.Specifically, face image can be recognized according to the face image of object to be detected
Different positions, according to the temperature of face's difference position, thermal map is expected by the face for determining the object to be detected.
For example, normal human body temperature is 36 DEG C~37 DEG C, and the temperature of face difference position also can difference, such as forehead
Higher, the bridge of the nose is low, and the region that hair is covered is lower, theoretical based on this, can obtain face and expect thermal map.Therefore in S103
In, the different positions of face according to the face image of object to be detected, can be recognized and given by the temperature characterisitic of position certain
Temperature value (such as 37 DEG C of forehead, 36 DEG C of the bridge of the nose, hair covers 35 DEG C of position etc.), it is achieved thereby that the structure of thermal map is expected by face
Build.
S104, according to face's thermal map and the face thermal map is expected, judges whether the object to be detected is live body.
Exemplarily, face's thermal map can be expected that thermal map is compared with the face, judges described to be detected right
As if it is no for live body.
Exemplarily, the value and the face that can calculate each characteristic point in face's thermal map is expected in thermal map
The difference of the value of corresponding characteristic point;In all differences for being calculated, if less than or equal to the difference of corresponding predetermined threshold value
The quantity of value meets pre-conditioned, it is determined that the object to be detected is live body.If less than or equal to corresponding predetermined threshold value
Difference quantity be unsatisfactory for it is pre-conditioned, it is determined that the object to be detected be non-living body.
It is understood that the quantity of characteristic point can for multiple, and can the different positions of face extract respectively one or
Multiple characteristic points.For example, 3 characteristic points are taken in forehead, in the bridge of the nose 2 characteristic points is taken, in lip 1 characteristic point ... etc. is taken.
The value of the characteristic point can represent the temperature value at the characteristic point.In addition, according to the different calculated differences of characteristic point
Being worth corresponding predetermined threshold value can be with equal or different.For example, according to the corresponding default threshold of the calculated all differences of characteristic point
Value is equal to 2 DEG C, or, 1 DEG C is equal to according to the corresponding predetermined threshold value of the calculated difference of characteristic point at forehead, according to nose
The corresponding predetermined threshold value of the calculated difference of characteristic point of Liang Chu is equal to 0.8 DEG C, etc..
The pre-conditioned quantity that can be the difference less than or equal to corresponding predetermined threshold value is more than or equal to default
Quantity.The ratio of number of pre-conditioned quantity and the characteristic point that can be the difference less than or equal to corresponding predetermined threshold value
More than or equal to preset percentage.It should be understood that can according to specific application conditions arrange the predetermined number and/or
Preset percentage.
As can be seen here, when occurring pretending using non-living bodies such as photo, video, mask or three-dimensional faces, the institute in S102
The thermal map of acquisition has larger difference with the expectation thermal map obtained by S103, thus can determine as non-living body camouflage.For example,
If using photo, video etc., face's temperature equalization of these non-living bodies, trip temperature will not be entered according to position as living body faces
Distribution, therefore be easily determined in S104 as non-living body.If using mask, three-dimensional face etc., these non-living bodies due to its from
The reason for stature matter, there is certain suction ripple effect to infrared medium wave, therefore, although the thermal map acquired in S102 has certain temperature
Difference between degree distribution, but the value of the characteristic point in thermal map and the value of corresponding characteristic point in expectation thermal map determined by S103
Can be outside corresponding preset threshold range, so as to non-living body can also be easily determined as in S104.It can be seen that, the present invention
The method of embodiment can security from attacks person use the various situations such as photo, video, mask or three-dimensional face model.
Exemplarily, before the method shown in Fig. 2, the Temperature Distribution and default threshold of the face of live body can first be determined
Value.
With to be detected pair as if artificial example, can by the following method determine the Temperature Distribution of the face of live body and preset
Threshold value.The face thermal map of multiple experimenters is gathered, according to multiple face thermal maps the Temperature Distribution and predetermined threshold value of face are determined.
For example, the Temperature Distribution of face can be determined according to multiple face thermal maps by methods such as geometric average or arithmetic means.Can be with
According to the thermal map difference between multiple experimenters, predetermined threshold value is determined.
For example, characteristic point is taken in the place between the eyebrows position of forehead, if the temperature range at this feature point of multiple experimenters
For 36.5 DEG C~37.5 DEG C, then can determine that temperature value at this feature point is (37.5+36.5)/2=37 DEG C, it is determined that according to this
The corresponding predetermined threshold value of the calculated difference of characteristic point is (37.5-37) × β.Wherein, β can be being more than or equal to for setting
1 number, for example, β=1.Body temperature and sex, age, health in view of people, the time in one day etc. are relevant and multiple
The limitation of experimenter, it is the number more than 1, for example, β=1.5 or β=2 etc. that can take β.It should be noted that the example is only to illustrate
Property, it is impossible to the example is considered into the restriction to the embodiment of the present invention.
Therefore, the embodiment of the present invention can expect the comparison of thermal map according to the face's thermal map and face for collecting, it is determined that
Whether object to be detected is live body.The method is not only simple to operate, and it is each to take precautions against photo, mask or three-dimensional face model etc.
Plant the attack of camouflage.
Fig. 5 is the embodiment of the present invention.Device 50 shown in Fig. 5 includes:First acquisition module 501, the second acquisition module
502nd, determining module 503 and judge module 504.
First acquisition module 501, for obtaining the face image of object to be detected;
Second acquisition module 502, for obtaining face's thermal map of the object to be detected;
Determining module 503, face's figure of the object described to be detected for being obtained according to first acquisition module 501
Thermal map is expected by picture, the face for determining the object to be detected;And
Judge module 504, for face's thermal map for being obtained according to second acquisition module 502 and the determination mould
Thermal map is expected by the face that block 503 determines, judges whether the object to be detected is live body.
Exemplarily, determining module 503 can be used for:According to the Temperature Distribution of the face of the object to be detected, it is determined that
Thermal map is expected by the face of the object to be detected.
Exemplarily, judge module 504 can be used for:Face's thermal map is expected into that thermal map is compared with the face
It is right, judge whether the object to be detected is live body.
Exemplarily, judge module 504 can include computing unit and live body determining unit, and the computing unit is based on
The value and the face of calculating each characteristic point in face's thermal map expect the difference of the value of the corresponding characteristic point in thermal map;
The live body determining unit is used for:In all differences for being calculated, if less than or equal to the difference of corresponding predetermined threshold value
Quantity meet pre-conditioned, it is determined that the object to be detected be live body.
Exemplarily, the first acquisition module 501 can be used for:Obtain by the described to be checked of visible light image sensor collection
Survey the face image of object.
Alternatively, device 50 can include visible light image sensor, and the visible light image sensor is used to gather described
The face image of object to be detected.First acquisition module 501 can be used for obtaining this from visible light image sensor to be detected right
The face image of elephant.
Exemplarily, the second acquisition module 502 can be used for:Obtain by described in medium-wave infrared thermal imaging sensor is gathered
Face's thermal map of object to be detected.
Alternatively, device 50 can include medium-wave infrared thermal imaging sensor, and the medium-wave infrared thermal imaging sensor is used for
Gather face's thermal map of the object to be detected.Second acquisition module 502 can be used for from medium wave infrared thermal imaging sensor obtaining
Take face's thermal map of the object to be detected.
The method that device 50 shown in Fig. 5 is implemented for the In vivo detection shown in aforementioned Fig. 2 or Fig. 4.
In addition, the embodiment of the present invention additionally provides the device of another kind of In vivo detection, the device can include processor and
Memory, wherein, memory is used for store instruction code, during the computing device instruction code, it is possible to achieve aforementioned Fig. 2 or figure
The method of the In vivo detection shown in 4.
In addition, the embodiment of the present invention additionally provides a kind of electronic equipment, the electronic equipment can include the device shown in Fig. 5
50。
The embodiment of the present invention can expect the comparison of thermal map according to the face's thermal map and face for collecting, and determine to be detected
Whether object is live body.The method is not only simple to operate, and can take precautions against the various camouflages such as photo, mask or three-dimensional face model
Attack.
Although the example embodiment by reference to Description of Drawings here, it should be understood that above-mentioned example embodiment is merely exemplary
, and be not intended to limit the scope of the invention to this.Those of ordinary skill in the art can wherein carry out various changes
And modification, it is made without departing from the scope of the present invention and spirit.All such changes and modifications are intended to be included in claims
Within required the scope of the present invention.
Those of ordinary skill in the art are it is to be appreciated that the list of each example with reference to the embodiments described herein description
Unit and algorithm steps, being capable of being implemented in combination in electronic hardware or computer software and electronic hardware.These functions are actually
Performed with hardware or software mode, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel
Each specific application can be used different methods to realize described function, but this realization it is not considered that exceeding
The scope of the present invention.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, it can be passed through
Its mode is realized.For example, apparatus embodiments described above are only schematic, for example, the division of the unit, and only
Only a kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component can be tied
Close or be desirably integrated into another equipment, or some features can be ignored, or do not perform.
In specification mentioned herein, a large amount of details are illustrated.It is to be appreciated, however, that the enforcement of the present invention
Example can be put into practice in the case of without these details.In some instances, known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the present invention and help understand one or more in each inventive aspect, exist
To the present invention exemplary embodiment description in, the present invention each feature be grouped together into sometimes single embodiment, figure,
Or in descriptions thereof.However, the method for the present invention should be construed to reflect following intention:It is i.e. required for protection
The more features of feature that application claims ratio is expressly recited in each claim.More precisely, such as corresponding power
As sharp claim reflects, its inventive point is can be with the spy of all features less than certain disclosed single embodiment
Levy to solve corresponding technical problem.Therefore, it then follows it is concrete that thus claims of specific embodiment are expressly incorporated in this
Separate embodiments of the embodiment, wherein each claim as the present invention itself.
It will be understood to those skilled in the art that in addition to mutually exclusive between feature, any combinations pair can be adopted
All features and so disclosed any method disclosed in this specification (including adjoint claim, summary and accompanying drawing)
Or all processes or unit of equipment are combined.Unless expressly stated otherwise, this specification (will including adjoint right
Ask, make a summary and accompanying drawing) disclosed in each feature can, equivalent identical by offer or similar purpose alternative features replacing.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments
In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in detail in the claims, embodiment required for protection one of arbitrarily
Can in any combination mode using.
The present invention all parts embodiment can be realized with hardware, or with one or more processor operation
Software module realize, or with combinations thereof realization.It will be understood by those of skill in the art that can use in practice
Microprocessor or digital signal processor (DSP) to realize article analytical equipment according to embodiments of the present invention in some moulds
The some or all functions of block.The present invention is also implemented as the part for performing method as described herein or complete
The program of device (for example, computer program and computer program) in portion.Such program for realizing the present invention can be stored
On a computer-readable medium, or can have one or more signal form.Such signal can be from internet
Download on website and obtain, or provide on carrier signal, or provide in any other form.
It should be noted that above-described embodiment the present invention will be described rather than limits the invention, and ability
Field technique personnel can design without departing from the scope of the appended claims alternative embodiment.In the claims,
Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not
Element listed in the claims or step.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can come real by means of the hardware for including some different elements and by means of properly programmed computer
It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch
To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and be run after fame
Claim.
The above, the only specific embodiment of the present invention or the explanation to specific embodiment, the protection of the present invention
Scope is not limited thereto, any those familiar with the art the invention discloses technical scope in, can be easily
Expect change or replacement, all should be included within the scope of the present invention.Protection scope of the present invention should be with claim
Protection domain is defined.