CN103279746A - Method and system for identifying faces based on support vector machine - Google Patents
Method and system for identifying faces based on support vector machine Download PDFInfo
- Publication number
- CN103279746A CN103279746A CN2013102103722A CN201310210372A CN103279746A CN 103279746 A CN103279746 A CN 103279746A CN 2013102103722 A CN2013102103722 A CN 2013102103722A CN 201310210372 A CN201310210372 A CN 201310210372A CN 103279746 A CN103279746 A CN 103279746A
- Authority
- CN
- China
- Prior art keywords
- sample
- face
- people
- identified
- training
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Image Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and system for identifying faces based on a support vector machine. The method includes the step that a face sample training set is obtained; for all face samples in the face sample training set, k face samples are selected at random to serve as homogeneous samples, wherein the face samples and a face sample belong to a same category, and the k face samples are selected to serve as heterogeneous samples, wherein the face samples and the face sample belong to different categories; A difference sample pair set is generated according to the homogeneous samples and the heterogeneous samples; in the difference sample pair set, each face sample in the face sample training set is provided with 2k homogeneous difference sample pairs and 2k heterogeneous difference sample pairs; for the difference sample pair set, the support vector machine is adopted for training and a similarity judgment model is obtained; according to the similarity judgment model, a classification model is obtained, and the classification model is adopted for identifying faces. According to the method or the system, on the premise that the rapid sampling is guaranteed, the efficiency of identifying the faces can be improved.
Description
Technical field
The present invention relates to the recognition of face field, particularly relate to a kind of face identification method based on support vector machine and system.
Background technology
Recognition of face refers to utilize analyze compares the computer technology that people's face visual signature information is carried out the identity discriminating.At present, (Support Vector Machine, face identification method development SVM) is comparatively rapid based on support vector machine.
So-called support vector refers to that those are at the training sample point at spacer region edge.Here " machine (machine, machine) " is actually the implication of " algorithm ".In the machine learning field, often some algorithms are regarded as a machine.Support vector machine is based upon on VC dimension (Vapnik-Chervonenkis Dimension) theory and structure risk minimum principle basis of Statistical Learning Theory, between the complicacy of the model study precision of specific training sample (namely to) and learning ability (namely identifying the ability of arbitrary sample error-free), seek optimal compromise according to limited sample information, in the hope of obtaining best popularization ability.Wherein, the VC dimension has reflected the learning ability of collection of functions, and VC ties up the more big machine more complicated (capacity is more big) of then learning.
P.Jonathon Phillips proposes support vector machine (SVM) is applied in the recognition of face problem in article " Support Vector Machines Applied to Face Recognition ".In the method that this article proposes, support vector machine at first will be learnt a similarity function, and the structure sample is right, carries out recognition of face by the similarity between the facial image then.
But this method has problems in the right process of structure sample.On the one hand, it is right that this method can produce a large amount of training samples, may cause working time of this method long even internal memory to overflow and can't carry out.This method can produce the unbalanced data problem on the other hand.The unbalanced data problem refers to because the singularity of recognition of face problem, can occur similar sample to and dissimilar sample between very big imbalance, this can influence the performance of support vector machine to a great extent.
Summary of the invention
The purpose of this invention is to provide a kind of face identification method based on support vector machine and system, can reduce the right number of training sample, make similar sample to the number maintenance balance right with dissimilar sample simultaneously, and then can under the prerequisite that guarantees quick sampling, improve the efficient of recognition of face.
For achieving the above object, the invention provides following scheme:
A kind of face identification method based on support vector machine comprises:
Obtain the step of people's face sample training collection: described people's face sample training is concentrated and to be included others face sample set of a plurality of classes, comprises a plurality of people's face samples in others the face sample set of each class;
Choose the step of similar sample and foreign peoples's sample: everyone face sample of concentrating for described people's face sample training, picked at random k and this people's face sample belong to others face sample of same class as similar sample, and the individual people's face sample that belongs to a different category with this people's face sample of picked at random k is as foreign peoples's sample;
Generate the step of difference sample pair set: generate the difference sample pair set according to described similar sample and described foreign peoples's sample; In the described difference sample pair set, for everyone face sample that described people's face sample training is concentrated, all have 2k similar difference sample right, and 2k foreign peoples's difference sample is right;
Generate the step of disaggregated model: for described difference sample pair set, adopt the support vector machine training to obtain the similarity judgment models, obtain disaggregated model according to described similarity judgment models;
The step of recognition of face: adopt described disaggregated model to carry out recognition of face.
Optionally, described employing support vector machine training obtains the similarity judgment models, comprising:
The employing kernel function is that the support vector machine training of Gaussian radial basis function obtains described similarity judgment models.
Optionally, before the described generation difference sample pair set, also comprise:
Each sample that described people's face sample training is concentrated carries out dimensionality reduction at random, and the dimension behind each sample dimensionality reduction is identical;
People's face sample behind the employing dimensionality reduction generates the difference sample pair set;
Accordingly, when adopting described disaggregated model to carry out recognition of face, comprising:
People's face sample to be identified is carried out dimensionality reduction at random, and the dimension of the people's face sample behind the dimension of the people's face sample described to be identified behind the dimensionality reduction and the dimensionality reduction is identical.
Optionally, the described disaggregated model of described employing carries out recognition of face, comprising:
Obtain people's face sample to be identified;
Picked at random k people's face sample from the sample set of described each classification of people's face training set respectively, it is right to generate 2k difference sample to be identified, obtains difference sample pair set to be identified;
Utilize described disaggregated model that described difference sample pair set to be identified is analyzed, obtain the similarity probability of each class in described people's face sample to be identified and the described people's face training set;
According to described similarity probability, determine the classification of described people's face sample ownership to be identified.
Optionally, described method also comprises:
Repeat the step of choosing similar sample and foreign peoples's sample and the step that generates the difference sample pair set, obtain a plurality of similarity judgment models, obtain disaggregated model according to described a plurality of similarity judgment models;
Accordingly, describedly utilize described disaggregated model that described difference sample pair set to be identified is analyzed, comprising:
Utilize described a plurality of similarity judgment models that described difference sample pair set to be identified is analyzed, obtain the similarity probability of each class in a plurality of described people's face samples to be identified and the described people's face training set;
A plurality of described similarity probability are averaged, obtain the average similarity probability;
The described classification of determining described people's face sample ownership to be identified comprises:
With the classification of average similarity probability maximum, be defined as the classification of described people's face sample ownership to be identified.
A kind of face identification system based on support vector machine comprises:
The training set acquisition module is used for obtaining people's face sample training collection; Described people's face sample training is concentrated and to be included others face sample set of a plurality of classes, comprises a plurality of people's face samples in others the face sample set of each class;
Sample is chosen module, be used for to carry out the step of choosing similar sample and foreign peoples's sample: everyone face sample of concentrating for described people's face sample training, picked at random k and this people's face sample belong to others face sample of same class as similar sample, and the individual people's face sample that belongs to a different category with this people's face sample of picked at random k is as foreign peoples's sample;
Difference sample pair set generation module is used for carrying out the step that generates the difference sample pair set: generate the difference sample pair set according to described similar sample and described foreign peoples's sample; In the described difference sample pair set, for everyone face sample that described people's face sample training is concentrated, all have 2k similar difference sample right, and 2k foreign peoples's difference sample is right;
The disaggregated model generation module is used for for described difference sample pair set, adopts the support vector machine training to obtain the similarity judgment models, obtains disaggregated model according to described similarity judgment models;
Face recognition module is used for adopting described disaggregated model to carry out recognition of face.
Optionally, described disaggregated model generation module comprises:
Similarity judgment models generation unit, be used for adopting kernel function is that the support vector machine training of Gaussian radial basis function obtains described similarity judgment models.
Optionally, also comprise:
Training set sample dimensionality reduction module is used for each sample that described people's face sample training is concentrated is carried out dimensionality reduction at random, and the dimension behind each sample dimensionality reduction is identical; So that described difference sample pair set generation module adopts the people's face sample behind the dimensionality reduction to generate the difference sample pair set;
Accordingly, described face recognition module comprises:
Sample dimensionality reduction to be identified unit is used for people's face sample to be identified is carried out dimensionality reduction at random, and the dimension of the people's face sample behind the dimension of the people's face sample described to be identified behind the dimensionality reduction and the dimensionality reduction is identical.
Optionally, described face recognition module comprises:
People's face sample acquisition unit to be identified is used for obtaining people's face sample to be identified;
Difference sample pair set generation unit to be identified, from k people's face of sample set picked at random sample of described each classification of people's face training set, it is right to generate 2k difference sample to be identified, obtains difference sample pair set to be identified for respectively;
Similarity probability calculation unit is used for utilizing described disaggregated model that described difference sample pair set to be identified is analyzed, and obtains the similarity probability of each class in described people's face sample to be identified and the described people's face training set;
The classification determining unit is used for according to described similarity probability, determines the classification of described people's face sample ownership to be identified.
Optionally, also comprise:
Repeat module, described sample is chosen module and described difference sample pair set generation module repeats the step of choosing similar sample and foreign peoples's sample and the step that generates the difference sample pair set for controlling, obtain a plurality of similarity judgment models, obtain disaggregated model according to described a plurality of similarity judgment models;
Accordingly, described similarity probability calculation unit comprises:
Similarity probability calculation subelement is used for utilizing described a plurality of similarity judgment models that described difference sample pair set to be identified is analyzed, and obtains the similarity probability of each class in a plurality of described people's face samples to be identified and the described people's face training set;
Average similarity probability calculation subelement is used for a plurality of described similarity probability are averaged, and obtains the average similarity probability;
Described classification determining unit comprises:
Classification is determined subelement, is used for the classification with average similarity probability maximum, is defined as the classification of described people's face sample ownership to be identified.
According to specific embodiment provided by the invention, the invention discloses following technique effect:
Face identification method of the present invention and system, by everyone face sample of concentrating for described people's face sample training, picked at random k similar sample and k foreign peoples's sample, according to described similar sample and described foreign peoples's sample, generate the difference sample pair set, for described difference sample pair set, adopt the support vector machine training to obtain the similarity judgment models; Obtain disaggregated model according to described a plurality of similarity judgment models; Adopt described disaggregated model to carry out recognition of face; On the one hand because from others the face sample set of each class that described people's face sample training is concentrated, picked at random k similar sample and k foreign peoples's sample architecture difference sample are right, in prior art, everyone face sample of concentrating for described people's face sample training, choose everyone face sample architecture difference sample except this people's face sample to comparing, can reduce the right number of training sample; On the other hand, because the number of the similar sample of choosing and foreign peoples's sample is identical, so the similar difference sample that can generate similar number to right with foreign peoples's difference sample, makes similar sample to keeping balance with the right number of dissimilar sample.In conjunction with the beneficial effect of above-mentioned two aspects, method of the present invention or system can improve the efficient of recognition of face under the prerequisite that guarantees quick sampling.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use among the embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the process flow diagram of the face identification method embodiment based on support vector machine of the present invention;
Fig. 2 is the structural drawing of the face identification system embodiment based on support vector machine of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, 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 belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
Fig. 1 is the process flow diagram of the face identification method embodiment based on support vector machine of the present invention.As shown in Figure 1, described method comprises:
Step 101: obtain people's face sample training collection; Described people's face sample training is concentrated and to be included others face sample set of a plurality of classes, comprises a plurality of people's face samples in others the face sample set of each class;
People's face sample in others the face sample set of each class can be the people's face sample that belongs to same individual.Different people face sample in the same classification, sampling angle, the expression when perhaps sampling can be different.
Step 102: everyone face sample of concentrating for described people's face sample training, picked at random k and this people's face sample belong to others face sample of same class as similar sample, and the individual people's face sample that belongs to a different category with this people's face sample of picked at random k is as foreign peoples's sample; Wherein, k is positive integer.
Usually the people's face number of samples under each classification is fewer, for example 10 to 20.The value of k in the step 102 is less than the people's face number of samples under this classification.
Step 103: generate the difference sample pair set according to described similar sample and described foreign peoples's sample; In the described difference sample pair set, for everyone face sample that described people's face sample training is concentrated, all have 2k similar difference sample right, and k foreign peoples's difference sample is right;
Suppose that people's face sample that described people's face sample training is concentrated is A, k similar sample is A1, A2, and A3, A4, A5, the similar difference sample that then can generate is to being: A-A1, A-A2, A-A3, A-A4, A-A5; A1-A, A2-A, A3-A, A4-A, A5-A.Adopt that can to generate 2k foreign peoples's difference sample in the same way right.
Step 104: for described difference sample pair set, adopt the support vector machine training to obtain the similarity judgment models, obtain disaggregated model according to described similarity judgment models;
Can adopt kernel function is that the support vector machine training of Gaussian radial basis function obtains described similarity judgment models.
Can obtain disaggregated model according to a similarity judgment models, also can obtain disaggregated model according to a plurality of similarity judgment models.When obtaining disaggregated model according to a similarity judgment models, described disaggregated model can be identical with described similarity judgment models; When obtaining disaggregated model according to a plurality of similarity judgment models, described disaggregated model can be the set of a plurality of similarity judgment models.
If x, z ∈ X, X belongs to R(n) space, nonlinear function Φ realizes input space X to the mapping of feature space F, wherein F belongs to R(m), n<<m.Have according to the kernel function technology:
K(x,z)=<Φ(x),Φ(z)>——————(1)
Wherein:<, be inner product, (x z) is kernel function to K.From formula (1) as can be seen, kernel function is converted into the kernel function calculating of the n dimension low-dimensional input space with the inner product operation that m ties up higher dimensional space, thereby has solved the problems of calculating in high-dimensional feature space such as " dimension disasters ".
Gaussian radial basis function in this step refers to the gaussian kernel function in the radial basis function.
So-called radial basis function (Radial Basis Function is called for short RBF) is exactly certain radially scalar function of symmetry.Be normally defined any point x in the space to the monotonic quantity of Euclidean distance between a certain center xc, can remember do k (|| x-xc||), its effect is local often, namely when x during away from xc the function value very little.
The most frequently used radial basis function is gaussian kernel function, and form is k (|| x-xc||)=exp{-||x-xc||^2/2* σ ^2) } wherein xc be the kernel function center, σ is the width parameter of function, has controlled the radial effect scope of function.
Step 105: adopt described disaggregated model to carry out recognition of face.
Concrete, the process that adopts described disaggregated model to carry out recognition of face can comprise the steps:
Steps A: obtain people's face sample to be identified;
Step B: picked at random k people's face sample from the sample set of described each classification of people's face training set respectively, it is right to generate 2k difference sample to be identified, obtains difference sample pair set to be identified;
Step C: utilize described disaggregated model that described difference sample pair set to be identified is analyzed, obtain the similarity probability of each class in described people's face sample to be identified and the described people's face training set;
Step D: according to described similarity probability, determine the classification of described people's face sample ownership to be identified.
Wherein, among the step C, utilize described disaggregated model that described difference sample pair set to be identified is analyzed, refer to described difference sample to be identified as input value, the described disaggregated model of substitution calculates.The result of calculation of disaggregated model is represented the similarity probability of each class in described people's face sample to be identified and the described people's face training set.
Among the step D, can with the similarity probability corresponding class of maximum, be defined as the classification of described people's face sample ownership to be identified according to the size of similarity probability.
In sum, the face identification method of present embodiment, by everyone face sample of concentrating for described people's face sample training, picked at random k similar sample and k foreign peoples's sample, according to described similar sample and described foreign peoples's sample, generate the difference sample pair set, for described difference sample pair set, adopt the support vector machine training to obtain the similarity judgment models; Obtain disaggregated model according to described similarity judgment models; Adopt described disaggregated model to carry out recognition of face; On the one hand because from others the face sample set of each class that described people's face sample training is concentrated, picked at random k similar sample and k foreign peoples's sample architecture difference sample are right, in prior art, everyone face sample of concentrating for described people's face sample training, choose everyone face sample architecture difference sample except this people's face sample to comparing, the method for present embodiment can reduce the right number of training sample; On the other hand, because the number of the similar sample of choosing and foreign peoples's sample is identical, so the similar difference sample that can generate similar number to right with foreign peoples's difference sample, makes similar sample to keeping balance with the right number of dissimilar sample.In conjunction with the beneficial effect of above-mentioned two aspects, the method for present embodiment and then can be in the efficient that guarantees to improve under the prerequisite of quick sampling recognition of face.
In order further to improve the efficient of face identification method of the present invention, before step 103, can also comprise the steps:
Each sample that described people's face sample training is concentrated carries out dimensionality reduction at random, and the dimension behind each sample dimensionality reduction is identical;
People's face sample behind the employing dimensionality reduction generates the difference sample pair set.
Wherein, each concentrated sample of people's face sample training can be picture format.Described dimensionality reduction can be the number of pixels that reduces described each sample.
Accordingly, after people's face sample is carried out dimension-reduction treatment, when adopting described disaggregated model to carry out recognition of face, can comprise the steps:
People's face sample to be identified is carried out dimensionality reduction at random, and the dimension of the people's face sample behind the dimension of the people's face sample described to be identified behind the dimensionality reduction and the dimensionality reduction is identical.
In order further to improve the accuracy of face identification method of the present invention, face identification method of the present invention can also adopt following steps:
Repeated execution of steps 102 and step 103 obtain a plurality of similarity judgment models, obtain disaggregated model according to described a plurality of similarity judgment models;
For example, can repeated execution of steps 102 and step 103 each 50 times, just can obtain 50 similarity judgment models.Then can be according to 50 similarity judgment models classification results separately, analysis-by-synthesis (for example averaging) obtains the average similarity probability.
The set of above-mentioned a plurality of similarity judgment models can the composition and classification model.The present invention can carry out recognition of face according to described disaggregated model.
Accordingly, when utilizing described disaggregated model that described difference sample pair set to be identified is analyzed, can comprise the steps:
Utilize described a plurality of similarity judgment models that described difference sample pair set to be identified is analyzed, obtain the similarity probability of each class in a plurality of described people's face samples to be identified and the described people's face training set;
A plurality of described similarity probability are averaged, obtain the average similarity probability;
When determining the classification of described people's face sample ownership to be identified, can comprise the steps:
With the classification of average similarity probability maximum, be defined as the classification of described people's face sample ownership to be identified.
The invention also discloses a kind of face identification system based on support vector machine.Fig. 2 is the structural drawing of the face identification system embodiment based on support vector machine of the present invention.As shown in Figure 2, described system can comprise:
Training set acquisition module 201 is used for obtaining people's face sample training collection; Described people's face sample training is concentrated and to be included others face sample set of a plurality of classes, comprises a plurality of people's face samples in others the face sample set of each class;
Sample is chosen module 202, be used for to carry out the step of choosing similar sample and foreign peoples's sample: everyone face sample of concentrating for described people's face sample training, picked at random k and this people's face sample belong to others face sample of same class as similar sample, and the individual people's face sample that belongs to a different category with this people's face sample of picked at random k is as foreign peoples's sample;
Difference sample pair set generation module 203 is used for carrying out the step that generates the difference sample pair set: generate the difference sample pair set according to described similar sample and described foreign peoples's sample; In the described difference sample pair set, for everyone face sample that described people's face sample training is concentrated, all have 2k similar difference sample right, and 2k foreign peoples's difference sample is right;
Disaggregated model generation module 204 is used for for described difference sample pair set, adopts the support vector machine training to obtain the similarity judgment models, obtains disaggregated model according to described similarity judgment models;
Face recognition module 205 is used for adopting described disaggregated model to carry out recognition of face.
Wherein, described disaggregated model generation module 204 can comprise:
Similarity judgment models generation unit, be used for adopting kernel function is that the support vector machine training of Gaussian radial basis function obtains described similarity judgment models.
Described face recognition module 205 can comprise:
People's face sample acquisition unit to be identified is used for obtaining people's face sample to be identified;
Difference sample pair set generation unit to be identified, from k people's face of sample set picked at random sample of described each classification of people's face training set, it is right to generate 2k difference sample to be identified, obtains difference sample pair set to be identified for respectively;
Similarity probability calculation unit is used for utilizing described disaggregated model that described difference sample pair set to be identified is analyzed, and obtains the similarity probability of each class in described people's face sample to be identified and the described people's face training set;
The classification determining unit is used for according to described similarity probability, determines the classification of described people's face sample ownership to be identified.
Described system can also comprise:
Training set sample dimensionality reduction module is used for each sample that described people's face sample training is concentrated is carried out dimensionality reduction at random, and the dimension behind each sample dimensionality reduction is identical; So that described difference sample pair set generation module adopts the people's face sample behind the dimensionality reduction to generate the difference sample pair set;
Accordingly, described face recognition module 205 can comprise:
Sample dimensionality reduction to be identified unit is used for people's face sample to be identified is carried out dimensionality reduction at random, and the dimension of the people's face sample behind the dimension of the people's face sample described to be identified behind the dimensionality reduction and the dimensionality reduction is identical.
Described system can also comprise:
Repeat module, described sample is chosen module 202 and described difference sample pair set generation module 203 repeats the step of choosing similar sample and foreign peoples's sample and the step that generates the difference sample pair set for controlling, obtain a plurality of similarity judgment models, obtain disaggregated model according to described a plurality of similarity judgment models;
Accordingly, described similarity probability calculation unit can comprise:
Similarity probability calculation subelement is used for utilizing described a plurality of similarity judgment models that described difference sample pair set to be identified is analyzed, and obtains the similarity probability of each class in a plurality of described people's face samples to be identified and the described people's face training set;
Average similarity probability calculation subelement is used for a plurality of described similarity probability are averaged, and obtains the average similarity probability;
Described classification determining unit can comprise:
Classification is determined subelement, is used for the classification with average similarity probability maximum, is defined as the classification of described people's face sample ownership to be identified.
In order further to understand method of the present invention and beneficial effect, describe with a more concrete example below.
In this example, people's face sample training centralized procurement UMIST face database.UMIST people's face data set comprises 564 images, and totally 20 people have been contained different race, sexs and appearance.Each individual photo of taking of this data centralization has the continuous attitude that arrives positive different angles from the side to change, and is a kind of recognition of face database commonly used.In this example from 20 class samples every class picked at random half as training set, second half is as test set, each 282 sample in training set, the test set.
Concrete implementation step is as follows:
(1) step 1: people's face training sample is handled, constructed new training sample.If existing view data is
At first the sample in the training set is carried out dimensionality reduction at random, sample is dropped to 50 dimensions, keep the classification mark behind the dimensionality reduction constant simultaneously.Then the training sample set behind the dimensionality reduction is
After the dimensionality reduction, produce new difference sample to training set at random.For any two samples
, can produce two different difference samples
With
If
With
Classification identical, then remember classification value+1 of new sample, i.e. positive sample, otherwise be designated as-1, i.e. negative sample.
In training set to each sample
Select k similar sample point and foreign peoples's sample point respectively at random, respectively these sample points are stored in set respectively
With
In, k gets 5.Then new training set difference sample can be expressed as
z
q∈ R
50, q=1 ..., 5640,5640 is the right number of difference sample.
Can generate a plurality of similarity judgment models, for each similarity judgment models is constructed the difference sample pair set respectively.Suppose to construct altogether enum similarity judgment models, enum gets 50, then repeats above-mentioned construction process 50 times.In the difference sample pair set that obtains, comprise that the difference sample of each classification correspondence is right, described difference sample pair set as new training sample set, is designated as Trn respectively
1, Trn
2..., Trn
50
(2) step 2: with new training sample set support vector machine is trained, obtain 50 similarity judgment models.The set that these 50 similarity judgment models constitute is exactly the disaggregated model among the present invention.Concrete, for each training sample set Trn
i, i=1,2 ..., 50, adopt the support vector machine training to obtain a similarity judgment models respectively, totally 50, independent each other, wherein p similarity judgment models is to obtain according to the methods below:
The kernel function of support vector machine is selected most widely used Gaussian radial basis function
Wherein σ is nuclear parameter.After the parameter that the appointment support vector machine needs, the set of input training sample is kernel function with the Gaussian radial basis function, similarity judgment models of training generation:
Wherein
And b
pBe that sgn () represents sign function by the coefficient of p similarity judgment models of support vector machine training generation.
(3) step 3: the test sample book to test set is handled, and constructs new test sample book.If any one sample x to be tested, x ∈ R
10304
Same, test sample book is carried out dimensionality reduction at random, the dimension of test sample book is dropped to 50 dimensions, sample x to be tested becomes
The dimensionality reduction at random of the process of the dimensionality reduction at random of test sample book and corresponding training sample is duplicate.
At random after the dimensionality reduction, produce the new right test set of difference sample that comprises.For reducing the number of new test sample book, a random choose num sample in each class sample of former training set, num gets 5, for sample to be tested
With each training sample of picking out
It is right all to generate two difference samples
With
Then new test set can be expressed as
Q=1 ..., 200,200 is the right number of difference sample.
(4) step 4: the difference sample that obtains in the new test set is right
Be input to successively in each similarity judgment models, replace the z in the former similarity judgment models, each similarity judgment models can obtain 200 judged results.The result of each similarity judgment models is expressed as successively
According to classification results, can count in each similarity judgment models the similarity probability size of each class among the x and former training sample
(5) step 5: the result of each similarity judgment models is carried out integrated, draw final classification results.Can draw the similarity probability size P of each class in sample to be tested x and the former training sample by each similarity judgment models
Ij, i=1,2 ..., 50, j=1,2 ..., 20.Calculate sample to be tested and class average similarity probability P then
j', account form is as follows:
At last sample to be tested x is classified according to average similar probability maximal criterion, namely
Effect of the present invention can be by following experimental verification:
In the process of experiment, the value of regular factor gets 10, Gauss's radial kernel function parameters then each generate the right training sample of new difference sample after all by calculating, computation process is specific as follows: the average of determining the training sample set earlier, obtain each training sample then to the Euclidean distance of average point, the intermediate value of the mean value of all distances then is the value of nuclear parameter.According to the model that draws on the training set, estimated performance obtains discrimination on test set.Selecting of training sample and test sample book is at random, repeats 10 tests, last experimental result such as table 1.
Table 1
Control methods of the present invention is four kinds of typical Downsapling methods, is respectively down-sampling at random, NearMiss-1, and NearMiss-2 and NearMiss-3, wherein the sampling rate of Downsapling method reaches balance with the back new training set of sampling and is as the criterion to determine.
Result by experiment, recognition of face effect of the present invention obviously is better than other four kinds of Downsapling methods as can be seen, and has shown stronger stability, has certain advantage.
? | The present invention | Down-sampling at random | NearMiss-1 | NearMiss-2 | NearMiss-3 |
Time (second) | 1321.5(50 it is inferior) | 604(1 time) | 2291.5(1 it is inferior) | 2467.5(1 it is inferior) | 1109.3(1 it is inferior) |
Table 2
Table 2 has provided this four kinds of times that method spends in certain is once trained.Note present invention includes 50 times and generate sample to the time of generation and 50 SVM training, that is to say, only needed just can in 26.43 seconds at every turn.The execution time of other four kinds of methods all is that 1 sample is to the time of rise time and 1 SVM training.It is clearly, of the present invention that to adopt the sampling time be very fast comparatively speaking.
Each embodiment adopts the mode of going forward one by one to describe in this instructions, and what each embodiment stressed is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.For the disclosed system of embodiment, because it is corresponding with the embodiment disclosed method, so description is fairly simple, relevant part partly illustrates referring to method and gets final product.
Used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, part in specific embodiments and applications all can change.In sum, this description should not be construed as limitation of the present invention.
Claims (10)
1. the face identification method based on support vector machine is characterized in that, comprising:
Obtain the step of people's face sample training collection: described people's face sample training is concentrated and to be included others face sample set of a plurality of classes, comprises a plurality of people's face samples in others the face sample set of each class;
Choose the step of similar sample and foreign peoples's sample: everyone face sample of concentrating for described people's face sample training, picked at random k and this people's face sample belong to others face sample of same class as similar sample, and the individual people's face sample that belongs to a different category with this people's face sample of picked at random k is as foreign peoples's sample;
Generate the step of difference sample pair set: generate the difference sample pair set according to described similar sample and described foreign peoples's sample; In the described difference sample pair set, for everyone face sample that described people's face sample training is concentrated, all have 2k similar difference sample right, and 2k foreign peoples's difference sample is right;
Generate the step of disaggregated model: for described difference sample pair set, adopt the support vector machine training to obtain the similarity judgment models, obtain disaggregated model according to described similarity judgment models;
The step of recognition of face: adopt described disaggregated model to carry out recognition of face.
2. method according to claim 1 is characterized in that, described employing support vector machine training obtains the similarity judgment models, comprising:
The employing kernel function is that the support vector machine training of Gaussian radial basis function obtains described similarity judgment models.
3. method according to claim 1 is characterized in that, before the described generation difference sample pair set, also comprises:
Each sample that described people's face sample training is concentrated carries out dimensionality reduction at random, and the dimension behind each sample dimensionality reduction is identical;
People's face sample behind the employing dimensionality reduction generates the difference sample pair set;
Accordingly, when adopting described disaggregated model to carry out recognition of face, comprising:
People's face sample to be identified is carried out dimensionality reduction at random, and the dimension of the people's face sample behind the dimension of the people's face sample described to be identified behind the dimensionality reduction and the dimensionality reduction is identical.
4. method according to claim 1 is characterized in that, the described disaggregated model of described employing carries out recognition of face, comprising:
Obtain people's face sample to be identified;
Picked at random k people's face sample from the sample set of described each classification of people's face training set respectively, it is right to generate 2k difference sample to be identified, obtains difference sample pair set to be identified;
Utilize described disaggregated model that described difference sample pair set to be identified is analyzed, obtain the similarity probability of each class in described people's face sample to be identified and the described people's face training set;
According to described similarity probability, determine the classification of described people's face sample ownership to be identified.
5. method according to claim 4 is characterized in that, described method also comprises:
Repeat the step of choosing similar sample and foreign peoples's sample and the step that generates the difference sample pair set, obtain a plurality of similarity judgment models, obtain disaggregated model according to described a plurality of similarity judgment models;
Accordingly, describedly utilize described disaggregated model that described difference sample pair set to be identified is analyzed, comprising:
Utilize described a plurality of similarity judgment models that described difference sample pair set to be identified is analyzed, obtain the similarity probability of each class in a plurality of described people's face samples to be identified and the described people's face training set;
A plurality of described similarity probability are averaged, obtain the average similarity probability;
The described classification of determining described people's face sample ownership to be identified comprises:
With the classification of average similarity probability maximum, be defined as the classification of described people's face sample ownership to be identified.
6. the face identification system based on support vector machine is characterized in that, comprising:
The training set acquisition module is used for obtaining people's face sample training collection; Described people's face sample training is concentrated and to be included others face sample set of a plurality of classes, comprises a plurality of people's face samples in others the face sample set of each class;
Sample is chosen module, be used for to carry out the step of choosing similar sample and foreign peoples's sample: everyone face sample of concentrating for described people's face sample training, picked at random k and this people's face sample belong to others face sample of same class as similar sample, and the individual people's face sample that belongs to a different category with this people's face sample of picked at random k is as foreign peoples's sample;
Difference sample pair set generation module is used for carrying out the step that generates the difference sample pair set: generate the difference sample pair set according to described similar sample and described foreign peoples's sample; In the described difference sample pair set, for everyone face sample that described people's face sample training is concentrated, all have 2k similar difference sample right, and 2k foreign peoples's difference sample is right;
The disaggregated model generation module is used for for described difference sample pair set, adopts the support vector machine training to obtain the similarity judgment models, obtains disaggregated model according to described similarity judgment models;
Face recognition module is used for adopting described disaggregated model to carry out recognition of face.
7. system according to claim 6 is characterized in that, described disaggregated model generation module comprises:
Similarity judgment models generation unit, be used for adopting kernel function is that the support vector machine training of Gaussian radial basis function obtains described similarity judgment models.
8. system according to claim 6 is characterized in that, also comprises:
Training set sample dimensionality reduction module is used for each sample that described people's face sample training is concentrated is carried out dimensionality reduction at random, and the dimension behind each sample dimensionality reduction is identical; So that described difference sample pair set generation module adopts the people's face sample behind the dimensionality reduction to generate the difference sample pair set;
Accordingly, described face recognition module comprises:
Sample dimensionality reduction to be identified unit is used for people's face sample to be identified is carried out dimensionality reduction at random, and the dimension of the people's face sample behind the dimension of the people's face sample described to be identified behind the dimensionality reduction and the dimensionality reduction is identical.
9. system according to claim 6 is characterized in that, described face recognition module comprises:
People's face sample acquisition unit to be identified is used for obtaining people's face sample to be identified;
Difference sample pair set generation unit to be identified, from k people's face of sample set picked at random sample of described each classification of people's face training set, it is right to generate 2k difference sample to be identified, obtains difference sample pair set to be identified for respectively;
Similarity probability calculation unit is used for utilizing described disaggregated model that described difference sample pair set to be identified is analyzed, and obtains the similarity probability of each class in described people's face sample to be identified and the described people's face training set;
The classification determining unit is used for according to described similarity probability, determines the classification of described people's face sample ownership to be identified.
10. system according to claim 9 is characterized in that, also comprises:
Repeat module, described sample is chosen module and described difference sample pair set generation module repeats the step of choosing similar sample and foreign peoples's sample and the step that generates the difference sample pair set for controlling, obtain a plurality of similarity judgment models, obtain disaggregated model according to described a plurality of similarity judgment models;
Accordingly, described similarity probability calculation unit comprises:
Similarity probability calculation subelement is used for utilizing described a plurality of similarity judgment models that described difference sample pair set to be identified is analyzed, and obtains the similarity probability of each class in a plurality of described people's face samples to be identified and the described people's face training set;
Average similarity probability calculation subelement is used for a plurality of described similarity probability are averaged, and obtains the average similarity probability;
Described classification determining unit comprises:
Classification is determined subelement, is used for the classification with average similarity probability maximum, is defined as the classification of described people's face sample ownership to be identified.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310210372.2A CN103279746B (en) | 2013-05-30 | 2013-05-30 | A kind of face identification method based on support vector machine and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310210372.2A CN103279746B (en) | 2013-05-30 | 2013-05-30 | A kind of face identification method based on support vector machine and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103279746A true CN103279746A (en) | 2013-09-04 |
CN103279746B CN103279746B (en) | 2016-12-07 |
Family
ID=49062261
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310210372.2A Active CN103279746B (en) | 2013-05-30 | 2013-05-30 | A kind of face identification method based on support vector machine and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103279746B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103679160A (en) * | 2014-01-03 | 2014-03-26 | 苏州大学 | Human-face identifying method and device |
CN103793699A (en) * | 2014-02-24 | 2014-05-14 | 苏州大学 | Face recognition method and system |
CN104008364A (en) * | 2013-12-31 | 2014-08-27 | 广西科技大学 | Face recognition method |
CN105139033A (en) * | 2015-08-24 | 2015-12-09 | 小米科技有限责任公司 | Classifier construction method and device and image processing method and device |
CN107688829A (en) * | 2017-08-29 | 2018-02-13 | 湖南财政经济学院 | A kind of identifying system and recognition methods based on SVMs |
CN108446659A (en) * | 2018-03-28 | 2018-08-24 | 百度在线网络技术(北京)有限公司 | Method and apparatus for detecting facial image |
CN108564067A (en) * | 2018-04-28 | 2018-09-21 | 深圳卡安兴科技有限公司 | The Threshold and system of face alignment |
CN109145991A (en) * | 2018-08-24 | 2019-01-04 | 北京地平线机器人技术研发有限公司 | Image group generation method, image group generating means and electronic equipment |
CN112819018A (en) * | 2019-10-31 | 2021-05-18 | 北京沃东天骏信息技术有限公司 | Method and device for generating sample, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030108244A1 (en) * | 2001-12-08 | 2003-06-12 | Li Ziqing | System and method for multi-view face detection |
CN102663370A (en) * | 2012-04-23 | 2012-09-12 | 苏州大学 | Face identification method and system |
-
2013
- 2013-05-30 CN CN201310210372.2A patent/CN103279746B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030108244A1 (en) * | 2001-12-08 | 2003-06-12 | Li Ziqing | System and method for multi-view face detection |
CN102663370A (en) * | 2012-04-23 | 2012-09-12 | 苏州大学 | Face identification method and system |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104008364B (en) * | 2013-12-31 | 2018-09-25 | 广西科技大学 | Face identification method |
CN104008364A (en) * | 2013-12-31 | 2014-08-27 | 广西科技大学 | Face recognition method |
CN103679160A (en) * | 2014-01-03 | 2014-03-26 | 苏州大学 | Human-face identifying method and device |
CN103679160B (en) * | 2014-01-03 | 2017-03-22 | 苏州大学 | Human-face identifying method and device |
CN103793699A (en) * | 2014-02-24 | 2014-05-14 | 苏州大学 | Face recognition method and system |
CN105139033B (en) * | 2015-08-24 | 2018-11-06 | 小米科技有限责任公司 | Grader construction method and device and image processing method and device |
CN105139033A (en) * | 2015-08-24 | 2015-12-09 | 小米科技有限责任公司 | Classifier construction method and device and image processing method and device |
CN107688829A (en) * | 2017-08-29 | 2018-02-13 | 湖南财政经济学院 | A kind of identifying system and recognition methods based on SVMs |
CN108446659A (en) * | 2018-03-28 | 2018-08-24 | 百度在线网络技术(北京)有限公司 | Method and apparatus for detecting facial image |
CN108564067A (en) * | 2018-04-28 | 2018-09-21 | 深圳卡安兴科技有限公司 | The Threshold and system of face alignment |
CN109145991A (en) * | 2018-08-24 | 2019-01-04 | 北京地平线机器人技术研发有限公司 | Image group generation method, image group generating means and electronic equipment |
CN109145991B (en) * | 2018-08-24 | 2020-07-31 | 北京地平线机器人技术研发有限公司 | Image group generation method, image group generation device and electronic equipment |
CN112819018A (en) * | 2019-10-31 | 2021-05-18 | 北京沃东天骏信息技术有限公司 | Method and device for generating sample, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN103279746B (en) | 2016-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103279746A (en) | Method and system for identifying faces based on support vector machine | |
JP6397986B2 (en) | Image object region recognition method and apparatus | |
CN102663370B (en) | Face identification method and system | |
Cambria et al. | Extreme learning machines [trends & controversies] | |
Singha et al. | Hand gesture recognition using two-level speed normalization, feature selection and classifier fusion | |
CN110309842B (en) | Object detection method and device based on convolutional neural network | |
Chadha et al. | An improved K-means clustering algorithm: a step forward for removal of dependency on K | |
CN103559504A (en) | Image target category identification method and device | |
CN104834941A (en) | Offline handwriting recognition method of sparse autoencoder based on computer input | |
CN103745200A (en) | Facial image identification method based on word bag model | |
CN105894050A (en) | Multi-task learning based method for recognizing race and gender through human face image | |
Li et al. | Fuzzy based affinity learning for spectral clustering | |
CN104392241A (en) | Mixed regression-based head pose estimation method | |
CN103745233B (en) | The hyperspectral image classification method migrated based on spatial information | |
CN103065158A (en) | Action identification method of independent subspace analysis (ISA) model based on relative gradient | |
CN105320764A (en) | 3D model retrieval method and 3D model retrieval apparatus based on slow increment features | |
Górecki et al. | First and second derivatives in time series classification using DTW | |
An et al. | Weather classification using convolutional neural networks | |
Tan et al. | L1-norm latent SVM for compact features in object detection | |
CN115293919A (en) | Graph neural network prediction method and system oriented to social network distribution generalization | |
Maudes et al. | Random projections for linear SVM ensembles | |
CN108549915A (en) | Image hash code training pattern algorithm based on two-value weight and classification learning method | |
Little et al. | A multiscale spectral method for learning number of clusters | |
CN102034102B (en) | Image-based significant object extraction method as well as complementary significance graph learning method and system | |
CN103258211A (en) | Handwriting digital recognition method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |