CN106326876A - Training model generation method and device, and face alignment method and device - Google Patents

Training model generation method and device, and face alignment method and device Download PDF

Info

Publication number
CN106326876A
CN106326876A CN201610798033.4A CN201610798033A CN106326876A CN 106326876 A CN106326876 A CN 106326876A CN 201610798033 A CN201610798033 A CN 201610798033A CN 106326876 A CN106326876 A CN 106326876A
Authority
CN
China
Prior art keywords
position information
dot position
current dot
training pattern
current
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
CN201610798033.4A
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.)
All Kinds Of Fruits Garden Guangzhou Network Technology Co Ltd
Original Assignee
All Kinds Of Fruits Garden Guangzhou Network Technology Co Ltd
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 All Kinds Of Fruits Garden Guangzhou Network Technology Co Ltd filed Critical All Kinds Of Fruits Garden Guangzhou Network Technology Co Ltd
Priority to CN201610798033.4A priority Critical patent/CN106326876A/en
Publication of CN106326876A publication Critical patent/CN106326876A/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/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • G06V10/507Summing image-intensity values; Histogram projection analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention discloses a training model generation method, which comprises the steps of acquiring a training sample containing a face feature point annotation; extracting a histogram of oriented gradient (HOG) feature from the training sample based on current point location information, and generating a feature matrix, wherein the initial current point location information is location information of a face feature point in a preset initial face shape; acquiring updated current point location information through a sparse regression calculation according to the difference between the coordinates of the face feature point annotation and the coordinates of the current point location information and the feature matrix; iteratively executing the step of extracting an HOG feature to the step of acquiring updated current point location information through sparse regression calculation for M times according to the updated current point location information, wherein M is a positive integer; and storing a regression matrix, which is formed through each time of iteration, of the current point location information so as to generate a training model for face alignment processing. Training models for face alignment can be reduced to a great extent.

Description

A kind of training pattern generates method, face registration process method and device
Technical field
The present invention relates to face registration process field, particularly relate to training pattern generate method, face registration process method, Training pattern generating means and face registration process device.
Background technology
Face alignment techniques is mainly accurately positioned the key point of face face in the image-region containing face, including Facial contour, eyes, face, nose, eyebrow part.
Face alignment techniques is the base of the technology such as recognition of face, the most U.S. face, facial emotion classification, head pose identification Plinth.Prior art has the implementation method that many faces align, such as at " Supervised Descent Method and Its Applications to Face Alignment " face alignment method that proposes, the method uses the study having supervision Mode looks for the regression matrix of regression function global optimum.
But, according to the implementation method of current face's alignment, in order to ensure the precision of Face detection, training location out The size of model is the biggest, and such as tens, the most up to a hundred million, can not being integrated in existing app program of light weight.
Summary of the invention
Embodiment of the present invention technical problem to be solved is, it is provided that a kind of training pattern generates method, face alignment Processing method, training pattern generating means and face registration process device, solve the location model training out in prior art Size the biggest, be unfavorable for the technical problem being integrated in existing app program.
In order to solve above-mentioned technical problem, embodiment of the present invention first aspect discloses a kind of training pattern and generates method, Including:
Obtain the training sample containing human face characteristic point mark;
From described training sample, extract histograms of oriented gradients HOG feature based on current dot position information, generate feature Matrix;Wherein, initial current dot position information is the positional information of human face characteristic point in default Initial Face shape;
The difference of the coordinate of the coordinate marked according to described human face characteristic point and described current dot position information, and described Eigenmatrix, draws the current dot position information of renewal by rarefaction regression Calculation;
According to the current dot position information of described renewal, iteration perform described based on current dot position information from described currently Training sample extracts histograms of oriented gradients (Histogram of Oriented Gradient, HOG) feature to described logical Cross step M time that rarefaction regression Calculation draws the current dot position information of renewal;Described M is positive integer;
Preserve each iteration to obtain and the regression matrix of current dot position information that forms, to generate at face alignment The training pattern of reason.
In conjunction with first aspect, in the implementation that the first is possible, described based on current dot position information from described instruction Practice and sample extract histograms of oriented gradients HOG feature, before generating eigenmatrix, also include:
Average shape is set as described Initial Face shape.
In conjunction with the first possible implementation of first aspect or first aspect, in the realization side that the second is possible In formula, the described current dot position information being drawn renewal by rarefaction regression Calculation, including:
By the x in rarefaction Regressive Solution Ax=b;Wherein A is described eigenmatrix, and described b is described face characteristic The coordinate of some mark and the difference of the coordinate of described current dot position information;
Described x is multiplied by described A again, obtains b ', using described b ' as the coordinate of current dot position information updated;
The regression matrix of the current dot position information that each iteration of described preservation obtains and forms, including: preserve the most repeatedly The sparse regression matrix x that generation obtains and forms.
Embodiment of the present invention second aspect discloses a kind of face registration process method, including:
Read the training pattern for face registration process;Wherein said training pattern is arbitrary by claim 1-3 Training pattern described in Xiang generates the training pattern that method generates;
From target image, extract HOG feature based on current dot position information, generate eigenmatrix;Wherein, initial work as Front dot position information is the positional information of human face characteristic point in default Initial Face shape;
According to regression matrix in described eigenmatrix and described training pattern, calculate face characteristic shaped Offset value;
Described current dot position information is updated according to described deviant;
According to the current dot position information after updating, iteration perform described based on current dot position information from target image Extract HOG feature to the most described step M time updating described current dot position information according to described deviant, obtain final updated Current dot position information;Described M is positive integer.
In conjunction with second aspect, in the implementation that the first is possible, the regression matrix in described training pattern includes institute State the sparse regression matrix x of M shell;Described according to regression matrix in described eigenmatrix and described training pattern, calculate face special Levy shaped Offset value, including:
K layer sparse when carrying out kth iteration, in the eigenmatrix generated according to kth and described training pattern Regression matrix x calculates face characteristic shaped Offset value;Described K is more than 0, less than or equal to the natural number of M.
The embodiment of the present invention third aspect discloses a kind of training pattern generating means, including:
Acquisition module, for obtaining the training sample containing human face characteristic point mark;
Matrix generation module, for extracting histograms of oriented gradients based on current dot position information from described training sample HOG feature, generates eigenmatrix;Wherein, initial current dot position information is face characteristic in default Initial Face shape The positional information of point;
Computing module, is used for the coordinate of coordinate and the described current dot position information marked according to described human face characteristic point Difference, and described eigenmatrix, draw the current dot position information of renewal by rarefaction regression Calculation;
Iteration module, for the current dot position information according to described renewal, iteration performs described based on currently putting position Information is extracted histograms of oriented gradients HOG feature from described current training sample and is drawn by rarefaction regression Calculation to described The step of the current dot position information updated M time;Described M is positive integer;
Preserve module, obtain and the regression matrix of current dot position information that forms, to generate for preserving each iteration Training pattern for face registration process.
In conjunction with the third aspect, in the implementation that the first is possible, also include:
Module is set, for extracting from described training sample based on current dot position information at described matrix generation module Histograms of oriented gradients HOG feature, before generating eigenmatrix, arranges average shape as described Initial Face shape.
In conjunction with the third aspect, or the first possible implementation of second aspect, in the realization side that the second is possible In formula, described computing module includes:
Rarefaction solves unit, for by the x in rarefaction Regressive Solution Ax=b;Wherein A is described eigenmatrix, Described b is the coordinate difference with the coordinate of described current dot position information of described human face characteristic point mark;
Updating block, for described x is multiplied by described A again, obtains b ', and as update, described b ' is currently put position The coordinate of information;
Described preservation module specifically for, preserve each iteration and obtain and the sparse regression matrix x that forms.
Embodiment of the present invention fourth aspect discloses a kind of face registration process device, including:
Read module, for reading the training pattern for face registration process;Wherein said training pattern is by upper State training pattern and generate the training pattern that method generates;
Extract generation module, for extracting HOG feature from target image based on current dot position information, generate feature square Battle array;Wherein, initial current dot position information is the positional information of human face characteristic point in default Initial Face shape;
Deviant computing module, for according to regression matrix in described eigenmatrix and described training pattern, calculates face Character shape deviant;
Information updating module, for updating described current dot position information according to described deviant;
Iteration more new module, for according to the current dot position information after updating, iteration performs described based on currently putting position Confidence breath extracts HOG feature to the described step updating described current dot position information according to described deviant from target image M time, obtain the current dot position information of final updated;Described M is positive integer.
In conjunction with fourth aspect, in the implementation that the first is possible, the regression matrix in described training pattern includes institute State the sparse regression matrix x of M shell;Described deviant computing module specifically for, when carrying out kth iteration, according to kth generate Eigenmatrix and described training pattern in the sparse regression matrix x of K layer calculate face characteristic shaped Offset value;Described K is more than 0, less than or equal to the natural number of M.
The embodiment of the present invention the 5th aspect discloses a kind of computer-readable storage medium, and described computer-readable storage medium storage has Program, described program includes embodiment of the present invention first aspect, or the first possible realization side of first aspect when performing In formula, or the possible implementation of the second of first aspect, training pattern generates the Overall Steps of method.
The embodiment of the present invention the 6th aspect discloses a kind of computer-readable storage medium, and described computer-readable storage medium storage has Program, described program includes embodiment of the present invention second aspect, or the first possible realization side of second aspect when performing The Overall Steps of the face registration process method in formula.
Implement the embodiment of the present invention, by obtaining the training sample containing human face characteristic point mark;Based on currently putting position Information extracts histograms of oriented gradients HOG feature from training sample, generates eigenmatrix;Wherein, initial position is currently put Information is the positional information of human face characteristic point in default Initial Face shape;Coordinate according to human face characteristic point mark is with current The difference of the coordinate of dot position information, and eigenmatrix, show that by rarefaction regression Calculation the current some position of renewal is believed Breath;According to the current dot position information updated, iteration performs based on current dot position information extraction side from current training sample Step M time to histogram of gradients HOG feature to the current dot position information being drawn renewal by rarefaction regression Calculation;Preserve The regression matrix of the current dot position information that each iteration obtains and forms, to generate the training mould for face registration process Type.Achieve the sparse matrix regression training mode of a kind of compressive features point location model, it is possible to the biggest program ground reduces face The training pattern of alignment, maintains the precision of Face detection, thus solves the location mould training out in prior art The size of type is the biggest, is unfavorable for the technical problem being integrated in existing app program, can training pattern light weight be collected Become in mobile app product.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to Other accompanying drawing is obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet that the training pattern that the embodiment of the present invention provides generates method;
Fig. 2 is the schematic flow sheet that the training pattern that the present invention provides generates another embodiment of method;
Fig. 3 is the schematic flow sheet of the face registration process method that the embodiment of the present invention provides;
Fig. 4 is the structural representation of the training pattern generating means that the embodiment of the present invention provides;
Fig. 5 is the structural representation of another embodiment of the training pattern generating means that the present invention provides;
Fig. 6 is the structural representation of the computing module that the embodiment of the present invention provides;
Fig. 7 is the structural representation of another embodiment of the training pattern generating means that the present invention provides;
Fig. 8 is the structural representation of the face registration process device that the embodiment of the present invention provides;
The structural representation of another embodiment of the face registration process device that Fig. 9 present invention provides.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under not making creative work premise Embodiment, broadly falls into the scope of protection of the invention.
The training pattern of each embodiment of the present invention generates method and can realize based on personal computer, i.e. technology people Member, by operation personal computer, writes the generating run code of training pattern, can generate training pattern, and finally be integrated into In required mobile app product.
The face registration process method of each embodiment of the present invention can be based on personal computer, personal digital assistant (Personal Digital Assis tant, PDA), media player, Intelligent mobile equipment (include mobile phone, mobile electricity Brain, panel computer, intelligent television, intelligent watch, intelligent glasses and Intelligent bracelet etc.) etc. equipment realize.It is to say, it is integrated The mobile app product having the training pattern that the embodiment of the present invention generates may operate in the said equipment.
We generate the schematic flow sheet of method with the training pattern that the embodiment of the present invention shown in Fig. 1 provides below, come The training pattern that describing the embodiment of the present invention in detail provides generates method, comprises the steps:
Step S100: obtain the training sample containing human face characteristic point mark;
Specifically, can collect the training sample containing K human face characteristic point mark, this K human face characteristic point can be 68 human face characteristic points, or 72 human face characteristic points etc., the embodiment of the present invention is not restricted.The training sample collected is permissible Having thousands of, such as more than 2000 training sample, the training sample in the embodiment of the present invention is all labeled with the position of human face characteristic point Confidence ceases, the coordinate etc. of such as human face characteristic point.
Step S102: extract histograms of oriented gradients HOG feature from described training sample based on current dot position information, Generate eigenmatrix;
Specifically, initial in the embodiment of the present invention current dot position information can be people in the Initial Face shape preset The positional information of face characteristic point;This Initial Face shape can be average shape, say, that before step S102, it is also possible to Including arranging the average shape step as described Initial Face shape.
It is as a example by 68 human face characteristic points by training sample, then the eigenmatrix extracting the generation of HOG feature can be thought The eigenmatrix of 68 vector compositions.
Step S104: the difference of the coordinate of the coordinate marked according to described human face characteristic point and described current dot position information Value, and described eigenmatrix, draw the current dot position information of renewal by rarefaction regression Calculation;
Specifically, the embodiment of the present invention calculates by the way of rarefaction returns, it is possible to achieve to positioning feature point Model is compressed such that it is able to the biggest program ground reduces the training pattern of face alignment, maintains the essence of Face detection Degree.
Step S106: according to the current dot position information of described renewal, iteration performs described based on current dot position information From described current training sample, extract histograms of oriented gradients HOG feature draw renewal to described by rarefaction regression Calculation Step M time of current dot position information;
Specifically, re-execute step S102 to step S104 with the current dot position information calculated in step S104, That is completing M iteration, the M in the embodiment of the present invention is positive integer.The value of M can according to the demand of user self or Arranging based on experience value, the present invention does not limits.
Step S108: preserve each iteration and obtain and the regression matrix of current dot position information that forms, be used for generate The training pattern of face registration process.
Specifically, perform step S104 during performing step S104 and successive iterations for the first time every time, can obtain To a current dot position information, then preserve all current dot position informations obtained and form regression matrix, thus generate It is subsequently used for the training pattern of face registration process.
Implement the embodiment of the present invention, it is achieved that the sparse matrix regression training mode of a kind of compressive features point location model, The training pattern that face aligns can be reduced in the biggest program ground, maintain the precision of Face detection, thus solve existing The size of the location model training out in technology is the biggest, is unfavorable for the technical problem being integrated in existing app program, Training pattern light weight can be integrated in mobile app product.
Further, the flow process of another embodiment that the training pattern that the present invention as shown in Figure 2 provides generates method is shown It is intended to, then citing describes the training pattern generation method that the embodiment of the present invention provides in detail, comprises the steps:
Step S200: obtain the training sample containing human face characteristic point mark;
Step S202: average shape is set as described Initial Face shape;
Step S204: extract histograms of oriented gradients HOG feature from described training sample based on current dot position information, Generate eigenmatrix;
Specifically, step S200 to step S204 is referred to step S100 in above-mentioned Fig. 1 embodiment to step S102, Here repeat no more.
Step S206: by the x in rarefaction Regressive Solution Ax=b;
Specifically, this A is described eigenmatrix, and this b is that the coordinate of this human face characteristic point mark is currently believed some position with this The difference of the coordinate of breath;This x is provided as the coordinate of the current dot position information updated.
Step S208: described x is multiplied by described A again, obtains b ', using described b ' as the current dot position information updated Coordinate;
Specifically, make use of the principle of rarefaction Regressive Solution, this x is multiplied by this A again, value b obtained ' close to this B, but it is not equal to b;It is iterated processing as new current location information using this b '.
Step S210: according to the current dot position information of described renewal, iteration performs described based on current dot position information Histograms of oriented gradients HOG feature is extracted to the described current point being provided as by this x and updating from described current training sample The step of the coordinate of positional information M time;
Specifically, re-execute step S204 to step S208 with the current dot position information calculated in step S208, That is completing M iteration, the M in the embodiment of the present invention is positive integer.The value of M can according to the demand of user self or Arranging based on experience value, the present invention does not limits.
Step S212: preserve each iteration and obtain and the sparse regression matrix x that forms, to generate for face registration process Training pattern.
For the ease of preferably implementing the such scheme of the embodiment of the present invention, the present invention also correspondence provides a kind of face pair Neat processing method, below in conjunction with the schematic flow sheet of the face registration process method that the embodiment of the present invention shown in Fig. 3 provides, in detail Describe how the bright present invention carries out face registration process in detail, comprise the steps:
Step S300: read the training pattern for face registration process;
Specifically, this training pattern that the embodiment of the present invention reads is the training pattern by above-mentioned Fig. 1 to Fig. 2 embodiment The training pattern that generation method generates;Here repeat no more.
Step S302: extract HOG feature from target image based on current dot position information, generates eigenmatrix;
Specifically, initial in the embodiment of the present invention current dot position information can be people in the Initial Face shape preset The positional information of face characteristic point;This Initial Face shape can be average shape, say, that before step S302, it is also possible to Including arranging the average shape step as described Initial Face shape.
It is as a example by 68 human face characteristic points by training sample, then the eigenmatrix extracting the generation of HOG feature can be thought The eigenmatrix of 68 vector compositions.
Step S304: according to regression matrix in described eigenmatrix and described training pattern, calculates face characteristic shape inclined Shifting value;
Specifically, the regression matrix in this training pattern can include the sparse regression matrix x of M shell;This M is positive integer. So when carrying out kth iteration, sparse time of the K layer in the eigenmatrix generated according to kth and described training pattern Return matrix x to calculate face characteristic shaped Offset value;This K is more than 0, less than or equal to the natural number of M.It will be appreciated that when K is When 1, i.e. carry out the calculating of primary face characteristic shaped Offset value.
Step S306: update described current dot position information according to described deviant;
Specifically, according to the coordinate of the current dot position information of size correction of deviant, thus the current point updated is obtained Positional information, processes for follow-up being iterated.
Step S308: according to the current dot position information after updating, iteration perform described based on current dot position information from Target image extracts HOG feature to the most described step M time updating described current dot position information according to described deviant, obtain The current dot position information of final updated;
Implement the embodiment of the present invention, by obtaining the training sample containing human face characteristic point mark;Based on currently putting position Information extracts histograms of oriented gradients HOG feature from training sample, generates eigenmatrix;Wherein, initial position is currently put Information is the positional information of human face characteristic point in default Initial Face shape;Coordinate according to human face characteristic point mark is with current The difference of the coordinate of dot position information, and eigenmatrix, show that by rarefaction regression Calculation the current some position of renewal is believed Breath;According to the current dot position information updated, iteration performs based on current dot position information extraction side from current training sample Step M time to histogram of gradients HOG feature to the current dot position information being drawn renewal by rarefaction regression Calculation;Preserve The regression matrix of the current dot position information that each iteration obtains and forms, to generate the training mould for face registration process Type.Achieve the sparse matrix regression training mode of a kind of compressive features point location model, it is possible to the biggest program ground reduces face The training pattern of alignment, maintains the precision of Face detection, thus solves the location mould training out in prior art The size of type is the biggest, is unfavorable for the technical problem being integrated in existing app program, can training pattern light weight be collected Become in mobile app product.
For the ease of preferably implementing the such scheme of the embodiment of the present invention, the present invention also correspondence provides a kind of training mould Type generating means, the structural representation of the training pattern generating means that the embodiment of the present invention as shown in Figure 4 provides, training pattern Generating means 40 may include that acquisition module 400, matrix generation module 402, computing module 404, iteration module 406 and preserves Module 408, wherein,
Acquisition module 400 is for obtaining the training sample containing human face characteristic point mark;
Matrix generation module 402 is for extracting direction gradient Nogata based on current dot position information from described training sample Figure HOG feature, generates eigenmatrix;Wherein, initial current dot position information is that in default Initial Face shape, face is special Levy positional information a little;
Computing module 404 is for the coordinate marked according to described human face characteristic point and the coordinate of described current dot position information Difference, and described eigenmatrix, drawn the current dot position information of renewal by rarefaction regression Calculation;
Iteration module 406 is for the current dot position information according to described renewal, and iteration performs described based on currently putting position Confidence breath is extracted histograms of oriented gradients HOG feature from described current training sample and is obtained by rarefaction regression Calculation to described Go out step M time of the current dot position information updated;Described M is positive integer;
Preserve the regression matrix of the module 408 current dot position information for preserving each iteration and obtain and forming, with life Become the training pattern for face registration process.
Specifically, the structural representation of another embodiment of the training pattern generating means that the present invention as shown in Figure 5 provides Figure, training pattern generating means 40 includes acquisition module 400, matrix generation module 402, computing module 404, iteration module 406 Outside with preservation module 408, it is also possible to including:
Module 4010 is set for carrying from described training sample based on current dot position information at matrix generation module 402 Take histograms of oriented gradients HOG feature, before generating eigenmatrix, average shape is set as described Initial Face shape.
Further, the structural representation of the computing module that the embodiment of the present invention as shown in Figure 6 provides, computing module 404 include: rarefaction solves unit 4040 and updating block 4042, wherein,
Rarefaction solves unit 4040 for by the x in rarefaction Regressive Solution Ax=b;Wherein A is described feature square Battle array, described b is the coordinate difference with the coordinate of described current dot position information of described human face characteristic point mark;
Updating block 4042, for described x is multiplied by described A again, obtains b ', using described b ' as the current point updated The coordinate of positional information;
Preservation module 408 in training pattern generating means 40 specifically may be used for, and preserves each iteration and obtains and form Sparse regression matrix x.
It should be noted that the function of each module can corresponding be implemented with reference to above-mentioned each method in training pattern generating means 40 In example, the specific implementation of Fig. 1 to Fig. 2 embodiment, repeats no more here.
Yet further, another embodiment that Fig. 7, Fig. 7 are the training pattern generating means that the present invention provides is referred to Structural representation.Wherein, as it is shown in fig. 7, training pattern generating means 70 may include that at least one processor 701, such as CPU, at least one network interface 704, user interface 703, memorizer 705, at least one communication bus 702 and display screen 706.Wherein, communication bus 702 is for realizing the connection communication between these assemblies.Wherein, user interface 703 can include showing Display screen, keyboard or mouse etc..Network interface 704 optionally can include that the wireline interface of standard, wave point are (such as WI-FI Interface).Memorizer 705 can be high-speed RAM memorizer, it is also possible to be non-labile memorizer (non-volatile Memory), for example, at least one disk memory, memorizer 705 includes the flash in the embodiment of the present invention.Memorizer 705 can That selects can also is that at least one is located remotely from the storage system of aforementioned processor 701.As it is shown in fig. 7, as a kind of computer The memorizer 705 of storage medium can including, operating system, network communication module, Subscriber Interface Module SIM and training pattern are raw One-tenth program.
Processor 701 may be used for calling the training pattern of storage in memorizer 705 and generates program, and performs following behaviour Make:
The training sample containing human face characteristic point mark can be obtained by network interface 704 grade;
From described training sample, extract histograms of oriented gradients HOG feature based on current dot position information, generate feature Matrix;Wherein, initial current dot position information is the positional information of human face characteristic point in default Initial Face shape;
The difference of the coordinate of the coordinate marked according to described human face characteristic point and described current dot position information, and described Eigenmatrix, draws the current dot position information of renewal by rarefaction regression Calculation;
According to the current dot position information of described renewal, iteration perform described based on current dot position information from described currently Training sample extracts histograms of oriented gradients HOG feature and currently puts position to the most described by what rarefaction regression Calculation drew renewal The step of confidence breath M time;Described M is positive integer;
Preserve each iteration by memorizer 705 to obtain and the regression matrix of current dot position information that forms, to generate Training pattern for face registration process.
Specifically, processor 701 extracts histograms of oriented gradients based on current dot position information from described training sample HOG feature, before generating eigenmatrix, it is also possible to performs:
Average shape is set as described Initial Face shape.
Specifically, processor 701 draws the current dot position information of renewal by rarefaction regression Calculation, including:
By the x in rarefaction Regressive Solution Ax=b;Wherein A is described eigenmatrix, and described b is described face characteristic The coordinate of some mark and the difference of the coordinate of described current dot position information;
Described x is multiplied by described A again, obtains b ', using described b ' as the coordinate of current dot position information updated;
Processor 701 preserves each iteration by memorizer 705 and obtains and the recurrence square of current dot position information that forms Battle array, including: preserve each iteration and obtain and the sparse regression matrix x that forms.
Implement the embodiment of the present invention, it is achieved that the sparse matrix regression training mode of a kind of compressive features point location model, The training pattern that face aligns can be reduced in the biggest program ground, maintain the precision of Face detection, thus solve existing The size of the location model training out in technology is the biggest, is unfavorable for the technical problem being integrated in existing app program, Training pattern light weight can be integrated in mobile app product.
For the ease of preferably implementing the such scheme of the embodiment of the present invention, the present invention also correspondence provides a kind of face pair Neat processing means, the structural representation of the face registration process device that the embodiment of the present invention as shown in Figure 8 provides, face aligns Processing means 80 may include that read module 800, extracts generation module 802, deviant computing module 804, information updating module 806 and iteration more new module 808, wherein,
Read module 800 is for reading the training pattern for face registration process;Wherein said training pattern is for passing through Above-mentioned training pattern generates the training pattern that embodiment of the method generates;
Extract generation module 802 for extracting HOG feature, generation feature from target image based on current dot position information Matrix;Wherein, initial current dot position information is the positional information of human face characteristic point in default Initial Face shape;
Deviant computing module 804, for according to regression matrix in described eigenmatrix and described training pattern, calculates people Face character shape deviant;
Information updating module 806 is for updating described current dot position information according to described deviant;
Iteration more new module 808 is for according to the current dot position information after updating, and iteration performs described based on current point Positional information extracts HOG feature to the described step updating described current dot position information according to described deviant from target image Rapid M time, obtain the current dot position information of final updated;Described M is positive integer.
Specifically, the regression matrix in the training pattern of the embodiment of the present invention includes the sparse regression matrix x of described M shell; Deviant computing module 804 can be specifically for, when carrying out kth iteration, and the eigenmatrix generated according to kth and described instruction The sparse regression matrix x practicing the K layer in model calculates face characteristic shaped Offset value;Described K is more than 0, less than or equal to M Natural number.
It should be noted that the function of each module can corresponding be implemented with reference to above-mentioned each method in face registration process device 80 In example, the specific implementation of Fig. 3 embodiment, repeats no more here.
Yet further, another embodiment that Fig. 9, Fig. 9 are the face registration process devices that the present invention provides is referred to Structural representation.Wherein, as it is shown in figure 9, face registration process device 90 may include that at least one processor 901, such as CPU, at least one network interface 904, user interface 903, memorizer 905, at least one communication bus 902 and display screen 906.Wherein, communication bus 902 is for realizing the connection communication between these assemblies.Wherein, user interface 903 can include showing Display screen, keyboard or mouse etc..Network interface 904 optionally can include that the wireline interface of standard, wave point are (such as WI-FI Interface).Memorizer 905 can be high-speed RAM memorizer, it is also possible to be non-labile memorizer (non-volatile Memory), for example, at least one disk memory, memorizer 905 includes the flash in the embodiment of the present invention.Memorizer 905 can That selects can also is that at least one is located remotely from the storage system of aforementioned processor 901.As it is shown in figure 9, as a kind of computer The memorizer 905 of storage medium can include at operating system, network communication module, Subscriber Interface Module SIM and face alignment Reason program.
Processor 901 may be used for calling the face registration process program of storage in memorizer 905, and performs following behaviour Make:
Read the training pattern for face registration process;Wherein said training pattern is arbitrary by claim 1-3 Training pattern described in Xiang generates the training pattern that method generates;
From target image, extract HOG feature based on current dot position information, generate eigenmatrix;Wherein, initial work as Front dot position information is the positional information of human face characteristic point in default Initial Face shape;
According to regression matrix in described eigenmatrix and described training pattern, calculate face characteristic shaped Offset value;
Described current dot position information is updated according to described deviant;
According to the current dot position information after updating, iteration perform described based on current dot position information from target image Extract HOG feature to the most described step M time updating described current dot position information according to described deviant, obtain final updated Current dot position information;Described M is positive integer.
Specifically, the regression matrix in training pattern includes the sparse regression matrix x of described M shell;Root described in processor 901 According to regression matrix in described eigenmatrix and described training pattern, calculate face characteristic shaped Offset value, may include that
K layer sparse when carrying out kth iteration, in the eigenmatrix generated according to kth and described training pattern Regression matrix x calculates face characteristic shaped Offset value;Described K is more than 0, less than or equal to the natural number of M.
In sum, implement the embodiment of the present invention, by obtaining the training sample containing human face characteristic point mark;Based on working as Front dot position information extracts histograms of oriented gradients HOG feature from training sample, generates eigenmatrix;Wherein, initial work as Front dot position information is the positional information of human face characteristic point in default Initial Face shape;Seat according to human face characteristic point mark The difference of the coordinate of mark and current dot position information, and eigenmatrix, draw the current of renewal by rarefaction regression Calculation Dot position information;According to the current dot position information updated, iteration performs based on current dot position information from current training sample Middle extraction histograms of oriented gradients HOG feature extremely draws the step of the current dot position information of renewal by rarefaction regression Calculation M time;Preserve each iteration to obtain and the regression matrix of current dot position information that forms, to generate for face registration process Training pattern.Achieve the sparse matrix regression training mode of a kind of compressive features point location model, it is possible to subtract to the biggest program The training pattern of few face alignment, maintain the precision of Face detection, thus solve and train out in prior art The size of location model is the biggest, is unfavorable for the technical problem being integrated in existing app program, can be light by training pattern Amount it is integrated in mobile app product.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, be permissible Instructing relevant hardware by computer program to complete, described program can be stored in a computer read/write memory medium In, this program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc..
The above disclosed present pre-ferred embodiments that is only, can not limit the right model of the present invention with this certainly Enclose, the equivalent variations therefore made according to the claims in the present invention, still belong to the scope that the present invention is contained.

Claims (10)

1. a training pattern generates method, it is characterised in that including:
Obtain the training sample containing human face characteristic point mark;
From described training sample, extract histograms of oriented gradients HOG feature based on current dot position information, generate eigenmatrix; Wherein, initial current dot position information is the positional information of human face characteristic point in default Initial Face shape;
The difference of the coordinate of the coordinate marked according to described human face characteristic point and described current dot position information, and described feature Matrix, draws the current dot position information of renewal by rarefaction regression Calculation;
According to the current dot position information of described renewal, iteration perform described based on current dot position information from described current training Sample extracts histograms of oriented gradients HOG feature and show that the current some position of renewal is believed to described by rarefaction regression Calculation The step of breath M time;Described M is positive integer;
Preserve each iteration to obtain and the regression matrix of current dot position information that forms, to generate for face registration process Training pattern.
2. the method for claim 1, it is characterised in that described based on current dot position information from described training sample Extract histograms of oriented gradients HOG feature, before generating eigenmatrix, also include:
Average shape is set as described Initial Face shape.
3. method as claimed in claim 1 or 2, it is characterised in that described draw working as of renewal by rarefaction regression Calculation Front dot position information, including:
By the x in rarefaction Regressive Solution Ax=b;Wherein A is described eigenmatrix, and described b is described human face characteristic point mark The coordinate of note and the difference of the coordinate of described current dot position information;
Described x is multiplied by described A again, obtains b ', using described b ' as the coordinate of current dot position information updated;
The regression matrix of the current dot position information that each iteration of described preservation obtains and forms, including: preserve each iteration and obtain To and the sparse regression matrix x that forms.
4. a face registration process method, it is characterised in that including:
Read the training pattern for face registration process;Wherein said training pattern is for by any one of claim 1-3 institute The training pattern stated generates the training pattern that method generates;
From target image, extract HOG feature based on current dot position information, generate eigenmatrix;Wherein, initial current point Positional information is the positional information of human face characteristic point in default Initial Face shape;
According to regression matrix in described eigenmatrix and described training pattern, calculate face characteristic shaped Offset value;
Described current dot position information is updated according to described deviant;
According to update after current dot position information, iteration perform described in extract from target image based on current dot position information HOG feature, to the most described step M time updating described current dot position information according to described deviant, obtains the current of final updated Dot position information;Described M is positive integer.
5. method as claimed in claim 4, it is characterised in that the regression matrix in described training pattern includes described M shell Sparse regression matrix x;Described according to regression matrix in described eigenmatrix and described training pattern, calculate face characteristic shape inclined Shifting value, including:
When carrying out kth iteration, the sparse regression of the K layer in the eigenmatrix generated according to kth and described training pattern Matrix x calculates face characteristic shaped Offset value;Described K is more than 0, less than or equal to the natural number of M.
6. a training pattern generating means, it is characterised in that including:
Acquisition module, for obtaining the training sample containing human face characteristic point mark;
Matrix generation module, for extracting histograms of oriented gradients HOG based on current dot position information from described training sample Feature, generates eigenmatrix;Wherein, initial current dot position information is human face characteristic point in default Initial Face shape Positional information;
Computing module, for the coordinate marked according to described human face characteristic point and the difference of the coordinate of described current dot position information Value, and described eigenmatrix, draw the current dot position information of renewal by rarefaction regression Calculation;
Iteration module, for the current dot position information according to described renewal, iteration performs described based on current dot position information From described current training sample, extract histograms of oriented gradients HOG feature draw renewal to described by rarefaction regression Calculation Step M time of current dot position information;Described M is positive integer;
Preserve module, obtain and the regression matrix of current dot position information that forms for preserving each iteration, be used for generate The training pattern of face registration process.
7. device as claimed in claim 6, it is characterised in that also include:
Module is set, for extracting direction at described matrix generation module from described training sample based on current dot position information Histogram of gradients HOG feature, before generating eigenmatrix, arranges average shape as described Initial Face shape.
Device the most as claimed in claims 6 or 7, it is characterised in that described computing module includes:
Rarefaction solves unit, for by the x in rarefaction Regressive Solution Ax=b;Wherein A is described eigenmatrix, described b The difference of the coordinate of the coordinate marked for described human face characteristic point and described current dot position information;
Updating block, for described x is multiplied by described A again, obtains b ', using described b ' as the current dot position information updated Coordinate;
Described preservation module specifically for, preserve each iteration and obtain and the sparse regression matrix x that forms.
9. a face registration process device, it is characterised in that including:
Read module, for reading the training pattern for face registration process;Wherein said training pattern is to be wanted by right The training pattern described in any one of 1-3 is asked to generate the training pattern that method generates;
Extract generation module, for extracting HOG feature from target image based on current dot position information, generate eigenmatrix; Wherein, initial current dot position information is the positional information of human face characteristic point in default Initial Face shape;
Deviant computing module, for according to regression matrix in described eigenmatrix and described training pattern, calculates face characteristic Shaped Offset value;
Information updating module, for updating described current dot position information according to described deviant;
Iteration more new module, for according to the current dot position information after updating, iteration performs described based on current some position letter Breath extracts HOG feature to described step M time updating described current dot position information according to described deviant from target image, Obtain the current dot position information of final updated;Described M is positive integer.
10. device as claimed in claim 9, it is characterised in that the regression matrix in described training pattern includes described M shell Sparse regression matrix x;Described deviant computing module specifically for, when carrying out kth iteration, according to kth generate feature The sparse regression matrix x of the K layer in matrix and described training pattern calculates face characteristic shaped Offset value;Described K is big In 0, less than or equal to the natural number of M.
CN201610798033.4A 2016-08-31 2016-08-31 Training model generation method and device, and face alignment method and device Pending CN106326876A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610798033.4A CN106326876A (en) 2016-08-31 2016-08-31 Training model generation method and device, and face alignment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610798033.4A CN106326876A (en) 2016-08-31 2016-08-31 Training model generation method and device, and face alignment method and device

Publications (1)

Publication Number Publication Date
CN106326876A true CN106326876A (en) 2017-01-11

Family

ID=57787362

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610798033.4A Pending CN106326876A (en) 2016-08-31 2016-08-31 Training model generation method and device, and face alignment method and device

Country Status (1)

Country Link
CN (1) CN106326876A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107909019A (en) * 2017-11-07 2018-04-13 重庆邮电大学 It is a kind of based on the face automatic aligning of TI SPCA and recognition methods
CN108062545A (en) * 2018-01-30 2018-05-22 北京搜狐新媒体信息技术有限公司 A kind of method and device of face alignment
CN108711175A (en) * 2018-05-16 2018-10-26 浙江大学 A kind of head pose estimation optimization method that inter-frame information is oriented to
CN109858363A (en) * 2018-12-28 2019-06-07 北京旷视科技有限公司 A kind of detection method, device, system and the storage medium of dog noseprint characteristic point

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140185924A1 (en) * 2012-12-27 2014-07-03 Microsoft Corporation Face Alignment by Explicit Shape Regression
CN104298963A (en) * 2014-09-11 2015-01-21 浙江捷尚视觉科技股份有限公司 Robust multi-pose fatigue monitoring method based on face shape regression model
CN105809123A (en) * 2016-03-04 2016-07-27 北京智慧眼科技股份有限公司 Face detecting method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140185924A1 (en) * 2012-12-27 2014-07-03 Microsoft Corporation Face Alignment by Explicit Shape Regression
CN104298963A (en) * 2014-09-11 2015-01-21 浙江捷尚视觉科技股份有限公司 Robust multi-pose fatigue monitoring method based on face shape regression model
CN105809123A (en) * 2016-03-04 2016-07-27 北京智慧眼科技股份有限公司 Face detecting method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邓健康等: "基于稀疏级联回归的快速人脸配准方法及其在移动设备上的应用", 《计算机科学》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107909019A (en) * 2017-11-07 2018-04-13 重庆邮电大学 It is a kind of based on the face automatic aligning of TI SPCA and recognition methods
CN108062545A (en) * 2018-01-30 2018-05-22 北京搜狐新媒体信息技术有限公司 A kind of method and device of face alignment
CN108062545B (en) * 2018-01-30 2020-08-28 北京搜狐新媒体信息技术有限公司 Face alignment method and device
CN108711175A (en) * 2018-05-16 2018-10-26 浙江大学 A kind of head pose estimation optimization method that inter-frame information is oriented to
CN108711175B (en) * 2018-05-16 2021-10-01 浙江大学 Head attitude estimation optimization method based on interframe information guidance
CN109858363A (en) * 2018-12-28 2019-06-07 北京旷视科技有限公司 A kind of detection method, device, system and the storage medium of dog noseprint characteristic point
CN109858363B (en) * 2018-12-28 2020-07-17 北京旷视科技有限公司 Dog nose print feature point detection method, device, system and storage medium

Similar Documents

Publication Publication Date Title
CN109934197B (en) Training method and device for face recognition model and computer readable storage medium
US20210174072A1 (en) Microexpression-based image recognition method and apparatus, and related device
CN106384094B (en) A kind of Chinese word library automatic generation method based on writing style modeling
CN105184249B (en) Method and apparatus for face image processing
CN108288051B (en) Pedestrian re-recognition model training method and device, electronic equipment and storage medium
KR101525133B1 (en) Image Processing Device, Information Generation Device, Image Processing Method, Information Generation Method, Control Program, and Recording Medium
CN106326876A (en) Training model generation method and device, and face alignment method and device
CN102968643B (en) A kind of multi-modal emotion identification method based on the theory of Lie groups
CN108416266A (en) A kind of video behavior method for quickly identifying extracting moving target using light stream
CN106326857A (en) Gender identification method and gender identification device based on face image
CN113870401B (en) Expression generation method, device, equipment, medium and computer program product
CN114723888B (en) Three-dimensional hair model generation method, device, equipment, storage medium and product
WO2021223738A1 (en) Method, apparatus and device for updating model parameter, and storage medium
CN111209867A (en) Expression recognition method and device
CN114549710A (en) Virtual image generation method and device, electronic equipment and storage medium
CN112241667A (en) Image detection method, device, equipment and storage medium
CN112489129A (en) Pose recognition model training method and device, pose recognition method and terminal equipment
CN114187624A (en) Image generation method, image generation device, electronic equipment and storage medium
CN111282281B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN112699857A (en) Living body verification method and device based on human face posture and electronic equipment
CN115393872A (en) Method, device and equipment for training text classification model and storage medium
CN110659702A (en) Calligraphy copybook evaluation system and method based on generative confrontation network model
CN115035566B (en) Expression recognition method, apparatus, computer device and computer readable storage medium
CN105512664A (en) Image recognition method and device
KR101787255B1 (en) Facial expression recognition method based on ratio of facial ladnmark's distance

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170111

RJ01 Rejection of invention patent application after publication