CN108446691A - A kind of face identification method based on SVM linear discriminants - Google Patents

A kind of face identification method based on SVM linear discriminants Download PDF

Info

Publication number
CN108446691A
CN108446691A CN201810590721.0A CN201810590721A CN108446691A CN 108446691 A CN108446691 A CN 108446691A CN 201810590721 A CN201810590721 A CN 201810590721A CN 108446691 A CN108446691 A CN 108446691A
Authority
CN
China
Prior art keywords
face
image
value
sample
feature
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.)
Pending
Application number
CN201810590721.0A
Other languages
Chinese (zh)
Inventor
杨沛
秦建荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northwest A&F University
Original Assignee
Northwest A&F University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Northwest A&F University filed Critical Northwest A&F University
Priority to CN201810590721.0A priority Critical patent/CN108446691A/en
Publication of CN108446691A publication Critical patent/CN108446691A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships

Landscapes

  • Engineering & Computer Science (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of face identification method based on SVM linear discriminants, step 1, image preprocessings:Four processes are divided for image preprocessing, have been image gray processing, medium filtering, Equalization Histogram equalization, picture superposition respectively.They are handled successively so that picture quality is more superior.The normalization of step 2, face, step 3, face characteristic extraction:Step 4, recognition of face:Technical scheme of the present invention handles the face-image or video flowing of people, the facial characteristics of people is obtained, then matched with data in database, to identify the identity of user.Relative to conventional method, this method is not only at low cost, not others' participation, it is often more important that the not property invaded, it is naturally completed.

Description

A kind of face identification method based on SVM linear discriminants
Technical field
The invention belongs to field of computer technology, are related to a kind of face identification method based on SVM linear discriminants.
Background technology
Recognition of face is a very challenging research topic, while its application prospect is also boundless.Closely Nian Lai, with information technology make rapid progress as develop rapidly, traditional personal verification means in the past, as identity document, The modes such as IC card cannot since he is the reason detached with me and phenomena such as causing to forge, usurping occurs again and again Meet the needs of modern social economy activity and social safety strick precaution.Simultaneously, the authentication based on living things feature recognition Technology has the characteristics that safer convenient and is widely used in many fields.Biological characteristic includes face, fingerprint etc., Middle face recognition technology is non-contacting, therefore has higher uniqueness, acceptability and naturality.
In recent years, flourishing with computer technology and each subject, computer vision achieves great breakthrough, And start to be widely applied inside every field.Such as:Intelligent video monitoring system known to us at present, he utilizes meter Calculation machine vision technique is handled, is analyzed, understands vision signal, and controls video monitoring system, to make video monitoring system With the general wisdom of such as people.It can be seen that the importance of computer vision technique has some idea of.
Currently popular iris recognition, Expression Recognition, Mouth-Shape Recognition etc. are all set up on the basis of face. With the development of information technology, Face datection will become a popular research topic.Simultaneously compared with other biological feature, Recognition of face have the characteristics that more directly, conveniently, it is friendly, and more received by general public because he has non-infringement property (Sun Zhi 2014), and performed an analysis by the countenance etc. to people, moreover it is possible to acquisition is difficult to obtain more compared to other systems Add accurate information, therefore recognition of face will occupy leading position in terms of biometric identity signature verification.In addition, he is also in people The occasions such as machine interaction, access control and information security, also play increasingly important role.
US Army laboratory is developed also with VC++, and by software realization, and FAR is 49%.In the U.S. In the open test of progress, FAR 53%.Advanced Research Projects administration of U.S. Department of Defense, utilizes semi-automatic and full-automatic algorithm.This Kind algorithm needs manual or automatic two centre coordinates for pointing out people in image, is then identified.In the survey that airport is carried out In examination, the false alarm that system is sent out is too many, external some colleges and universities (Carnegie Mellon University (Carnegie Mellon University headed by), Massachusetts Polytechnics (Massachusetts Institute of Technology) etc., Britain University of Reading (University of Reading)) and company (Visionics companies Facelt face identification systems, Viiage FaceFINDER authentication systems, Lau Tech companies Hunter systems, the BioID systems etc. of Germany) engineering research Work also focuses primarily on public security, criminal side, is furtherd investigate in terms of the realization of examination verification system and few.
Invention content
The purpose of the present invention is to provide a kind of face identification methods based on SVM linear discriminants, to realizing face characteristic Extraction;Realize the match cognization of face.
Its specific technical solution is:
A kind of face identification method based on SVM linear discriminants, includes the following steps:
Step 1, image preprocessing:
Four processes are divided for image preprocessing, have been image gray processing, medium filtering, Equalization Histogram equilibrium respectively Change, picture superposition.They are handled successively so that picture quality is more superior.
The purpose of medium filtering is to remove the noise of image.It can not only keep the local edge of image, or a kind of Nonlinear smoothing technique.Its principle is median method, that is, is directed to the gray value of each pixel, he represents the field The midpoint of all interior grey scale pixel values allows the pixel value of surrounding more to approach true value, finally eliminates isolated make an uproar The process of sound point, to so that image is too fuzzy and can not recognize.
Method is the two-dimentional sleiding form with certain structure, and pixel in plate is ranked up according to the size of pixel value, raw It is 2-D data sequence at monotone increasing (or decline).Two dimension median filter exports:
G (x, y)=med { f (x-k, y-l), (k, l ∈ W) }
Wherein, f (x, y), g (x, y) are respectively image after original image and processing.W is two dimension pattern plate, usually 3*3,5* 5 regions, the shape that can also be different is such as linear, round, cross, circular ring shape etc..
The data of the centre of this column data are then taken out, and he is assigned to the pixel of masterplate center.
The realization of the medium filtering, specifically includes following steps:
1. being to obtain data from image to be ranked up first, it is obtained in some sampling window, then in the window Mouth takes out odd number data;
2. a pair value is ranked up, then replaced data to be processed with Mesophyticum.
The process of the histogram equalization, specially:
1. being the gray level for listing image first, image is not only original image, further includes the image after transformation;
2. the number of pixels of each gray level in pair original image counts;
3. being directed to original histogram, its P (i)=Ni/N is calculated;
4. next be exactly calculate add up made of histogram P (j)=P (1)+P (2)+P (3)+...+P (i);
5. calculating the gray value after transformation, go to calculate using greyscale transformation function;J=INT [(L-1) P+0.5]
6. followed by greyscale transformation relationship is confirmed, original image dullness gray value f (m, n)=i is then modified to g (m, m)=j;
7. the number of pixels Nj of gray level after statistics transformation;
8. calculating histogram P (i)=Ni/N of image after transformation;
It is exactly that gray processing is carried out to coloured image below:
So-called RGB color figure is exactly the color of each pixel, they are codetermined by three components, point It Wei not tri- components of R, G, B.The memory of wherein each component, its digit determine the occupied byte number of pixel.Such as:24 Dark RGB figures, their component respectively account for a byte respectively, wherein each component value range is also very wide, he is 0~255 Between carry out value, the color variation range of pixel each in this way is boundless.
Gray processing so is carried out to image, that is, tri- components of RGB of image are calculated, finally obtains its gray scale Value, wherein for three components, using average weighted method.
Gray=B;Gray=G;Gray=R
This method is component method, that is, using some component of tri- components of RGB, allows it as the gray scale of the point Value.
The normalization of step 2, face, he includes two aspects, and one is geometrical normalization, he is divided into two steps, one It is face normalization, another is exactly that face is cut.And gray scale normalization, he is to enhance the contrast of image.
Normalization:
Its purpose is uniform sizes, i.e., normalizes the facial expression image of face, increase the brightness of image so that face is thin Section is more clear apparent.Its step are as follows:
1. the characteristic point of calibration two and nose
2. in order to ensure the unification in face direction, image is rotated according to two coordinate values.
3. determining rectangular characteristic region
4. a pair graphical rule is normalized
Step 3, face characteristic extraction:
The module is the Haar feature extracting methods used, which is the face characteristic value of the facial image after positioning It extracts.
Step 4, recognition of face:
Feature vector in the data value of feature extraction before and subsequent data library is gone to be compared by it, if analysis As a result within a certain range, then the relevant information of the people is extracted, and is shown, you can to identify the identity of this person, from And to complete the process of recognition of face.If there is no corresponding feature vector in inventory, inventory's sample of prompt system Situation.
Further, step 3 is specially:
1. extracting the distance between two eyes;
2. the angle of inclination of eyes;
3. the center of gravity of eyes, face;
4. marking each feature with a rectangle;
It, will be in the characteristic value deposit library of extraction after having extracted feature.
Further, step 4 uses SVM algorithm, is classified to facial image and is matched.
Compared with prior art, beneficial effects of the present invention:
Technical scheme of the present invention handles the face-image or video flowing of people, obtains the facial characteristics of people, then It is matched with data in database, to identify the identity of user.Relative to conventional method, this method is not only at low cost, Not others' participation, it is often more important that the not property invaded, it is naturally completed.
Description of the drawings
Fig. 1 pre-processes hierarchy chart;
Fig. 2 medium filtering schematic diagrams;
Fig. 3 3*3 median filter results, wherein Fig. 3 A are images before medium filtering, and Fig. 3 B are images after medium filtering;
Fig. 4 facial geometric features;
Fig. 5 optimum classifiers;
Fig. 6 classification samples figures;
Fig. 7 linear separability problems;
Fig. 8 linear separabilities;
The schematic diagram of face identification methods of the Fig. 9 based on SVM linear discriminants;
The flow chart of face identification methods of the Figure 10 based on SVM linear discriminants.
Specific implementation mode
Technical scheme of the present invention is described in more detail with specific embodiment below in conjunction with the accompanying drawings.
Fig. 1-Fig. 4 shows the pretreated method of facial image.The following detailed description of:
The image obtained by video camera, tends not to be directly used in Face datection, because by external environmental factor Some influence, such as:Illumination, overcover, noise etc., therefore a series of pretreatment will be carried out for the image of acquisition. So that picture quality more optimizes.
Four processes are divided herein for image preprocessing, have been image gray processing, medium filtering, Equalization Histogram respectively Equalization, picture superposition.They are handled successively so that picture quality is more superior.
The purpose of medium filtering is to remove the noise of image.It can not only keep the local edge of image, or a kind of Nonlinear smoothing technique.Its principle is median method, that is, is directed to the gray value of each pixel, he represents the field The midpoint of all interior grey scale pixel values allows the pixel value of surrounding more to approach true value, finally eliminates isolated make an uproar The process of sound point, to so that image is too fuzzy and can not recognize.
Method is the two-dimentional sleiding form with certain structure, and pixel in plate is ranked up according to the size of pixel value, raw It is 2-D data sequence at monotone increasing (or decline).Two dimension median filter exports:
G (x, y)=med { f (x-k, y-l), (k, l ∈ W) } (1)
Wherein, f (x, y), g (x, y) are respectively image after original image and processing.W is two dimension pattern plate, usually 3*3,5* 5 regions, the shape that can also be different is such as linear, round, cross, circular ring shape etc..
The data of the centre of this column data are then taken out, and he is assigned to the pixel of masterplate center.
The realization of medium filtering:
1. being to obtain data from image to be ranked up first, it is obtained in some sampling window, then in the window Mouth takes out odd number data;
2. a pair value is ranked up, then replaced data to be processed with Mesophyticum.
Histogram equalization, what it was showed is the distribution situation of whole image gray value.The basic think of of histogram equalization Think be:By the non-uniform histogram of original distribution, equally distributed form is transformed by transformation.I.e. by the ash of concentration of local Degree interval mapping is at being uniformly distributed in whole tonal ranges.Nonlinear extension is carried out to image, to make it redistribute Pixel value, and keep its pixel roughly the same in a certain range.Its purpose is to increase the dynamic of grey scale pixel value Range, to reach the overall contrast of enhancing image.
It is well known that two conditions involved in equalization process:
First, it maps anyway, the original magnitude relationship of image remains unchanged forever.Bright region be still it is bright, Dark region is still dark, and only the contrast of light and shade enhances;Another factor is exactly the problem of crossing the border, If it is eight images, codomain is inevitable between 0~255.Due to both the above factor, Cumulative Distribution Function exactly meets Its condition, and the function of he or monotonic increase, while its codomain, between 0~1, the two characteristics are not only for control Magnitude relationship, and the selection for being all best for controlling problem of crossing the border.
Second, the processed pixel value of cumulative function, since cumulative distribution function is monotonic increase, so its pixel value It is evenly distributed.
In histogram equalization process, mapping method is:
Above in this formula wherein n represent be pixel in image summation, njWhat is represented is current gray level grade Number of pixels, what L was represented is possible gray level sum in image.
As long as the advantage of this method is that he is reversible.
The process of histogram equalization:
1. being the gray level for listing image first, image is not only original image, further includes the image after transformation;
2. the number of pixels of each gray level in pair original image counts;
3. being directed to original histogram, its P (i)=Ni/N is calculated;
4. next be exactly calculate add up made of histogram P (j)=P (1)+P (2)+P (3)+...+P (i);
5. calculating the gray value after transformation, go to calculate using greyscale transformation function;J=INT [(L-1) P+0.5]
6. followed by greyscale transformation relationship is confirmed, original image dullness gray value f (m, n)=i is then modified to g (m, m)=j;
7. the number of pixels Nj of gray level after statistics transformation;
8. calculating histogram P (i)=Ni/N of image after transformation;
Histogram transform is:
So-called both advantageous and disadvantageous, there is also disadvantages for histogram equalization:
1. after histogram equalization converts so that the gray level of image is reduced, and certain details is caused to be vanished from sight.
2. as some have the histogram on peak, contrast is caused excessively to enhance after processing.
It is known that in carrying out video flowing acquisition, wherein to be related to target recognition and tracking.Because of black-and-white photograph, Their data volume is smaller, and opposite photochrome is more prone to realize.Another aspect, black-and-white photograph is that do not have By the photo that light is handled, the information covered is more valuable.
It is exactly that gray processing is carried out to coloured image below:
So-called RGB color figure is exactly the color of each pixel, they are codetermined by three components, point It Wei not tri- components of R, G, B.The memory of wherein each component, its digit determine the occupied byte number of pixel.Such as:24 Dark RGB figures, their component respectively account for a byte respectively, wherein each component value range is also very wide, he is 0~255 Between carry out value, the color variation range of pixel each in this way is boundless.
Gray processing so is carried out to image, that is, tri- components of RGB of image are calculated, finally obtains its gray scale Value, wherein for three components, we are using average weighted method:
Gray=B;Gray=G;Gray=R
This method is component method, that is, using some component of tri- components of RGB, allows him as the gray scale of the point Value.
The normalization of face, he includes two aspects, and one is geometrical normalization, he is divided into two steps, and one is face Correction, another is exactly that face is cut.And gray scale normalization, he is to enhance the contrast of image.
Normalization:
Its purpose is uniform sizes, i.e., normalizes the facial expression image of face, increase the brightness of image so that face is thin Section is more clear apparent.Its step are as follows:
1. the characteristic point of calibration two and nose
2. in order to ensure the unification in face direction, image is rotated according to two coordinate values.
3. determining rectangular characteristic region
4. a pair graphical rule is normalized
The face identification system of this secondary design, it includes mainly four component parts, respectively:Man face image acquiring and inspection Survey, facial image pretreatment, facial image feature extraction and matching and identification.
Man face image acquiring:
Mould picture in the block is dynamic, static state, and by camera take pictures first obtains required picture, Acquisition can be gone from the face database stored in advance, then that module is shown in the image of the acquisition at interface.
Facial image pre-processes:
Relevant processing is carried out to the image or video flowing that obtain before, its feature is made clearly to show.It Include these parts, wherein having image gray processing, medium filtering, histogram equalization, contrast enhancing etc..
Face detection:
Processed picture before is carried out the positioning of face by it, is exactly marked the face of people, such as:Eyes, Nose, face etc..In the design of this subsystem, positioning is characterized in the eyes of people, nose and face.Because eyes are pair Claim, so be easier to mark, and nose, face be all in the lower section of eyes, as long as therefore marked eyes, be left Just it is easy.
The extraction of feature:
The module is the Haar feature extracting methods used, which is the face characteristic value of the facial image after positioning It extracts.
Feature extraction mainly has following four step:
1. extracting the distance between two eyes
2. the angle of inclination of eyes
3. the center of gravity of eyes, face
4. marking each feature with a rectangle
It, will be in the characteristic value deposit library of extraction after having extracted feature.
Recognition of face:
Feature vector in the data value of feature extraction before and subsequent data library is gone to be compared by it, if analysis As a result within a certain range, then the relevant information of the people is extracted, and is shown, you can to identify the identity of this person, from And to complete the process of recognition of face.If there is no corresponding feature vector in inventory, inventory's sample of prompt system Situation.
Up to the present, face recognition algorithms have had very much.Such as:PCA Principal Component Analysis Algorithms, SVM algorithm, Fisher algorithms etc. are SVM algorithms in view of what is studied herein, therefore SVM algorithm are dealt with later.
Face identification method based on SVM linear discriminants:
SVM is support vector machines, its full name in English is Support Vector Machine, it is proposed in nineteen ninety-five. The purpose of the algorithm is to solve small sample, non-linear, has many unique strong points in the high order modes of identification, and it is desirable that in machine It is promoted in study.
Support vector machines, its purpose are under conditions of limited sample information, in complicated model and engineering Habit ability finds therebetween best compromise.
SVM algorithm is mentioned, VC dimensions, the i.e. complexity of problem will necessarily be spoken of.Wherein dimension is higher, and problem can be more complicated. SVM is a kind of machine learning, and essence is approaching to reality model, but true model is unknown, and at this time all problems are all Assume, necessarily there are prodigious gaps for the solution of it and real problems.Wherein this error, referred to as risk.Do not knowing error In the case of being how many, it can only be gone to approach it with some amount as much as possible.Certainly, most direct thinking is, with experimental result with Legitimate reading is compared, and determines that their difference, experimental result are exactly to be divided using grader in sample data Result after class.Wherein this difference, is called empiric risk, carries out being preferably minimized empiric risk of machine learning.However Experiment is easy to reach this standard, and due to various reasons, but difference is very big for reality.Therefore, empirical results are shown, it is difficult to find one The suitable algorithm of kind enables the unlimited approaching to reality risk of empiric risk.Wherein main cause is that the sample number thousand in reality is poor Ten thousand are not, but the sample number in testing is but relatively seldom.
In fact, real risk is often to be made of two parts, one is empiric risk above-mentioned, it is represented The error for causing grader to generate due to the limitation of sample number, another is confidence risk, it is illustrated to grader Degree of belief, i.e., the result that grader is classified.However, second method is difficult prediction, therefore one can only be calculated accidentally Optimal result within poor allowable range.
Confidence risk, also there are two correlatives for it to investigate, one of them is the quantity of sample, and the sample size of selection is got over Greatly, learning outcome gets over approaching to reality value.Another is exactly that the VC of classification function ties up this factor, and VC dimensions are bigger, Corresponding confidence risk also can be bigger, necessarily causes to be more difficult to promote.
The formula of wherein extensive error bounds is as shown in Equation 4:
R(w)≤Remp(w)+Ф(n/h) (4)
R (w) is real risk in above formula, and Remp (w) is empiric risk, and Ф (n/h) is confidence risk.By above formula It can obtain, be minimized to seek structural risk minimization it is necessary to seek the sum of real risk and empiric risk, with this ability Reach optimization.
The purpose of SVM algorithm namely seeks minimal structure risk.
Details are as follows for some other features of SVM:
The algorithm of small sample, recognition of face has very much, such as:PCA, LDA etc..With some other face recognition algorithms phase Than demands of the SVM to sample number is fewer.
It is non-linear, i.e. SVM for linear discriminant its advantageously.It is mainly two technologies to realize, one is core letter Number technology, one is slack variable technology.
Another feature of SVM algorithm be high dimensional pattern identification, it refer to sample dimension it is very high.Even if there are dimensions up to ten thousand Situation, SVM algorithm still can be coped with normally.The main reason is that the grader of SVM is very succinct, therefore it is used Sample information is with regard to seldom, even if facing very high dimension, it will not carry out prodigious problem to storage tape.
It can be illustrated below with an example, such as in a two-dimensional space, only two class samples are classified Situation is C1 and C2 respectively, is now to distinguish them in two dimensional surface.Classification function is exactly that intermediate straight line , it is therefore an objective to two kinds of samples are distinguished.If can be completely separable next by sample, this linear function be exactly linear separability Function, if it could not, being exactly linear unseparable function.
The definition of linear function is:Point-line-face is the point of the one-dimensional space, a straight line of two-dimensional space, three-dimensional space Between a plane ... ignore space dimensionality this problem, it can be known as hyperplane.
Its purpose is to export different classifications respectively.Such as:We can indicate that 0 indicates to be not belonging to C1 with 0 and 1 (belonging to C2), 1 indicates to belong to C1, at this time only it needs to be determined that a threshold value carrys out identification and classification problem, in conjunction with real-valued function, really Surely classify more than or less than this threshold value.
Judge for disaggregated model quality is usually all judged with class interval.
The problem of following text classification, be supplied to the training sample of computer be it is dimeric, one be to Amount, is the vector being made of text feature;Another is exactly to mark, that is, identifies the classification or affiliated of sample.Such as 5 institute of formula Show:
Di=(Xi, Yi) (5)
Wherein xi represents the very high text vector of dimension, yi presentation classes label.
In linear classification problem, just than binary as mentioned above, often this label is indicated with two values, one It is 1, one is -1, they indicate to belong to or be not belonging to.Next the interval of a sample is defined, this interval is that he arrives certain The interval of a hyperplane.
δi=yi(wxi+b) (6)
, if belonging to the category, there is wxi+b when carrying out sample class classification to 6 formulas>0, form is said with above It is bright similar.Similarly, yi is also naturally larger than 0;Conversely, then there is wxi+b<0, similarly yi also should be less than 0.Thus product is carried out It was found that no matter when yi (wxi+b) is greater than 0.It is known that for a positive number, his value is equal to his absolute value, Yi (wxi+b)=| yi (wxi+b) |.
Next w and b are normalized, use w/ | | w | | instead of w before, b/ | | w | | instead of b before, therefore formula 7:
Thus a similar formula in analytic geometry is associated, D=(Ax+By+c)/sqrt (A^2+B^2), wherein Sqrt (A^2+B^2) is analogous to | | W | |, wherein | | W | | be exactly the norm of vector W, usually to a kind of measurement of vector length Do norm.And vector therein is W=[A, B];And (Ax+By+c) is equivalent to g (X), vector X=[x, y] therein.
This formula is exactly distance of the point in geometry to straight line above.
Normalized w and b is used above, and original value, referred to as geometry interval are replaced respectively with it.The usual table in geometry interval What is shown is exactly distance of the point to hyperplane, this distance is exactly Euclidean distance.In the case of clearly being showed linear separability The correlation circumstance of optimum classifier.
H is classifying face in Fig. 5, and H1 and H2 are mutually parallel, and also parallel with H.This two classes straight line of H1 and H2 in Fig. 5 Between, and the straight line of H is crossed, it is exactly H and H1, H and H2, the distance between they are exactly so-called geometric distance.Geometric distance, It is between the mistake gradation number of sample, and there is indivisible contacts, as shown in following formula 3-5:
Found out by above formula, there are one factor delta, representative is sample set the distance between to classifying face.R=max | | xi | | i=1 ..., n can be seen that by this formula:R is the longest value of vector length in all samples.It follows that working as sample When this number has determined, accidentally the maximum value of gradation number is determined by geometry spacing.It can be seen that by above formula, geometry spacing It is that inverse ratio is presented with max value of error, i.e. geometry spacing is bigger, and corresponding max value of error will be smaller.
By above we can show that, in order to obtain the minimum of max value of error, we will realize that geometry spacing is maximum Change.However this acquires SVM minimum theories with us and runs counter to, the reason is as follows that:
Interval:σ=y (wx+b)=| g (x) | (9)
Geometry interval:
Can be seen that by the formula at interval above and geometry interval, δ=| | w | | δ geometry, geometry interval with | | w | | be to be in Existing inverse ratio, i.e., maximum geometry spacing is just comparable to minimize | | W | |.
Followed by maximum geometry interval, that is, seek maximum value, i.e. optimal value.It is translated into and seeks minimum problems ratio Easier, the problem of adding negative sign to make its maximum value, is converted into the problem of seeking minimum value.It is first for seeking minimum value this problem It first needs to find optimal objective, if wanting to seek minimum | | W | | this problem, as shown in following formula 11:
min||w|| (11)
Often actually, object function is replaced with the thought of equivalencing, as shown in following formula 12:
It can be seen that by above formula, when | | W | | same when 2 acquirement minimum value | | W | | also necessarily obtain minimum value.It sees now that This formula above, if it is desired to be minimized, it is only necessary to | | W | | obtain minimum value.No matter however take any data, be all The solution of this formula.If it is exactly two straight lines in the figure to put, the distance between they infinity, necessarily cause to own in this way The confusion of sample, they concentrate between two straight lines.However what this was disagreed with our original intention, Buddhist is put in this way enters one Gray zone, all are all can not classifying for confusion, as shown in Figure 6:
It considers target and does not account for constraints but, and constraints is:Sampling point must in the sides H1 H2, one Surely it cannot occupy between the two.Front is said, and interval is fixed at 1, this is divided into 1 point necessarily that is in all samples It is spaced minimum that point, the interval of that other same point can all be more than 1.According to previous definition, following 13 must be met Formula:
Yi [(wxi)+b] >=1 (i=1,2 ..., l) (l be total sample number) (13)
After transformed:
Yi [(wxi)+b] -1 >=0 (i=1,2 ..., l) (l be total sample number) (14)
Therefore, classification problem is converted to the digital form of belt restraining:
yi[(wxi+ b] -1 >=0, (i=1,2, l) (l is sample number) (15)
Therefore, this seek the problem of minimum value be equivalent to one planning the problem of.It is made of two modules, mesh Scalar functions and constraints the two modules.It is indicated with 3-13 formulas:
Cj(x)=0, j=p+1, p+2 ..., p+q (16)
In above formula, constraints is indicated with C.There is p+q constraints in above formula, what wherein P was represented is inequality Constraint, and what q was represented is equality constraint.Independent variable in formula is x, but his dimension is not limited but, because in reality In the problem of border, his dimension may be thousands of.It is obtained most in certain point followed by f (x) is found inside constraints Small value.It is known that every bit is required for meeting p+q condition inside feasibility domain, in addition can be taken in borderline point Equal sign.
Be related to convex set this problem inside feasibility domain, so-called convex set be exactly in space any two points be linked to be it is straight Line, all points on the straight line are all in this space.
Above in 12 formulas, independent variable is W, while object function is the quadratic function of W, before cited all pacts Beam condition, they are the linear functions of w, therefore, comprehensive come to describe him be a convex quadratic programming.
Convex quadratic programming, there are one prodigious advantages for he, and being exactly him has globally optimal solution.
When learning of higher mathematics solves before, the problem of typically acquiring with equation, but problems faced is band at present The restricted problem of inequality, therefore it can be converted to the restricted problem with equation, such problem is quickly just simple very It is more!
By may know that there is the sample point of many two classifications before, specifically as shown in fig. 7, Fig. 7 is linear separability In the case of sample point:
There are two sample points as can be seen from Figure 7, and one is circular sample point, is set to positive sample, another is just It is rectangular sample point, is set to negative sample in passing.Therefore we are required of the linear function in a n-dimensional space:
G (x)=wx+b (17)
Next so that the point of all positive samples generates g (x+) >=1 after bringing above formula into, while the point of all negative samples is brought into Generate g (x-)≤- 1 after above formula, thus can determine the value of g (x) except+1 and -1 this range, if result this range it It is interior, then it cannot be judged.By the process of solution, a n-dimensional vector w, the value of another real number b can be found out, once it asks Out, then straight line H is determined that, while H1 and H2 are because parallel with H.After sample determines W, then certain combination can With with pattern representation:
W=a1×1+a2×2+…+an×n (18)
In formula 3-15, since ai is Lagrange multiplier, Xi is sample point, therefore is vector, and n is total sample The number of this point.There is the product of number and vector in next formula, also the inner product of directed quantity<X1, x2>, see 19 expression Formula:
G (x)=<W, x>+b (19)
If the position of my motionless any sample point, only change sample point is positive and negative, that is, the inside illustrated above , circle is turned into rectangular, but the purpose inscribed is to distinguish round and rectangular point, it can be seen that, W is not only It is closely bound up with sample point position, also it is inextricably linked with the classification of sample.As formula 20 is represented by:
W=a1y1x1+a2y2x2+…+anynxn (20)
Yi in above formula represents the label of i-th of sample, he is equal to 1 or -1. in this formula, when he is equal to 0 When, it is meant that these points are fallen on straight line, because we require to be the point on non-rectilinear, therefore W are needed to be not equal to 0.Therefore formula It can write a Chinese character in simplified form and be expressed as:
Meanwhile former formula is expressed as:
It is vector there was only Xi and X in above formula, and since Xi is known sample, former formula is:
Find that formula asks W to be transformed to seek a from original from above formula, this problem of inequality constraints optimizes.
Above we for always linear separability the problem of solution sample problem, but have in reality it is many it is linear not The problem of can dividing.
Since in two-dimensional space, general linear function is all straight line, and face linearly inseparable situation, it is clear that cannot use straight Line drawing is stated, therefore is only able to find a curve.
By judging point in the top of curve or lower section, to judge the classification belonging to it.We can send out usually Existing, the function of positive sample class, value is bigger than 0, we describe sample function with conic section:
G (x)=C0+C1x+C2x2 (24)
A vector is created for top curve function, wherein y and a are three-dimensional vectors, as shown in Equation 25:
G (x) is converted by above formula, be allowed to be converted into f (y)=<a,y>, can decide whether to be equal to so original G (x), therefore f (y) is such as shown in (26):
G (x)=f (y)=ay+b (26)
It is a linear function in formula above, what wherein a and y both represent is all hyperspace vector, former Because being independent variable y, his number is less than or equal to 1.
Linear inseparable problem can not be solved in two-dimensional space, but if converted to higher dimensional space, It is allowed to be mapped to inside space-time and go, thus by problem reduction, the problem of being allowed to become linear separability.
And it is the mapping method that must be found from x to y that conversion key factor is carried out in reality.However, for thousands of dimensions Often there is linearly inseparable in text vector, if continuing to be converted to higher dimension, difficulty is very big.
In fact be only higher dimensional space inside inner product value, if value is calculated, that result do not say naturally and It explains.In theory, be obtained from being converted as x, therefore the function of x can be referred to as, but due to be constant simultaneously And be a lower dimensional space value W and generated by a series of transformation, therefore by the way that the value of w and x will necessarily there are one determinations Value is mutually matched therewith.At this moment it first has to find a kind of function K (w, x), can not only be inputted by the value of lower dimensional space, And inner product value can also be calculated, this inner product value is higher dimensional space.
If in the presence of, then when the input for providing an x, it is corresponding with lower dimensional space, at this time:
G (x)=k (w, x)+b (27)
F (x ')=(w ', x ')+b (28)
In fact the result of the two functions is coincide very much, and more worth happiness is that K (w, x) is implicitly present in, this letter Number is referred to as kernel function.The main function of kernel function is the vector for receiving two spaces first, the two vectors are to come from low-dimensional , it can calculate corresponding inner product of vectors value, this inner product value is presented in higher dimensional space after certain transformation Face, the form for the problem of seeking a linear classifier is as shown in 29:
This function is exactly kernel function above, i.e., the linear function being transformed in higher dimensional space.Change its name, so that it may To obtain following 30 formula:
Pass through this formula above, it has been found that these three values of a, y, b and formula is repeated before, it can thus be seen that existing When seeking linearly inseparable problem, need to solve according to linear separability.But it should be noted that in selection inner product When, it to be realized by kernel function, thus obtain required grader.
But, next there are two problems:
1. kernel function is multiple, how to be selected
2. if using kernel function, result remains linearly inseparable after being mapped to higher dimensional space, and at this time this how
By inquiry data of surfing the Internet, obtain:The selection of kernel function can not determine that corresponding handling result also has Difference.But radius vector kernel function, its result error often very little very little, its most of accuracy rate are 85% or more.
By High Dimensional Mapping, the case where function originally will become linear separability.Assuming that sample point is thousands of, and Also another training set, only than present more sample points the case where, corresponding position is as shown in Figure 8.
Wherein that point of yellow is exactly that additional sample point, just because of its addition makes original linear separability Moment is transformed into the problem of linearly inseparable again.It can certainly go to think deeply from another angle, this sample point is perhaps It is exactly disturbing factor, is mistake either noiseIf we ignore this sample point, effect remains unchanged meeting and with previous Sample.
But this mistake is artificial, being the thinking of people causes to generate.At this moment in order to solve the problems, such as, using " between hard Every " sorting technique, the reason is that he is mandatory to allow all sample point requirements so that the distance between classification plane, it is necessary to big It just can be in some value.
Apish thinking allows some points so that they arrive the distance of plane, are unsatisfactory for that original requirement i.e. It can.Because of each training set, their arduous scale is different, therefore interval is used as the index of measurement by we.
yi[(wxi)+b] >=1, (i=13 ..., l) (l is sample number) (31)
The interval that can be seen that all samples from formula above all has to be larger than 1.If having to introduce fault-tolerance This factor just adds a slack variable, i.e.,:
ζ≥0 (32)
Because slack variable is positive value, therefore to be required of its interval can be smaller than 1.But this will necessarily be damaged It loses.But the gain and loss of this loss is must be balanced against, so-called fish can not get both with bear's paw.Meanwhile if obtained grader interval Bigger, benefit is just corresponding more.It is original optimization problem, he be classify with hardware space it is corresponding:
yi[(wxi)+b] -1 >=0, (i=1,2 ..., l) (l is sample number) (34)
From the above, it can be seen that | | W | | it is object function, its certain its smaller result of value is preferably also.Weighing loss has Following two usual way:
Another is:
In formula above, what I was indicated is the number of sample, and first method is second order soft margin classification device, second Referred to as single order soft margin classification device.It is learnt through consulting reference materials, it is desirable to object function be added to inside original object function, at this moment It waits and just needs a penalty factor, therefore optimization problem:
yi[(wxi)+b]≥1-ζi, (i=1,2 ..., l) (l is sample number) (ζi≥0) (38)
Above formula needs to pay attention to:
One, slacks are not one-to-one, and not every sample has.Often only a other " outlier " Have.
Its value of two, expression is distance apart from group, and value is bigger certainly, and point is inevitable also can be remoter.
Three, penalty factors, it represents your attention degree to loss, and C is bigger, and corresponding loss also can be in succession bigger
Four, penalty factors are not a variables, it is a definite value specified in advance, solve to obtain a grader Afterwards, look at that effect is selected again.
For C, skew problems have been mentioned here, i.e. namely data skew.Its expression, two class samples of participation, It has prodigious quantitative value difference.In order to solve the problems, such as to tilt this, need to give it with regard to seldom negative class to script sample size The penalty factor of bigger, to indicate the attention degree to him.Then become:
By above formula, we can obtain, i is positive sample, and j is negative sample number, now determines that C+ and C-, then best side Method is the degree weighed them and be distributed.
In feature extraction, that stage has used Haar features.It can be divided into three classes:Linear character, edge feature, Line feature, diagonal line feature.Its characteristic value:A total of four direction is that X, Y, X are tilted, Y tilts this four direction respectively.Its In, all it is the pixel value of black-pixel region when calculating each characteristic value, is carried out with the pixel value of white filling region Difference, the difference as a result calculated are exactly Haar features.
In this formula above, wherein what is represented is the size of picture, expression be rectangular characteristic size, it is indicated Be:The maximum ratio coefficient that rectangle can amplify, w, h they be feature in the rotated both horizontally and vertically for 45 ° Feature indicates as shown at 41:
Then their calculation formula is:
Fig. 9-Figure 10 respectively illustrates face identification system flow chart and method figure, now such as by concrete configuration procedure declaration Under:
The computer system of this secondary design is the system of Win8.1_64bits, final by searching various data on the net Configuration successful.It is as follows that it configures the process of OpenCV1.0:
First:Download installation OpenCV1.0
Visual C++6.0 are installed first, then download OpenCV1.0, and address is http://opencv.org/.
It is the .exe files that can be executed after download, is unziped to after operation in C disks, path can be selected for C:\\ Opencv1.0 opens its file and sees two sub-folders, is build and sources both of these documents folder respectively.
Followed by the configuration process of OpenCV1.0 environmental variances:
The first step:Computer is selected, clicks attribute-by right key>Advanced system setting->Environmental variance->PATH->In variable The middle corresponding path of addition.
It is arranged followed by the overall situation, configuration step:
Step is:Tool->Option->Then catalogue goes to the path of setting lib, select Library files, then fill out Enter path:C:\OPENCV1.0\OPENCV\LIB
Include files are selected, following path is equally inserted:
C:\OpenCV1.0\OpenCV\cxcore\include;
C:\OpenCV1.0\OpenCV\cv\include
C:\OpenCV1.0\OpenCV\cvaux\include;
C:\OpenCV1.0\OpenCV\ml\include
C:\OpenCV1.0\OpenCV\otherlibs\highgui
C:\OpenCV1.0\OpenCV\otherlibs\cvaum\include
Source files are selected, following path is equally inserted:
C:\OpenCV1.0\OpenCV\cxcore\src;C:\OpenCV1.0\OpenCV\cv\src;
C:\OpenCV1.0\OpenCV\cvaux\src;C:\OpenCV1.0\OpenCV\ml\include;
C:\OpenCV1.0\OpenCV\otherlibs\highgui;
C:\OpenCV1.0\OpenCV\otherlibs\cvaum\src\windows;
Herein, entire configuration is basically completed.
Remaining is exactly item setup, whenever create one will use to OpenCV VC Project when, It is required for specifying required lib. to him
Step is:Project->Setting, is then selected as All Configurations by setting, then selects the right side The label of link then adds following content on object/library modules:
Cxcore.lib cv.lib ml.lib cvaux.lib highgui.lib cvcam.lib
Then entire configuration is declared successfully.
The foregoing is only a preferred embodiment of the present invention, protection scope of the present invention is without being limited thereto, it is any ripe Those skilled in the art are known in the technical scope of present disclosure, the letter for the technical solution that can be become apparent to Altered or equivalence replacement are each fallen in protection scope of the present invention.

Claims (3)

1. a kind of face identification method based on SVM linear discriminants, which is characterized in that
Step 1, image preprocessing:
Four processes are divided for image preprocessing, have been image gray processing, medium filtering, Equalization Histogram equalization, figure respectively Image contrast enhances;They are handled successively so that picture quality is more superior;
The normalization of step 2, face, he includes two aspects, and one is geometrical normalization, is divided into two steps, and one is face Correction, another is exactly that face is cut;And gray scale normalization, it is to enhance the contrast of image;
Step 3, face characteristic extraction:
The module is the Haar feature extracting methods used, which is the face characteristics extraction of the facial image after positioning Out;
Step 4, recognition of face:
Feature vector in the data value of feature extraction before and subsequent data library is gone to be compared by it, if the result of analysis Within a certain range, then the relevant information of the people is extracted, and is shown, that is, can recognize that the identity of this person, to come At the process of recognition of face;If there is no corresponding feature vector in inventory, inventory's sample situation of prompt system.
2. the face identification method according to claim 1 based on SVM linear discriminants, which is characterized in that step 3 is specific For:
1) extracts the distance between two eyes;
2) angle of inclination of eyes;
3) center of gravity of eyes, face;
4) marks each feature with a rectangle;
It, will be in the characteristic value deposit library of extraction after having extracted feature.
3. the face identification method according to claim 1 based on SVM linear discriminants, which is characterized in that step 4 uses SVM algorithm is classified to facial image and is matched.
CN201810590721.0A 2018-06-09 2018-06-09 A kind of face identification method based on SVM linear discriminants Pending CN108446691A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810590721.0A CN108446691A (en) 2018-06-09 2018-06-09 A kind of face identification method based on SVM linear discriminants

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810590721.0A CN108446691A (en) 2018-06-09 2018-06-09 A kind of face identification method based on SVM linear discriminants

Publications (1)

Publication Number Publication Date
CN108446691A true CN108446691A (en) 2018-08-24

Family

ID=63206858

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810590721.0A Pending CN108446691A (en) 2018-06-09 2018-06-09 A kind of face identification method based on SVM linear discriminants

Country Status (1)

Country Link
CN (1) CN108446691A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113205619A (en) * 2021-03-15 2021-08-03 广州朗国电子科技有限公司 Door lock face recognition method, equipment and medium based on wireless network
CN114125401A (en) * 2021-12-23 2022-03-01 中华人民共和国大连海关 Case site wireless information acquisition method and system
CN114897588A (en) * 2022-07-12 2022-08-12 武汉数智云科技有限公司 Order management method and device based on data analysis

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902958A (en) * 2012-12-28 2014-07-02 重庆凯泽科技有限公司 Method for face recognition
CN106096517A (en) * 2016-06-01 2016-11-09 北京联合大学 A kind of face identification method based on low-rank matrix Yu eigenface

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902958A (en) * 2012-12-28 2014-07-02 重庆凯泽科技有限公司 Method for face recognition
CN106096517A (en) * 2016-06-01 2016-11-09 北京联合大学 A kind of face identification method based on low-rank matrix Yu eigenface

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113205619A (en) * 2021-03-15 2021-08-03 广州朗国电子科技有限公司 Door lock face recognition method, equipment and medium based on wireless network
CN114125401A (en) * 2021-12-23 2022-03-01 中华人民共和国大连海关 Case site wireless information acquisition method and system
CN114897588A (en) * 2022-07-12 2022-08-12 武汉数智云科技有限公司 Order management method and device based on data analysis
CN114897588B (en) * 2022-07-12 2022-09-23 武汉数智云科技有限公司 Order management method and device based on data analysis

Similar Documents

Publication Publication Date Title
Rana et al. A fast iris recognition system through optimum feature extraction
Wang et al. Expression of Concern: Facial feature discovery for ethnicity recognition
CN108446691A (en) A kind of face identification method based on SVM linear discriminants
El Kaddouhi et al. Eye detection based on the Viola-Jones method and corners points
CN104395913A (en) Method, apparatus and computer readable recording medium for detecting a location of a face feature point using an ADABOOST learning algorithm
Verma et al. Local invariant feature-based gender recognition from facial images
CN109376717A (en) Personal identification method, device, electronic equipment and the storage medium of face comparison
Boranbayev et al. The software system for solving the problem of recognition and classification
Boranbayev et al. The development of a software system for solving the problem of data classification and data processing
Kuang et al. Fruit classification based on weighted score-level feature fusion
Barbosa et al. Transient biometrics using finger nails
Bapst et al. Open set recognition of aircraft in aerial imagery using synthetic template models
Subudhiray et al. K-nearest neighbor based facial emotion recognition using effective features
Chen et al. Optically guided level set for underwater object segmentation
Rashid et al. On the design of embedded solutions to banknote recognition
CN111368803A (en) Face recognition method and system
Hannan et al. Analysis of Detection and Recognition of Human Face Using Support Vector Machine
Eliades et al. Automatic face recognition with well-calibrated confidence measures
Tang et al. Visible-infrared person re-identification employing style-supervision and content-supervision
Borodinov et al. Comparison of classification algorithms for various methods of preprocessing radar images of the MSTAR base
Hahmann et al. Combination of facial landmarks for robust eye localization using the Discriminative Generalized Hough Transform
Liu et al. An improved finger-vein recognition algorithm based on template matching
Zayeef et al. Face Recognition-Based Automated Attendance System for Educational Institutions Utilizing Machine Learning
Wu et al. Face segmentation based on level set and improved DBM prior shape
Nikhilesh et al. Machine learning and its capabilities: example of automated attendance management system using facial recognition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180824