CN106485235B - A kind of convolutional neural networks generation method, age recognition methods and relevant apparatus - Google Patents

A kind of convolutional neural networks generation method, age recognition methods and relevant apparatus Download PDF

Info

Publication number
CN106485235B
CN106485235B CN201610925676.0A CN201610925676A CN106485235B CN 106485235 B CN106485235 B CN 106485235B CN 201610925676 A CN201610925676 A CN 201610925676A CN 106485235 B CN106485235 B CN 106485235B
Authority
CN
China
Prior art keywords
age
face
convolutional neural
neural networks
classifier
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.)
Active
Application number
CN201610925676.0A
Other languages
Chinese (zh)
Other versions
CN106485235A (en
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.)
Xiamen Meitu Technology Co Ltd
Original Assignee
Xiamen Meitu Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Meitu Technology Co Ltd filed Critical Xiamen Meitu Technology Co Ltd
Priority to CN201610925676.0A priority Critical patent/CN106485235B/en
Publication of CN106485235A publication Critical patent/CN106485235A/en
Application granted granted Critical
Publication of CN106485235B publication Critical patent/CN106485235B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06N3/084Backpropagation, e.g. using gradient descent
    • 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/178Human faces, e.g. facial parts, sketches or expressions estimating age from face image; using age information for improving recognition

Abstract

Generation method, age recognition methods, relevant apparatus and the calculating equipment that the invention discloses a kind of for carrying out the convolutional neural networks of age identification to the face in image, the generation method of the convolutional neural networks includes: to be trained to the first convolutional neural networks, includes multiple convolution groups, multiple full articulamentums and the first classifier being sequentially connected in the first convolutional neural networks;By in trained first convolutional neural networks the full articulamentum in part and the first classifier replaced accordingly, generate the second convolutional neural networks simultaneously it is trained;The full articulamentum and classifier new to the addition of trained second convolutional neural networks, to generate third convolutional neural networks and be trained;The full articulamentum and classifier new to the addition of trained third convolutional neural networks, to generate Volume Four product neural network and be trained.Wherein, it before being trained to above-mentioned each convolutional neural networks, can be pre-processed to for trained human face image information.

Description

A kind of convolutional neural networks generation method, age recognition methods and relevant apparatus
Technical field
It is the present invention relates to technical field of image processing, in particular to a kind of for carrying out age identification to the face in image Convolutional neural networks generation method, age recognition methods, relevant apparatus and calculate equipment.
Background technique
Face has contained bulk information as important one of biological characteristic on facial image, such as age, gender, ethnic group Deng.It is further deep with studying in image processing techniques facial image, especially in terms of the identification of face age, with volume Face age recognition methods based on product neural network (CNN:Convolutional Neural Network) is also gradually sent out Exhibition is got up, and is all played an important role in numerous reality scenes.On " Computer Science " in 2014, Karen Simonyan and Andrew Zisserman have delivered an entitled " Very Deep Convolutional The paper of Networks for Large-Scale Image Recognition " proposes a kind of deeper convolution mind of level Through network model, i.e. VGG (Visual Geometry Group) model, the accuracy for carrying out age identification based on this model has Certain promotion.
However, gap is larger between the amplitude of variation, especially 0~5 years old baby for the facial image of different age group Child, variation is very huge, but 25~30 years old or so adult, then varies less, this phenomenon is brought to age identification Large effect.In existing face age recognition methods, age true value is replaced using age distribution value, is alleviated to a certain extent The above problem, but the result got is in a certain age range, and not accurate enough, once the critical value in section malfunctions, Then age estimated value can fall into adjacent interval, bring biggish error.And since the numerical value span at age is larger, even if taking Above-mentioned VGG model carries out age identification, it is also desirable to and take multiple models to realize according to the distribution of age bracket, it is complex, and Versatility is lower.
Summary of the invention
For this purpose, the present invention provides a kind of convolutional neural networks generation side for the face progress age identification in image Case, and the age identifying schemes based on the convolutional neural networks are proposed, it is existing above to try hard to solve or at least alleviate Problem.
According to an aspect of the present invention, it provides a kind of for carrying out the convolutional Neural of age identification to the face in image Network generation method, suitable for executing in calculating equipment, this method comprises the following steps: firstly, according to the face obtained in advance Sets of image data is trained so that the first convolutional neural networks are suitable for identification face, people the first convolutional neural networks Face image data acquisition system includes multiple human face image informations, and each facial image information includes people in facial image and correspondence image Age information, the first convolutional neural networks include the multiple convolution groups being sequentially connected, the first full articulamentum, the second full connection Layer, the full articulamentum of third and the first classifier;According to preset age threshold to each of face image data set face Image information is handled, to add new age threshold attribute, the instruction of age threshold attribute for each human face image information The age of corresponding people is greater than preset age threshold and is also no more than preset age threshold;By trained first convolution The full articulamentum of third and the first classifier in neural network replace with the 4th full articulamentum and the second classifier respectively, to generate Second convolutional neural networks, and according to being added to the face image data set of age threshold attribute to the second convolutional neural networks It is trained, the age of people corresponding to the output instruction face so as to the second classifier of the second convolutional neural networks is above year Age threshold value is also no greater than age threshold;After the first full articulamentum in trained second convolutional neural networks, addition The 5th full articulamentum, the 6th full articulamentum and the third classifier being sequentially connected, to generate third convolutional neural networks, and select In face image data set, the age no more than default age threshold human face image information to third convolutional neural networks It is trained, the age of people corresponding to the output instruction face so as to the third classifier of third convolutional neural networks is zero to institute Which of default age threshold;After the first full articulamentum in trained third convolutional neural networks, addition according to Secondary connected the 7th full articulamentum, eight convergent points articulamentum and the 4th classifier, to generate Volume Four product neural network, and according to people Face image data acquisition system is trained Volume Four product neural network, people corresponding to the output instruction face so as to the 4th classifier Age.
Optionally, the convolutional neural networks according to the present invention for carrying out age identification to the face in image generate In method, the facial image of each human face image information keeps horizontal front and meets default ruler in face image data set It is very little, facial image correspond to people age be 0~100 between integer.
Optionally, the convolutional neural networks according to the present invention for carrying out age identification to the face in image generate It include at least one convolutional layer in each convolution group of the first convolutional neural networks in method.
Optionally, the convolutional neural networks according to the present invention for carrying out age identification to the face in image generate In method, after the first full articulamentum in trained second convolutional neural networks, it is complete to add the 5th be sequentially connected Articulamentum, the 6th full articulamentum and third classifier, the step of to generate third convolutional neural networks before, further comprise the steps of: To in face image data set, the age no more than preset age threshold human face image information age carry out 0/1 coding, 0/1 coding includes adding the sum of 1 with preset age threshold for number of encoding bits, each is any one of digital 0 and digital 1, Since first place, the difference that the number that number 1 occurs subtracts 1 is the age.
Optionally, the convolutional neural networks according to the present invention for carrying out age identification to the face in image generate In method, the 6th full articulamentum includes multiple full articulamentums of son in parallel, and the number of the full articulamentum of son is preset age threshold Add the sum of 1.
Optionally, the convolutional neural networks according to the present invention for carrying out age identification to the face in image generate In method, after the first full articulamentum in trained third convolutional neural networks, it is complete to add the 7th be sequentially connected Articulamentum, eight convergent points articulamentum and the 4th classifier are further comprised the steps of: before generating the step of Volume Four accumulates neural network To in face image data set human face image information age carry out distributed code, distributed code include according to Gaussian Profile into Row age coding.
Optionally, the convolutional neural networks according to the present invention for carrying out age identification to the face in image generate In method, preset age threshold is 12.
According to a further aspect of the invention, a kind of age recognition methods is provided, suitable for being executed in calculating equipment, the party Method based on for in image face carry out age identification convolutional neural networks generation method in, trained Volume Four product Neural network carries out age identification to the face in image, comprising steps of facial image to be identified is input to trained the Age identification is carried out in four convolutional neural networks;The output of the second classifier is in the good Volume Four product neural network of training of judgement It is no to be greater than preset age threshold;If the output of the second classifier is not more than preset age threshold, trained the is obtained The output of third classifier is the age of people corresponding to face in four convolutional neural networks;If the output of the second classifier is greater than pre- If age threshold, then the output for obtaining the 4th classifier in trained Volume Four product neural network is people's corresponding to face Age.
It optionally, further include being pre-processed to images to be recognized to obtain in age recognition methods according to the present invention Take facial image to be identified.
Optionally, in age recognition methods according to the present invention, images to be recognized is pre-processed to obtain wait know Others' face image includes: to carry out Face datection to images to be recognized, obtains face location information;It, will by face location information Face in images to be recognized is converted after cutting to pre-set dimension;Face, which is calculated, according to face key point information carries out Plane Rotation Transformation matrix;The facial image under pre-set dimension is rotated into horizontal front to obtain face figure to be identified using transformation matrix Picture.
According to a further aspect of the invention, it provides a kind of for carrying out the convolution mind of age identification to the face in image It through network generating means, is calculated in equipment suitable for residing in, which includes the first training module, attribute adding module, first Generation module, the second training module, the second generation module, third training module, third generation module and the 4th training module.Its In, the first training module is suitable for being trained the first convolutional neural networks according to the face image data set obtained in advance So that the first convolutional neural networks are suitable for identification face, face image data set includes multiple human face image informations, each Human face image information includes the age information of people in facial image and correspondence image, and the first convolutional neural networks include being sequentially connected Multiple convolution groups, the first full articulamentum, the second full articulamentum, the full articulamentum of third and the first classifier;Attribute adding module Suitable for being handled according to preset age threshold each of face image data set face image information, to be every A human face image information adds new age threshold attribute, and it is preset that age threshold attribute indicates that the age of corresponding people is greater than Age threshold is also no more than preset age threshold;First generation module is suitable for will be in trained first convolutional neural networks The full articulamentum of third and the first classifier replace with the 4th full articulamentum and the second classifier respectively, with generate the second convolution mind Through network;Second training module is suitable for basis and is added to the face image data set of age threshold attribute to the second convolutional Neural Network is trained, and the age of people corresponding to the output instruction face so as to the second classifier of the second convolutional neural networks is high Age threshold is also no greater than in age threshold;Second generation module is suitable for the in trained second convolutional neural networks After one full articulamentum, the 5th full articulamentum, the 6th full articulamentum and the third classifier being sequentially connected are added, to generate third Convolutional neural networks;Third training module is suitably selected in face image data set, the age is no more than default age threshold The human face image information of value is trained third convolutional neural networks, so as to the third classifier of third convolutional neural networks The age of people corresponding to output instruction face is which of zero to default age threshold;Third generation module is suitable for instructing After the first full articulamentum in the third convolutional neural networks perfected, the 7th full articulamentum, the eight convergent points being sequentially connected are added Articulamentum and the 4th classifier, to generate Volume Four product neural network;4th training module is suitable for according to face image data collection It closes and Volume Four product neural network is trained, the age of people corresponding to the output instruction face so as to the 4th classifier.
According to a further aspect of the invention, a kind of age identification device is provided, is calculated in equipment suitable for residing in, the dress Set based on for in image face carry out age identification convolutional neural networks generating means in, trained Volume Four product Neural network carries out age identification, including identification module, judgment module and acquisition module to the face in image.Wherein, it identifies Module, which is suitable for for facial image to be identified being input in trained Volume Four product neural network, carries out age identification;Judgment module Suitable for judging the output of the second classifier in the trained Volume Four product neural network after identification module carries out age identification;It obtains Modulus block is suitable for obtaining identification module when judgment module judges the output of the second classifier no more than preset age threshold The output of third classifier is the year of people corresponding to face in trained Volume Four product neural network after carrying out age identification Age obtains identification module and carries out the age when judgment module judges the output of the second classifier greater than preset age threshold The output of the 4th classifier is the age of people corresponding to face in trained Volume Four product neural network after identification.
According to a further aspect of the invention, a kind of calculating equipment is also provided, including according to the present invention for image In face carry out age identification convolutional neural networks generating means and age identification device.
The technical side that convolutional neural networks according to the present invention for carrying out age identification to the face in image generate Case is first trained the first convolutional neural networks, in the first convolutional neural networks include be sequentially connected multiple convolution groups, Multiple full articulamentums and the first classifier classify the full articulamentum in part and first in trained first convolutional neural networks Device is replaced accordingly, is generated the second convolutional neural networks and is simultaneously trained to it, then to trained second convolutional Neural Network addition new full articulamentum and classifier, to generate third convolutional neural networks and be trained, finally to trained The addition of third convolutional neural networks new full articulamentum and classifier, to generate Volume Four product neural network and be trained.? In above-mentioned technical proposal, using convolutional neural networks as basic frame, and before generating each convolutional neural networks in case training, Carry out such as age threshold segmentation, 0/1 coding and age distribution coding processing to for trained face image data, assist by The model of step modification convolutional neural networks, ultimately forms the convolutional neural networks model that can accurately identify the age, without dividing It cuts, succinct intuitive, versatility is stronger.In turn, age recognition methods according to the present invention, facial image to be identified is input to In trained Volume Four product neural network, the range of age and its specific value are judged according to the output of different classifications device, is tied Fruit accuracy has huge promotion.
Detailed description of the invention
To the accomplishment of the foregoing and related purposes, certain illustrative sides are described herein in conjunction with following description and drawings Face, these aspects indicate the various modes that can practice principles disclosed herein, and all aspects and its equivalent aspect It is intended to fall in the range of theme claimed.Read following detailed description in conjunction with the accompanying drawings, the disclosure it is above-mentioned And other purposes, feature and advantage will be apparent.Throughout the disclosure, identical appended drawing reference generally refers to identical Component or element.
Fig. 1 shows the schematic diagram according to an embodiment of the invention for calculating equipment 100;
Fig. 2 shows according to an embodiment of the invention for carrying out the convolution mind of age identification to the face in image Flow chart through network generation method 200;
Fig. 3 shows the convolution for being used to carry out the face in image age identification of another embodiment according to the present invention The flow chart of neural network generation method 300;
Fig. 4 shows the structural schematic diagram of the first convolutional neural networks according to an embodiment of the invention;
Fig. 5 shows the structural schematic diagram of the second convolutional neural networks according to an embodiment of the invention;
Fig. 6 shows the structural schematic diagram of third convolutional neural networks according to an embodiment of the invention;
Fig. 7 shows the structural schematic diagram of Volume Four product neural network according to an embodiment of the invention;
Fig. 8 shows the flow chart of age recognition methods 400 according to an embodiment of the invention;
Fig. 9 shows the flow chart of the age recognition methods 500 of another embodiment according to the present invention;
Figure 10 shows according to an embodiment of the invention for carrying out the volume of age identification to the face in image The schematic diagram of product neural network generating means 600;
Figure 11 show according to still another embodiment of the invention for carrying out age identification to the face in image The schematic diagram of convolutional neural networks generating means 700;
Figure 12 shows the schematic diagram of age identification device 800 according to an embodiment of the invention;And
Figure 13 shows the schematic diagram of age identification device 900 according to still another embodiment of the invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Fig. 1 is the block diagram of Example Computing Device 100.In basic configuration 102, calculating equipment 100, which typically comprises, is System memory 106 and one or more processor 104.Memory bus 108 can be used for storing in processor 104 and system Communication between device 106.
Depending on desired configuration, processor 104 can be any kind of processing, including but not limited to: microprocessor (μ P), microcontroller (μ C), digital information processor (DSP) or any combination of them.Processor 104 may include such as The cache of one or more rank of on-chip cache 110 and second level cache 112 etc, processor core 114 and register 116.Exemplary processor core 114 may include arithmetic and logical unit (ALU), floating-point unit (FPU), Digital signal processing core (DSP core) or any combination of them.Exemplary Memory Controller 118 can be with processor 104 are used together, or in some implementations, and Memory Controller 118 can be an interior section of processor 104.
Depending on desired configuration, system storage 106 can be any type of memory, including but not limited to: easily The property lost memory (RAM), nonvolatile memory (ROM, flash memory etc.) or any combination of them.System storage Device 106 may include operating system 120, one or more is using 122 and program data 124.In some embodiments, It may be arranged to be operated using program data 124 on an operating system using 122.
Calculating equipment 100 can also include facilitating from various interface equipments (for example, output equipment 142, Peripheral Interface 144 and communication equipment 146) to basic configuration 102 via the communication of bus/interface controller 130 interface bus 140.Example Output equipment 142 include graphics processing unit 148 and audio treatment unit 150.They can be configured as facilitate via One or more port A/V 152 is communicated with the various external equipments of such as display or loudspeaker etc.Outside example If interface 144 may include serial interface controller 154 and parallel interface controller 156, they, which can be configured as, facilitates Via one or more port I/O 158 and such as input equipment (for example, keyboard, mouse, pen, voice-input device, touch Input equipment) or the external equipment of other peripheral hardwares (such as printer, scanner etc.) etc communicated.Exemplary communication is set Standby 146 may include network controller 160, can be arranged to convenient for via one or more communication port 164 and one A or multiple other calculate communication of the equipment 162 by network communication link.
Network communication link can be an example of communication media.Communication media can be usually presented as in such as carrier wave Or computer readable instructions, data structure, program module in the modulated data signal of other transmission mechanisms etc, and can To include any information delivery media." modulated data signal " can such signal, one in its data set or more It is a or it change can the mode of encoded information in the signal carry out.As unrestricted example, communication media can be with Wired medium including such as cable network or private line network etc, and it is such as sound, radio frequency (RF), microwave, infrared (IR) the various wireless mediums or including other wireless mediums.Term computer-readable medium used herein may include depositing Both storage media and communication media.
Calculating equipment 100 can be implemented as server, these servers can be such as file server, database service The servers such as device, apps server and WEB server.Calculate equipment 100 can be implemented as small size it is portable (or move It is dynamic) a part of electronic equipment, these electronic equipments can be such as cellular phone, personal digital assistant (PDA), individual media Player device, wireless network browsing apparatus, personal helmet, application specific equipment or may include any of the above function The mixing apparatus of energy.It calculates equipment 100 and is also implemented as including that desktop computer and the personal of notebook computer configuration are counted Calculation machine.In some embodiments, equipment 100 is calculated to be configured as executing according to the present invention be used for the face progress in image The generation method and age recognition methods of the convolutional neural networks of age identification.Using 122 include it is according to the present invention for pair Face in image carries out the convolutional neural networks generating means 600 and age identification device 700 of age identification.
Fig. 2 shows according to an embodiment of the invention for carrying out the convolution mind of age identification to the face in image Flow chart through network generation method 200.For carrying out the convolutional neural networks generation side of age identification to the face in image Method 200 is suitable for executing in calculating equipment (such as calculating equipment 100 shown in FIG. 1).
As shown in Fig. 2, method 200 starts from step S210.In step S210, according to the face image data obtained in advance Set is trained so that the first convolutional neural networks are suitable for identification face, facial image number the first convolutional neural networks It include multiple human face image informations according to set, each facial image information includes the age letter of people in facial image and correspondence image Breath, the first convolutional neural networks include that the multiple convolution groups being sequentially connected, the first full articulamentum, the second full articulamentum, third are complete Articulamentum and the first classifier.Wherein, the facial image of each human face image information keeps water in face image data set Straight and even face and meet pre-set dimension, the age that the facial image corresponds to people is integer between 0~100, the first convolutional Neural It include at least one convolutional layer in each convolution group of network.
In the present embodiment, face image data collection is combined into the human face data collection of MsCeleb, in the face data set For human face image information comprising facial image be image after rotation processing, i.e., the facial image is revolved in advance Switch to horizontal front, and facial image is Three Channel Color image, pre-set dimension is 224px × 224px.First convolution nerve net Network is that one kind, Fig. 4 show the structure of the first convolutional neural networks according to an embodiment of the invention in the VGG model used Schematic diagram.As shown in figure 4, in the first convolutional neural networks, including five convolution groups, using the first convolution group as input terminal, after Face is sequentially connected the second convolution group, third convolution group, Volume Four product group, the 5th convolution group, the first full articulamentum, the second full connection Layer, the full articulamentum of third and the first classifier, wherein the first classifier is output end, it is the defeated of the first convolution group with facial image Enter, the age of people is that the output of the first classifier carries out the training of the first convolutional neural networks in correspondence image.In fact, adjacent Two convolution groups between there is a down-sampling layer, and there is also under one between the 5th convolution group and the first full articulamentum Each down-sampling layer is successively become the first down-sampling layer, the second down-sampling according to the sequence from input terminal to output end by sample level Layer, third down-sampling layer, the 4th down-sampling layer and the 5th down-sampling layer.It include two in first convolution group and the second convolution group Convolutional layer, it includes three convolutional layers in group and the 5th convolution group that third convolution group, Volume Four, which are accumulated,.With face image data set In human face image information A for be illustrated, human face image information A includes the age of people in facial image A1 and correspondence image Information A2, A2 are 7 years old.
In the first convolutional neural networks, A1 is input to the first convolution group first.A1 is Three Channel Color image, size For 224px × 224px.Two convolutional layers in first convolution group have 64 convolution kernels, each convolution in first convolutional layer The number of parameters of core is 3 × 3 × 3, and the convolution kernel for being equivalent to 33 × 3 sizes carries out convolution, step-length 1 in each channel.Through After crossing the convolution of first convolutional layer, according to (2243)/1+1=222 it is found that the size of the image obtained at this time be 222px × 222px obtains the characteristic pattern of 64 222px × 222px sizes.Since triple channel being closed in first convolutional layer Convolution is carried out together, therefore the input of second convolutional layer is the single channel image of 64 222px × 222px.Second convolution The number of parameters of each convolution kernel is 3 × 3 in layer, and the convolution kernel for being equivalent to 13 × 3 size carries out convolution, step-length 1.Then pass through After crossing the convolution of second convolutional layer, according to (222-3)/1+1=220 it is found that obtain 64 220px × 220px at this time big Small characteristic pattern.Then, into the first down-sampling layer, down-sampling is also known as pond, is the principle using image local correlation, Sub-sample is carried out to image, to reduce under data processing and retain useful information.Herein, pondization uses Maximum overlap pond Change, i.e., piecemeal is carried out to the characteristic pattern of 220px × 220x, each piece of size is 2 × 2, step-length 2, and counts each piece Maximum value, the pixel value as Chi Huahou image.According to (220-2)/2+1=27 it is found that the characteristic pattern of Chi Huahou having a size of 110px × 110px, then by obtaining the characteristic pattern of 64 110px × 110px after the first down-sampling layer.
Two convolutional layers in second convolution group have 128 convolution kernels, and three convolutional layers in third convolution group have 256 convolution kernels, three convolutional layers that Volume Four is accumulated in group have 512 convolution kernels, three convolutional layers in the 5th convolution group Also have 512 convolution kernels, wherein the number of parameters of each convolution kernel is 3 × 3, be equivalent to the convolution kernel of 13 × 3 size into Row convolution, step-length 1.Second down-sampling layer, third down-sampling layer, the 4th down-sampling layer and the 5th down-sampling layer are all made of maximum Overlapping pool, the size for carrying out the block of piecemeal processing to characteristic pattern is 2 × 2, step-length 2, according under the first convolution group and first The treatment process of sample level, the output for finally obtaining the 5th down-sampling layer is the characteristic pattern of 512 2px × 2px.Wherein, into When row Maximum overlap pond, since the side length of characteristic pattern is not necessarily 2 multiple, the processing side for retaining edge is taken Method, i.e., by the side length of characteristic pattern with 0 be filled with 2 multiple, then carry out pond again.In fact, completing to roll up in each convolutional layer After product processing, it is also necessary to which the output for adjusting the convolutional layer by activation primitive, avoiding next layer of output is upper one layer of line Property combination and arbitrary function can not be approached.Using ReLU (Rectified Linear Unit), function is as activation primitive, into one Step alleviates overfitting problem, and expression formula is f (x)=max (0, wx+b), and wherein wx+b is conventional linear function.Often A convolutional layer completes the characteristic pattern obtained after process of convolution to image, may be applicable to the adjustment of above-mentioned activation primitive, below will It repeats no more.
Then, into the first full articulamentum, the neuron number of the first full articulamentum selects 4096, then the first full connection The output of layer is the characteristic pattern of 4096 1px × 1px sizes.In actual treatment, it will usually first lead to above-mentioned 4096 characteristic patterns The activation of ReLU function is crossed, then carries out dropout processing, dropout can be understood as model and be averaged, i.e., in forward direction in training process When conduction, the activation value of some neuron is allowed to stop working with certain Probability p, i.e. the activation value of the neuron is become with Probability p It is 0.For example, the neuron of the first full articulamentum is 4096, if dropout ratio selection 0.4, then this layer of neuron warp It crosses after dropout, wherein there are about the values of 1638 neurons to be set to 0, is equivalent to by preventing the collaboration of certain features from making For alleviating over-fitting, the phenomenon that appearance of a neuron is dependent on another neuron is avoided.By dropout, treated Characteristic pattern is input in the second full articulamentum, and the neuron number of the second full articulamentum is still 4096, then its output is 4096 The characteristic pattern for opening 1px × 1px size can equally first pass through the activation of ReLU function to it, then carry out dropout processing, and will place Result after reason is input in the full articulamentum of third.It is classification problem more than one due to being identified to the age, and in this reality Applying age in example is the integer between 0~100, therefore the neuron number of the full articulamentum of third is chosen as 101, then final the Three full articulamentum outputs are also 101, respectively correspond the probability at 0~100 this 101 ages.First classifier selects softmax Classifier, output are the maximum probability corresponding age, which should be the age A2 of facial image A1.About softmax points The content of class device is not repeated herein for mature technological means.In order to train the first convolutional neural networks, according to input The corresponding age A2 of facial image A1 be 7 years old this foreseen outcome, the output of the first classifier is adjusted, by minimization The method backpropagation of error is to adjust each parameter in the first convolutional neural networks.By a large amount of in face image data set Human face image information be trained after, obtain trained first convolutional neural networks.
In step S220, according to preset age threshold to each of face image data set face image information It is handled, to add new age threshold attribute for each human face image information, age threshold attribute indicates corresponding people Age be greater than preset age threshold and be also no more than preset age threshold.In the present embodiment, preset age threshold Value is 12, then age threshold attribute added by each human face image information in face image data set, can indicate corresponding people Age be greater than 12 years old and be also no more than 12 years old.
Then, S230 is entered step, the third in the first convolutional neural networks trained in step S210 is connected entirely Layer and the first classifier replace with the 4th full articulamentum and the second classifier respectively, to generate the second convolutional neural networks, and root The second convolutional neural networks are trained according to the face image data set for being added to age threshold attribute, so as to the second convolution The age of people corresponding to the output instruction face of second classifier of neural network is above age threshold and is also no greater than the age Threshold value.In the present embodiment, the neuron of the 4th full articulamentum should be 2, and the result of output is to be greater than 12 years old and not at the age Probability greater than 12 years old then corresponds to the softmax classifier of the second classifier for the corresponding the range of age of output probability the larger value. By taking human face image information A as an example, the age A2 in human face image information A is 7 years old, after adding age threshold attribute, it is known that year Age A2 is not higher than age threshold, that is, is not more than 12 years old.Using facial image A1 as the first convolution group in the second convolutional neural networks Input, the age be not more than the output as the second classifier in the second convolutional neural networks in 12 years old, to the second convolution nerve net Network carries out fine-tune training.Fig. 5 shows the structural representation of the second convolutional neural networks according to an embodiment of the invention Figure.As shown in figure 5, the second convolutional neural networks and the first convolutional neural networks are completely the same in hierarchical structure.
Next, in step S240, trained second convolutional neural networks in obtaining step S230, trained After the first full articulamentum in second convolutional neural networks, the 5th full articulamentum, the 6th full articulamentum being sequentially connected are added With third classifier, to generate third convolutional neural networks, and select in face image data set, the age is no more than presetting The human face image information of age threshold third convolutional neural networks are trained, so as to the third of third convolutional neural networks The age of people corresponding to the output instruction face of classifier is which of zero to default age threshold.6th full articulamentum Including multiple full articulamentums of son in parallel, the number of the full articulamentum of son is that preset age threshold adds the sum of 1.Fig. 6 shows root According to the structural schematic diagram of the third convolutional neural networks of one embodiment of the invention.As shown in fig. 6, the first full articulamentum it Afterwards, the 5th full articulamentum, the 6th full articulamentum and the third classifier being sequentially connected are added to, respectively with the second full articulamentum, 4th full articulamentum and the second classifier are in same level, so as to form respectively with the first classifier be output first point Branch and with the second classifier be export the second branch.The number of neuron is 4096 in 5th full articulamentum, the 6th Quan Lian It connects layer to be made of 13 full articulamentums of son, therefore this full articulamentum of 13 sons and the 4th full articulamentum are same level, are selected Softmax classifier is as third classifier.It should be noted that in the 6th full articulamentum 13 full articulamentums of son neuron Number is 2, and the output result of each full articulamentum of son is number 1 and digital 0 corresponding probability, then classifies as third The softmax classifier of device exports according to the size of probability value greater probability and is worth corresponding number.
In the present embodiment, human face image information third convolutional neural networks being trained, using face figure As in data acquisition system, the age be not more than 12 years old human face image information, that is, the age of the human face image information used should be 0~12 Integer in year.In hands-on, third convolutional neural networks are trained using Ordinal loss as loss function. About Ordinal loss, i.e. order loss is generally handled by ordered logistic regress model, is directed to for one kind The homing method of ordinal scale dependent variable data can utilize predictive variable, such as classifying type variable and numeric type variable, to orderly The modeling that the response variable of classificatory scale type is returned, relevant technology contents repeat no more here.
Finally, enter step S250, step S240 the first full connection in trained third convolutional neural networks After layer, the 7th full articulamentum, eight convergent points articulamentum and the 4th classifier being sequentially connected are added, to generate Volume Four product nerve Network, and Volume Four product neural network is trained according to face image data set, so that the output of the 4th classifier refers to It lets others have a look at age of people corresponding to face.The structure that Fig. 7 shows Volume Four product neural network according to an embodiment of the invention is shown It is intended to.As shown in fig. 7, after the first full articulamentum, be added to the 7th full articulamentum being sequentially connected, eight convergent points articulamentum and 4th classifier, so as to form respectively with the first branch that the second classifier is output, with third classifier is output the Two branches and with the 4th classifier be output third branch.7th full articulamentum and the second full articulamentum, the 5th full articulamentum For same level, neuron number is 4096, and eight convergent points articulamentum and the 4th full articulamentum, the 6th full articulamentum are same layer Grade, neuron number are 101, and the 4th classifier and the second classifier, third classifier are same level, same to select Softmax classifier is as the 4th classifier.In hands-on, using Euclidean loss as loss function to Volume Four Product neural network is trained.About Euclidean loss, i.e. Euclidean distance is lost, and function expression is as follows:
Wherein, predicted valueLabel value y ∈ [- ∞ ,+∞], N are number of samples.About Euclidean The realization of loss has mature technical method, is not repeated herein.
Fig. 3 shows the convolution for being used to carry out the face in image age identification of another embodiment according to the present invention The flow chart of neural network generation method 300.As shown in figure 3, step S310, S320, S330, S340 and S350 of method 300 It corresponds, is consistent respectively with step S210, S220, S230, S240 and S250 of method 200 in Fig. 2, and in step Step S360 is increased before S340, step S370 is increased before step S350.
In step S360, in face image data set, the age be not more than preset age threshold facial image The age of information carries out 0/1 coding, and 0/1 coding includes adding the sum of 1 with preset age threshold for number of encoding bits, each is number Any one of word 0 and number 1, since first place, the difference that the number that number 1 occurs subtracts 1 is the age.In the present embodiment In, to the human face image information that third convolutional neural networks are trained, using in face image data set, the age not Human face image information greater than 12 years old, that is, the age of the human face image information used should be the integer in 0~12 years old.With face figure As for information A comprising age A2 be 7 years old, can be used for training third convolutional neural networks.Firstly, being carried out to age A2 0/1 coding, the digit of 0/1 coding is 13, and since first place, the difference that the number that number 1 occurs subtracts 1 is 7, then explanation is opened from first place Beginning sequentially to amount to has 8 continuous numbers 1, therefore 7 years old corresponding 0/1 is encoded to 1111111100000.To in step In S340, the age 1111111100000 after 0/1 coding is carried out in obtaining step S360 to age A2, by human face image information A In facial image A1 as the input of the first convolution group, age in the third convolutional neural networks generated in step S330 1111111100000 output as third classifier in the third convolutional neural networks generated in step S330, with Ordinal Loss is trained third convolutional neural networks as loss function.
And in step S370, distributed code is carried out to the age of human face image information in face image data set, point Cloth coding includes carrying out age coding according to Gaussian Profile.In the present embodiment, distributed code is carried out to the age to refer to one The numerical value at age is indicated with a Gaussian Profile.And in face image data set human face image information age be 0~ Integer in 100, then to 0,1,2 ..., 99,100 this 101 integers there is the general of a corresponding Gaussian distributed The expression formula of rate density function, the function is as follows:
X is the integer in 0~100
In formula, px(i) indicating that age i obeys a mean value is x, variance δ2Gaussian Profile.
For example, the human face image information B in face image data set comprising in facial image B1 and correspondence image The age information B2 of people, wherein age B2 is 28 years old.At this point, the value of x is 28, corresponding probability density function are as follows:
As can be seen from the above equation, the probability density function p obtained after distributed code is carried out to age B228(i) for, work as i When=28, p28(i) maximum value p is obtained28(28)。
Since the output result of eight convergent points articulamentum is 0~100 years old this corresponding probability of 101 age numerical value, and conduct The softmax classifier of 4th classifier exports the most probable value corresponding age, therefore in step for according to the size of probability value It is using facial image B1 as step S340 Volume Four generated when being trained in rapid S350 to Volume Four product neural network The input of first convolution group in product neural network, age B2 carry out the result after distributed code as step in step S370 The output of eight convergent points articulamentum in S340 Volume Four product neural network generated, using Euclidean loss as loss function Volume Four product neural network is trained.
Fig. 8 shows the flow chart of age recognition methods 400 according to an embodiment of the invention.Age recognition methods 400 are suitable for executing in calculating equipment (such as calculating equipment 100 shown in FIG. 1), based on for carrying out to the face in image Age identification convolutional neural networks generation method in, trained Volume Four product neural network carry out age identification.
As shown in figure 4, method 400 starts from step S410.In step S410, facial image to be identified is input to training Age identification is carried out in good Volume Four product neural network.In the present embodiment, are carried out to two facial images to be identified the age Identification, the corresponding age of image one are 9 years old, and the corresponding age of image two is 43 years old, and image one and image two are input to training Age identification is carried out in good Volume Four product neural network.
Then, it enters step S420, after carrying out age identification to facial image to be identified in judgment step S410, trains Volume Four product neural network in the output of the second classifier whether be greater than preset age threshold.For image one, judgement The output of second classifier is not more than 12 years old, for image two, judges that the output of the second classifier is greater than 12 years old.
Next, in step S430, if the output of the second classifier is to obtain step no more than preset age threshold After carrying out age identification to facial image to be identified in rapid S410, third classifier in trained Volume Four product neural network Output is the age of people corresponding to face.Since the output of corresponding second classifier of image one is no more than preset age threshold Value is not more than 12 years old, then the age for obtaining the output of third classifier is final result, 1111111111000 is expressed as, from head Position start it is total have 10 continuous numbers 1, thus identify that age be 9 years old, it is consistent with true value.
And in step S440, if the output of the second classifier is greater than preset age threshold, obtaining step S410 In age identification carried out to facial image to be identified after, the output of the 4th classifier is in trained Volume Four product neural network The age of people corresponding to face.Because greater than preset age threshold, i.e., greatly the output of corresponding second classifier of image two is In 12 years old, then the age for obtaining the output of the 4th classifier was final result, and 101 due to eight convergent points articulamentum output at this time are general The 44th numerical value is maximum in rate value, therefore the age of the 4th classifier output is 43 years old, consistent with true value.
Fig. 8 shows the flow chart of the age recognition methods 500 of another embodiment according to the present invention.Age recognition methods 500 are suitable for executing in calculating equipment (such as calculating equipment 100 shown in FIG. 1), based on for carrying out to the face in image Age identification convolutional neural networks generation method in, trained Volume Four product neural network carry out age identification.Such as Fig. 8 institute Show, step S510, S520, S530 and S540 of method 500 and step S410, S420, S430 and S440 in method 400 distinguish It corresponds, is consistent, and increase step S550 before step S510.
In step S550, images to be recognized is pre-processed to obtain facial image to be identified.This is because right Before face in images to be recognized carries out age identification, need first to extract the facial image in images to be recognized. Firstly, carrying out Face datection to images to be recognized, face location information is obtained;By face location information, by images to be recognized In face cut after conversion to pre-set dimension;The transformation square that face carries out Plane Rotation is calculated according to face key point information Battle array;The facial image under pre-set dimension is rotated into horizontal front to obtain facial image to be identified using transformation matrix.At this In embodiment, to the advanced row Face datection of images to be recognized, i.e., first determine that scan image is carried out in a region, to each sector scanning The position arrived carries out feature extraction, then classification processing to judge whether the position includes face.For there are human face regions Images to be recognized is converted after cutting face to 224px × 224px size.Due to above-mentioned face location generally i.e. refer to face and Outer profile, then face rotational value needs the line of two fixing points determination to obtain, and selects pupil as fixed point, passes through two The line and facial image horizontal line of pupil calculate an angle, use affine transformation by the angle, obtain spin matrix, After using spin matrix to the image, face can be rotated to be to interpupillary line and image level line is in parallel relation, thus It obtains and keeps horizontal positive facial image to be identified.According to the line of pupil two o'clock in face, this line and horizontal line are calculated Angle to obtain the angle A ngleValue of rotation, and can be into using the get RotationMatrix2D function in OpenCV The relevant calculation of the row spin matrix carries out face rotation using warpAffine, and specific function is as follows:
RotateMatrix=cv2.getRotationMatrix2D (center=(Img.shape [1]/2, Img.shape [0]/2), angle=AngleValue, scale=1)
RotImg=cv2.warpAffine (Img, RotateMatrix, (Img.shape [0] * 2, Img.shape [1] * 2))
Figure 10 shows according to an embodiment of the invention for carrying out the convolution of age identification to the face in image The schematic diagram of neural network generating means 600.The device includes: the first training module 610, the life of attribute adding module 620, first At module 630, the second training module 640, the second generation module 650, third training module 660, third generation module 670 and Four training modules 680.
First training mould 610 is suitable for according to the face image data set that obtains in advance, to the first convolutional neural networks into Row training is suitable for identification face so as to the first convolutional neural networks, and face image data set is believed comprising multiple facial images Breath, each facial image information includes the age information of people in facial image and correspondence image, and the first convolutional neural networks include Multiple convolution groups, the first full articulamentum, the second full articulamentum, the full articulamentum of third and the first classifier being sequentially connected.Wherein, The holding of the facial image of each human face image information is horizontal positive in face image data set and meets pre-set dimension, face The age that image corresponds to people is integer between 0~100, includes at least one in each convolution group of the first convolutional neural networks Convolutional layer.
Attribute adding module 620 is suitable for according to preset age threshold to each of face image data set face figure As information is handled, to add new age threshold attribute, the instruction pair of age threshold attribute for each human face image information The age of the people answered is greater than preset age threshold and is also no more than preset age threshold.Wherein, preset age threshold It is 12.
First generation module 630 is connected with the first training module 610, and being suitable for will be trained in the first training module 610 The full articulamentum of third and the first classifier in first convolutional neural networks replace with the 4th full articulamentum and the second classification respectively Device, to generate the second convolutional neural networks.
Second training module 640 is connected with attribute adding module 620 and the first generation module 630 respectively, is suitable for according to category The face image data set of age threshold attribute is added in property adding module 620, it is generated to the first generation module 630 Second convolutional neural networks are trained, corresponding to the output instruction face so as to the second classifier of the second convolutional neural networks The age of people is above age threshold and is also no greater than age threshold.
Second generation module 650 is connected with the second training module 640, is suitable for obtaining the second training module 640 trained Second convolutional neural networks, after the first full articulamentum in trained second convolutional neural networks, addition is sequentially connected The 5th full articulamentum, the 6th full articulamentum and third classifier, to generate third convolutional neural networks.Wherein, the 6th Quan Lian Connecing layer includes multiple full articulamentums of son in parallel, and the number of the full articulamentum of son is that preset age threshold adds the sum of 1.
Third training module 660 is connected with the second generation module 650, is suitably selected in face image data set, the age No more than default age threshold human face image information to the third convolutional neural networks generated in the second generation module 650 It is trained, the age of people corresponding to the output instruction face so as to the third classifier of third convolutional neural networks is zero to institute Which of default age threshold.
Third generation module 670 is connected with third training module 660, is suitable for obtaining third training module 670 trained Third convolutional neural networks, after the first full articulamentum in trained third convolutional neural networks, addition is sequentially connected The 7th full articulamentum, eight convergent points articulamentum and the 4th classifier, with generate Volume Four product neural network.
4th training module 680 is connected with third generation module 670, is suitable for raw to third according to face image data set It is trained at the Volume Four generated of module 670 product neural network, corresponding to the output instruction face so as to the 4th classifier The age of people.
Figure 11 shows the schematic diagram of the age identification device 700 according to this method another embodiment.As shown in figure 11, The first training module 710, attribute adding module 720, the first generation module 730, the second training module 740, second of device 700 Generation module 750, third training module 760, third generation module 770 and the 4th training module 780, respectively with device in Figure 10 600 the first training module 610, attribute adding module 620, the first generation module 630, the second training module 640, second generate Module 650, third training module 660, third generation module 670 and the 4th training module 680 correspond, and are consistent, and It has increased the first coding module 790 being connected with third training module 760 newly and second to be connected with the 4th training module 780 encodes Module 792.
First coding module 791 is connected with third training module 760, be suitable for in face image data set, the age not Age greater than the human face image information of preset age threshold carries out 0/1 coding, and 0/1 coding includes with preset age threshold Add the sum of 1 for number of encoding bits, each is any one of number 0 and number 1, and since first place, the number that number 1 occurs subtracts 1 difference is the age.In turn, third training module 760 is suitably selected in face image data set, the age is no more than default The human face image information of age threshold is trained the third convolutional neural networks generated in the second generation module 750, wherein For training the age of the human face image information of third convolutional neural networks to carry out coded treatment by the first coding module 791.
Second coding module 792 is connected with the 4th training module 780, is suitable for facial image in face image data set The age of information carries out distributed code, and distributed code includes carrying out age coding according to Gaussian Profile.Then the 4th training module 780 Suitable for being trained according to face image data set to the Volume Four generated of third generation module 770 product neural network, In for train Volume Four product neural network human face image information by the second coding module 792 carry out coded treatment.
The specific steps and reality generated about the convolutional neural networks for carrying out age identification to the face in image Example is applied, has been disclosed in detail in the description based on Fig. 2-7, details are not described herein again.
Figure 12 shows the schematic diagram of age identification device 800 according to an embodiment of the invention.Age identification device 800 based on for in image face carry out age identification convolutional neural networks generating means in, trained Volume Four Product neural network carries out age identification, which includes: identification module 810, judgment module 820 and acquisition module 830.Wherein, Identification module 810 is connected with judgment module 810, suitable for facial image to be identified is input to trained Volume Four product nerve net Age identification is carried out in network.Judgment module 820 is suitable for the trained Volume Four for judging that identification module 810 carries out after age identification Whether the output of the second classifier is greater than preset age threshold in product neural network.Obtain module 830 respectively with identification module 810 are connected with judgment module 820, suitable for judging the output of the second classifier no more than the preset age when judgment module 820 When threshold value, obtains identification module 810 and carry out third classifier in the trained Volume Four product neural network after age identification Output is the age of people corresponding to face, when the output of the second classifier is greater than preset age threshold, obtains identification module 810 outputs for carrying out the 4th classifier in the trained Volume Four product neural network after age identification are people's corresponding to face Age.
Figure 13 shows the schematic diagram of the age identification device 900 of another embodiment according to the present invention.Age identification dress Set 900 based on for in image face carry out age identification convolutional neural networks generating means in, the trained 4th Convolutional neural networks carry out age identification.As shown in figure 13, the identification module 910 of device 900, judgment module 920 and acquisition mould Block 930 corresponds with the identification module 810 of device 800, judgment module 820 and acquisition module 830 in Figure 12 respectively, is one It causes, and has increased preprocessing module 940 newly, be connected with identification module 910, suitable for being pre-processed images to be recognized to obtain Facial image to be identified, so that the facial image to be identified obtained from preprocessing module 940 is input to training by identification module 910 Age identification is carried out in good Volume Four product neural network.Preprocessing module 940 is further adapted for carrying out people to images to be recognized Face detection, obtains face location information;By the face location information, turn after the face in the images to be recognized is cut Shift to pre-set dimension;The transformation matrix that face carries out Plane Rotation is calculated according to face key point information;Utilize the transformation square Facial image under pre-set dimension is rotated into horizontal front to obtain facial image to be identified by battle array.
About the specific steps and embodiment of age identification, it has been disclosed in detail in the description based on Fig. 8-9, herein It repeats no more.
In existing face age recognition methods, age true value is replaced using age distribution value, the result got is in A certain age range, it is not accurate enough, even if VGG model is taken to carry out age identification, it is also desirable to be taken according to the distribution of age bracket Multiple models are realized, complex, and versatility is lower.It is according to the present invention to be used to carry out age knowledge to the face in image The technical solution that other convolutional neural networks generate, is first trained the first convolutional neural networks, the first convolution nerve net It include multiple convolution groups, multiple full articulamentums and the first classifier being sequentially connected in network, by trained first convolutional Neural The full articulamentum in part and the first classifier in network are replaced accordingly, are generated the second convolutional neural networks and are carried out to it Training, then the full articulamentum and classifier new to the addition of trained second convolutional neural networks, to generate third convolutional Neural Network is simultaneously trained, finally new to the addition of trained third convolutional neural networks full articulamentum and classifier, to generate Volume Four product neural network is simultaneously trained.In the above-mentioned technical solutions, using convolutional neural networks as basic frame, and in life At each convolutional neural networks in case before training, compiled to such as age threshold segmentation, 0/1 is carried out for trained face image data The processing such as code and age distribution coding, auxiliary gradually modify the model of convolutional neural networks, and ultimately forming one can accurately identify The convolutional neural networks model at age, without segmentation, succinct intuitive, versatility is stronger.In turn, age identification according to the present invention Facial image to be identified is input in trained Volume Four product neural network, according to the output of different classifications device by method Judge the range of age and its specific value, as a result accuracy has huge promotion.

Claims (21)

1. it is a kind of for carrying out the convolutional neural networks generation method of age identification to the face in image, it is suitable for calculating equipment Middle execution, the method includes the steps:
According to the face image data set obtained in advance, the first convolutional neural networks are trained so as to first convolution Neural network is suitable for identification face, and the face image data set includes multiple human face image informations, each facial image Information includes the age information of people in facial image and correspondence image, first convolutional neural networks include be sequentially connected it is more A convolution group, the first full articulamentum, the second full articulamentum, the full articulamentum of third and the first classifier;
Each of face image data set face image information is handled according to preset age threshold, so as to New age threshold attribute is added for each human face image information, the age threshold attribute indicates that the age of corresponding people is big Preset age threshold is also no more than in preset age threshold;
By in trained first convolutional neural networks the full articulamentum of third and the first classifier replace with the 4th Quan Lian respectively Layer and the second classifier are connect, to generate the second convolutional neural networks, and according to the face figure for being added to age threshold attribute As data acquisition system is trained the second convolutional neural networks, so as to second convolutional neural networks the second classifier it is defeated Indicate that the age of people corresponding to face is above the age threshold and is also no greater than the age threshold out;
After the first full articulamentum in trained second convolutional neural networks, the full connection of the 5th be sequentially connected is added Layer, the 6th full articulamentum and third classifier, to generate third convolutional neural networks, and select the face image data set In, the age third convolutional neural networks are trained no more than the human face image information of default age threshold, with toilet The age of people corresponding to the output instruction face of the third classifier of third convolutional neural networks is stated by zero to default age threshold Which of value;
After the first full articulamentum in trained third convolutional neural networks, the full connection of the 7th be sequentially connected is added Layer, eight convergent points articulamentum and the 4th classifier, to generate Volume Four product neural network, and according to the face image data set Volume Four product neural network is trained, the year of people corresponding to the output instruction face so as to the 4th classifier Age.
2. the method as described in claim 1, the facial image of each human face image information in the face image data set The horizontal front of holding and meet pre-set dimension, the facial image correspond to the age of people as the integer between 0~100.
3. it is method according to claim 1 or 2, it include at least one in each convolution group of first convolutional neural networks Convolutional layer.
4. the method as described in claim 1, in the first full articulamentum in trained second convolutional neural networks Later, the 5th full articulamentum, the 6th full articulamentum and the third classifier being sequentially connected are added, to generate third convolutional Neural net Before the step of network, further comprise the steps of:
To in the face image data set, the age no more than preset age threshold human face image information age carry out 0/1 coding, 0/1 coding include adding the sum of 1 with preset age threshold for number of encoding bits, each is number 0 and number 1 Any one of, since first place, the difference that the number that number 1 occurs subtracts 1 is the age.
5. the method as described in claim 1, the 6th full articulamentum includes multiple full articulamentums of son in parallel, the full connection of son The number of layer is that preset age threshold adds the sum of 1.
6. the method as described in claim 1, in the first full articulamentum in trained third convolutional neural networks Later, the 7th full articulamentum, eight convergent points articulamentum and the 4th classifier being sequentially connected are added, to generate Volume Four product nerve net Before the step of network, further comprise the steps of:
Distributed code is carried out to the age of human face image information in face image data set, the distributed code includes according to height This distribution carries out age coding.
7. the method as described in claim 1, the preset age threshold is 12.
8. a kind of age recognition methods, suitable for executing in calculating equipment, the method is based on any one of claim 1-7 institute The trained Volume Four product neural network stated carries out age identification to the face in image, comprising steps of
Facial image to be identified is input in trained Volume Four product neural network and carries out age identification;
Judge whether the output of the second classifier in the trained Volume Four product neural network is greater than preset age threshold;
If the output of second classifier is to obtain the trained Volume Four product mind no more than preset age threshold Output through third classifier in network is the age of people corresponding to face;
If the output of second classifier is to obtain the trained Volume Four product nerve greater than preset age threshold The output of the 4th classifier is the age of people corresponding to face in network.
9. method according to claim 8 further includes being pre-processed to images to be recognized to obtain facial image to be identified.
10. method as claimed in claim 9, described to be pre-processed to images to be recognized to obtain facial image packet to be identified It includes:
Face datection is carried out to images to be recognized, obtains face location information;
By the face location information, convert after the face in the images to be recognized is cut to pre-set dimension;
The transformation matrix that face carries out Plane Rotation is calculated according to face key point information;
The facial image under pre-set dimension is rotated into horizontal front to obtain facial image to be identified using the transformation matrix.
11. it is a kind of for carrying out the convolutional neural networks generating means of age identification to the face in image, suitable for residing in meter It calculates in equipment, described device includes:
First training module, suitable for being instructed to the first convolutional neural networks according to the face image data set obtained in advance Practice so that first convolutional neural networks are suitable for identification face, the face image data set includes multiple facial images Information, each facial image information include the age information of people in facial image and correspondence image, the first convolution nerve net Network includes the multiple convolution groups being sequentially connected, the first full articulamentum, the second full articulamentum, the full articulamentum of third and the first classification Device;
Attribute adding module is suitable for according to preset age threshold to each of face image data set face image Information is handled, to add new age threshold attribute, the age threshold attribute instruction for each human face image information The age of corresponding people is greater than preset age threshold and is also no more than preset age threshold;
First generation module, suitable for by the full articulamentum of third and the first classifier point in trained first convolutional neural networks The 4th full articulamentum and the second classifier are not replaced with, to generate the second convolutional neural networks;
Second training module, suitable for being added to the face image data set of age threshold attribute according to the second convolution mind It is trained through network, the year of people corresponding to the output instruction face so as to the second classifier of second convolutional neural networks Age is above the age threshold and is also no greater than the age threshold;
Second generation module, after the first full articulamentum in trained second convolutional neural networks, addition is successively Connected the 5th full articulamentum, the 6th full articulamentum and third classifier, to generate third convolutional neural networks;
Third training module is suitably selected in the face image data set, the age is no more than default age threshold Human face image information is trained third convolutional neural networks, so as to the third classifier of the third convolutional neural networks The age of people corresponding to output instruction face is which of zero to default age threshold;
Third generation module, after the first full articulamentum in trained third convolutional neural networks, addition is successively Connected the 7th full articulamentum, eight convergent points articulamentum and the 4th classifier, to generate Volume Four product neural network;
4th training module, suitable for being trained according to the face image data set to Volume Four product neural network, The age of people corresponding to output instruction face so as to the 4th classifier.
12. device as claimed in claim 11, the face figure of each human face image information in the face image data set As the horizontal front of equal holdings and meet pre-set dimension, the facial image correspond to the age of people as the integer between 0~100.
It include at least 13. the device as described in claim 11 or 12, in each convolution group of first convolutional neural networks One convolutional layer.
14. device as claimed in claim 11 further includes the first coding module, is suitable for:
To in the face image data set, the age no more than preset age threshold human face image information age carry out 0/1 coding, 0/1 coding include adding the sum of 1 with preset age threshold for number of encoding bits, each is number 0 and number 1 Any one of, since first place, the difference that the number that number 1 occurs subtracts 1 is the age.
15. device as claimed in claim 11, the 6th full articulamentum includes multiple full articulamentums of son in parallel, sub- Quan Lian The number for connecing layer is that preset age threshold adds the sum of 1.
16. device as claimed in claim 11 further includes the second coding module, is suitable for:
Distributed code is carried out to the age of human face image information in face image data set, the distributed code includes according to height This distribution carries out age coding.
17. device as claimed in claim 11, the preset age threshold is 12.
18. a kind of age identification device calculates in equipment suitable for residing in, described device is based on any in claim 11-17 Trained Volume Four product neural network described in carries out age identification to the face in image, comprising:
Identification module carries out age knowledge suitable for facial image to be identified to be input in trained Volume Four product neural network Not;
Judgment module, suitable for judging in the trained Volume Four product neural network after the identification module carries out age identification the Whether the output of two classifiers is greater than preset age threshold;
Module is obtained, when suitable for judging the output of the second classifier when the judgment module no more than preset age threshold, It obtains the identification module and carries out the output of third classifier in the trained Volume Four product neural network after age identification and be The age of people corresponding to face, when the judgment module judges the output of the second classifier greater than preset age threshold, It obtains the identification module and carries out the output of the 4th classifier in the trained Volume Four product neural network after age identification and be The age of people corresponding to face.
19. device as claimed in claim 18 further includes preprocessing module, suitable for being pre-processed images to be recognized to obtain Take facial image to be identified.
20. device as claimed in claim 19, the preprocessing module is further adapted for:
Face datection is carried out to images to be recognized, obtains face location information;
By the face location information, convert after the face in the images to be recognized is cut to pre-set dimension;
The transformation matrix that face carries out Plane Rotation is calculated according to face key point information;
The facial image under pre-set dimension is rotated into horizontal front to obtain facial image to be identified using the transformation matrix.
21. a kind of calculating equipment, comprising:
The convolutional neural networks for being used to carry out the face in image age identification as described in any one of claim 11-17 Generating means;And
Age identification device as described in any one of claim 18-20.
CN201610925676.0A 2016-10-24 2016-10-24 A kind of convolutional neural networks generation method, age recognition methods and relevant apparatus Active CN106485235B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610925676.0A CN106485235B (en) 2016-10-24 2016-10-24 A kind of convolutional neural networks generation method, age recognition methods and relevant apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610925676.0A CN106485235B (en) 2016-10-24 2016-10-24 A kind of convolutional neural networks generation method, age recognition methods and relevant apparatus

Publications (2)

Publication Number Publication Date
CN106485235A CN106485235A (en) 2017-03-08
CN106485235B true CN106485235B (en) 2019-05-03

Family

ID=58270488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610925676.0A Active CN106485235B (en) 2016-10-24 2016-10-24 A kind of convolutional neural networks generation method, age recognition methods and relevant apparatus

Country Status (1)

Country Link
CN (1) CN106485235B (en)

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106980830A (en) * 2017-03-17 2017-07-25 中国人民解放军国防科学技术大学 One kind is based on depth convolutional network from affiliation recognition methods and device
CN106874964B (en) * 2017-03-30 2023-11-03 李文谦 Foot-type image size automatic prediction method and prediction device based on improved convolutional neural network
CN107122798A (en) * 2017-04-17 2017-09-01 深圳市淘米科技有限公司 Chin-up count detection method and device based on depth convolutional network
CN107194407B (en) * 2017-05-18 2020-04-07 网易(杭州)网络有限公司 Image understanding method and device
JP6729516B2 (en) * 2017-07-27 2020-07-22 トヨタ自動車株式会社 Identification device
CN107527024A (en) * 2017-08-08 2017-12-29 北京小米移动软件有限公司 Face face value appraisal procedure and device
CN108021863B (en) * 2017-11-01 2022-05-06 平安科技(深圳)有限公司 Electronic device, age classification method based on image and storage medium
CN107622261A (en) * 2017-11-03 2018-01-23 北方工业大学 Face age estimation method and device based on deep learning
CN108052861A (en) * 2017-11-08 2018-05-18 北京卓视智通科技有限责任公司 A kind of nerve network system and the model recognizing method based on the nerve network system
CN108073910B (en) * 2017-12-29 2021-05-07 百度在线网络技术(北京)有限公司 Method and device for generating human face features
CN108197602B (en) * 2018-01-30 2020-05-19 厦门美图之家科技有限公司 Convolutional neural network generation method and expression recognition method
CN108596042A (en) * 2018-03-29 2018-09-28 青岛海尔智能技术研发有限公司 Enabling control method and system
CN109002884A (en) * 2018-07-20 2018-12-14 郑州云海信息技术有限公司 A kind of pond processing unit and pond processing method
CN109101938B (en) * 2018-08-23 2021-01-15 武汉嫦娥医学抗衰机器人股份有限公司 Multi-label age estimation method based on convolutional neural network
CN110971901B (en) * 2018-09-29 2022-08-02 杭州海康威视数字技术股份有限公司 Processing method, device and equipment of convolutional neural network and storage medium
CN109522872A (en) * 2018-12-04 2019-03-26 西安电子科技大学 A kind of face identification method, device, computer equipment and storage medium
CN109711546B (en) * 2018-12-21 2021-04-06 深圳市商汤科技有限公司 Neural network training method and device, electronic equipment and storage medium
CN110185939B (en) * 2019-05-16 2021-04-02 西北工业大学 Gas pipeline leakage identification method based on convolutional neural network
CN112052710A (en) * 2019-06-06 2020-12-08 搜狗(杭州)智能科技有限公司 Face age identification method and device
CN110399813A (en) * 2019-07-10 2019-11-01 深兰科技(上海)有限公司 A kind of age recognition methods, device, electronic equipment and storage medium
CN112307796B (en) * 2019-07-24 2022-06-24 魔门塔(苏州)科技有限公司 Age prediction method and device for infrared image
CN111159450A (en) * 2019-12-30 2020-05-15 上海眼控科技股份有限公司 Picture classification method and device, computer equipment and storage medium
CN111325256A (en) * 2020-02-13 2020-06-23 上海眼控科技股份有限公司 Vehicle appearance detection method and device, computer equipment and storage medium
CN112927801A (en) * 2021-01-24 2021-06-08 武汉东湖大数据交易中心股份有限公司 Health prediction model construction method and device based on dressing meteorological index

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103824054A (en) * 2014-02-17 2014-05-28 北京旷视科技有限公司 Cascaded depth neural network-based face attribute recognition method
CN104504376A (en) * 2014-12-22 2015-04-08 厦门美图之家科技有限公司 Age classification method and system for face images
CN104866829A (en) * 2015-05-25 2015-08-26 苏州大学 Cross-age face verify method based on characteristic learning
CN105095833A (en) * 2014-05-08 2015-11-25 中国科学院声学研究所 Network constructing method for human face identification, identification method and system
CN105279499A (en) * 2015-10-30 2016-01-27 小米科技有限责任公司 Age recognition method and device
CN105426963A (en) * 2015-12-01 2016-03-23 北京天诚盛业科技有限公司 Convolutional neural network Training method and apparatus for human face identification and application
CN105825191A (en) * 2016-03-23 2016-08-03 厦门美图之家科技有限公司 Face multi-attribute information-based gender recognition method and system and shooting terminal
CN105975916A (en) * 2016-04-28 2016-09-28 西安电子科技大学 Age estimation method based on multi-output convolution neural network and ordered regression

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103824054A (en) * 2014-02-17 2014-05-28 北京旷视科技有限公司 Cascaded depth neural network-based face attribute recognition method
CN105095833A (en) * 2014-05-08 2015-11-25 中国科学院声学研究所 Network constructing method for human face identification, identification method and system
CN104504376A (en) * 2014-12-22 2015-04-08 厦门美图之家科技有限公司 Age classification method and system for face images
CN104866829A (en) * 2015-05-25 2015-08-26 苏州大学 Cross-age face verify method based on characteristic learning
CN105279499A (en) * 2015-10-30 2016-01-27 小米科技有限责任公司 Age recognition method and device
CN105426963A (en) * 2015-12-01 2016-03-23 北京天诚盛业科技有限公司 Convolutional neural network Training method and apparatus for human face identification and application
CN105825191A (en) * 2016-03-23 2016-08-03 厦门美图之家科技有限公司 Face multi-attribute information-based gender recognition method and system and shooting terminal
CN105975916A (en) * 2016-04-28 2016-09-28 西安电子科技大学 Age estimation method based on multi-output convolution neural network and ordered regression

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
《Age and Gender Classification using Convolutional Neural Networks》;Gil Levi等;《2015 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW)》;20150612;第34-42页
《基于人脸特征的性别判断和年龄估计方法研究》;方晟;《中国优秀硕士论文全文数据库》;20151215;第I138-433页
《神经网络集成》;周志华等;《计算机学报》;20020131;第25卷(第1期);第1-8页

Also Published As

Publication number Publication date
CN106485235A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
CN106485235B (en) A kind of convolutional neural networks generation method, age recognition methods and relevant apparatus
Zhang et al. Human action recognition using convolutional LSTM and fully-connected LSTM with different attentions
CN106778854B (en) Behavior identification method based on trajectory and convolutional neural network feature extraction
CN104217214B (en) RGB D personage's Activity recognition methods based on configurable convolutional neural networks
CN105975931B (en) A kind of convolutional neural networks face identification method based on multiple dimensioned pond
CN103996056B (en) Tattoo image classification method based on deep learning
CN104281853B (en) A kind of Activity recognition method based on 3D convolutional neural networks
CN108304826A (en) Facial expression recognizing method based on convolutional neural networks
CN110096950A (en) A kind of multiple features fusion Activity recognition method based on key frame
CN108509978A (en) The multi-class targets detection method and model of multi-stage characteristics fusion based on CNN
CN109389055A (en) Video classification methods based on mixing convolution sum attention mechanism
CN107808132A (en) A kind of scene image classification method for merging topic model
CN107341506A (en) A kind of Image emotional semantic classification method based on the expression of many-sided deep learning
CN107341452A (en) Human bodys' response method based on quaternary number space-time convolutional neural networks
CN107229904A (en) A kind of object detection and recognition method based on deep learning
CN107748858A (en) A kind of multi-pose eye locating method based on concatenated convolutional neutral net
CN107785061A (en) Autism-spectrum disorder with children mood ability interfering system
CN104103033B (en) View synthesis method
CN106651915B (en) The method for tracking target of multi-scale expression based on convolutional neural networks
CN106909887A (en) A kind of action identification method based on CNN and SVM
CN109558902A (en) A kind of fast target detection method
CN110399788A (en) AU detection method, device, electronic equipment and the storage medium of image
CN109934158A (en) Video feeling recognition methods based on local strengthening motion history figure and recursive convolution neural network
CN107609563A (en) Picture semantic describes method and device
CN106845329A (en) A kind of action identification method based on depth convolution feature multichannel pyramid pond

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant