CN109344759A - A kind of relatives' recognition methods based on angle loss neural network - Google Patents

A kind of relatives' recognition methods based on angle loss neural network Download PDF

Info

Publication number
CN109344759A
CN109344759A CN201811118748.6A CN201811118748A CN109344759A CN 109344759 A CN109344759 A CN 109344759A CN 201811118748 A CN201811118748 A CN 201811118748A CN 109344759 A CN109344759 A CN 109344759A
Authority
CN
China
Prior art keywords
facial image
label
neural network
data
sample
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
CN201811118748.6A
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.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
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 Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Publication of CN109344759A publication Critical patent/CN109344759A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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

Abstract

The present invention relates to a kind of relatives' recognition methods based on angle loss neural network, belong to field of image processing.Include the following steps: Step 1: to data concentrate facial image pre-process, obtain pretreated facial image;Step 2: building facial image positive sample to and facial image negative sample pair;Step 3: generating corresponding positive sample to label and negative sample to label;Step 4: generating training set and test set;Step 5: the training set and test set that step 4 generates are spliced;Step 7: training data is inputted to neural network is iterated training in batches, trained neural network parameter is saved, trained neural network is exported;Step 8: the trained neural network of test data input step seven that step 5 has been spliced is tested.The method carries out driving inquiry learning to feature using the mode of learning of end-to-end task based access control, significantly improves relatives' recognition accuracy.

Description

A kind of relatives' recognition methods based on angle loss neural network
Technical field
The present invention relates to a kind of relatives' recognition methods based on angle loss neural network, belong to field of image processing.
Background technique
Kinship identifies an important branch as field of image processing, main two studied based on face picture Whether with the kinship on specific gene genetic between individual, with very extensive social theory's research significance and dive Business application scene.Four kinds of kinships most often studying include: father and son, father and daughter, mothers and sons and mother and daughter in relatives' identification, Due to a large amount of successions of gene, this few class kinship type is also the connection with biological characteristic most got close in human relation Bridge.In recent years, with the development of development of Mobile Internet technology and it is universal, people more and more gladly in by network in various social activities Share the animation of oneself on media and each website, and electronic pictures, video as a kind of intuitive expression way by The favor of more and more users just has thousands of mass picture circulations on daily network, how effectively to organize to utilize, Potential information and relationship in mining analysis picture are just at the most important thing in image procossing research field.
Existing model method can be roughly divided into two major classes: relatives' identification model based on feature and based on study Relatives' identification model.Relatives' recognizer based on feature is intended to design a general low layer craft character representation to have The feature called cousin with can be used effectively, and common feature includes local feature and global characteristics.Based on study Relatives' recognition methods, which mainly passes through, finds a suitable semantic conversion space so as in the subspace that this is mapped, effectively Increase the separability having between kinship facial image pair.Typical representative model has metric learning, transfer learning, multicore Study, the study based on figure, study neural network based etc..
An intractable challenge factor for influencing relatives' recognition performance is two individual face spies of not kinship Sign is very alike, and the similitude between the face-image between two relatives with genetic connection is very low.In order to effective Solve this problem, at present relatives' recognizer common practice of mainstream be the hand-designed extracted feature description and Design classifier carries out that a step is added between discriminant classification, refuses metric learning by neighbour and carries out to the character representation extracted Linear Mapping into theorem in Euclid space, it is constrained guarantee class inherited be greater than class in spacing, later again to the feature after mapping into Row classification.Metric learning alleviates this factor for influencing relatives' recognition performance, but existing measurement in certain degree The method of study is intended to one simple mahalanobis distance of study to guarantee to maximize between class distance, minimizes difference in class, this Sample cannot capture the regularity of distribution that face is located on non-linear basin.In order to solve this problem, it is proposed that one is based on angle Relatives' identification model of degree loss neural network trains a neural network to go to learn a series of non-linear conversion of levels, will Facial image to project in potential suprasphere feature space guarantee positive sample to the distance between it is reduced, negative sample is to it Between distance be amplified so that the feature after being projected has more identification.
Summary of the invention
The purpose of the present invention is what is lost using the advantage of end-to-end study, the excellent properties of neural network and angle to have Relatives are influenced under the conditions of learning model solution of the effect property foundation effectively based on end-to-end angle loss neural network is unrestricted to know The factor and challenge of other accuracy rate propose a kind of relatives' recognition methods based on angle loss neural network.
Relatives identify that problem is typical two classification problem, differentiate that the two is based on given two individual facial images It is no that there is determining kinship;
The principle that the present invention carries out relatives' identification in neural network is: can ensure that nerve net by the constraint that angle is lost Network learns angularity discriminant information, and feature vector is classified as the smallest class of the angle between parameter vector, from geometrically It sees, angle loss is considered as the constraint in the discriminate in suprasphere basin, conforms exactly to face and is located on non-linearity manifold domain Prior distribution.
The purpose of the present invention is what is be achieved through the following technical solutions:
Step 1: the facial image concentrated to data pre-processes, pretreated facial image is obtained;
Wherein, data set includes X facial image, and X is even number;Pretreated facial image quantity is also X;Data Concentrate two facial images in order that there is kinship, specifically: the corresponding image of even number serial number is wait know in data set Other image, the corresponding image of odd indexed are one of remote kinsman image or women relatives' image;
Wherein, the images to be recognized of even number serial number is to be judged whether there is parent with corresponding odd indexed image The image of category relationship;
Facial image is RGB image, i.e. the facial image of triple channel, and the triple channel respectively corresponds the channel R, the channel G And channel B;
Wherein, pretreatment includes alignment, cutting and normalization operation;
Step 1 includes following sub-step again:
Step 1.1 is aligned using the facial image that the face alignment method based on structuring SVM concentrates data, is obtained Facial image after to alignment;
Facial image after step 1.1 is aligned by step 1.2 is cut, the facial image after being cut;
Wherein, the quantity of the facial image after alignment is X;The quantity of facial image after cutting is X, each image Dimension be 64*64;
The facial image that step 1.3 obtains step 1.2 is normalized, and obtains pretreated facial image;
Wherein, the number of pretreated facial image is X;
Step 2: the pretreated facial image building facial image positive sample obtained based on step 1 to and face figure As negative sample pair;
Wherein, the quantity of facial image positive sample pair is X/2;The quantity of facial image negative sample pair is X/2;
Step 2 includes following sub-step again:
Step 2.1 constructs X/2 positive sample pair, specifically: in order by two facial images composition one in data set It is right;
Step 2.2 constructs X/2 negative sample pair, specifically: first the corresponding images to be recognized of even number serial number is upset at random, Image after being upset at random;Two facial images in data set are partnered in order again, i.e., in data set with Machine selects two facial images of not kinship as a pair of of negative sample data pair;
Wherein, the judgment rule for upsetting operation at random is completed are as follows: the corresponding serial number of image for upsetting front and back is entirely different;
Step 3: the positive sample based on step 2 building to and negative sample pair, generate corresponding positive sample to label and negative Sample is to label;Specifically, setting 1 to corresponding label for positive sample, negative sample is set as 0 to corresponding label;
Wherein, positive sample is X/2 to label, and negative sample is X/2 to label;
Step 4: respectively by the positive sample of step 2 building to, negative sample to and the positive sample that generates of step 3 to label, Negative sample is split label, generates training set and test set;
Respectively by X/2 positive sample to and negative sample to being split, A% therein is used to train, by remaining B% =1-A% positive sample to and negative sample to for testing;X/2 positive sample divides label label and negative sample respectively Cut, A% therein be used to train, by remaining B%=1-A% positive sample to and negative sample label is used to test;
Wherein, X/2 positive sample to and negative sample pair A% and X/2 positive sample to label and negative sample to label A% composing training collection, i.e., training set total sample number be (A%*X) it is a;X/2 positive sample to and negative sample pair B% and X/2 positive sample constitutes test set to the B% of label to label and negative sample, i.e. test set total sample number is that (B%*X) is a;
Step 5: the training set and test set that step 4 generates are spliced, specifically: it will be in training set and test set The image mosaic in two Zhang San channels of each sample pair gets up the training data to form six channels and test data as nerve net The input data of network, the i.e. test data of the training data in generation a six channel (A%*X) and a six channel (B%*X);
Wherein, neural network includes convolutional layer, pond layer and full articulamentum, and the number of plies of convolutional layer is C layers, is denoted as convolutional layer 1, convolutional layer 2.... convolutional layer C, C are more than or equal to 2;The number of plies of pond layer is D layers, is denoted as pond layer 1, the pond pond layer 2.... Layer D, D are more than or equal to 2;The number of plies of full articulamentum is M layers, is denoted as full articulamentum 1, full articulamentum 2.... full articulamentum M, and M is greater than Equal to 2;
Step 6: initialization the number of iterations t is 1, iteration total degree T is initialized, initialization iteration number i is 1, initialization The value of batch is N, and initialization convolutional layer, pond layer and full articulamentum weight W initialize constrained parameters m;
Step 7: (A%*X) a training data that step 5 has been spliced, which is inputted neural network, carries out T wheel iteration instruction in batches Practice, exports trained neural network, and save trained neural network parameter;
Step 7 includes following sub-step again:
(A%*X) a training data in training set that step 5 obtains is randomly divided into (A%*X)/N=I by step 7.1 Part, every part of N number of training data;
Step 7.2 propagated forward, specifically, the training data in N number of six channel for i-th part of data for taking step 7.1 to be divided into Neural network is inputted, the P dimensional feature vector of full articulamentum M-1 is exported;
Step 7.3 calculates loss, specifically: N number of P dimensional feature vector for exporting step 7.2 and i-th part of training data N number of label calculates through angle loss function lose together;
Wherein, the expression formula of angle loss function such as formula (1):
Wherein, N is the quantity of every batch of training data, ∑iIndicate that the loss to N number of data adds up summation, xiFor i-th of number According to the output vector in full articulamentum M-1, | | | | indicate vector field homoemorphism, WjIndicate j-th neuron of full articulamentum M and complete Weight vectors between articulamentum M-1,Indicate neuron corresponding to sample label and full articulamentum M- in full articulamentum M Weight vectors between 1, | | W | |=1, θj,iIndicate vector WjAnd xiBetween angle, 0≤θj,i≤π,Indicate vectorAnd xiBetween angle, M is constrained parameters, m >=2;
Step 7.4 backpropagation, specifically, the loss that solution procedure 7.3 obtains uses the partial derivative of weight parameter W Adam optimizer is updated parameter, completes backpropagation;
Step 7.5 judges whether iteration number i is equal to I, if it is not, i is then added 1, skips to step 7.2;
Step 7.6 judges whether the number of iterations t is equal to T, if it is not, t is then added 1, skips to step 7.1, otherwise jumps To step 7.7;
Step 7.7 exports trained neural network, and saves neural network parameter;
Wherein, the neural network parameter of preservation includes the weight W of convolutional layer, pond layer and full articulamentum;
Step 8: the trained mind of test data input step seven in a six channel (B%*X) that step 5 has been spliced It is tested through network, specifically: the six lane testing data and the trained mind of input step seven that load step five has spliced Propagated forward is carried out in network, obtains the K dimensional vector of full articulamentum M output, is then inputted Softmax function and is calculated, obtains K Dimensional vector, each value in this K dimensional vector represents the probability that the sample belongs to each classification, by maximum probability in K dimensional vector Label of the position as facial image sample pair;
Wherein, K=2, and maximum position is one in 0 or 1;0 indicate facial image to do not have kinship, 1 Indicate facial image to kinship.
Beneficial effect
A kind of relatives' recognition methods based on angle loss neural network of the present invention has as follows compared with prior art The utility model has the advantages that
1. the present invention does not have to extract the feature of hand-designed and constructs classifier, but uses end-to-end task based access control Habit mode carries out driving inquiry learning to feature, so that image is expressed with semantic information abundant;
2. the present invention using angle loss function guarantee e-learning to Feature Mapping to suprasphere space in positive sample This to the distance between it is reduced, negative sample to the distance between be amplified so that the feature after being projected has more identification, Significantly improve relatives' recognition accuracy.
Detailed description of the invention
Fig. 1 is that a kind of relatives' recognition methods for losing neural network based on angle of the present invention loses neural network using angle Relatives identify schematic diagram;
Fig. 2 is that a kind of relatives' recognition methods for losing neural network based on angle of the present invention loses neural network using angle Relatives' recognition training and test flow chart.
Specific embodiment
With reference to the accompanying drawing 1 and attached drawing 2, illustrate embodiments of the present invention.
Embodiment 1
The present embodiment illustrates relatives' recognition methods of the present invention set membership, father and daughter's relationship, Mu Ziguan for identification One of system and mother and daughter relationship, schematic diagram is as shown in Figure 1.Include the following steps:
Step I, the facial image concentrated to data pre-processes, and obtains pretreated facial image;
Wherein, data set includes X facial image, and X is even number;Pretreated facial image quantity is also X;Data Concentrate two facial images in order that there is lineal relative's relationship, and the corresponding image of even number serial number is child's figure in data set Picture, the corresponding image of odd indexed are one of father's image or mother's image;
Facial image is RGB image, i.e. the facial image of triple channel, and the triple channel respectively corresponds the channel R, the channel G And channel B;
Wherein, pretreatment includes alignment, cutting and normalization operation;
Step I includes following sub-step again:
Step (I.1) is aligned using the facial image that the face alignment method based on structuring SVM concentrates data, Facial image after being aligned;
Facial image after step (I.1) is aligned by step (I.2) is cut, the facial image after being cut;
Wherein, the quantity of the facial image after alignment is X;The quantity of facial image after cutting is X, each image Dimension be 64*64;
The facial image that step (I.2) obtains is normalized step (I.3), obtains pretreated facial image; Specifically, each pixel is subtracted 127.5,128 are then removed again;
Wherein, the number of pretreated facial image is X, and wherein the value of X depends on data set, specific to this reality Example is applied, 3 different data sets as shown in table 1 below have been used:
The different data set of table 1
Step II, the pretreated facial image building facial image positive sample obtained based on step 1 to and face figure As negative sample pair;
Wherein, the quantity of facial image positive sample pair is X/2;The quantity of facial image negative sample pair is X/2;
Step II includes following sub-step again:
Step (II.1) constructs X/2 positive sample pair, specifically: two facial images in data set are formed in order It is a pair of;
Step (II.2) constructs X/2 negative sample pair, specifically: first the corresponding child's image of even number serial number is beaten at random Disorderly, the image after being upset at random;Two facial images in data set are partnered in order again, i.e., in data set Two facial images of not kinship are randomly choosed as a pair of of negative sample data pair;
Wherein, the judgment rule for upsetting operation at random is completed are as follows: the corresponding serial number of image for upsetting front and back is entirely different;
Specific to the present embodiment, building for negative sample pair is corresponding by even number serial number using shuffle () function first Child's image upset at random so that entirely different with original child's picture numbers, then again in order by data set two A facial image partners negative sample pair;
Step III, positive sample based on step 2 building to and negative sample pair, generate corresponding positive sample to label and negative Sample is to label;Specifically, setting 1 to corresponding label for positive sample, negative sample is set as 0 to corresponding label;
Wherein, positive sample is X/2 to label, and negative sample is X/2 to label;
Specific to the present embodiment, positive sample is generated to label 1 using ones () function, is generated using zeros () function negative Sample is to label 0;
Step IV, the positive sample for respectively constructing step II to, negative sample to and the positive sample that generates of step III to mark Label, negative sample are split label, generate training set and test set;
Respectively by X/2 positive sample to and negative sample to being split, therein 80% is used to train, will be remaining 20%=1-80% positive sample to and negative sample to for testing;Respectively by X/2 positive sample to label and negative sample to label Be split, therein 80% be used to train, by remaining 20%=1-80% positive sample to and negative sample label is used for Test;
Wherein, X/2 positive sample to and negative sample pair 80% and X/2 positive sample to label and negative sample to label 80% composing training collection;X/2 positive sample to and negative sample pair 20% and X/2 positive sample to label and negative sample pair The 20% of label constitutes test set;
Step V, the step IV training set generated and test set are spliced, specifically: it will be in training set and test set The image mosaic in two Zhang San channels of each sample pair gets up the training data to form six channels and test data as nerve net The input data of network, the i.e. test data of the training data in generation a six channel (80%*X) and a six channel (20%*X);
Wherein, neural network includes 4 convolutional layers, is denoted as convolutional layer 1, convolutional layer 2, convolutional layer 3 and convolutional layer 4;3 ponds Change layer, is denoted as pond layer 1, pond layer 2 and pond layer 3;2 full articulamentums are denoted as full articulamentum 1 and full articulamentum 2;
Each layer of sequence in above-mentioned neural network are as follows: convolutional layer 1, pond layer 1, convolutional layer 2, pond layer 2, convolutional layer 3, Convolutional layer 4, pond layer 3, full articulamentum 1 and full articulamentum 2;The filter size of convolutional layer 1 to convolutional layer 4 is all 5*5, step-length For 1, padding 0, it is normalized before each convolution using BatchNormalization, is made behind each convolutional layer Use unsaturation, nonlinear Leaky ReLU as activation primitive, the size of pond layer filter is 2*2, and step-length is 2 pictures Element, the data after convolution are chosen as unit of the pixel of 2*2 maximum value carry out it is down-sampled, the size of such data becomes original The half of data space size, maximum pondization can increase translation invariance, avoid the generation of over-fitting, full articulamentum 1 There are 512 neurons, for extracting the depth characteristic of 512 dimensions, and prevents neural network mistake using dropout in full articulamentum 1 Fitting, full articulamentum 2 have 2 neurons, are used to two classification;
Step VI, initialization the number of iterations t is 1, and iteration total degree T is 160, and initialization iteration number i is 1, initialization The value N of batch is 4, and using mean value is 0, and the Gaussian Profile that variance is 0.01 initializes convolutional layer, pond layer and full articulamentum are weighed Weight W, initialization constrained parameters m are 4;
Step VII, (80%*X) a training data that step VI has spliced is inputted into neural network in batches and carries out T wheel iteration Training, exports trained neural network, and save trained neural network parameter;
Step VII includes following sub-step again:
(80%*X) a training data that step 5 has been spliced is randomly divided into (80%*X)/N=I parts by step (VII.1), Every part of N number of training data;
Step (VII.2) propagated forward, specifically, taking step (VII.1) to generate i-th part of data, by the N of i-th part of data A training data sequentially inputs in the neural network in step (V) and carries out forward calculation, finally exports 512 dimensions of full articulamentum 1 Feature vector;
Step (VII.3) calculates loss, specifically: by N number of 512 dimensional feature vector of step (VII.2) output and i-th part N number of label of training data calculates through angle loss function lose together;
Wherein, the expression formula of angle loss function such as formula (1):
Wherein, N is the quantity of every batch of training data, ∑iIndicate that the loss to N number of data adds up summation, xiFor i-th of number According to the output vector in full articulamentum M-1, | | | | indicate vector field homoemorphism, WjIndicate j-th neuron of full articulamentum M and complete Weight vectors between articulamentum M-1,Indicate neuron corresponding to sample label and full articulamentum M- in full articulamentum M Weight vectors between 1, | | W | |=1, θj,iIndicate vector WjAnd xiBetween angle, 0≤θj,i≤π,Indicate vectorAnd xiBetween angle, M is constrained parameters, m >=2;
Step (VII.4) backpropagation, specifically, local derviation of the obtained loss of solution procedure (VII.3) to weight parameter W Number, is updated parameter using Adam optimizer, completes backpropagation;
Step (VII.5) judges whether iteration number i is equal to I, if it is not, i is then added 1, skips to step (VII.2);
Step (VII.6) judges whether the number of iterations t is equal to T, if it is not, t is then added 1, skips to step (VII.1), step (VII.7) is otherwise skipped to;
Step (VII.7) exports trained neural network, and saves neural network parameter;
Wherein, the model parameter of preservation includes the weight W of convolutional layer, pond layer and full articulamentum;
It is trained to optimize gradient calculating and backpropagation using angle loss function specific to the present embodiment During neural network, we are by the cos θ in loss functionj,iWithWith only comprising parameter W and xiExpression Formula is substituted, in this way, entire expression formula only carries out gradient calculating and backpropagation just with to independent variable W just without angle, θ Optimizing for algorithm may be implemented.The specific implementation process is as follows batch size N when setting training is 4, feature vector x is 4* 512 dimensions, 512 export dimension for full articulamentum 1, and the number of the neuron of full articulamentum 2 is 2, and corresponding label vector y size is 4*2, the dimension for connecting the weight matrix W of the last layer neuron is 512*2, according to the thought that angle is lost, first by weight square Battle array is normalized to obtain W by columnnorm, wherein | | Wnorm| |=1, WnormIt is opening divided by each column element quadratic sum by matrix W Root, the output output of network is xW at this timenorm, dimension 4*2, due to | | Wnorm| | being worth is 1, thus output can be write as Lower form:
Output=xWnorm=| | x | | | | Wnorm| | cos θ=| | x | | cos θ,
At this moment calculate | | x | | value can obtain the value of cos θ according to output output, | | x | | be equal to x divided by every in x Row element square root sum square, so cos θ=output/ | | x | |, the cos (m θ) after m constraint can be according to double angle formula It is calculated, m value is 4 in this example, so cos (4 θ)=4cos3θ-3cosθ。
Loss is calculated using the angle loss function that parameter m is added in training process, is in order to ensure neural network learning Angularity discriminant information, so that inter- object distance is closer, between class distance is farther, and then extracts the depth characteristic for having more identification.
Specifically, decision boundary is cos at this time if removing the constrained parameters m in the angle loss function of formula (1) θ1-cosθ2=0, that is, the condition that the data inputted belong to 1 is cos θ1>cosθ2, the condition for belonging to class 2 is cos θ1<cosθ2.And It introduces after a variable m constrains it, so that being cos (m θ by the condition that input data is divided into class 11)>cosθ2, divide Condition for class 2 is cos θ1<cos(mθ2), decision plane has become two from one at this time, i.e., different classes corresponds to different Decision boundary, and there are also certain angular distances between different decision boundaries to guarantee the distance between inhomogeneity as far as possible Far, the distance between similar close as far as possible, it is all that addition parameter m is used in the training process end to end of step (VII) Angle loss function calculate loss.
In whole network training process, optimized using the backpropagation that Adam optimizer carries out weighting parameter, wherein learning Rate is 0.001, β 1 and β 2 is respectively 0.9 and 0.999, and the retention rate parameter in dropout is 0.8.
Test data input step (VII) training of step (VIII), a six channel (B%*X) that has spliced step 5 Good neural network is tested, specifically: six lane testing data and input step (VII) instruction that load step five has spliced Propagated forward is carried out in the neural network perfected, and is obtained 2 dimensional vectors that full articulamentum 2 exports, is then inputted Softmax function meter It calculates, obtains 2 dimensional vectors, each value in this 2 dimensional vector represents the probability that the sample belongs to each classification, will be general in 2 dimensional vectors Label of the maximum position of rate as facial image sample pair;
Wherein, maximum position is one in 0 or 1, and 0 indicates facial image to not having kinship, and 1 indicates face Image is to kinship.
Training and the testing process of whole network are as shown in Fig. 2, training process with described above, passes through neural end to end Network extracts high-rise feature and is used to excavate potential kinship information in facial image, is lost in training process by angle Constraint the parameter of whole network is learnt, guarantee the feature that the learns positive negative sample in the suprasphere space being mapped to Kinship between has more identification.During the test, the network parameter and structure extraction deep layer people succeeded in school is utilized Then face image feature is classified using Softmax function, obtain sample class label.
The present invention is not limited only to above embodiments, all using mentality of designing of the invention, does setting for some simple changes Meter, should all be included within protection scope of the present invention.

Claims (6)

1. a kind of relatives' recognition methods based on angle loss neural network, characterized by the following steps:
Step 1: the facial image concentrated to data pre-processes, pretreated facial image is obtained;
Wherein, data set includes X facial image, and X is even number;Pretreated facial image quantity is also X;In data set Two facial images in order have kinship, specifically: the corresponding image of even number serial number is figure to be identified in data set Picture, the corresponding image of odd indexed are one of remote kinsman image or women relatives' image;
Wherein, the images to be recognized of even number serial number is to be judged whether to close with corresponding odd indexed image with relatives The image of system;
Facial image is RGB image, i.e. the facial image of triple channel, and it is logical that the triple channel respectively corresponds the channel R, the channel G and B Road;
Wherein, pretreatment includes alignment, cutting and normalization operation;
Step 2: the pretreated facial image building facial image positive sample obtained based on step 1 to and facial image it is negative Sample pair;
Wherein, the quantity of facial image positive sample pair is X/2;The quantity of facial image negative sample pair is X/2;
Step 3: based on step 2 building positive sample to and negative sample pair, generate corresponding positive sample to label and negative sample To label;Specifically, setting 1 to corresponding label for positive sample, negative sample is set as 0 to corresponding label;
Wherein, positive sample is X/2 to label, and negative sample is X/2 to label;
Step 4: respectively by the positive sample of step 2 building to, negative sample to and the positive sample that generates of step 3 to label, negative sample This is split label, generates training set and test set;
Respectively by X/2 positive sample to and negative sample to being split, A% therein is used to train, by remaining B%=1- A% positive sample to and negative sample to for testing;X/2 positive sample is split label and negative sample to label respectively, A% therein is used to train, by remaining B%=1-A% positive sample to and negative sample label is used to test;
Wherein, X/2 positive sample to and negative sample pair A% and X/2 positive sample to label and negative sample to the A% of label Composing training collection, i.e. training set total sample number are that (A%*X) is a;X/2 positive sample to and negative sample pair B% and X/2 Positive sample constitutes test set to the B% of label to label and negative sample, i.e. test set total sample number is that (B%*X) is a;
Step 5: the training set and test set that step 4 generates are spliced, specifically: it will be each in training set and test set The image mosaic in two Zhang San channels of sample pair gets up the training data to form six channels and test data as neural network Input data, the i.e. test data of the training data in generation a six channel (A%*X) and a six channel (B%*X);
Step 6: initialization the number of iterations t is 1, iteration total degree T is initialized, initialization iteration number i is 1, initialization The value of batch is N, and initialization convolutional layer, pond layer and full articulamentum weight W initialize constrained parameters m;
Step 7: (A%*X) a training data that step 5 has been spliced is inputted neural network in batches carries out T wheel repetitive exercise, Trained neural network is exported, and saves trained neural network parameter;
Step 8: the trained nerve net of test data input step seven in a six channel (B%*X) that step 5 has been spliced Network is tested, specifically: the six lane testing data and the trained nerve net of input step seven that load step five has spliced Carry out propagated forward in network, obtain the K dimensional vector of full articulamentum M output, then input Softmax function and calculate, obtain K tie up to It measures, each value in this K dimensional vector represents the probability that the sample belongs to each classification, by the position of maximum probability in K dimensional vector Label as facial image sample pair;
Wherein, K=2, and maximum position is one in 0 or 1;0 indicates facial image to not having kinship, and 1 indicates Facial image is to kinship.
2. a kind of relatives' recognition methods based on angle loss neural network according to claim 1, it is characterised in that: step Rapid one includes following sub-step again:
Step 1.1 is aligned using the facial image that the face alignment method based on structuring SVM concentrates data, is obtained pair Facial image after neat;
Facial image after step 1.1 is aligned by step 1.2 is cut, the facial image after being cut;
Wherein, the quantity of the facial image after alignment is X;The quantity of facial image after cutting is X, the dimension of each image Degree is 64*64;
The facial image that step 1.3 obtains step 1.2 is normalized, and obtains pretreated facial image;
Wherein, the number of pretreated facial image is X.
3. a kind of relatives' recognition methods based on angle loss neural network according to claim 1, it is characterised in that: step Rapid two include following sub-step again:
Step 2.1 constructs X/2 positive sample pair, specifically: two facial images in data set are partnered in order;
Step 2.2 constructs X/2 negative sample pair, specifically: the corresponding images to be recognized of even number serial number is upset at random first, is obtained Image after upsetting at random;Two facial images in data set are partnered in order again, i.e., are selected at random in data set Two facial images of not kinship are selected as a pair of of negative sample data pair;
Wherein, the judgment rule for upsetting operation at random is completed are as follows: the corresponding serial number of image for upsetting front and back is entirely different.
4. a kind of relatives' recognition methods based on angle loss neural network according to claim 1, it is characterised in that: step In rapid five, neural network includes convolutional layer, pond layer and full articulamentum, and the number of plies of convolutional layer is C layers, is denoted as convolutional layer 1, convolution Layer 2.... convolutional layer C, C are more than or equal to 2;The number of plies of pond layer is D layers, is denoted as pond layer 1, the pond pond layer 2.... layer D, D More than or equal to 2;The number of plies of full articulamentum is M layers, is denoted as full articulamentum 1, full articulamentum 2.... full articulamentum M, and M is more than or equal to 2。
5. a kind of relatives' recognition methods based on angle loss neural network according to claim 1, it is characterised in that: step Rapid seven include following sub-step again:
(A%*X) a training data in training set that step 5 obtains is randomly divided into (A%*X)/N=I parts by step 7.1, often The N number of training data of part;
Step 7.2 propagated forward, specifically, N number of six channel training data of i-th part of training data of step 7.1 is taken to input nerve Network exports N number of P dimensional feature vector of full articulamentum M-1;
Step 7.3 calculates loss, specifically: N number of P dimensional feature vector for exporting step 7.2 and i-th part of training data it is N number of Label calculates through angle loss function lose together;
Wherein, the expression formula of angle loss function such as formula (1):
Wherein, N is the quantity of every batch of training data, ∑iIndicate that the loss to N number of data adds up summation, xiExist for i-th of data The output vector of full articulamentum M-1, | | | | indicate vector field homoemorphism, WjIndicate j-th of neuron of full articulamentum M with connect entirely Weight vectors between layer M-1,Indicate in full articulamentum M neuron corresponding to sample label and full articulamentum M-1 it Between weight vectors, | | W | |=1, θJ, iIndicate vector WjAnd xiBetween angle, 0≤θJ, i≤π,Indicate vector And xiBetween angle,M is constrained parameters, m >=2;
Step 7.4 backpropagation, specifically, the loss that solution procedure 7.3 obtains uses Adam to the partial derivative of weight parameter W Optimizer is updated parameter, completes backpropagation;
Step 7.5 judges whether iteration number i is equal to I, if it is not, i is then added 1, skips to step 7.2;
Step 7.6 judges whether the number of iterations t is equal to T, if it is not, t is then added 1, skips to step 7.1, otherwise skips to step Rapid 7.7;
Step 7.7 exports trained neural network, and saves neural network parameter.
6. a kind of relatives' recognition methods based on angle loss neural network according to claim 5, it is characterised in that: step In rapid 7.7, the neural network parameter of preservation includes the weight W of convolutional layer, pond layer and full articulamentum.
CN201811118748.6A 2018-06-12 2018-09-25 A kind of relatives' recognition methods based on angle loss neural network Pending CN109344759A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810599624 2018-06-12
CN2018105996248 2018-06-12

Publications (1)

Publication Number Publication Date
CN109344759A true CN109344759A (en) 2019-02-15

Family

ID=65306355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811118748.6A Pending CN109344759A (en) 2018-06-12 2018-09-25 A kind of relatives' recognition methods based on angle loss neural network

Country Status (1)

Country Link
CN (1) CN109344759A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110211123A (en) * 2019-06-14 2019-09-06 北京文安智能技术股份有限公司 A kind of optimization method, the apparatus and system of deep learning neural network
CN110348285A (en) * 2019-05-23 2019-10-18 北京邮电大学 Social relationships recognition methods and device based on semantically enhancement network
CN111079540A (en) * 2019-11-19 2020-04-28 北航航空航天产业研究院丹阳有限公司 Target characteristic-based layered reconfigurable vehicle-mounted video target detection method
CN111325736A (en) * 2020-02-27 2020-06-23 成都航空职业技术学院 Sight angle estimation method based on human eye difference image
CN111401320A (en) * 2020-04-15 2020-07-10 支付宝(杭州)信息技术有限公司 Privacy-protecting biological characteristic image processing method and device
CN111666985A (en) * 2020-05-21 2020-09-15 武汉大学 Deep learning confrontation sample image classification defense method based on dropout
CN112668509A (en) * 2020-12-31 2021-04-16 深圳云天励飞技术股份有限公司 Training method and recognition method of social relationship recognition model and related equipment
CN112950550A (en) * 2021-02-04 2021-06-11 广州中医药大学第一附属医院 Deep learning-based type 2 diabetic nephropathy image classification method
CN112966585A (en) * 2021-03-01 2021-06-15 淮阴师范学院 Face image relative relationship verification method for relieving information island influence
CN113158929A (en) * 2021-04-27 2021-07-23 河南大学 Depth discrimination metric learning relationship verification framework based on distance and direction
CN113496219A (en) * 2021-09-06 2021-10-12 首都师范大学 Automatic blood relationship identification method and device based on face image analysis
CN115424330A (en) * 2022-09-16 2022-12-02 郑州轻工业大学 Single-mode face in-vivo detection method based on DFMN and DSD

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105005774A (en) * 2015-07-28 2015-10-28 中国科学院自动化研究所 Face relative relation recognition method based on convolutional neural network and device thereof
CN105488463A (en) * 2015-11-25 2016-04-13 康佳集团股份有限公司 Lineal relationship recognizing method and system based on face biological features
CN106951858A (en) * 2017-03-17 2017-07-14 中国人民解放军国防科学技术大学 A kind of recognition methods of personage's affiliation and device based on depth convolutional network
CN106980830A (en) * 2017-03-17 2017-07-25 中国人民解放军国防科学技术大学 One kind is based on depth convolutional network from affiliation recognition methods and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105005774A (en) * 2015-07-28 2015-10-28 中国科学院自动化研究所 Face relative relation recognition method based on convolutional neural network and device thereof
CN105488463A (en) * 2015-11-25 2016-04-13 康佳集团股份有限公司 Lineal relationship recognizing method and system based on face biological features
CN106951858A (en) * 2017-03-17 2017-07-14 中国人民解放军国防科学技术大学 A kind of recognition methods of personage's affiliation and device based on depth convolutional network
CN106980830A (en) * 2017-03-17 2017-07-25 中国人民解放军国防科学技术大学 One kind is based on depth convolutional network from affiliation recognition methods and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LVYE CUI,BO MA: ""ADAPTIVE FEATURE SELECTION FOR KINSHIP VERIFICATION"", 《PROCEEDINGS OF THE IEEE INTERNATIONAL CONFERENCE ON MUTILMEDIA AND EXPO 2017》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110348285A (en) * 2019-05-23 2019-10-18 北京邮电大学 Social relationships recognition methods and device based on semantically enhancement network
CN110211123B (en) * 2019-06-14 2021-06-01 北京文安智能技术股份有限公司 Deep learning neural network optimization method, device and system
CN110211123A (en) * 2019-06-14 2019-09-06 北京文安智能技术股份有限公司 A kind of optimization method, the apparatus and system of deep learning neural network
CN111079540A (en) * 2019-11-19 2020-04-28 北航航空航天产业研究院丹阳有限公司 Target characteristic-based layered reconfigurable vehicle-mounted video target detection method
CN111079540B (en) * 2019-11-19 2024-03-19 北航航空航天产业研究院丹阳有限公司 Hierarchical reconfigurable vehicle-mounted video target detection method based on target characteristics
CN111325736A (en) * 2020-02-27 2020-06-23 成都航空职业技术学院 Sight angle estimation method based on human eye difference image
CN111325736B (en) * 2020-02-27 2024-02-27 成都航空职业技术学院 Eye differential image-based sight angle estimation method
CN111401320B (en) * 2020-04-15 2022-04-12 支付宝(杭州)信息技术有限公司 Privacy-protecting biometric image processing method, device, medium, and apparatus
CN111401320A (en) * 2020-04-15 2020-07-10 支付宝(杭州)信息技术有限公司 Privacy-protecting biological characteristic image processing method and device
CN111666985A (en) * 2020-05-21 2020-09-15 武汉大学 Deep learning confrontation sample image classification defense method based on dropout
CN111666985B (en) * 2020-05-21 2022-10-21 武汉大学 Deep learning confrontation sample image classification defense method based on dropout
CN112668509A (en) * 2020-12-31 2021-04-16 深圳云天励飞技术股份有限公司 Training method and recognition method of social relationship recognition model and related equipment
CN112668509B (en) * 2020-12-31 2024-04-02 深圳云天励飞技术股份有限公司 Training method and recognition method of social relation recognition model and related equipment
CN112950550A (en) * 2021-02-04 2021-06-11 广州中医药大学第一附属医院 Deep learning-based type 2 diabetic nephropathy image classification method
CN112950550B (en) * 2021-02-04 2023-11-14 广州中医药大学第一附属医院 Deep learning-based type 2 diabetes kidney disease image classification method
CN112966585A (en) * 2021-03-01 2021-06-15 淮阴师范学院 Face image relative relationship verification method for relieving information island influence
CN113158929A (en) * 2021-04-27 2021-07-23 河南大学 Depth discrimination metric learning relationship verification framework based on distance and direction
CN113158929B (en) * 2021-04-27 2022-09-30 河南大学 Depth discrimination measurement learning relativity verification system based on distance and direction
CN113496219A (en) * 2021-09-06 2021-10-12 首都师范大学 Automatic blood relationship identification method and device based on face image analysis
CN115424330A (en) * 2022-09-16 2022-12-02 郑州轻工业大学 Single-mode face in-vivo detection method based on DFMN and DSD

Similar Documents

Publication Publication Date Title
CN109344759A (en) A kind of relatives&#39; recognition methods based on angle loss neural network
CN112308158B (en) Multi-source field self-adaptive model and method based on partial feature alignment
EP3166049B1 (en) Systems and methods for attention-based configurable convolutional neural networks (abc-cnn) for visual question answering
Dong et al. Automatic age estimation based on deep learning algorithm
Shao et al. Feature learning for image classification via multiobjective genetic programming
CN106372581B (en) Method for constructing and training face recognition feature extraction network
CN108427921A (en) A kind of face identification method based on convolutional neural networks
CN106651830A (en) Image quality test method based on parallel convolutional neural network
CN101447020B (en) Pornographic image recognizing method based on intuitionistic fuzzy
CN109325443A (en) A kind of face character recognition methods based on the study of more example multi-tag depth migrations
CN105389326B (en) Image labeling method based on weak matching probability typical relevancy models
Zhang et al. Physiognomy: Personality traits prediction by learning
CN109740536A (en) A kind of relatives&#39; recognition methods based on Fusion Features neural network
CN111353411A (en) Face-shielding identification method based on joint loss function
CN108154156A (en) Image Ensemble classifier method and device based on neural topic model
CN109271546A (en) The foundation of image retrieval Feature Selection Model, Database and search method
CN110889335B (en) Human skeleton double interaction behavior identification method based on multichannel space-time fusion network
CN112668486A (en) Method, device and carrier for identifying facial expressions of pre-activated residual depth separable convolutional network
Yasrab et al. Fighting deepfakes using body language analysis
CN110111365B (en) Training method and device based on deep learning and target tracking method and device
CN109948662B (en) Face image depth clustering method based on K-means and MMD
CN105809200B (en) Method and device for autonomously extracting image semantic information in bioauthentication mode
Xu et al. A novel image feature extraction algorithm based on the fusion AutoEncoder and CNN
CN111382684B (en) Angle robust personalized facial expression recognition method based on antagonistic learning
CN109583406B (en) Facial expression recognition method based on feature attention mechanism

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20220429