Summary of the invention
In order to solve above-mentioned technical problem, the invention provides a kind of face identification method and device, solve
Existing face recognition technology uses fixing predetermined threshold value, the problem that recognition success rate is low.
According to one aspect of the present invention, it is provided that a kind of face identification method, including:
Obtain in video flowing the face information to be identified of present frame and be stored in ginseng corresponding in face characteristic storehouse
Examine the characteristic distance value of face information;
Relation according to characteristic distance value Yu predetermined threshold value, it is judged that face information to be identified and reference face information
Whether mate;
If face information to be identified is with reference to face information matches, then improve the value of predetermined threshold value as new pre-
If threshold value.
Wherein, obtain in video flowing the face information to be identified of present frame be stored in face characteristic storehouse corresponding
The step of characteristic distance value of reference face information include:
Extract the face characteristic to be identified in face information to be identified, and face characteristic to be identified is carried out dimensionality reduction
Process;
Calculate the face characteristic to be identified after dimension-reduction treatment with face characteristic storehouse all with reference to face characteristics it
Between distance value, and the minima of selected distance value is as characteristic distance value.
Wherein, according to the relation of characteristic distance value Yu predetermined threshold value, it is judged that face information to be identified and reference man
The step whether face information mates includes:
If characteristic distance value is less than or equal to predetermined threshold value, face information the most to be identified and reference face information
Join;
If characteristic distance value is more than predetermined threshold value, face information the most to be identified is not mated with reference to face information.
Wherein, according to the relation of characteristic distance value Yu predetermined threshold value, it is judged that face information to be identified and reference man
After the step whether face information mates, also include:
If face information to be identified is not mated with reference to face information, then read in video flowing and be spaced Preset Time
After the face information to be identified of a frame again mate.
Wherein, according to the relation of characteristic distance value Yu predetermined threshold value, it is judged that face information to be identified and reference man
After the step whether face information mates, also include:
If face information to be identified is with reference to face information matches, then whether judging characteristic distance value is less than presetting
Confidence value;
If being less than, then read the face information to be identified of next frame in video flowing, and improve the value of predetermined threshold value
As new predetermined threshold value.
Wherein, in the relation according to characteristic distance value Yu predetermined threshold value, it is judged that face information to be identified and reference
After the step whether face information mates, also include:
Whether detection matching times exceedes pre-determined number;If exceeding, face information identification the most to be identified success,
Otherwise recognition failures.
Wherein, after the step of face information recognition failures to be identified, also include:
Face information to be identified is registered by prompting.
Wherein, the face information to be identified of present frame in video flowing and the ginseng being stored in face characteristic storehouse are calculated
Before examining the step of characteristic distance value of face information, also include:
The face information got is carried out location registration process;
Face information after processing registration is stored in face characteristic storehouse.
Wherein, the step that the face information got carries out location registration process includes:
Face information is normalized;
Face information after normalized is carried out feature extraction, and uses subspace to calculate face information
Carry out dimension-reduction treatment.
According to another aspect of the present invention, additionally provide a kind of face identification device, including:
Acquisition module, for obtaining in video flowing the face information to be identified of present frame and being stored in face characteristic
The characteristic distance value of reference face information corresponding in storehouse;
Matching module, for the relation according to characteristic distance value Yu predetermined threshold value, it is judged that face information to be identified
Whether mate with reference to face information;
Adjusting module, for when face information to be identified is with during with reference to face information matches, improving predetermined threshold value
Value as new predetermined threshold value.
Wherein, acquisition module includes:
Extraction unit, for extracting the face characteristic to be identified in face information to be identified, and to people to be identified
Face feature carries out dimension-reduction treatment;
Computing unit, the face characteristic to be identified after calculating dimension-reduction treatment and all ginsengs in face characteristic storehouse
Examine the distance value between face characteristic, and the minima of selected distance value is as characteristic distance value.
Wherein, matching module includes:
First matching unit, for when characteristic distance value is less than or equal to predetermined threshold value, determining people to be identified
Face information and reference face information matches;
Second matching unit, for when characteristic distance value is more than predetermined threshold value, determining face information to be identified
Do not mate with reference to face information.
Wherein, this face identification device also includes:
First processing module, for when face information to be identified is not with when mating with reference to face information, and reading regards
The face information to be identified of the frame after being spaced Preset Time in frequency stream is mated again.
Wherein, this face identification device also includes:
Judge module, for during when face information to be identified and reference face information matches, it is judged that characteristic distance
Whether value is less than pre-seting certainty value;
Second processing module, is used for when characteristic distance value is less than and pre-sets certainty value, under reading in video flowing
The face information to be identified of one frame, and improve the value of predetermined threshold value as new predetermined threshold value.
Wherein, this face identification device also includes: identification module, is used for detecting whether matching times exceedes pre-
Determine number of times;If exceeding, face information identification the most to be identified success, otherwise recognition failures.
Wherein, this face identification device also includes:
Reminding module, for after determining face information recognition failures to be identified, face to be identified is believed by prompting
Breath is registered.
Wherein, this face identification device also includes:
Registering modules, for carrying out location registration process to the face information got;
Memory module, the face information after processing registration is stored in face characteristic storehouse.
Wherein, Registering modules includes:
First processing unit, for being normalized face information;
Second processing unit, for the face information after normalized is carried out feature extraction, and uses son
SPATIAL CALCULATION carries out dimension-reduction treatment to face information.
Embodiments of the invention provide the benefit that: a kind of face identification method and device, wait to know by obtaining
Other face information and the characteristic distance value with reference to face information, and whether detect this feature distance value less than current
Predetermined threshold value, with judge face information to be identified with reference to the match condition of face information;Wherein, currently
The matching result of predetermined threshold value face information to be identified to former frame is relevant, when the face to be identified of former frame is believed
The when that breath matching result being highly desirable, the predetermined threshold value of next frame can be properly increased, reduce difficulty of matching, this
Sample avoids surrounding enviroment the most to a certain extent to be changed and effect characteristics distance value, and then causes misrecognition
Phenomenon, improves the recognition success rate of recognition of face.
Embodiment
Video human face identification is owing to having the simple feature of ease for operation, good stability and identifying procedure, general
All over being applied to the fields such as customs, public security part, bank, company gate inhibition.But in existing face recognition technology,
The predetermined threshold value of characteristic matching can not dynamically adjust, the misrecognition easily caused or the low problem of recognition success rate.
In order to solve the problems referred to above, as it is shown in figure 1, The embodiment provides a kind of face identification method,
Specifically include following steps:
Step 10: obtain in video flowing the face information to be identified of present frame and be stored in face characteristic storehouse
The characteristic distance value of reference face information.
As a example by the authentication of business hall, when certain user will hold at business hall transacting business, sales counter video camera
Continue and shoot real-time video for this user, based on this video, user is carried out authentication.During certification, acquisition regards
The face information to be identified that present frame in frequency stream is provided, and calculate this face information to be identified with corresponding
With reference to the characteristic distance value of face information, wherein, all of reference face information is stored in Verification System
In face characteristic storehouse.
Step 20: according to the relation of characteristic distance value Yu predetermined threshold value, it is judged that face information to be identified and ginseng
Examine whether face information mates.
Wherein, predetermined threshold value mentioned here is not necessarily worth, but by former frame face information to be identified
And dynamically change with reference to the characteristic distance value impact between face information.If former frame face to be identified is believed
Characteristic distance value between breath and reference face information is close, say, that matching effect is preferable, the most current
The predetermined threshold value that predetermined threshold value is corresponding less than former frame.Thus can avoid to a certain extent because of light, angle
Degree or expression posture etc., and the problem affecting matching effect.
Step 30: if face information to be identified is with reference to face information matches, then improve the value of predetermined threshold value
As new predetermined threshold value.
Here it is to say, after the face information to be identified of present frame is successful with reference to face information matches, can carry
The predetermined threshold value of high coupling, so, when carrying out the coupling of next frame, next frame can be made to be more easy to, and the match is successful.
By obtain face information to be identified with reference to the characteristic distance value of face information, and detect this feature away from
Whether distance values is less than current predetermined threshold value, to judge face information to be identified and mating with reference to face information
Situation, identifies successfully when matching times exceedes pre-determined number;Wherein, current preset threshold value is treated with former frame
Identify that the matching result of face information is correlated with, when the face information matching result to be identified of former frame is highly desirable
Time, the predetermined threshold value of next frame can be properly increased, reduce difficulty of matching, keep away the most to a certain extent
Exempt from surrounding enviroment to change and effect characteristics distance value, and then caused the phenomenon of misrecognition, improve face and know
Other recognition success rate.
Core scheme and the flow process of the embodiment of the present invention are briefly discussed above it, below in conjunction with accompanying drawing to step 10
It is further elaborated with step 20.
As in figure 2 it is shown, step 10 specifically includes:
Step 11: extract the face characteristic to be identified in face information to be identified, and special to face to be identified
Levy and carry out dimension-reduction treatment.
Step 12: calculate the face characteristic to be identified after dimension-reduction treatment and all reference men in face characteristic storehouse
Distance value between face feature, and the minima of selected distance value is as characteristic distance value.
In simple terms, recognition of face is i.e. that face picture/video is carried out feature extraction and dimensionality reduction, and stores
In face characteristic storehouse, during identification, picture/video to be identified is carried out feature extraction and dimensionality reduction equally, and
Face characteristic after dimensionality reduction is compared one by one with the face characteristic in data base, finds closest with its eigenvalue
Face picture, according to the threshold determination set, whether the match is successful.
It is to say, storage has all registered reference face characteristics, i.e. face characteristic in face characteristic storehouse
Vector value, when needs identify, carries out feature extraction to face information to be identified (human face photo or image),
Obtain the most original high dimension vector of face to be identified, generally 70,000 multidimensional, in order to simplify calculating, also need former
Beginning face characteristic carries out dimension-reduction treatment, obtains the characteristic vector value of face information to be identified.
In order to simplify matching process further, owing to when registering face information, the body of corresponding user can be gathered
Part information, such as essential informations such as name, sex or ID (identity number) card No., searches correspondence in face characteristic storehouse
During with reference to face information, the set of the identical reference face information of retrieving identity information can be passed through, reduce coupling
The scope of contrast object, to reduce amount of calculation, improves matching efficiency.But for not gathering corresponding user's body
The situation of part information can use the process mating contrast one by one.
As it is shown on figure 3, step 20 specifically includes following several situation:
Step 21: if characteristic distance value is less than or equal to predetermined threshold value, face information the most to be identified and reference
Face information is mated.
Step 22: if characteristic distance value is believed with reference to face more than predetermined threshold value, face information the most to be identified
Breath does not mates.
Said herein, if characteristic distance value is less than current predetermined threshold value, then it represents that face to be identified is believed
Cease and corresponding reference face information match, do not mate.
After step 20 obtains the step of matching result, also include judging that matching times is to terminate to mate
The step of journey, specifically can refer to following steps and realizes:
Step 40: if matching times exceedes pre-determined number, face information identification the most to be identified success, otherwise
Face information recognition failures to be identified.
In order to avoid misrecognition, usual recognition of face all arranges repeatedly matching process, in predetermined matching process
If matching times reaches pre-determined number, then it represents that identify successfully, otherwise represent recognition failures.Such as: if setting
Putting matching process is 5 times, identifies that successful pre-determined number is 3 times, if coupling time in 5 matching processs
Number reach 3 times and more than, then the match is successful, and otherwise it fails to match.
Further, mentioned above when face information to be identified and with reference to face information matches time be dynamically adapted
Predetermined threshold value, but when face information to be identified is not with when mating with reference to face information, following steps can be performed:
If face information to be identified is not mated with reference to face information, then read in video flowing and be spaced Preset Time
After the face information to be identified of a frame again mate.
If the face information to be identified of present frame with reference to face information matches unsuccessful, in order to get rid of be illumination,
The impact of the extraneous factors such as angle, expression or posture, Verification System can read in video flowing with current frame interval
A frame after Preset Time (such as 300ms or 500ms), as face information to be identified, then carries out another
Secondary matching process.
In order to ensure the accuracy of recognition of face, after the match is successful for step 20, also include:
If face information to be identified is with reference to face information matches, then whether judging characteristic distance value is less than presetting
Confidence value.
When video human face identification, owing to the factors such as illumination, expression, attitude are the most uncontrollable, therefore in system
Identify identified person, if above there being the frame that confidence level is higher, can be pre-by mate in follow-up identification
If threshold value is suitably relaxed.Wherein, the certainty value that pre-sets mentioned here is higher than the predetermined threshold value of coupling.Also
That is after the match is successful, in order to ensure the accuracy of subsequent match, be also performed to sentencing of a confidence level
Disconnected, only the when of confidence level height, could represent that the accuracy of coupling is higher.
If being less than, then read the face information to be identified of next frame in video flowing, and improve the value of predetermined threshold value
As new predetermined threshold value.
Said herein, the confidence level of face information to be identified is high, just can improve pre-during subsequent match
If the value of threshold value, relax matching condition, the rate that improves that the match is successful.
After said process, face information recognition failures to be identified, expression does not has correspondence in face characteristic storehouse
Reference face information, as shown in Figure 4, after step 40 recognition failures, also include:
Step 50: if face information recognition failures to be identified, then point out and face information to be identified is noted
Volume.
The registration warehouse-in phase in face characteristic storehouse it is pre-created before registration warehouse-in mentioned here, with step 10
Seemingly, the registration warehouse-in process before step 10 will specifically be introduced below.
The face information got is carried out location registration process;
Face information after processing registration is stored in face characteristic storehouse.
During video human face identification, initial preparation is i.e. face information registration warehouse-in, specifically,
The step that the face information got carries out location registration process is as follows:
Face information is normalized.To at least one pictures information inputted by video or image
Carry out Face datection, detect whether to comprise face, to comprising the pictorial information of face as pending face
Information.Face information is normalized, will unify to be cut into the picture of fixed pixel by face, then hold
Row unitary of illumination, reduces to the most weak by the impact of illumination.
Face information after normalized is carried out feature extraction, and uses subspace to calculate face information
Carry out dimension-reduction treatment.The Initial Face feature of the face information after the normalized extracted, i.e. face is the most former
The high dimension vector dimension begun is too high, generally 70,000 multidimensional, directly calculates sufficiently complex.In order to reduce calculating
Difficulty, needs it is carried out dimension-reduction treatment, obtains a characteristic vector value, and dimensionality reduction mode typically uses son empty
Between calculate mode realize.Characteristic vector value after dimension-reduction treatment is stored to face feature database as reference
Face characteristic.
Below each step with regard to recognition of face is made that and explains in detail explanation, below in conjunction with specifically should respectively
By scene (as a example by business hall), the overall flow of face identification method is further detailed.
As it is shown in figure 5, when certain user removes business hall transacting business, it is necessary first to it is carried out authentication,
Use the mode of recognition of face to be authenticated when authentication.
First obtain in video flowing the face information to be identified of present frame be stored in during face characteristic storehouse has right
The characteristic distance value of the reference face information answered.Here, will collect this user's by the video camera of sales counter
Video information inputs to identifying system, by face characteristic and the face characteristic of the face information to be identified of present frame
The all face characteristics with reference to face information stored in storehouse compare, and calculate multiple distance value,
Multiple distance values choose minima as characteristic distance value, and by reference face letter corresponding for lowest distance value
Cease the reference face information corresponding as this user.
Whether judging characteristic distance value is less than predetermined threshold value.Characteristic distance value obtained above is pre-with current
If threshold value compares, if being less than, then it represents that the match is successful, if not being less than, then obtain next in video flowing
Frame is as present frame.
After the match is successful, it is judged that whether characteristic distance value is less than pre-seting certainty value, if being less than, then under carrying out
One step, if not being less than, then obtains the next frame in video flowing as present frame.
If characteristic distance value is less than pre-seting certainty value, then read the face to be identified letter of another frame in video flowing
Breath, and improve the value of predetermined threshold value as new predetermined threshold value.
Obtain the characteristic distance value of face information to be identified and corresponding reference face information;Wherein, this is institute
The corresponding reference face information said is identical with the corresponding reference face information determined before.
Continuing whether judging characteristic distance value is less than new predetermined threshold value, if be not less than, then reading video flowing
In another frame as present frame;If it is less, carry out next step.
Judging whether matching process reaches preset times, if not up to, then that continues to read in video flowing is another
One frame is as present frame;If fruit reaches, then carry out next step.
Judge whether matching times reaches pre-determined number, if reached, then it represents that this user identifies successfully;As
Fruit is not up to, then it represents that this user's recognition failures, and points out and register face information to be identified, i.e. carries
Show the registration that this user is carried out face characteristic.
The face identification method that the embodiment of the present invention provides, can refer to code as shown in Figure 6 when implementing
Realizing, by obtaining face information to be identified and the characteristic distance value with reference to face information, and detection should
Whether characteristic distance value is less than current predetermined threshold value, to judge face information to be identified and reference face information
Match condition, when matching times less than pre-determined number time identify successfully;Wherein, current preset threshold value is with front
The matching result of one frame face information to be identified be correlated with, when former frame face information matching result to be identified very
Time preferably, the predetermined threshold value of next frame can be properly increased, reduce difficulty of matching, thus in certain journey
Avoid surrounding enviroment on degree to change and effect characteristics distance value, and then cause the phenomenon of misrecognition, improve
The recognition success rate of recognition of face.
It is above the simple declaration that the example of face identification method in the embodiment of the present invention is carried out, below will knot
Close Fig. 7 such as the device that said method is corresponding is simply introduced, this face identification device, including:
Acquisition module 101, for obtaining in video flowing the face information to be identified of present frame and being stored in face
The characteristic distance value of reference face information corresponding in feature database;
Matching module 201, for the relation according to characteristic distance value Yu predetermined threshold value, it is judged that face to be identified
Whether information mates with reference to face information;
Adjusting module 301, for when face information to be identified is with during with reference to face information matches, improving and preset
The value of threshold value is as new predetermined threshold value.
Wherein, acquisition module 101 includes:
Extraction unit, for extracting the face characteristic to be identified in face information to be identified, and to people to be identified
Face feature carries out dimension-reduction treatment;
Computing unit, the face characteristic to be identified after calculating dimension-reduction treatment and all ginsengs in face characteristic storehouse
Examine the distance value between face characteristic, and the minima of selected distance value is as characteristic distance value.
Wherein, matching module 201 includes:
First matching unit, for when characteristic distance value is less than or equal to predetermined threshold value, determining people to be identified
Face information and reference face information matches;
Second matching unit, for when characteristic distance value is more than predetermined threshold value, determining face information to be identified
Do not mate with reference to face information.
Wherein, this face identification device also includes:
First processing module, for when face information to be identified is not with when mating with reference to face information, and reading regards
The face information to be identified of the frame after being spaced Preset Time in frequency stream is mated again.
Wherein, this face identification device also includes:
Judge module, for during when face information to be identified and reference face information matches, it is judged that characteristic distance
Whether value is less than pre-seting certainty value;
Second processing module, is used for when characteristic distance value is less than and pre-sets certainty value, under reading in video flowing
The face information to be identified of one frame, and improve the value of predetermined threshold value as new predetermined threshold value.
Wherein, this face identification device also includes: identification module, is used for detecting whether matching times exceedes pre-
Determine number of times;If exceeding, face information identification the most to be identified success, otherwise recognition failures.
Wherein, this face identification device also includes:
Reminding module, for after determining face information recognition failures to be identified, face to be identified is believed by prompting
Breath is registered.
Wherein, this face identification device also includes:
Registering modules, for carrying out location registration process to the face information got;
Memory module, the face information after processing registration is stored in face characteristic storehouse.
Wherein, Registering modules includes:
First processing unit, for being normalized face information;
Second processing unit, for the face information after normalized is carried out feature extraction, and uses son
SPATIAL CALCULATION carries out dimension-reduction treatment to face information.
It should be noted that this device is the device corresponding with above-mentioned face identification method, said method is implemented
In example, all implementations are all be applicable to the embodiment of this device, also can reach identical technique effect.
Above-described is the preferred embodiment of the present invention, it should be pointed out that for the ordinary people of the art
For Yuan, some improvements and modifications can also be made under without departing from principle premise of the present invention, these
Improvements and modifications are the most within the scope of the present invention.