The content of the invention
The invention provides a kind of face character recognition methods and device, existed with solving existing face character detection technique
The technical problem of defect present on identification types and recognition accuracy.
The technical solution adopted by the present invention is as follows:
There is provided a kind of face character recognition methods, including step according to an aspect of the present invention:
The face character of facial image using depth residual error network to having collected is trained, and obtains carrying a variety of faces
Many net with attributes training patterns of attributive character;
Come to carry out many attribute forecasts to the face character of images to be recognized with obtained many net with attributes training patterns, with
Recognize a variety of face characters in images to be recognized.
Further, the face character of the facial image using depth residual error network to having collected is trained, and obtains band
The step of having many net with attributes training patterns of a variety of face character features includes:
The facial image collected is inputted into depth residual error network, face is extracted using the network structure of depth residual error network
Face character feature in image, to export face feature vector in depth residual error network;
Depth residual error network is expanded, the face feature vector concentration training that depth residual error network is exported belongs to more into
Property network model.
Further, depth residual error network is expanded, the face feature vector that depth residual error network is exported is concentrated
The step of being trained to many net with attributes models includes:
The full articulamentum of deep neural network is added behind the network structure of depth residual error network, makes full articulamentum and depth
The face feature vector correspondence for spending the output of residual error network is connected;
The face feature vector exported in depth residual error network correspondence is input on full articulamentum, obtains setting dimension
Many attributive character of face characteristic training image.
Further, the face feature vector exported in depth residual error network correspondence is input on full articulamentum, obtained
Include after the step of many attributive character for the face characteristic training image for setting dimension:
The loss function layer of deep neural network is added behind the network structure of depth residual error network, makes loss function layer
It is corresponding with the output layer in depth residual error network to be connected, obtain the training dataset mark in many attribute face characteristic training images
Label, calculate loss during many attribute face characteristic training image propagated forwards in depth residual error network.
Further, to carry out the face character of images to be recognized belong to obtained many net with attributes training patterns more
Property prediction, included with recognizing the step of a variety of face characters in images to be recognized:
Images to be recognized is inputted into many net with attributes training patterns, many attribute face characteristics in images to be recognized are extracted;
Many attribute face characteristics of extraction are inputted into corresponding full articulamentum respectively, the facial image for obtaining setting dimension is more
Attribute forecast feature;
The output result of full articulamentum is sent into softmax layers, the most probable value of many attribute face characteristics is calculated, with
Recognize a variety of face characters in images to be recognized.
According to another aspect of the present invention, a kind of face character identifying device is also provided, including:
Training module, the face character for the facial image using depth residual error network to having collected is trained, and is obtained
To many net with attributes training patterns with a variety of face character features;
Prediction module, for carrying out the face character progress to images to be recognized with obtained many net with attributes training patterns
Many attribute forecasts, to recognize a variety of face characters in images to be recognized.
Further, training module includes the first extraction unit and expands unit,
First extraction unit, for the facial image collected to be inputted into depth residual error network, utilizes depth residual error network
Network structure extract facial image in face character feature, to export face feature vector in depth residual error network;
Unit is expanded, for being expanded to depth residual error network, the face feature vector that depth residual error network is exported
Concentration training is into many net with attributes models.
Further, expanding unit includes connection subelement and training image acquisition subelement,
Subelement is connected, the full connection for adding deep neural network behind the network structure of depth residual error network
Layer, makes the connection corresponding with the face feature vector that depth residual error network is exported of full articulamentum;
Training image obtains subelement, complete for the face feature vector exported in depth residual error network correspondence to be input to
On articulamentum, obtain setting many attributive character of the face characteristic training image of dimension.
Further, expanding unit also includes costing bio disturbance subelement,
Costing bio disturbance subelement, the loss for adding deep neural network behind the network structure of depth residual error network
Function layer, makes loss function layer is corresponding with the output layer in depth residual error network to be connected, and obtains many attribute face characteristic training figures
Training dataset label as in, calculates damage during many attribute face characteristic training image propagated forwards in depth residual error network
Lose.
Further, prediction module includes the second extraction unit, acquiring unit and computing unit,
Second extraction unit, for images to be recognized to be inputted into many net with attributes training patterns, is extracted in images to be recognized
Many attribute face characteristics;
Acquiring unit, for many attribute face characteristics of extraction to be inputted into corresponding full articulamentum respectively, obtains setting dimension
The many attribute forecast features of facial image of degree;
Computing unit, for the output result of full articulamentum to be sent into softmax layers, calculates many attribute face characteristics
Most probable value, to recognize a variety of face characters in images to be recognized.
The invention has the advantages that:
Face character recognition methods and device that the present invention is provided, by using depth residual error network to the face collected
The face character of image is trained, and obtains many net with attributes training patterns with a variety of face character features;With obtaining
Many net with attributes training patterns to carry out many attribute forecasts to the face character of images to be recognized, to recognize in images to be recognized
A variety of face characters.Face character recognition methods and device that the present invention is provided, using a depth residual error network to having received
The face character of the facial image of collection is trained, and trains obtained many net with attributes training patterns to treat knowledge according to particular task
The face character of other image carries out many attribute forecasts, because the face that many net with attributes models can extract more high rule complexity is special
Levy, so as to quick and precisely recognize a variety of face characters in facial image.
In addition to objects, features and advantages described above, the present invention also has other objects, features and advantages.
Below with reference to figure, the present invention is further detailed explanation.
Embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase
Mutually combination.Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Reference picture 1, the preferred embodiments of the present invention provide a kind of face character recognition methods, including step:
Step S100, the face character of facial image using depth residual error network to having collected are trained, and obtain band
There are many net with attributes training patterns of a variety of face character features.
Because different face characters has correlation, the people collected by a depth residual error network training each other
All face characters of face image, obtain many net with attributes training patterns with a variety of face character features.In machine learning
In, training is to train the model of a machine learning with the facial image with label.Because depth residual error network has more
The deep network number of plies, good effect is all achieved for different task training.Wherein, face character include the age, sex,
Two or more in glasses, head pose, beard, eye state and smile degree etc..
Step S200, the face character progress come with obtained many net with attributes training patterns to images to be recognized belong to more
Property prediction, to recognize a variety of face characters in images to be recognized.
Images to be recognized is input in many net with attributes training patterns that training is obtained, mould is trained with many nets with attributes
Type to carry out many attribute forecasts to the face character of images to be recognized, to recognize a variety of face characters in images to be recognized, and
Export recognition result.Prediction refers to do pre- to the images to be recognized of Unknown Label with many net with attributes training patterns that training is obtained
Survey, predict the Unknown Label of images to be recognized.In the present embodiment, for sex, glasses, smiling this is relatively easy to two points
Class problem, the probability for directly drawing the attribute yes/no with Softmax layers, using most probable value as the attribute prediction.It is right
In the age, Softmax layers of output 80 dimension age prediction probability distribution corresponding with the age is asked with probability distribution with rated age base
Similitude, the weight obtained with similitude is to rated age base weighted sum, and maximum correspondence dimension is the prediction of age attribute.
The face character recognition methods that the present embodiment is provided, using depth residual error network to the people for the facial image collected
Face attribute is trained, and obtains many net with attributes training patterns with a variety of face character features;With obtained many attributes
Network training model to carry out many attribute forecasts to the face character of images to be recognized, to recognize a variety of people in images to be recognized
Face attribute.The face character recognition methods that the present embodiment is provided, using a depth residual error network to the facial image collected
Face character be trained, obtained many net with attributes training patterns are trained to the face of images to be recognized according to particular task
Attribute carries out many attribute forecasts, because many net with attributes models can extract the face characteristic of more high rule complexity, so as to quick
Accurately identify a variety of face characters in facial image.
Preferably, as shown in Fig. 2 the face character recognition methods that the present embodiment is provided, step S100 includes:
Step S110, by the facial image collected input depth residual error network, utilize the network knot of depth residual error network
Structure extracts the face character feature in facial image, to export face feature vector in depth residual error network.
Depth residual error network is the deep learning network structure proposed in 2015 by Microsoft Asia laboratory, structure tool
There is the deeper network number of plies, win the championship in multinomial image related contests.In the present embodiment, the network of depth residual error network is utilized
Face character feature in structure extraction facial image, to export face feature vector, face character in depth residual error network
Including two or more in age, sex, glasses, head pose, beard, eye state and smile degree etc..
Step S120, depth residual error network is expanded, the face feature vector that depth residual error network is exported is concentrated
It is trained to many net with attributes models.
Using the network model trained on ImageNet data sets announced on the net, to the people in the facial image of extraction
Face attributive character carries out retraining to obtain many net with attributes models.Former depth residual error network is output as 1000 dimensional vectors, to figure
Classify as doing, can classify 1000 type objects, correspondence 1000 dimensions of output, per dimension, correspondence is identified as certain classification object
Probability.In the present embodiment, in order to train many nets with attributes, depth residual error network is expanded, in depth residual error network
The loss function layer corresponding with each attribute is added behind network structure, makes each loss function layer and depth residual error network
Output layer be connected.As shown in figure 3,1000 dimensional feature vectors exported for residual error network connect different full articulamentums respectively
To recognize different task.
The face character recognition methods that the present embodiment is provided, depth residual error network, profit are inputted by the facial image collected
The face character feature in facial image is extracted with the network structure of depth residual error network, to export people in depth residual error network
Face characteristic vector;Depth residual error network is expanded, by depth residual error network export face feature vector concentration training into
Many net with attributes models.The face character recognition methods that the present embodiment is provided, utilizes a depth residual error real-time performance face figure
As multiattribute identification, according to particular task train come many net with attributes model extractions go out more high rule complexity face it is special
Levy, realize the fast and accurately identification of face character.
Preferably, as shown in figure 4, the face character recognition methods that the present embodiment is provided, step S120 includes:
Step S121, the full articulamentum for adding behind the network structure of depth residual error network deep neural network, make complete
Articulamentum connection corresponding with the face feature vector that depth residual error network is exported.
See Fig. 3, because face feature has correlation, by being added not behind the network structure of depth residual error network
The full articulamentum of same deep neural network, the 1000 many attribute feature vectors of dimension for making full articulamentum be exported with depth residual error network
Correspondence connection.So that the identification of different attribute can share same neutral net, while realizing multiple attributes training with
Identification, accelerates training and predetermined speed to greatest extent.
Step S122, by the face feature vector exported in depth residual error network correspondence be input on full articulamentum, obtain
Set many attributive character of the face characteristic training image of dimension.
Referring to Fig. 3, different full articulamentums are connected respectively for 1000 dimensional feature vectors that depth residual error network is exported
Recognize different task.Wherein, for age attribute, in corresponding full articulamentum fc1The face characteristic training figure of the upper dimension of output 80
The age attribute of picture.For gender attribute, in corresponding full articulamentum fc2The property of the face characteristic training image of the upper dimension of output 2
Other attributive character.For glasses attribute, in corresponding full articulamentum fc3The glasses of the face characteristic training image of the upper dimension of output 2
Attributive character.
Step S123, behind the network structure of depth residual error network add deep neural network loss function layer, make
Loss function layer is corresponding with the output layer in depth residual error network to be connected, and obtains the training in many attribute face characteristic training images
Data set label, calculates loss during many attribute face characteristic training image propagated forwards in depth residual error network.
For age attribute, do not use the sorting technique of conventional Age Variations to train, but by images to be recognized
Age label regards the form of Gaussian function as, and many attribute face characteristic training figures in depth residual error network are calculated using cross entropy
Loss during as propagated forward.For the training image that the age is age, the age label of many attribute face characteristic training images
For:
Wherein, οageFor age correspondence standard deviation, i values represent that prediction the range of age is 1 years old to 80 years old from 1 to 80.It is right
In all ages and classes, ο is setageHave any different, when outside the age threshold scope of setting, for example smaller age (<10 years old) and it is larger
Age (>70 years old) smaller ο is setage, the problem of so as to avoid the edge age from recognizing to intermediate ages field offset.
By full articulamentum fc180 dimension age characteristics in many attribute face characteristic training images of output pass through softmax
Layer, exports the probability that many attribute face characteristic training images belong to each age, and softmax computings are as follows:
Wherein, x is input vector, and p is output probability.Intersection entropy function can be measured preferably between two probability distribution
Distance, therefore calculate output age Probability p=[p1,p2,…,p80] and label q=[q1,q2,…,q80] between loss make
Cross entropy cost function, for training sample label, is shown below:
Wherein, N is training image number, and i is correspondence dimension.
For in addition to age attribute other attributes are using Softmax loss functions calculation cost and optimize,
Softmax cost functions are as follows:
Wherein, pjFor softmax computing probable values, j is many real class numbers of attribute face characteristic training image.
By above computing, the corresponding cost of each attribute can be calculated.And network is updated by back-propagation algorithm
Parameter.
The face character recognition methods that the present embodiment is provided, passes through the face feature vector that will be exported in depth residual error network
Correspondence is input on full articulamentum, obtains setting many attributive character of the face characteristic training image of dimension;In depth residual error net
Behind the network structure of network add deep neural network loss function layer, make loss function layer with it is defeated in depth residual error network
Go out layer correspondence to be connected, obtain the training dataset label in many attribute face characteristic training images, calculate depth residual error network
In many attribute face characteristic training image propagated forwards when loss.The face character recognition methods that the present embodiment is provided, passes through
The full articulamentum of the different neutral net of addition, so that same neutral net is shared in the identification of different attribute, is realized multiple
Training and identification, accelerate training and predetermined speed to greatest extent while attribute;For the age that difficulty in all properties is larger
Identification problem, the label list of institute's has age image is shown with the form of the Gaussian function of variance difference, using cross entropy conduct
Cost function is trained, and to draw rational age prediction scheme, the program causes the age to know by a kind of method of soft distribution
Robustness that Ju You be not stronger.
Preferably, as shown in figure 5, the face character recognition methods that the present embodiment is provided, step S200 includes:
Step S210, many attributes inputted images to be recognized in many net with attributes training patterns, extraction images to be recognized
Face characteristic.
The overall plan of many attribute forecasts of face is as shown in Figure 6.Images to be recognized is inputted into many net with attributes training patterns,
By many net with attributes training patterns extract images to be recognized in many attribute face characteristics, network export 1000 dimensional features to
Amount.
Step S220, many attribute face characteristics of extraction are inputted into corresponding full articulamentum respectively, obtain setting dimension
The many attribute forecast features of facial image.
For age attribute, the 1000 dimensional feature vectors input that many net with attributes training pattern networks are exported is corresponding complete
Articulamentum fc1, in full articulamentum fc1Facial image many attribute forecast features of the middle output with 80 dimension age characteristics.For property
Other attributes such as, whether do not wear glasses, 1000 dimensional feature vectors are inputted into corresponding full articulamentum fci, in full articulamentum fciIn
Facial image many attribute forecast features of the output with 2 dimensional features.
Step S230, softmax layers of the output result feeding by full articulamentum, calculate the maximum of many attribute face characteristics
Probable value, to recognize a variety of face characters in images to be recognized.
For age attribute, by full articulamentum fc1Output result feeding is corresponding Softmax layers, initial to calculate
The result of each age prediction probability, output prediction age.For sex, other attributes such as whether wear glasses, by corresponding
Softmax layers calculate the probability whether 2 dimensional feature attributes are, and take maximum probability correspondence situation to judge 2 dimensional feature attribute feelings
Condition.
In the present embodiment, a variety of of images to be recognized are predicted by many net with attributes training patterns after network training terminates
Face character.It is available with reference to Fig. 6 for other attributes in addition to the age.For age attribute, one group of standard feature is constructed
Base.Because network output characteristic result there may be error, but analog year age map as output characteristic be similar, pass through aspect ratio
Age label weighted sum is realized that more accurately the age recognizes by the method to finding analog year age map picture and utilizing soft distribution.
N images are selected as rated age image for each age, the generation dimension 80 dimension age corresponding with the age
Feature f (i.e. fc in Fig. 61By the result after Softmax computings) it is used as rated age feature base.For every images to be recognized
It is same to extract 80 dimension age characteristics f, and calculate the weight ε between 80 dimension age characteristics f and rated age feature basei:
Wherein, f is 80 dimension age characteristics,It is characterized the i-th width characteristics of image in base.
By εiThe contribution margin that the label label of the corresponding standards of image i is predicted as image i for the age is multiplied by, by year
80 dimensional vectors obtained by all image contribution margins correspondence dimensions are added in age feature base, then finally to predict the outcome, 80 tie up to
Maximum correspondence dimension is the prediction age in amount.
The face character recognition methods that the present embodiment is provided, inputs many net with attributes training patterns by images to be recognized, carries
Take many attribute face characteristics in images to be recognized;Many attribute face characteristics of extraction are inputted into corresponding full articulamentum respectively,
Obtain setting many attribute forecast features of facial image of dimension;The output result of full articulamentum is sent into softmax layers, calculated
The most probable value of many attribute face characteristics, to recognize a variety of face characters in images to be recognized.The people that the present embodiment is provided
Face attribute recognition approach, because face feature all has correlation, by adding, the full articulamentum of different neutral nets, is not belonged to together
Property identification can share same neutral net, training is accelerated in training and identification while realizing multiple attributes to greatest extent
With predetermined speed;Predicted the outcome during prediction using the standard label weighted sum in age characteristics base to select the age.For instruction
The many net with attributes training patterns perfected, generate the age characteristics of dimension corresponding with all age group, and the correspondence of generation is tieed up
The age characteristics of degree is used as age characteristics base.Age characteristics vector is extracted in images to be recognized, and by the age characteristics of extraction
It is vectorial to calculate distance with all age characteristics bases, the images to be recognized corresponding to age characteristics base is weighted with the exponential function of distance
Standard label, by after all weightings standard label be added after sum, maximum correspondence dimension then be age predicted value.The party
Case causes age identification to have stronger robustness by a kind of method of soft distribution.
Preferably, as shown in fig. 7, the present embodiment also provides a kind of face character identifying device, including:Training module 10,
Face character for the facial image using depth residual error network to having collected is trained, and obtains carrying a variety of face characters
Many net with attributes training patterns of feature;Prediction module 20, for treating knowledge with obtained many net with attributes training patterns
The face character of other image carries out many attribute forecasts, to recognize a variety of face characters in images to be recognized.
Because different face characters has correlation each other, the facial image collected is trained by training module 10
All face characters, obtain many net with attributes training patterns with a variety of face character features.In machine learning, training
It is to train the model of a machine learning with the facial image with label.Because depth residual error network has deeper network
The number of plies, good effect is all achieved for different task training.Wherein, face character includes age, sex, glasses, head
Two or more in portion's posture, beard, eye state and smile degree etc..
Images to be recognized is input in many net with attributes training patterns that training is obtained, prediction module 20 uses many attributes
Network training model to carry out many attribute forecasts to the face character of images to be recognized, to recognize a variety of people in images to be recognized
Face attribute, and export recognition result.Prediction refer to train obtained many net with attributes training patterns to Unknown Label wait know
Other image gives a forecast, and predicts the Unknown Label of images to be recognized.In the present embodiment, it is this more for sex, glasses, smile
Easy two classification problem, the probability for directly drawing the attribute yes/no with Softmax layers, assign most probable value as the attribute
Prediction.For the age, Softmax layers of output 80 dimension age prediction probability distribution corresponding with the age, with probability distribution and mark
Quasi- age base seeks similitude, and the weight obtained with similitude is to rated age base weighted sum, and maximum correspondence dimension is the age
The prediction of attribute.
The face character identifying device that the present embodiment is provided, by using depth residual error network to the facial image collected
Face character be trained, obtain many net with attributes training patterns with a variety of face character features;It is many with what is obtained
Net with attributes training pattern to carry out many attribute forecasts to the face character of images to be recognized, many in images to be recognized to recognize
Plant face character.The face character identifying device that the present embodiment is provided, by training obtained many net with attributes training patterns pair
The face character of images to be recognized carries out many attribute forecasts, can quick and precisely recognize a variety of face characters in facial image.Profit
The face character of facial image with depth residual error network to having collected is trained, and is obtained with a variety of face character features
Many net with attributes training patterns;To carry out the face character of images to be recognized with obtained many net with attributes training patterns many
Attribute forecast, to recognize a variety of face characters in images to be recognized.The face character recognition methods that the present embodiment is provided, is utilized
The face character of facial image of one depth residual error network to having collected is trained, according to particular task train obtain it is many
Net with attributes training pattern carries out many attribute forecasts to the face character of images to be recognized, because many net with attributes models can be extracted
The face characteristic of more high rule complexity, so as to quick and precisely recognize a variety of face characters in facial image.
Preferably, the face character identifying device that the present embodiment is provided, training module 10 includes the He of the first extraction unit 11
Unit 12 is expanded, the first extraction unit 11, for the facial image collected to be inputted into depth residual error network, utilizes depth residual error
The network structure of network extracts the face character feature in facial image, with exported in depth residual error network face characteristic to
Amount;Unit 12 is expanded, for being expanded to depth residual error network, the face feature vector that depth residual error network is exported is concentrated
It is trained to many net with attributes models.
Depth residual error network is the deep learning network structure proposed in 2015 by Microsoft Asia laboratory, structure tool
There is the deeper network number of plies, win the championship in multinomial image related contests.In the present embodiment, extracted using the first extraction unit 11
Face character feature in facial image, to export face feature vector in depth residual error network, face character include the age,
Two or more in sex, glasses, head pose, beard, eye state and smile degree etc..
Using the network model trained on ImageNet data sets announced on the net, to the people in the facial image of extraction
Face attributive character carries out retraining to obtain network model.Former depth residual error network is output as 1000 dimensional feature vectors, to image
Do and classify, can classify 1000 type objects, correspondence 1000 dimensions of output, per dimension, correspondence is identified as the general of certain classification object
Rate.In the present embodiment, in order to train many nets with attributes, expand unit 12 and expanded in depth residual error network, it is residual in depth
The loss function layer of each attribute is added behind the network structure of poor network, makes each loss function layer and former depth residual error net
The output layer of network is connected.As shown in figure 3,1000 dimensional feature vectors exported for residual error network connect different full connections respectively
Layer recognizes different task.
The face character identifying device that the present embodiment is provided, depth residual error network, profit are inputted by the facial image collected
The face character feature in facial image is extracted with the network structure of depth residual error network, to export people in depth residual error network
Face characteristic vector;Depth residual error network is expanded, by depth residual error network export face feature vector concentration training into
Many net with attributes models.The face character identifying device that the present embodiment is provided, utilizes a depth residual error real-time performance face figure
As multiattribute identification, according to particular task train come many net with attributes model extractions go out the feature of more high rule complexity,
Realize the fast and accurately identification of face character.
Preferably, the face character identifying device that the present embodiment is provided, expanding unit 12 includes connection subelement 121, instruction
Practice image and obtain subelement 122 and costing bio disturbance subelement 123, subelement 121 is connected, for the network in depth residual error network
The full articulamentum of deep neural network, the face feature vector for making full articulamentum be exported with depth residual error network are added behind structure
Correspondence connection.Training image obtains subelement 122, and the face feature vector correspondence for will be exported in depth residual error network is inputted
Onto full articulamentum, obtain setting many attributive character of the face characteristic training image of dimension.Costing bio disturbance subelement 123, is used
The loss function layer of deep neural network is added behind the network structure in depth residual error network, makes loss function layer and depth
Output layer correspondence in residual error network is connected, and obtains the training dataset label in many attribute face characteristic training images, calculates
Go out loss during many attribute face characteristic training image propagated forwards in depth residual error network.
See Fig. 3, because face feature has correlation, by being added not behind the network structure of depth residual error network
The full articulamentum of same deep neural network, the 1000 many attribute feature vectors of dimension for making full articulamentum be exported with depth residual error network
Correspondence connection.So that the identification of different attribute can share same neutral net, while realizing multiple attributes training with
Identification, accelerates training and predetermined speed to greatest extent.
Referring to Fig. 3, different full articulamentums are connected respectively for 1000 dimensional feature vectors that depth residual error network is exported
Recognize different task.Wherein, for age attribute, in corresponding full articulamentum fc1The face characteristic training figure of the upper dimension of output 80
The age attribute of picture.For gender attribute, in corresponding full articulamentum fc2The property of the face characteristic training image of the upper dimension of output 2
Other attributive character.For glasses attribute, in corresponding full articulamentum fc3The glasses of the face characteristic training image of the upper dimension of output 2
Attributive character.
For age attribute, do not use the sorting technique of conventional Age Variations to train, but pass through costing bio disturbance
Unit 123 regards the age label of images to be recognized as the form of Gaussian function, and depth residual error network is calculated using cross entropy
In many attribute face characteristic training image propagated forwards when loss.For the training image that the age is age, many attribute faces are special
The age label for levying training image is:
Wherein, οageFor age correspondence standard deviation, i values represent that prediction the range of age is 1 years old to 80 years old from 1 to 80.It is right
In all ages and classes, ο is setageHave any different, when outside the age threshold scope of setting, for example smaller age (<10 years old) and it is larger
Age (>70 years old) smaller ο is setage, the problem of so as to avoid the edge age from recognizing to intermediate ages field offset.
By full articulamentum fc180 dimension age characteristics in many attribute face characteristic training images of output pass through softmax
Layer, exports the probability that many attribute face characteristic training images belong to each age, and softmax computings are as follows:
Wherein, x is input vector, and p is output probability.Intersection entropy function can be measured preferably between two probability distribution
Distance, therefore calculate output age Probability p=[p1,p2,…,p80] and label q=[q1,q2,…,q80] between loss make
Cross entropy cost function, for training sample label, is shown below:
Wherein, N is training image number, and i is correspondence dimension.
For in addition to age attribute other attributes are using Softmax loss functions calculation cost and optimize,
Softmax cost functions are as follows:
Wherein, pjFor softmax computing probable values, j is many real class numbers of attribute face characteristic training image.
By above computing, the corresponding cost of each attribute can be calculated.And network is updated by back-propagation algorithm
Parameter.
The face character identifying device that the present embodiment is provided, passes through the face feature vector that will be exported in depth residual error network
Correspondence is input on full articulamentum, obtains setting many attributive character of the face characteristic training image of dimension;In depth residual error net
Behind the network structure of network add deep neural network loss function layer, make loss function layer with it is defeated in depth residual error network
Go out layer correspondence to be connected, obtain the training dataset label in many attribute face characteristic training images, calculate depth residual error network
In many attribute face characteristic training image propagated forwards when loss.The face character recognition methods device that the present embodiment is provided,
The full articulamentum of different neutral nets by adding, so that same neutral net is shared in the identification of different attribute, is realized
Training and identification, accelerate training and predetermined speed to greatest extent while multiple attributes;It is larger for difficulty in all properties
Age recognizes problem, the label list of institute's has age image is shown with to the form of the Gaussian function of variance difference, using cross entropy
Trained as cost function, to draw rational age prediction scheme, the program causes year by a kind of method of soft distribution
Age identification has stronger robustness.
Preferably, the face character identifying device that the present embodiment is provided, prediction module 20 includes the second extraction unit 21, obtained
Unit 22 and computing unit 23 are taken, the second extraction unit 21, for images to be recognized to be inputted into many net with attributes training patterns, is carried
Take many attribute face characteristics in images to be recognized;Acquiring unit 22, for many attribute face characteristics of extraction to be inputted respectively
Corresponding full articulamentum, obtains setting many attribute forecast features of facial image of dimension;Computing unit 23, for by full articulamentum
Output result send into softmax layers, the most probable value of many attribute face characteristics is calculated, to recognize in images to be recognized
A variety of face characters.
The overall plan of many attribute forecasts of face is as shown in Figure 6.Images to be recognized is inputted into many net with attributes training patterns,
Second extraction unit 21 extracts many attribute face characteristics in images to be recognized, network output by many net with attributes training patterns
1000 dimensional feature vectors.
For age attribute, 1000 dimensional feature vectors that acquiring unit 22 exports many net with attributes training pattern networks are defeated
Enter corresponding full articulamentum fc1, in full articulamentum fc1Facial image many attribute forecasts of the middle output with 80 dimension age characteristics are special
Levy.For sex, other attributes such as whether wear glasses, 1000 dimensional feature vectors are inputted corresponding full articulamentum by acquiring unit 22
fci, in full articulamentum fciMiddle facial image many attribute forecast features of the output with 2 dimensional features.
For age attribute, computing unit 23 is by full articulamentum fc1Output result feeding is corresponding Softmax layers, in terms of
Calculate the result of initial each age prediction probability, output prediction age.For sex, other attributes such as whether wear glasses, meter
Calculate unit 23 and calculate the probability whether 2 dimensional feature attributes are by corresponding Softmax layers, and take maximum probability correspondence situation
Judge 2 dimensional feature attribute situations.
In the present embodiment, a variety of of images to be recognized are predicted by many net with attributes training patterns after network training terminates
Face character.It is available with reference to Fig. 6 for other attributes in addition to the age.For age attribute, one group of standard feature is constructed
Base.Because network output characteristic result there may be error, but analog year age map as output characteristic be similar, pass through aspect ratio
Age label weighted sum is realized that more accurately the age recognizes by the method to finding analog year age map picture and utilizing soft distribution.
N images are selected as rated age image for each age, the generation dimension 80 dimension age corresponding with the age
Feature f (i.e. fc in Fig. 61By the result after Softmax computings) it is used as rated age feature base.For every images to be recognized
It is same to extract 80 dimension age characteristics f, and calculate the weight ε between 80 dimension age characteristics f and rated age feature basei:
Wherein, f is 80 dimension age characteristics,It is characterized the i-th width characteristics of image in base.
By εiThe contribution margin that the label label of the corresponding standards of image i is predicted as image i for the age is multiplied by, by year
80 dimensional vectors obtained by all image contribution margins correspondence dimensions are added in age feature base, then finally to predict the outcome, 80 tie up to
Maximum correspondence dimension is the prediction age in amount.
The face character identifying device that the present embodiment is provided, inputs many net with attributes training patterns by images to be recognized, carries
Take many attribute face characteristics in images to be recognized;Many attribute face characteristics of extraction are inputted into corresponding full articulamentum respectively,
Obtain setting many attribute forecast features of facial image of dimension;The output result of full articulamentum is sent into softmax layers, calculated
The most probable value of many attribute face characteristics, to recognize a variety of face characters in images to be recognized.The people that the present embodiment is provided
Face property recognition means, because face feature all has correlation, by adding, the full articulamentum of different neutral nets, is not belonged to together
Property identification can share same neutral net, training is accelerated in training and identification while realizing multiple attributes to greatest extent
With predetermined speed;Predicted the outcome during prediction using the standard label weighted sum in age characteristics base to select the age.For instruction
The many net with attributes training patterns perfected, generate the age characteristics of dimension corresponding with all age group, and the correspondence of generation is tieed up
The age characteristics of degree is used as age characteristics base.Age characteristics vector is extracted in images to be recognized, and by the age characteristics of extraction
It is vectorial to calculate distance with all age characteristics bases, the images to be recognized corresponding to age characteristics base is weighted with the exponential function of distance
Standard label, by after all weightings standard label be added after sum, maximum correspondence dimension then be age predicted value.The party
Case causes age identification to have stronger robustness by a kind of method of soft distribution.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent substitution, improvement etc., should be included in the scope of the protection.