Summary of the invention
Embodiments of the invention provide a kind of facial image recognition method and device, have improved the discrimination of facial image.
For achieving the above object, embodiments of the invention adopt following technical scheme:
A kind of recognition methods of facial image comprises:
To carry out characteristic matching and classification through first facial image and the facial image in the preset near infrared light enrolled set of near infrared light collection, and draw first group and mate preceding M the highest candidate's corresponding class of score value and mate score value;
To carry out characteristic matching and classification through second facial image and the facial image in the preset visible light enrolled set of visible light collection, and draw second group and mate preceding M the highest candidate's corresponding class of score value and mate score value;
Coupling score value and said second group coupling score value the highest preceding M the candidate corresponding coupling score value corresponding to preceding M the highest candidate of said first group of coupling score value carry out normalization, obtain the corresponding normalization score value of each candidate;
Preceding M candidate and said second group of preceding M the highest candidate of coupling score value that said first group of coupling score value is the highest carry out generic merging; Draw the merging score value of N classification and correspondence of all categories; In the said N classification the corresponding merging score value of i classification be said i classification in first group corresponding normalization score value and in said second group the summation of the normalization score value of correspondence; Wherein, N<2M; 0<i≤N, i, N and M are positive integer;
From a said N classification, confirm to merge the maximum classification of score value as the facial image recognition result.
A kind of recognition device of facial image comprises:
First processing unit is used for carrying out characteristic matching and classification through first facial image of near infrared light collection and the facial image of preset near infrared light enrolled set, draws first group and matees preceding M the highest candidate's corresponding class of score value and mate score value;
Second processing unit is used for carrying out characteristic matching and classification through second facial image of visible light collection and the facial image of preset visible light enrolled set, draws second group and matees preceding M the highest candidate's corresponding class of score value and mate score value;
The normalization unit is used for preceding M the highest candidate of said first group of coupling score value corresponding coupling score value and the highest corresponding coupling score value of preceding M candidate of said second group of coupling score value are carried out normalization, obtains the corresponding normalization score value of each candidate;
Merge cells; Be used for preceding M candidate that said first group of coupling score value is the highest and said second group of preceding M the highest candidate of coupling score value and carry out generic merging, draw the merging score value of N classification and correspondence of all categories, in the said N classification merging score value of i classification correspondence be the normalization score value of said i classification correspondence in first group and in said second group the summation of the normalization score value of correspondence; Wherein, N<2M, 0<i≤N, i, N and M are positive integer;
Confirm the unit, be used for confirming to merge the maximum classification of score value as the facial image recognition result from a said N classification.
In the described embodiment of the invention of technique scheme; To carry out characteristic matching and classification through first facial image and the facial image in the preset near infrared light enrolled set of near infrared light collection, and draw first group and mate preceding M the highest candidate's corresponding class of score value and mate score value; To carry out characteristic matching and classification through second facial image and the facial image in the preset visible light enrolled set of visible light collection, and draw second group and mate preceding M the highest candidate's corresponding class of score value and mate score value; Preceding M candidate and said second group of preceding M the highest candidate of coupling score value that said first group of coupling score value is the highest carry out generic merging; Draw N the corresponding classification of candidate and the merging score value of correspondence of all categories, from a said N classification, confirm to merge the maximum classification of score value as the facial image recognition result.With in the prior art because the quantity of information that the end that decision-making level is in identifying causes obtaining is less; Thereby make low the comparing of discrimination of facial image; The beneficial effect that the embodiment of the invention is brought is: when carrying out fusion recognition in decision-making level; Can obtain the score value of each classification, that is can the more information amount be provided, and then can improve the discrimination of facial image for decision-making level.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Embodiment 1:
The embodiment of the invention provides a kind of recognition methods of facial image, and is as shown in Figure 1, comprises the steps:
101, will carry out characteristic matching and classification through first facial image and the facial image in the preset near infrared light enrolled set of near infrared light collection, and draw first group and mate preceding M the highest candidate's corresponding class of score value and mate score value.
Particularly, will carry out characteristic matching, and adopt nearest neighbor classifier to classify through first facial image of near infrared light collection and the facial image in the preset near infrared light enrolled set.Said first group of coupling score value that matees in preceding M the highest candidate's corresponding class of score value can adopt the cosine distance or adopt Euclidean distance to calculate.
Shown in the following formula of the computing formula of cosine distance (1):
Formula (1)
Wherein, X representes the characteristic from first facial image through the near infrared light collection, extracted; Y representes a characteristic that facial image extracts in the preset near infrared light enrolled set, D (x, y) the coupling score value of the corresponding class that facial image had under expression first facial image and the y.
In the embodiment of the invention in the preset near infrared light enrolled set each is opened facial image and is all had a corresponding classification.Usually, belong to same individual's face images in the preset near infrared light enrolled set, all can regard same classification as.
For example; When the corresponding classification of a facial image A in the preset near infrared light enrolled set is classification 2; If above-mentioned y representes the characteristic that the facial image A in the preset near infrared light enrolled set extracts, D (x, y) the corresponding coupling score value of the classification that had of expression facial image A 2 so.
Shown in the following formula of the computing formula of Euclidean distance (2):
Formula (2)
Wherein, X representes the characteristic from first facial image through the near infrared light collection, extracted; Y representes the characteristic that the facial image in the preset near infrared light enrolled set extracts, D (x, y) the coupling score value of the corresponding class that facial image had under expression first facial image and the y.
Especially, said first group of preceding M the highest candidate's corresponding class of coupling score value specifically is meant preceding M the highest classification that the candidate has of coupling score value that score value is maximum.
102, will carry out characteristic matching and classification through second facial image and the facial image in the preset visible light enrolled set of visible light collection, and draw second group and mate preceding M the highest candidate's corresponding class of score value and mate score value.
Particularly, will carry out characteristic matching, and adopt nearest neighbor classifier to classify through second facial image of visible light collection and the facial image in the preset visible light enrolled set.Preceding M candidate's corresponding class that said second group of coupling score value is the highest can adopt the cosine distance or adopt Euclidean distance to calculate with the coupling score value.
The computing formula of said cosine distance can be referring to the associated description of above-mentioned formula (1), and the computing formula of said Euclidean distance can be referring to the associated description of above-mentioned formula (2).
Need to prove that coupling score value that preceding M the candidate that said first group of coupling score value is the highest is corresponding and the highest corresponding coupling score value of preceding M candidate of said second group of coupling score value all adopt the cosine distance to calculate;
Perhaps, coupling score value that preceding M the candidate that said first group of coupling score value is the highest is corresponding and the highest corresponding coupling score value of preceding M candidate of said second group of coupling score value all adopt Euclidean distance to calculate.
103, respectively preceding M the highest candidate of said first group of coupling score value corresponding coupling score value and the highest corresponding coupling score value of preceding M candidate of said second group of coupling score value are carried out normalization, obtain the corresponding normalization score value of each candidate.
Through on the same group coupling score value is not carried out normalization, can reduce score value number that the different modalities image causes not in the influence of same level, improve the accuracy of identification.Particularly; If above-mentionedsteps 101 and 102 all adopts the corresponding score value of each classification of cosine distance calculation, then this step will adopt following formula (3) respectively said first group of coupling score value the highest each self-corresponding score value of preceding M classification and said second group of the highest each self-corresponding score value of preceding M classification of coupling score value to be carried out normalization.
θ′=(θ-min(θ))/(max(θ)-min(θ)) (3)
Wherein, the current candidate's of θ ' expression normalization score value, θ are represented current candidate's coupling score value, the maximum score value of coupling score value in the group of the current candidate of max (θ) expression place, the minimum score value of coupling score value in the group of the current candidate of min (θ) expression place.
For example; When adopting above-mentioned formula (3) that said first group of the highest each self-corresponding coupling score value of preceding M candidate of coupling score value carried out normalization; J candidate's normalization score value in first group of the θ ' expression; Then θ representes j candidate's in first group coupling score value, the minimum score value of coupling score value in the maximum score value of coupling score value in first group of max (θ) expression, first group of min (θ).Through normalization, can obtain the highest preceding M and each self-corresponding normalization score value of candidate of coupling score value of first group.As shown in Figure 2, the corresponding normalization score value of first group of first candidate (classification 2) is 1.0.
And for example; When adopting above-mentioned formula (3) that said second group of the highest each self-corresponding coupling score value of preceding M candidate of coupling score value carried out normalization; J candidate's normalization score value in second group of the θ ' expression; Then θ representes j candidate's in second group coupling score value, the minimum score value of coupling score value in the maximum score value of coupling score value in second group of max (θ) expression, second group of min (θ).As shown in Figure 2, the corresponding normalization score value of second group of second candidate (classification 1) is 0.87.
Particularly; If above-mentionedsteps 101 and 102 all adopts Euclidean distance to calculate the corresponding score value of each classification, then this step will adopt following formula (4) respectively said first group of coupling score value the highest each self-corresponding score value of preceding M classification and said second group of the highest each self-corresponding score value of preceding M classification of coupling score value to be carried out normalization.
θ′=(θ-max(θ))/(min(θ)-max(θ)) (4)
Wherein, J candidate's of θ ' expression normalization score value, θ representes j candidate's coupling score value, the maximum score value of coupling score value in j candidate place group of max (θ) expression; The minimum score value of coupling score value in j candidate place group of min (θ) expression, j≤M and j are positive integer.
Adopt above-mentioned formula (4) when the highest each the self-corresponding score value of preceding M classification of coupling score value carries out normalization in said first group and second group, can be with reference to specifying in the above-mentioned employing formula (3).
As shown in Figure 2; With first image respectively with preset near infrared light enrolled set in facial image carry out characteristic matching; And adopt nearest neighbor classifier to classify, after again score value being carried out normalization and handles, draw score value after the normalization of first group of preceding 6 classification correspondence of all categories.As shown in Figure 2, the score value in first group after the corresponding normalization of classification 2 is that the score value after the corresponding normalization of classification 4 is 0.95 in 1.0, the first groups, or the like.
With second image respectively with preset visible light enrolled set in facial image carry out characteristic matching, and adopt nearest neighbor classifier to classify, after again score value being carried out normalization and handles, draw the normalization score value of second group of preceding 6 classification and correspondence of all categories.For example, classification 2 corresponding normalization score values are that classification 1 corresponding normalization score value is 0.87 in 1.0, the second groups in second group, or the like.
104, said first group of coupling score value is the highest preceding M classification and said second group of preceding M the highest classification of coupling score value are carried out generic merging; Draw the corresponding merging score value of N classification and arbitrary classification; In the said N classification the corresponding merging score value of i classification be said i classification in first group corresponding normalization score value and in said second group the summation of the normalization score value of correspondence, wherein, N<2M; 0<i≤N, i, N and M are positive integer.
With Fig. 2 is that example describes: first group of preceding 6 classification and said second group preceding 6 classifications are carried out generic merging, draw the corresponding score value of 4 classifications and arbitrary classification.
Such as; The corresponding score value of the 1st classification (being specially classification 1) is 0.87 in above-mentioned 4 classifications; Computation process is: classification 1 is no corresponding score value in first group; Classification 1 corresponding score value through after the normalization in second group is 0.87, thereby classification 1 corresponding score value is classification 1 score value after the process normalization in second group;
And for example; The corresponding score value of the 2nd classification (being specially classification 2) is 3.5 in above-mentioned 4 classifications; Computation process is: classification 2 corresponding respectively score value through after the normalization in first group is 1.0,0.73,0.45; Classification 2 corresponding respectively score value through after the normalization in second group is 1.0 and 0.32, thereby classification 2 corresponding score values are 1.0+0.73+0.45+1.0+0.32=3.5.
105, from a said N classification, confirm to merge the maximum classification of score value as the facial image recognition result.
Particularly, can a said N classification be carried out according to score value that ascending order is arranged or descending sort, afterwards, the classification of obtaining score value maximum in N the classification after the arrangement is as recognition result.
With Fig. 2 is example, and through after the descending sort, the maximum classification of score value is a classification 2 in above-mentioned 4 classifications, therefore, confirms that classification 2 is recognition result.
In the embodiment of the invention, will carry out characteristic matching and classification, and draw first group and mate preceding M the highest candidate's corresponding class of score value and mate score value through first facial image and the facial image in the preset near infrared light enrolled set of near infrared light collection; To carry out characteristic matching and classification through second facial image and the facial image in the preset visible light enrolled set of visible light collection, and draw second group and mate preceding M the highest candidate's corresponding class of score value and mate score value; Preceding M candidate and said second group of preceding M the highest candidate of coupling score value that said first group of coupling score value is the highest carry out generic merging; Draw N the corresponding classification of candidate and the merging score value of correspondence of all categories, from a said N classification, confirm to merge the maximum classification of score value as the facial image recognition result.With in the prior art because the quantity of information that the end that decision-making level is in identifying causes obtaining is less; Thereby make low the comparing of discrimination of facial image; The beneficial effect that the embodiment of the invention is brought is: when carrying out fusion recognition in decision-making level; Can obtain the score value of each classification, that is can the more information amount be provided, and then can improve the discrimination of facial image for decision-making level.
The method that provides for the better checking embodiment of the invention can improve the discrimination of facial image, and the recognition methods of the facial image that below the present invention is proposed and the recognizer of existing facial image compare.At sorting phase, adopt cosine apart from as the measuring similarity between the different samples, (NN) classifies with nearest neighbor classifier.
The recognition performance of the whole bag of tricks is compared in this experiment near infrared-visible data collection.Gather by the laboratory is inner near infrared-visible data storehouse, and total 5600 pictures from 90 people comprise 2800 near infrared light facial images and 2800 visible light facial images.These 90 people are respectively at 20 visible light pictures of indoor shot and 20 infrared light pictures, and respectively take 10 visible light pictures and 10 infrared light pictures at outdoor four direction of illuminations (frontlighting, backlight, left photometry, right photometry) respectively.Indoor 10 the visible light pictures of everyone random choose are as the visible light registered set, and indoor 10 the near infrared pictures of same random choose are as the near infrared registered set.With remaining indoor and outdoor picture as test set and be divided into 5 parts: indoor, frontlighting, backlight, left side light and right photometry.Images all in the experiment all are normalized to 64*64 based on the eyes coordinates that automatic detection obtains.
When facial image is carried out feature extraction, adopt LBP (Local Binary Pattern) characteristic, and use LDA (Linear Discriminant Analysis) dimensionality reduction.Like following table 1 be: the contrast situation that adopts the discrimination that discrimination that method provided by the invention reaches and existing recognition methods reach.
Table 1
From table 1, can find out; Indoor registration is indoor discern in, use the recognition performance of near infrared light image to be better than the recognition performance of visible images, and in outdoor identification; The recognition performance that uses the near infrared light image is but not as good as visible images; That is because in outdoor identification, and light source is far smaller than surround lighting because the existence of a large amount of surround lightings causes initiatively, and makes that gathering the near infrared light image lost efficacy.Use has certain effect based on existing fusion method to promoting recognition performance; But robustness is not strong; Performance boost is not obvious and recognition methods that use the present invention to mention can effectively promote recognition performance, and under outdoor situation backlight, its discrimination can reach 83%.
Embodiment 2:
The embodiment of the invention provides a kind of recognition device of facial image, and is as shown in Figure 3, comprising: first processing unit, 11, thesecond processing units 12,normalization unit 13, mergecells 14 anddefinite unit 15.
Wherein, First processingunit 11; Be used for and carry out characteristic matching and classification through first facial image of near infrared light collection and the facial image of preset near infrared light enrolled set, draw first group and mate preceding M the highest candidate's corresponding class of score value and mate score value;
Second processing unit 12 is used for carrying out characteristic matching and classification through second facial image of visible light collection and the facial image of preset visible light enrolled set, draws second group and matees preceding M the highest candidate's corresponding class of score value and mate score value;
Normalization unit 13 is used for preceding M the highest candidate of said first group of coupling score value corresponding coupling score value and the highest corresponding coupling score value of preceding M candidate of said second group of coupling score value are carried out normalization, obtains each candidate's normalization score value;
Mergecells 14; Be used for preceding M classification that said first group of coupling score value is the highest and said second group of preceding M the highest classification of coupling score value and carry out generic merging, draw the merging score value of N classification and correspondence of all categories, in the said N classification merging score value of i classification correspondence be the normalization score value of said i classification correspondence in first group and in said second group the summation of the normalization score value of correspondence; Wherein, N<2M, 0<i≤N, i, N and M are positive integer;
Confirm unit 15, be used for confirming to merge the maximum classification of score value as the facial image recognition result from a said N classification.
The device that the embodiment of the invention provides; To carry out characteristic matching and classification through first facial image and the facial image in the preset near infrared light enrolled set of near infrared light collection, and draw first group and mate preceding M the highest candidate's corresponding class of score value and mate score value; To carry out characteristic matching and classification through second facial image and the facial image in the preset visible light enrolled set of visible light collection, and draw second group and mate preceding M the highest candidate's corresponding class of score value and mate score value; Preceding M candidate and said second group of preceding M the highest candidate of coupling score value that said first group of coupling score value is the highest carry out generic merging; Draw N the corresponding classification of candidate and the merging score value of correspondence of all categories, from a said N classification, confirm to merge the maximum classification of score value as the facial image recognition result.With in the prior art because the quantity of information that the end that decision-making level is in identifying causes obtaining is less; Thereby make low the comparing of discrimination of facial image; The beneficial effect that the embodiment of the invention is brought is: when carrying out fusion recognition in decision-making level; Can obtain the score value of each classification, that is can the more information amount be provided, and then can improve the discrimination of facial image for decision-making level.
Said first processingunit 11 specifically is used for carrying out characteristic matching through first facial image of near infrared light collection and the facial image of preset near infrared light enrolled set, and adopts nearest neighbor classifier to classify;
Saidsecond processing unit 12 specifically is used for carrying out characteristic matching through second facial image of visible light collection and the facial image of preset visible light enrolled set, and adopts nearest neighbor classifier to classify.
The corresponding score value of arbitrary classification all adopts the cosine distance calculation to draw in preceding M the classification that second group of coupling score value of corresponding score value of arbitrary classification and saidsecond processing unit 12 is the highest in the highest preceding M the classification of draw first group coupling of saidfirst processing unit 11 score value, or the score value of arbitrary classification correspondence and second group of score value that matees arbitrary classification correspondence in preceding M the highest classification of score value of saidsecond processing unit 12 all adopt Euclidean distance to calculate in the highest preceding M the classification of first group of coupling score value drawing of saidfirst processing unit 11.
Saiddefinite unit 15 specifically is used for a said N classification is carried out ascending order and arranged or descending sort according to merging score value, and obtain merge the score value maximum in N the classification after the arrangement classification as recognition result.
Utilize the device that provides in the embodiment of the invention to accomplish the identifying of facial image, can repeat no more here with reference to the description among the embodiment one.
The embodiment of the invention is mainly used in the facial image identification processing.
The above; Be merely embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technician who is familiar with the present technique field is in the technical scope that the present invention discloses; Can expect easily changing or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of said claim.