Summary of the invention
In order to solve the above-mentioned technical problems, the present invention provides a kind of face identification method and devices, solve existing people
Fixed preset threshold, the low problem of recognition success rate are used in face identification technology.
According to one aspect of the present invention, a kind of face identification method is provided, comprising:
Obtain video flowing in present frame face information to be identified be stored in face characteristic library it is corresponding refer to face
The characteristic distance value of information;
According to the relationship of characteristic distance value and preset threshold, judge face information to be identified and with reference to face information whether
Match;
If face information to be identified improves the value of preset threshold as new default threshold with reference to face information matches
Value.
Wherein, obtain video flowing in present frame face information to be identified be stored in corresponding reference in face characteristic library
The step of characteristic distance value of face information includes:
The face characteristic to be identified in face information to be identified is extracted, and dimension-reduction treatment is carried out to face characteristic to be identified;
In face characteristic and face characteristic to be identified library after calculating dimension-reduction treatment it is all with reference between face characteristic away from
From value, and the minimum value of selected distance value is as characteristic distance value.
Wherein, according to the relationship of characteristic distance value and preset threshold, judge face information to be identified and refer to face information
The step of whether matching include:
If characteristic distance value is less than or equal to preset threshold, face information to be identified and with reference to face information matches;
If characteristic distance value is greater than preset threshold, face information to be identified and reference face information are mismatched.
Wherein, according to the relationship of characteristic distance value and preset threshold, judge face information to be identified and refer to face information
After the step of whether matching, further includes:
If face information to be identified and reference face information mismatch, one be spaced after preset time in video flowing is read
The face information to be identified of frame is matched again.
Wherein, according to the relationship of characteristic distance value and preset threshold, judge face information to be identified and refer to face information
After the step of whether matching, further includes:
If face information to be identified is with reference to face information matches, whether judging characteristic distance value is less than default confidence level
Value;
If being less than, the face information to be identified of next frame in video flowing is read, and improves the value of preset threshold as new
Preset threshold.
Wherein, in the relationship according to characteristic distance value and preset threshold, judge face information to be identified and believe with reference to face
After the step of whether breath matches, further includes:
Detect whether matching times are more than pre-determined number;If being more than, face information to be identified is identified successfully, is otherwise identified
Failure.
Wherein, after the face information recognition failures to be identified the step of, further includes:
Face information to be identified is registered in prompt.
Wherein, the face information to be identified of present frame and the reference face being stored in face characteristic library in video flowing are calculated
Before the step of characteristic distance value of information, further includes:
Location registration process is carried out to the face information got;
Face information after processing registration is stored in face characteristic library.
Wherein, include: to the step of face information progress location registration process got
Face information is normalized;
Feature extraction is carried out to the face information after normalized, and is calculated using subspace and face information is dropped
Dimension processing.
According to another aspect of the invention, a kind of face identification device is additionally provided, comprising:
Obtain module, for obtain in video flowing the face information to be identified of present frame be stored in it is right in face characteristic library
The characteristic distance value for the reference face information answered;
Matching module judges face information to be identified and reference for the relationship according to characteristic distance value and preset threshold
Whether face information matches;
Module is adjusted, for when face information to be identified and reference face information matches, the value for improving preset threshold to be made
For new preset threshold.
Wherein, obtaining module includes:
Extraction unit, for extracting the face characteristic to be identified in face information to be identified, and to face characteristic to be identified
Carry out dimension-reduction treatment;
Computing unit, it is all with reference to face in the face characteristic to be identified after dimension-reduction treatment and face characteristic library for calculating
The distance between feature value, and the minimum value of selected distance value is as characteristic distance value.
Wherein, matching module includes:
First matching unit, for determining face information to be identified when characteristic distance value is less than or equal to preset threshold
With reference face information matches;
Second matching unit, for determining face information to be identified and reference when characteristic distance value is greater than preset threshold
Face information mismatches.
Wherein, the face identification device further include:
First processing module, for reading in video flowing when face information to be identified and reference face information mismatch
The face information to be identified of a frame after the preset time of interval is matched again.
Wherein, the face identification device further include:
Judgment module, for when face information to be identified and reference face information matches, whether judging characteristic distance value
Less than default confidence value;
Second processing module, for reading next frame in video flowing when characteristic distance value is less than default confidence value
Face information to be identified, and the value of preset threshold is improved as new preset threshold.
Wherein, the face identification device further include: identification module, for detecting whether matching times are more than pre-determined number;
If being more than, face information to be identified is identified successfully, otherwise recognition failures.
Wherein, the face identification device further include:
Cue module carries out face information to be identified for prompting after determining face information recognition failures to be identified
Registration.
Wherein, the face identification device further include:
Registration module, for carrying out location registration process to the face information got;
Memory module, for the face information after processing registration to be stored in face characteristic library.
Wherein, registration module includes:
First processing units, for face information to be normalized;
The second processing unit for carrying out feature extraction to the face information after normalized, and is counted using subspace
It calculates and dimension-reduction treatment is carried out to face information.
The beneficial effect of the embodiment of the present invention is: a kind of face identification method and device pass through and obtain face to be identified
The characteristic distance value of information and reference face information, and detect whether this feature distance value is less than current preset threshold, to sentence
The match condition of face information to be identified of breaking and reference face information;Wherein, current preset threshold value and former frame face to be identified
The matching result of information is related, when the face information matching result to be identified of former frame is highly desirable, can properly increase down
The preset threshold of one frame, reduce difficulty of matching, thus avoid to a certain extent surrounding enviroment variation and influence feature away from
From value, and then lead to the phenomenon that misidentifying, improves the recognition success rate of recognition of face.
Embodiment
Video human face is identified due to having the characteristics that ease for operation, stability are good and identifying procedure is simple, commonly used
In fields such as customs, public security part, bank, company gate inhibitions.But in existing face recognition technology, the preset threshold of characteristic matching
It can not dynamically adjust, the low problem of the misrecognition or recognition success rate easily caused.To solve the above-mentioned problems, as shown in Figure 1, originally
The embodiment of invention provides a kind of face identification method, specifically includes the following steps:
Step 10: obtaining the face information to be identified of present frame and the reference man being stored in face characteristic library in video flowing
The characteristic distance value of face information.
By taking the authentication of business hall as an example, when certain user is in business hall transacting business, sales counter video camera will be continuously this
User shoots real-time video, carries out authentication to user based on the video.When certification, the present frame obtained in video flowing is mentioned
The face information to be identified supplied, and the face information to be identified and the corresponding characteristic distance value with reference to face information are calculated,
In, it is all to be stored in the face characteristic library of Verification System with reference to face information.
Step 20: according to the relationship of characteristic distance value and preset threshold, judging face information to be identified and believe with reference to face
Whether breath matches.
Wherein, preset threshold mentioned here is not necessarily worth, but by former frame face information to be identified and reference
Characteristic distance value between face information influences and dynamic change.If former frame face information to be identified with refer to face information
Between characteristic distance value it is close, that is to say, that matching effect is ideal, then it is corresponding pre- to be less than former frame for current preset threshold
If threshold value.The problem of can thus avoiding to a certain extent because of light, angle or expression posture etc., and influencing matching effect.
Step 30: if face information to be identified and refer to face information matches, improving the value of preset threshold as newly
Preset threshold.
Here it is to say, after the face information to be identified of present frame and with reference to the success of face information matches, matching can be improved
Preset threshold, in this way, carry out next frame matching when, next frame can be made to be easier to successful match.
It is by obtaining the characteristic distance value of face information to be identified and reference face information, and detecting this feature distance value
It is no to be less than current preset threshold, to judge face information to be identified and with reference to the match condition of face information, work as matching times
It is identified successfully when more than pre-determined number;Wherein, current preset threshold value is related to the matching result of former frame face information to be identified,
When the face information matching result to be identified of former frame is highly desirable, the preset threshold of next frame can be properly increased, is reduced
Difficulty of matching thus avoids surrounding enviroment variation to a certain extent and influences characteristic distance value, and then causes to misidentify
The phenomenon that, improve the recognition success rate of recognition of face.
It is briefly discussed above the core scheme and process of the embodiment of the present invention, below in conjunction with attached drawing to step 10 and step 20
It is further elaborated.
As shown in Fig. 2, step 10 specifically includes:
Step 11: extracting the face characteristic to be identified in face information to be identified, and face characteristic to be identified is dropped
Dimension processing.
Step 12: calculate dimension-reduction treatment after face characteristic to be identified and face characteristic library in it is all with reference to face characteristics it
Between distance value, and the minimum value of selected distance value is as characteristic distance value.
In simple terms, recognition of face is face picture/video to be carried out feature extraction and dimensionality reduction, and be stored in face spy
Levy in library, picture/video to be identified be equally subjected to feature extraction and dimensionality reduction when identification, and by after dimensionality reduction face characteristic and
Face characteristic in database compares one by one, and searching and the immediate face picture of its characteristic value are sentenced according to the threshold value set
It is fixed whether successful match.
That is, all registered reference face characteristics, i.e. face feature vector value are stored in face characteristic library,
When needing to identify, feature extraction is carried out to face information to be identified (human face photo or image), it is most former to obtain face to be identified
Beginning high dimension vector, generally 70,000 multidimensional calculate to simplify, and also need original face characteristic carrying out dimension-reduction treatment, obtain wait know
The feature vector value of other face information.
In order to be further simplified matching process, since the identity information of corresponding user can be acquired in registered face information,
Such as name, gender or ID card No. essential information can lead to when searching corresponding reference face information in face characteristic library
The identical set with reference to face information of retrieving identity information is crossed, the range for reducing matching comparison object is mentioned to reduce calculation amount
High matching efficiency.But can be used the process for matching comparison one by one no the case where acquiring corresponding subscriber identity information.
As shown in figure 3, step 20 specifically includes following several situations:
Step 21: if characteristic distance value is less than or equal to preset threshold, face information to be identified and with reference to face information
Matching.
Step 22: if characteristic distance value is greater than preset threshold, face information to be identified and reference face information are mismatched.
It is said herein to be, if characteristic distance value be less than current preset threshold, then it represents that face information to be identified with it is right
The reference face information answered matches, and otherwise mismatches.
It further include judging matching times to terminate the step of matching process after the step of step 20 obtains matching result
Suddenly, it specifically can refer to following steps realization:
Step 40: if matching times are more than pre-determined number, face information to be identified is identified successfully, otherwise face to be identified
Information recognition failures.
In order to avoid misrecognition, multiple matching process is all arranged in usual recognition of face, if matching in predetermined matching process
Number reaches pre-determined number, then it represents that identifies successfully, otherwise indicates recognition failures.Such as: if setting matching process is 5 times, know
Not successful pre-determined number is 3 times, if matching times reach 3 times or more in 5 matching process, successful match, otherwise
It fails to match.
Further, mentioned above to be dynamically adapted default threshold when face information to be identified and reference face information matches
Value, but when face information to be identified and reference face information mismatch, following steps can be performed:
If face information to be identified and reference face information mismatch, one be spaced after preset time in video flowing is read
The face information to be identified of frame is matched again.
If the face information to be identified of present frame and with reference to face information matches it is unsuccessful, in order to exclude be illumination, angle,
The influence of the extraneous factors such as expression or posture, Verification System can read in video flowing with current frame interval preset time (such as 300ms
Or 500ms) after a frame as face information to be identified, then carry out matching process again.
In order to guarantee the accuracy of recognition of face, after step 20 successful match, further includes:
If face information to be identified is with reference to face information matches, whether judging characteristic distance value is less than default confidence level
Value.
In video human face identification, since the factors such as illumination, expression, posture are uncontrollable, go out quilt in system identification
Identification person can suitably relax matched preset threshold in subsequent identification if there is the higher frame of confidence level in front.Its
In, default confidence value mentioned here is higher than matched preset threshold.That is after successful match, after guaranteeing
Continue matched accuracy, also to carry out the judgement of a confidence level, when only confidence level is high, could indicate matched correct
Rate is higher.
If being less than, the face information to be identified of next frame in video flowing is read, and improves the value of preset threshold as new
Preset threshold.
Said herein to be, the confidence level of face information to be identified is high, and preset threshold just can be improved during subsequent match
Value, relax matching condition, improve successful match rate.
After the above process, face information recognition failures to be identified indicate do not have corresponding reference in face characteristic library
Face information, as shown in figure 4, after step 40 recognition failures, further includes:
Step 50: if face information recognition failures to be identified, prompting to register face information to be identified.
Registration storage mentioned here, it is similar to the registration storage in face characteristic library is pre-created before step 10, below
Registration before specific introduction step 10 is put in storage process.
Location registration process is carried out to the face information got;
Face information after processing registration is stored in face characteristic library.
In video human face identification process, initial preparation is face information registration storage, specifically, to acquisition
It is as follows that the face information arrived carries out the step of location registration process:
Face information is normalized.People is carried out at least picture information inputted by video or image
Face detection, detects whether comprising face, to the pictorial information comprising face as face information to be processed.To face information into
Face, i.e., is uniformly cut into the picture of fixed pixel by row normalized, then executes unitary of illumination, and the influence of illumination is reduced to
It is most weak.
Feature extraction is carried out to the face information after normalized, and is calculated using subspace and face information is dropped
Dimension processing.The Initial Face feature of face information after the normalized of extraction, i.e. the high dimension vector dimension of face most original
Excessively high, generally 70,000 multidimensional directly calculate sufficiently complex.In order to reduce difficulty in computation, needs to carry out dimension-reduction treatment to it, obtain
To a feature vector value, dimensionality reduction mode is generally realized in such a way that subspace calculates.By the feature vector after dimension-reduction treatment
Value is stored into face characteristic library as with reference to face characteristic.
Each step of recognition of face is made that respectively above and explains in detail explanation, below in conjunction with concrete application scene
The overall flow of face identification method is further detailed in (by taking business hall as an example).
As shown in figure 5, when certain user removes business hall transacting business, it is necessary first to authentication is carried out to it, in identity
It is authenticated by the way of recognition of face when certification.
First obtain video flowing in present frame face information to be identified be stored in face characteristic library have in corresponding ginseng
Examine the characteristic distance value of face information.Here, the video information for collecting the user is input to by knowledge by the video camera of sales counter
Other system, it is all with reference to face letter by what is stored in the face characteristic of the face information to be identified of present frame and face characteristic library
The face characteristic of breath is compared, and calculates multiple distance values, minimum value is chosen in multiple distance values as characteristic distance value,
And it is lowest distance value is corresponding corresponding with reference to face information as the user with reference to face information.
Whether judging characteristic distance value is less than preset threshold.By characteristic distance value obtained above and current preset threshold
It compares, if being less than, then it represents that successful match, if no less than the next frame in video flowing is obtained as present frame.
After successful match, whether judging characteristic distance value is less than default confidence value, if being less than, carries out in next step, if
No less than then obtaining the next frame in video flowing as present frame.
If characteristic distance value is less than default confidence value, the face information to be identified of another frame in video flowing is read, and
The value of preset threshold is improved as new preset threshold.
Obtain face information to be identified and the corresponding characteristic distance value with reference to face information;Wherein, this is described pair
The reference face information answered is identical with predetermined corresponding reference face information.
Continue whether judging characteristic distance value is less than new preset threshold, if no less than reading another in video flowing
One frame is as present frame;If it is less, carrying out in next step.
Judge whether matching process reaches preset times, if not up to, continuing to read another frame in video flowing and making
For present frame;If fruit reaches, carry out in next step.
Judge whether matching times reach pre-determined number, if reached, then it represents that the user identifies successfully;If do not reached
It arrives, then it represents that user's recognition failures, and prompt to register face information to be identified, i.e. prompt carries out face to the user
The registration of feature.
Face identification method provided in an embodiment of the present invention, when specific implementation can refer to code as shown in FIG. 6 carry out it is real
Existing, whether by obtaining face information to be identified and with reference to the characteristic distance value of face information, and it is small to detect this feature distance value
In current preset threshold, to judge face information to be identified and with reference to the match condition of face information, when matching times are less than
It is identified successfully when pre-determined number;Wherein, current preset threshold value is related to the matching result of former frame face information to be identified, currently
When the face information matching result to be identified of one frame is highly desirable, the preset threshold of next frame can be properly increased, reduces matching
Difficulty thus avoids surrounding enviroment variation to a certain extent and influences characteristic distance value, and then leads to showing for misrecognition
As improving the recognition success rate of recognition of face.
It is the simple declaration carried out to the example of face identification method in the embodiment of the present invention above, below in conjunction with such as figure
The corresponding device of 7 pairs of above methods is simply introduced, the face identification device, comprising:
Module 101 is obtained, for obtaining the face information to be identified of present frame in video flowing and being stored in face characteristic library
In the corresponding characteristic distance value with reference to face information;
Matching module 201 judges face information to be identified and ginseng for the relationship according to characteristic distance value and preset threshold
Examine whether face information matches;
Module 301 is adjusted, for improving the value of preset threshold when face information to be identified and reference face information matches
As new preset threshold.
Wherein, obtaining module 101 includes:
Extraction unit, for extracting the face characteristic to be identified in face information to be identified, and to face characteristic to be identified
Carry out dimension-reduction treatment;
Computing unit, it is all with reference to face in the face characteristic to be identified after dimension-reduction treatment and face characteristic library for calculating
The distance between feature value, and the minimum value of selected distance value is as characteristic distance value.
Wherein, matching module 201 includes:
First matching unit, for determining face information to be identified when characteristic distance value is less than or equal to preset threshold
With reference face information matches;
Second matching unit, for determining face information to be identified and reference when characteristic distance value is greater than preset threshold
Face information mismatches.
Wherein, the face identification device further include:
First processing module, for reading in video flowing when face information to be identified and reference face information mismatch
The face information to be identified of a frame after the preset time of interval is matched again.
Wherein, the face identification device further include:
Judgment module, for when face information to be identified and reference face information matches, whether judging characteristic distance value
Less than default confidence value;
Second processing module, for reading next frame in video flowing when characteristic distance value is less than default confidence value
Face information to be identified, and the value of preset threshold is improved as new preset threshold.
Wherein, the face identification device further include: identification module, for detecting whether matching times are more than pre-determined number;
If being more than, face information to be identified is identified successfully, otherwise recognition failures.
Wherein, the face identification device further include:
Cue module carries out face information to be identified for prompting after determining face information recognition failures to be identified
Registration.
Wherein, the face identification device further include:
Registration module, for carrying out location registration process to the face information got;
Memory module, for the face information after processing registration to be stored in face characteristic library.
Wherein, registration module includes:
First processing units, for face information to be normalized;
The second processing unit for carrying out feature extraction to the face information after normalized, and is counted using subspace
It calculates and dimension-reduction treatment is carried out to face information.
It should be noted that the device is device corresponding with above-mentioned face identification method, institute in above method embodiment
There is implementation suitable for the embodiment of the device, can also reach identical technical effect.
Above-described is the preferred embodiment of the present invention, it should be pointed out that the ordinary person of the art is come
It says, can also make several improvements and retouch under the premise of not departing from principle of the present invention, these improvements and modifications also exist
In protection scope of the present invention.