WO2019091402A1 - 年龄预估方法和装置 - Google Patents

年龄预估方法和装置 Download PDF

Info

Publication number
WO2019091402A1
WO2019091402A1 PCT/CN2018/114368 CN2018114368W WO2019091402A1 WO 2019091402 A1 WO2019091402 A1 WO 2019091402A1 CN 2018114368 W CN2018114368 W CN 2018114368W WO 2019091402 A1 WO2019091402 A1 WO 2019091402A1
Authority
WO
WIPO (PCT)
Prior art keywords
age
model
gender
face image
training
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.)
Ceased
Application number
PCT/CN2018/114368
Other languages
English (en)
French (fr)
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.)
Reach Best Technology Co Ltd
Original Assignee
Reach Best 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 Reach Best Technology Co Ltd filed Critical Reach Best Technology Co Ltd
Priority to US16/762,706 priority Critical patent/US11587356B2/en
Publication of WO2019091402A1 publication Critical patent/WO2019091402A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • G06F18/2148Generating training patterns; Bootstrap methods, e.g. bagging or boosting characterised by the process organisation or structure, e.g. boosting cascade
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • G06V10/7747Organisation of the process, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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

Definitions

  • the present application relates to the field of computer vision technology, and in particular, to an age estimation method and apparatus.
  • the age of the face image is the age of the person in the face image, and the age estimation of the face image is based on the face image, and the age of the person in the image is estimated.
  • the age estimation method of face images mainly includes traditional machine learning methods. Specifically, firstly, artificial features such as Histogram of Oriented Gradient (HOG) and Scale Invariant Feature Transform (Scale) are designed and defined. -Invariant Feature Taransform (SIFT) and other features, and then use the dimension reduction method to extract the useful features of the face image useful for age estimation. Finally, using the extracted features, the regression model is used to predict the age of the face image.
  • HOG Histogram of Oriented Gradient
  • Scale Scale Invariant Feature Transform
  • SIFT -Invariant Feature Taransform
  • the characteristics learned by traditional machine learning methods are less robust to noise, background, light, different states of the face, etc., resulting in inaccurate age estimation of face images.
  • the face image of the same person photographed in different scenes has a larger age difference, and the age estimation accuracy of the face image is lower.
  • the embodiment of the present application provides an age estimation method and apparatus to solve the problem of low accuracy when estimating the age of a face image in the related art.
  • an embodiment of the present application discloses an age estimation method, including:
  • Gender training is performed on the gender model according to the face image sample, and the gender model is converged, wherein the gender model includes at least two convolution layers;
  • the age model includes the at least two convolution layers, and the convergence of the age model includes the at least two
  • the weight of each convolution layer is the same as the weight of the at least two convolution layers included in the converged gender model
  • the input face image is estimated based on the age model after convergence.
  • the gender model further includes at least one first fully connected layer and a first classifier, wherein the gender model is gender-trained according to the face image sample, and the gender model is converged, including:
  • the age model includes at least one convolution layer, at least one second fully connected layer, and a second classifier, in addition to the at least two convolution layers, according to the face image sample Age training is performed on the age model to converge the age model, including:
  • the method before the age estimation of the input face image according to the convergence of the age model, the method further includes:
  • the learning rate of the age model is set as a preset learning rate, and the age model is subjected to secondary age training according to the face image sample, so that the age model converges again.
  • the age estimation is performed on the input face image according to the convergence of the age model, including:
  • the estimated age of the face image is calculated according to the probability value corresponding to each age category and the age corresponding to each age category.
  • the calculating an estimated age of the face image according to the probability value corresponding to each age category and the age corresponding to each age category including:
  • the estimated age meanAge of the face image is calculated using the following formula:
  • MiddleAge i is the average age corresponding to the i-th age category
  • p i is the probability value corresponding to the i-th age category
  • n is the number of age categories.
  • an embodiment of the present application further discloses an age estimating apparatus, including:
  • a first training module configured to perform gender training on the gender model according to the face image sample, to converge the gender model, wherein the gender model includes at least two convolution layers;
  • a second training module configured to perform age training on the age model according to the face image sample, to converge the age model, wherein the age model includes the at least two convolution layers, and the age after convergence
  • the weight of the at least two convolution layers included in the model is the same as the weight of the at least two convolution layers included in the converged gender model
  • An estimation module is configured to perform age estimation on the input face image according to the condensed age model.
  • the gender model further includes at least one first fully connected layer and a first classifier, where the first training module includes:
  • a first training submodule configured to perform, according to the gender annotation information of the face image sample, the at least two convolution layers, the at least one first fully connected layer, and the first classifier included in the gender model Gender training converges the gender model.
  • the age model further includes at least one convolution layer, at least one second fully connected layer, and a second classifier, where the second training module includes:
  • a second training submodule configured to age the at least one convolution layer, the at least one second fully connected layer, and the second classifier included in the age model according to age labeling information of the face image sample Training to converge the age model.
  • the device further includes:
  • a third training module configured to set a learning rate of the age model to a preset learning rate after the age model converges, and perform a second age training on the age model according to the face image sample, so that The age model converges again.
  • the estimating module includes:
  • An estimation submodule configured to perform age estimation on the input face image according to the condensed age model, and obtain a probability value corresponding to each age category;
  • a calculation submodule configured to calculate an estimated age of the face image according to a probability value corresponding to each age category and an age corresponding to each age category.
  • the calculating sub-module is specifically configured to calculate an estimated age meanAge of the face image by using the following formula:
  • MiddleAge i is the average age corresponding to the i-th age category
  • p i is the probability value corresponding to the i-th age category
  • n is the number of age categories.
  • a mobile terminal includes a memory, a processor, and an age estimation program stored on the memory and executable on the processor.
  • the age estimation program is implemented by the processor to implement any of the steps of the age estimation method described above.
  • the embodiment of the present application further discloses a computer readable storage medium, where the computer readable storage medium stores an age estimation program, and the age estimation program is executed by a processor. Any step of the above age estimation method is implemented.
  • the embodiment of the present application further discloses a computer program, which is implemented by the processor to implement any step of the foregoing age estimation method.
  • the technical solution provided by the embodiment of the present application includes the following advantages:
  • the embodiment of the present application makes the gender model converge by sharing the gender model and the age model with at least two convolution layers, and training the gender model; and training the age model to maintain at least two of the above-mentioned models during the age model training process.
  • the weight of the convolutional layer is the same, and the weight of the gender model is still converged, so that the gender model is supervised during the training of the age model.
  • the converged age model is used to predict the age of the face image, which can eliminate people. The problem of inaccurate age estimation caused by gender differences in face images, and thus the accuracy of age estimation.
  • 1 is a flow chart showing the steps of an embodiment of an age estimation method of the present application.
  • FIG. 2 is a schematic diagram of an embodiment of a deep neural network model of the present application.
  • FIG. 3 is a structural block diagram of an embodiment of an age estimating apparatus of the present application.
  • FIG. 4 is a structural block diagram of an embodiment of a mobile terminal of the present application.
  • FIG. 1 a flow chart of steps of an embodiment of an age estimation method of the present application is shown, which may specifically include the following steps.
  • Step 101 Perform gender training on the gender model according to the face image sample to converge the gender model, wherein the gender model includes at least two convolution layers.
  • the face image sample includes a plurality of face images, and each face image is marked with age information and gender information.
  • the gender model is used to detect the gender of the face image, and the gender model may be a deep neural network model including at least two convolution layers.
  • the gender model is gender-trained by the face image sample with the gender information annotation, thereby adjusting the weight of each network layer in the gender model until the gender model converges, the convergence of the gender model, that is, the gender model output.
  • the error between the gender prediction result and the actual gender is less than the preset error threshold.
  • the network layer of the gender model includes at least two convolution layers.
  • the network layer may further include at least one first fully connected layer and a first classifier.
  • the gender model is performed according to the face image sample, and the gender model is converged, and the at least two convolution layers included in the gender model may be the gender labeling information according to the face image sample.
  • the at least one first fully connected layer and the first classifier perform gender training to converge the gender model.
  • Step 102 Perform age training on the age model according to the convergence of the face image sample and the weight of the at least two convolutional layers to converge the age model, wherein the age model includes the at least two Convolution layer.
  • Step 102 is: performing age training on the age model according to the face image sample to converge the age model, wherein the age model includes the at least two convolution layers, and the convergence of the age model includes The weights of the at least two convolutional layers are the same as the weights of the at least two convolutional layers included in the converged gender model.
  • the age model is used to detect the age of the face image, and in order to achieve the supervision of the age information by the gender information, the age model and the gender model of the embodiment of the present application share a partial convolution layer, that is, at least two convolution layers described above. .
  • the age model may also be a deep neural network model. At least two convolutional layers in the age model are trained in step 101, and the weight of each convolution layer is convergent for gender prediction. In order to supervise the age prediction of the gender information, the weight of each convolution layer in the at least two convolution layers can be kept unchanged when the age model is aged, that is, the step 101 training gender model is still converged. Weights.
  • the plurality of face image samples marked with the age information are respectively input to the age model to train the age model, and the weights of the at least two convolution layers in the age model are not modified during the age model training, and The weights of other network layers of the age model are adjusted until the adjusted weights of the network layers cause the age model to converge.
  • the convergence of the so-called age model that is, the error between the age prediction result output by the age model and the actual age is less than the preset age error threshold.
  • the network layer of the age model may include other network layers in addition to at least two convolutional layers of the gender model described above.
  • the network layer of the age model in an optional embodiment may further include at least one convolution layer, at least one second fully connected layer, and a second classifier.
  • age training is performed on the age model according to the face image sample, and the age model is converged, and may be the at least one convolution layer included in the age model according to age labeling information of the face image sample,
  • the at least one second fully connected layer and the second classifier perform age training to converge the age model.
  • Step 103 Perform an age estimation on the input face image according to the convergence of the age model.
  • an age model that is converged by the above-mentioned gender information supervision training can be used to identify any face image that needs an estimated age, specifically, the face image is input to the age model, and the age model predicts The age estimate can be output.
  • the embodiment of the present application makes the gender model converge by sharing the gender model and the age model with at least two convolution layers, and training the gender model; and training the age model to maintain the above-mentioned at least during the age model training process.
  • the weights of the two convolutional layers are the same, and the weight of the gender model is still converged, so that the gender model is supervised during the training of the age model, and finally the age model is used to predict the age of the face image. Eliminate the problem of inaccurate age estimation caused by gender differences in face images, and thus improve the accuracy of age estimation.
  • the flow of the age estimation method of the face image of the present embodiment mainly includes.
  • Step 1 Collect a batch of face image samples of different ages, and classify these face image samples into 16 categories according to age, and mark gender information for each face image.
  • the ages of the 16 categories are: 0-1 years old, 2-4 years old, 5-6 years old, 7-12 years old, 13-15 years old, 16-18 years old, 19-22 years old, 23 -25, 26-30, 31-35, 36-40, 41-45, 46-50, 51-55, 56-60, 60+.
  • the average age of each type of age is also set in Table 1 in the examples of the present application, which are: 0.5 years old, 3 years old, 5.5 years old, 9.5 years old, 14 years old, 17 years old, 20.5 years old, 24 years old, 28 years old, 33 years old, 38 years old, 43 years old, 48 years old, 53 years old, 58 years old, 60 years old.
  • the classification of the age label and the number of the classifications may be divided as needed, and only the age label is divided into the above 16 categories as an example, and does not play a limiting role.
  • Step 2 Construct a deep neural network model as shown in Figure 2.
  • the deep neural network model can be divided into a gender model and an age model.
  • the gender model and the age model are both deep neural network models, gender models and age models. It includes three parts: convolutional layer, fully connected layer, and classification layer.
  • the gender model includes four convolution layers of conv1, conv2, conv3, and conv4, two fully connected layers of FC1 and FC2, and a classification layer of softmax1.
  • the gender model in this embodiment includes four convolution layers.
  • the number of convolution layers in the gender model may be two or more arbitrary numbers, and may be flexibly set according to requirements.
  • the number of fully connected layers in the gender model may be one or more arbitrary numbers, and may be flexibly set as needed.
  • the age model includes a fifth convolutional layer of conv5 in addition to the above four convolutional layers of the gender model.
  • the age model may further comprise at least one fully connected layer connected to the last convolutional layer conv5 in the age model, such as the two fully connected layers FC3 and FC4 shown in FIG.
  • the age model may also include at least one sorting layer, such as the sorting layer softmax2 shown in Figure 2, which is connected behind the last fully connected layer FC4.
  • the features of the conv4 output can be input to conv5, the features output by conv5 are input to FC3, and the features output by FC3 are input to FC4.
  • the features of the FC4 output are input to softmax2 for age classification detection.
  • Step 3 The depth neural network model built in step 2 is trained by using the face image samples labeled with the gender information and the age information obtained in step 1.
  • the training of the deep neural network model may include 2 trainings.
  • the face image samples marked with gender information in Table 1 are input to the gender model, thereby training conv1, conv2, onv3, conv4, FC1, FC2 and softmax1 to make the gender model converge.
  • the specific training process may be: each input of a face image sample to a gender model, the gender model may output a gender prediction result, and adjust the gender model according to the difference between the gender prediction result of the face image sample and the actual gender.
  • the weight of each network layer Then, input a face image sample to the gender model, and use the gender model that adjusts the weight of each network layer to continue the gender prediction and adjust the weight of each network layer until the gender prediction result and the actual gender of the face image sample.
  • the error between the errors is less than the preset gender error threshold (for example, 1%), so that the gender model converges and the gender characteristics can be learned.
  • the training process of the gender model may be: inputting each face image sample marked with gender information into a gender model, and obtaining a gender prediction result of each face image sample. Based on the gender prediction results of each face image sample and the actual gender of each face image sample, the gender loss value is determined using a preset loss function. Determine whether the determined gender loss value is less than a preset gender loss threshold. If the determined gender loss value is less than the preset gender loss threshold, then the gender model can be determined to converge. If the determined gender loss value is not less than the preset gender loss threshold, adjust the weight of each network layer in the gender model, and re-train the gender model, that is, re-enter each face image sample into the gender model to obtain each face image. The gender prediction of the sample until the determined gender loss value is less than the preset loss threshold.
  • the second training After the gender model converges, the weights of conv1, conv2, conv3, and conv4 in the gender model that converges after the first training can be fixed. Then, the above-mentioned face image samples marked with age information are input to the age model, and conv5, FC3, FC4, and softmax2 in the age model are trained to converge the age model.
  • the specific training process may be: each time a face image sample is input to the age model, the age model may output an age prediction result, and adjust the age model according to the difference between the age prediction result of the face image sample and the actual age.
  • the actual age is taken as the age average in Table 1, for example, a face image belonging to category 1, the age of the face image is 2 years old, then the actual age of the face image is the age average of 3 years old. .
  • the training process of the age model may be: inputting each face image sample labeled with age information into an age model, and obtaining an age prediction result for each face image sample.
  • the age loss value is determined using a preset loss function based on the age prediction result of each face image sample and the actual age of each face image sample. Determine whether the determined age loss value is less than a preset age loss threshold. If the determined age loss value is less than the preset age loss threshold, then the age model can be determined to converge. If the determined age loss value is not less than the preset age loss threshold, adjust the weights of each conv5, FC3, FC4, and softmax2 in the age model, and re-train the age model, that is, re-enter each face image sample into the age model. The age prediction result of each face image sample is obtained until the determined age loss value is less than the preset age loss threshold.
  • the training of the deep neural network model may also include the third training.
  • the third training after the age model converges, the preset learning rate can be selected, and the learning rate of the age model is set as the preset learning rate.
  • the preset learning rate can be a small learning rate.
  • the above-described face image samples are used to train the age model as a whole until the age model converges again, thereby obtaining an accurate age model.
  • the overall training of the age model includes training conv1, conv2, conv3, conv4, conv5, FC3, FC4 and softmax2 in the age model.
  • the main purpose of the third training is to fine-tune the weights of conv1, conv2, conv3, and conv4 after the first training convergence, and the weights of conv5, FC3, FC4, and softmax2 after the second training.
  • the magnitude of the weight update for each network layer in the age model is related to the learning rate.
  • the weights of each network layer are updated in a small amount, and the weight adjustment of each network layer in the age model is implemented.
  • Step 4 Perform an age estimation on the face image to be measured by using the trained age model in step 3, so that each age category of the face image (ie, 16 categories in Table 1) can be output by softmax2. Probability value.
  • the face image to be tested is input into the age model after the training convergence in step 3, and the probability value of the face image to be tested belongs to each age category.
  • Step 5 Estimate the age of the face image to be tested by using the probability value corresponding to each age category output by the age model and the age corresponding to each age category.
  • the age estimation formula is as shown in equation (1):
  • MiddleAge i is the average age corresponding to the i-th age category shown in Table 1
  • p i is the probability value corresponding to the i-th age category output by the deep neural network model shown in FIG. 2 in the embodiment of the present application
  • i is the number of age categories, as shown in Table 1
  • i is an integer greater than or equal to zero and less than or equal to 15.
  • the maximum probability value is selected from the probability values corresponding to each age category output from the age model.
  • the age average of the age category corresponding to the largest probability value is taken as the estimated age of the face image to be tested.
  • the embodiment of the present application considers that there is a great correlation between the age and the gender of the face image, especially the age and gender relationship of the face image of an adult is more prominent, such as a female. Compared with men, they pay more attention to maintenance. Under the same conditions of male and female actual age, the ages of male and female face images may vary greatly. In social networks, the age of the face images in pictures and videos tends to be much different from the real age. Therefore, in order to accurately estimate the actual age of the face image, it is necessary to use the gender information of the face image to assist in estimating the age of the face image.
  • the age model for classifying age in the deep neural network model of the embodiment of the present application can be performed under the supervision of gender information during training, thereby further ensuring the accuracy of age classification detection and improving the age estimation of the face image. Accuracy.
  • FIG. 3 a structural block diagram of an embodiment of an age estimating apparatus of the present application is shown, which may specifically include the following modules:
  • the first training module 31 is configured to perform gender training on the gender model according to the face image sample to converge the gender model, wherein the gender model includes at least two convolution layers.
  • the face image sample includes a plurality of face images, and each face image is marked with age information and gender information.
  • the gender model is used to detect the gender of the face image, and the gender model may be a deep neural network model including at least two convolution layers.
  • the gender model is gender-trained by the face image sample with the gender information annotation, thereby adjusting the weight of each network layer in the gender model until the gender model converges, the convergence of the gender model, that is, the gender model output.
  • the error between the gender prediction result and the actual gender is less than the preset error threshold.
  • the network layer includes a convolutional layer, a fully connected layer, and a classification layer.
  • the classification layer is the classifier.
  • a second training module 32 configured to perform age training on the age model according to the face image sample, and converge the age model, wherein the age model includes the at least two convolution layers, and the convergence
  • the weight of the at least two convolutional layers included in the age model is the same as the weight of the at least two convolutional layers included in the converged gender model.
  • the age model is used to detect the age of the face image, and in order to achieve the supervision of the age information by the gender information, the age model and the gender model of the embodiment of the present application share a partial convolution layer, that is, at least two convolution layers described above. .
  • the age model may also be a deep neural network model. At least two convolutional layers in the age model are trained by the first training module 31, and the weight of each convolution layer is convergent for the gender prediction. In order to supervise the age prediction of the gender information, when the age model is trained in age, the weight of each convolution layer in the at least two convolution layers can be kept unchanged, that is, the first training module 31 is still training the gender model. The weight after convergence.
  • the plurality of face image samples marked with the age information are respectively input to the age model to train the age model, and the weights of the at least two convolution layers in the age model are not modified during the age model training, and The weights of other network layers of the age model are adjusted until the adjusted weights of the network layers cause the age model to converge.
  • the convergence of the so-called age model that is, the error between the age prediction result output by the age model and the actual age is less than the preset age error threshold.
  • the estimating module 33 is configured to perform age estimation on the input face image according to the condensed age model.
  • an age model that is converged by the above-mentioned gender information supervision training can be used to identify any face image that needs an estimated age, specifically, the face image is input to the age model, and the age model predicts The age estimate can be output.
  • the embodiment of the present application makes the gender model converge by sharing the gender model and the age model with at least two convolution layers, and training the gender model; and training the age model to maintain the above-mentioned at least during the age model training process.
  • the weights of the two convolutional layers are the same, and the weight of the gender model is still converged, so that the gender model is supervised during the training of the age model, and finally the age model is used to predict the age of the face image. Eliminate the problem of inaccurate age estimation caused by gender differences in face images, and thus improve the accuracy of age estimation.
  • the gender model further includes at least one first fully connected layer and a first classifier
  • the first training module 31 may include:
  • a first training submodule configured to perform gender training on the at least two convolution layers, the at least one first fully connected layer, and the first classifier included in the gender model according to the gender annotation information of the face image sample , the gender model is converged.
  • the age model further includes at least one convolution layer, at least one second fully connected layer, and a second classifier
  • the second training module 32 may include:
  • a second training sub-module configured to perform age training on the at least one convolution layer, the at least one second fully-connected layer, and the second classifier included in the age model according to age tag information of the face image sample, The age model is converged.
  • the age estimating apparatus provided by the embodiment of the present application may further include:
  • a third training module configured to set a learning rate of the age model to a preset learning rate after the age model converges, and perform a second age training on the age model according to the face image sample, so that The age model converges again.
  • the estimating module 33 may include:
  • An estimation submodule configured to perform age estimation on the input face image according to the condensed age model, and obtain a probability value corresponding to each age category;
  • a calculation submodule configured to calculate an estimated age of the face image according to a probability value corresponding to each age category and an age corresponding to each age category.
  • the calculating sub-module may be specifically configured to calculate an estimated age meanAge of the face image by using the following formula:
  • MiddleAge i is the average age corresponding to the i-th age category
  • p i is the probability value corresponding to the i-th age category
  • n is the number of age categories.
  • the description is relatively simple, and the relevant parts can be referred to the description of the embodiment of the age estimating method.
  • a mobile terminal is further provided.
  • the mobile terminal includes: a memory 401, a processor 402, and An age estimation program 403 on the memory and operable on the processor, the age estimation program 403 being executed by the processor 402 to implement the steps of the age estimation method as in the above embodiment.
  • the age estimation method includes the following steps:
  • Gender training is performed on the gender model according to the face image sample, and the gender model is converged, wherein the gender model includes at least two convolution layers;
  • the age model includes the at least two convolution layers, and the convergence of the age model includes the at least two
  • the weight of each convolution layer is the same as the weight of the at least two convolution layers included in the converged gender model
  • the input face image is estimated based on the age model after convergence.
  • the embodiment of the present application makes the gender model converge by sharing the gender model and the age model with at least two convolution layers, and training the gender model; and training the age model to maintain at least two of the above-mentioned models during the age model training process.
  • the weight of the convolutional layer is the same, and the weight of the gender model is still converged, so that the gender model is supervised during the training of the age model.
  • the converged age model is used to predict the age of the face image, which can eliminate people. The problem of inaccurate age estimation caused by gender differences in face images, and thus the accuracy of age estimation.
  • the mobile terminal may further include: a communication interface 404 and a communication bus 405.
  • the processor 402, the communication interface 404, and the memory 401 complete communication with each other via the communication bus 405.
  • the above communication bus may be a Peripheral Pomponent Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Pomponent Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 4, but it does not mean that there is only one bus or one type of bus.
  • the above communication interface is used for communication between the above mobile terminal and other devices.
  • the above memory may include a random access memory (RAM), and may also include a non-volatile memory (Non-Volatile Memory, NVM for short), such as at least one disk storage.
  • NVM non-Volatile Memory
  • the foregoing memory may also be at least one storage device located away from the foregoing processor.
  • the processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (Ne twork processor, NP for short), or a digital signal processor (DSP). ), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
  • CPU central processing unit
  • Ne twork processor Network processor
  • DSP digital signal processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the description is relatively simple, and the relevant part can be referred to the description of the embodiment of the age estimation method.
  • a computer readable storage medium is further provided, where the computer readable storage medium stores an age estimation program,
  • the step in the age estimation method as in the above embodiment is implemented when the age estimation program is executed by the processor.
  • the age estimation method includes the following steps:
  • Gender training is performed on the gender model according to the face image sample, and the gender model is converged, wherein the gender model includes at least two convolution layers;
  • the age model includes the at least two convolution layers, and the convergence of the age model includes the at least two
  • the weight of each convolution layer is the same as the weight of the at least two convolution layers included in the converged gender model
  • the input face image is estimated based on the age model after convergence.
  • the embodiment of the present application makes the gender model converge by sharing the gender model and the age model with at least two convolution layers, and training the gender model; and training the age model to maintain at least two of the above-mentioned models during the age model training process.
  • the weight of the convolutional layer is the same, and the weight of the gender model is still converged, so that the gender model is supervised during the training of the age model.
  • the converged age model is used to predict the age of the face image, which can eliminate people. The problem of inaccurate age estimation caused by gender differences in face images, and thus the accuracy of age estimation.
  • the description is relatively simple, and the relevant parts can be referred to the description of the embodiment of the age estimation method embodiment.
  • the age estimation method includes the following steps:
  • Gender training is performed on the gender model according to the face image sample, and the gender model is converged, wherein the gender model includes at least two convolution layers;
  • the age model includes the at least two convolution layers, and the convergence of the age model includes the at least two
  • the weight of each convolution layer is the same as the weight of the at least two convolution layers included in the converged gender model
  • the input face image is estimated based on the age model after convergence.
  • the embodiment of the present application makes the gender model converge by sharing the gender model and the age model with at least two convolution layers, and training the gender model; and training the age model to maintain at least two of the above-mentioned models during the age model training process.
  • the weight of the convolutional layer is the same, and the weight of the gender model is still converged, so that the gender model is supervised during the training of the age model.
  • the converged age model is used to predict the age of the face image, which can eliminate people. The problem of inaccurate age estimation caused by gender differences in face images, and thus the accuracy of age estimation.
  • embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device
  • Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Medical Informatics (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Human Computer Interaction (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本申请实施例提供了一种年龄预估方法和装置,该方法包括:根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,其中,所述性别模型包括至少两个卷积层;根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛,其中,所述年龄模型包括所述至少两个卷积层,收敛后的所述年龄模型包括的所述至少两个卷积层的权重,与收敛后的所述性别模型包括的所述至少两个卷积层的权重;根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估。本申请实施例提供的技术方案,能够消除人脸图像的性别差异造成的年龄预估不准确的问题,进而提升年龄预估准确度。

Description

年龄预估方法和装置
本申请要求于2017年11月9日提交中国专利局、申请号为201711100297.9发明名称为“年龄预估方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机视觉技术领域,特别是涉及一种年龄预估方法和装置。
背景技术
随着人脸图像的年龄在互联网用户画像、广告精准推送、图像或视频推荐等领域的应用越来越广泛,对人脸图像的年龄预估的需求越来越大。其中,人脸图像的年龄即为人脸图像中人的年龄,人脸图像的年龄预估即为基于人脸图像,对图像中人进行年龄预估。
目前,人脸图像的年龄预估方法主要包括传统的机器学习方法,具体而言,首先设计定义人工特征,如方向梯度直方图(Histogram of Oriented Gradient,简称HOG),尺度不变特征变换(Scale-Invariant Feature Taransform,简称SIFT)等特征,然后采用降维的方法来提取人脸图像中对年龄预估有用的有效特征,最后利用提取的特征,采用回归模型预估人脸图像的年龄。
传统的机器学习方法所学习到的特征对噪声、背景、光线、人脸不同状态等信息的鲁棒性差,导致人脸图像的年龄预估不准确。比如采用传统的机器学习方法,对,在不同场景下拍摄的同一个人的人脸图像,检测出的年龄差距较大,对人脸图像的年龄预估准确度较低。
发明内容
本申请实施例提供了一种年龄预估方法和装置,以解决相关技术中对人脸图像的年龄进行估计时,准确度较低的问题。
为了解决上述问题,根据本申请实施例的一个方面,本申请实施例公开了一种年龄预估方法,包括:
根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,其中,所述性别模型包括至少两个卷积层;
根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛,其中,所述年龄模型包括所述至少两个卷积层,收敛后的所述年龄模型包括的所述至少两个卷积层的权重,与收敛后的所述性别模型包括的所述至少两个卷积层的权重相同;
根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估。
可选的,所述性别模型还包括至少一个第一全连接层以及第一分类器,所述根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,包括:
根据人脸图像样本的性别标注信息对所述性别模型包括的所述至少两个卷积层、所述至少一个第一全连接层以及所述第一分类器进行性别训练,使所述性别模型收敛。
可选的,所述年龄模型除包括所述至少两个卷积层外,还包括至少一个卷积层、至少一个第二全连接层以及第二分类器,所述根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛,包括:
根据人脸图像样本的年龄标注信息对所述年龄模型包括的所述至少一个卷积层、所述至少一个第二全连接层以及所述第二分类器进行年龄训练,使所述年龄模型收敛。
可选的,所述根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估之前,所述方法还包括:
在所述年龄模型收敛后,将所述年龄模型的学习率设置为预设学习率,并根据所述人脸图像样本对所述年龄模型进行二次年龄训练,使所述年龄模型再次收敛。
可选的,所述根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估,包括:
根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估,得到每个年龄类别对应的概率值;
根据每个年龄类别对应的概率值和每个年龄类别对应的年龄,计算所述人脸图像的估计年龄。
可选的,所述根据每个年龄类别对应的概率值和每个年龄类别对应的年 龄,计算所述人脸图像的估计年龄,包括:
利用以下公式,计算所述人脸图像的估计年龄meanAge:
Figure PCTCN2018114368-appb-000001
其中,MiddleAge i为第i个年龄类别对应的平均年龄,p i为第i个年龄类别对应的概率值,n为年龄类别的个数。
根据本申请实施例的另一方面,本申请实施例还公开了一种年龄预估装置,包括:
第一训练模块,用于根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,其中,所述性别模型包括至少两个卷积层;
第二训练模块,用于根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛,其中,所述年龄模型包括所述至少两个卷积层,收敛后的所述年龄模型包括的所述至少两个卷积层的权重,与收敛后的所述性别模型包括的所述至少两个卷积层的权重相同;
预估模块,用于根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估。
可选的,所述性别模型还包括至少一个第一全连接层以及第一分类器,所述第一训练模块包括:
第一训练子模块,用于根据人脸图像样本的性别标注信息对所述性别模型包括的所述至少两个卷积层、所述至少一个第一全连接层以及所述第一分类器进行性别训练,使所述性别模型收敛。
可选的,所述年龄模型还包括至少一个卷积层、至少一个第二全连接层以及第二分类器,所述第二训练模块包括:
第二训练子模块,用于根据人脸图像样本的年龄标注信息对所述年龄模型包括的所述至少一个卷积层、所述至少一个第二全连接层以及所述第二分类器进行年龄训练,使所述年龄模型收敛。
可选的,所述装置还包括:
第三训练模块,用于在所述年龄模型收敛后,将所述年龄模型的学习率设置为预设学习率,并根据所述人脸图像样本对所述年龄模型进行二次年龄 训练,使所述年龄模型再次收敛。
可选的,所述预估模块包括:
预估子模块,用于根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估,得到每个年龄类别对应的概率值;
计算子模块,用于根据每个年龄类别对应的概率值和每个年龄类别对应的年龄,计算所述人脸图像的估计年龄。
可选的,所述计算子模块,具体用于利用以下公式,计算所述人脸图像的估计年龄meanAge:
Figure PCTCN2018114368-appb-000002
其中,MiddleAge i为第i个年龄类别对应的平均年龄,p i为第i个年龄类别对应的概率值,n为年龄类别的个数。
根据本申请实施例的另一方面,本申请实施例还公开了一种移动终端,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的年龄预估程序,所述年龄预估程序被所述处理器执行时实现上述年龄预估方法的任一步骤。
根据本申请实施例的另一方面,本申请实施例还公开了一种计算机可读存储介质,所述计算机可读存储介质上存储有年龄预估程序,所述年龄预估程序被处理器执行时实现上述年龄预估方法的任一步骤。
根据本申请实施例的另一方面,本申请实施例还公开了一种计算机程序,所述计算机程序被处理器执行时实现上述年龄预估方法的任一步骤。
与相关技术相比,本申请实施例提供的技术方案包括以下优点:
本申请实施例通过使性别模型和年龄模型共用至少两个卷积层,并通过对性别模型进行训练,使得性别模型收敛;并对年龄模型进行训练,在年龄模型训练过程中保持上述至少两个卷积层的权重不变,仍旧是性别模型收敛后的权重,使得年龄模型的训练过程中得到性别信息的监督,最终利用收敛后的年龄模型来对人脸图像进行年龄预估,能够消除人脸图像的性别差异造成的年龄预估不准确的问题,进而提升年龄预估准确度。
附图说明
图1是本申请的一种年龄预估方法实施例的步骤流程图;
图2是本申请的一种深度神经网络模型实施例的示意图;
图3是本申请的一种年龄预估装置实施例的结构框图;
图4是本申请的一种移动终端实施例的结构框图。
具体实施方式
为使本申请实施例的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
参照图1,示出了本申请的一种年龄预估方法实施例的步骤流程图,具体可以包括如下步骤。
步骤101,根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,其中,所述性别模型包括至少两个卷积层。
其中,人脸图像样本包括多个人脸图像,每个人脸图像均标注有年龄信息和性别信息。其中,性别模型,用于检测人脸图像的性别,该性别模型可以是一种深度神经网络模型,该性别模型包括至少两个卷积层。本申请实施例通过具有性别信息标注的人脸图像样本来对该性别模型进行性别训练,从而调整性别模型中各个网络层的权重,直至该性别模型收敛,所谓性别模型的收敛,即性别模型输出的性别预测结果与实际性别之间的误差小于预设误差阈值。性别模型的网络层包括至少两个卷积层。
一个可选的实施例中,网络层还可以包括至少一个第一全连接层以及第一分类器。此时,所述根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,可以为根据人脸图像样本的性别标注信息对所述性别模型包括的所述至少两个卷积层、所述至少一个第一全连接层以及所述第一分类器进行性别训练,使所述性别模型收敛。
步骤102,根据所述人脸图像样本以及所述至少两个卷积层收敛后的权重,对年龄模型进行年龄训练,使所述年龄模型收敛,其中,所述年龄模型包括所述至少两个卷积层。
步骤102即为:根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛,其中,所述年龄模型包括所述至少两个卷积层,收敛后的所述年龄模型包括的所述至少两个卷积层的权重,与收敛后的所述性别模型包括的所述至少两个卷积层的权重相同。
其中,年龄模型,用于检测人脸图像的年龄,而为了实现性别信息对年龄预测的监督,本申请实施例的年龄模型和性别模型共用部分卷积层,即上述的至少两个卷积层。其中,该年龄模型同样可以是一种深度神经网络模型,该年龄模型中的至少两个卷积层经过步骤101的训练,每个卷积层的权重都是对性别预测收敛的。为了实现性别信息对年龄预测的监督,在对年龄模型进行年龄训练时,可以保持该至少两个卷积层中每个卷积层的权重不变,即仍旧是步骤101训练性别模型收敛后的权重。然后,将上述标注有年龄信息的多个人脸图像样本分别输入至年龄模型,来对年龄模型训练,在年龄模型训练过程中不对年龄模型中的上述至少两个卷积层的权重进行修改,而是对年龄模型的其他网络层的权重进行调整,直至调整后的各网络层的权重使得年龄模型收敛。所谓年龄模型的收敛,即年龄模型输出的年龄预测结果与实际年龄之间的误差小于预设年龄误差阈值。年龄模型的网络层除包括上述性别模型的至少两个卷积层外,还可包括其他网络层。
一个可选的实施例中年龄模型的网络层还可以包括至少一个卷积层、至少一个第二全连接层以及第二分类器。此时,根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛,可以为根据人脸图像样本的年龄标注信息对所述年龄模型包括的所述至少一个卷积层、所述至少一个第二全连接层以及所述第二分类器进行年龄训练,使所述年龄模型收敛。
步骤103,根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估。
其中,可以利用经过上述性别信息监督训练而收敛的年龄模型,来对任意一个需要估计年龄的人脸图像进行识别,具体则是将该人脸图像输入至该年龄模型,经过年龄模型的预测,可以输出年龄预估结果。
这样,本申请实施例通过使性别模型和年龄模型共用至少两个卷积层,并通过对性别模型进行训练,使得性别模型收敛;并对年龄模型进行训练,在年龄模型训练过程中保持上述至少两个卷积层的权重不变,仍旧是性别模 型收敛后的权重,使得年龄模型的训练过程中得到性别信息的监督,最终利用收敛后的年龄模型来对人脸图像进行年龄预估,能够消除人脸图像的性别差异造成的年龄预估不准确的问题,进而提升年龄预估准确度。
下面为了更好的理解本申请实施例提供的技术方案,结合图2来对本申请实施例提供的上述技术方案进行详细阐述。本实施例的人脸图像的年龄预估方法的流程主要包括。
步骤1:收集一批不同年龄的人脸图像样本,并对这些人脸图像样本,按照年龄标注分成16类,并对每个人脸图像标注性别信息。
具体如表1所示,16类的年龄分别为:0-1岁,2-4岁,5-6岁,7-12岁,13-15岁,16-18岁,19-22岁,23-25岁,26-30岁,31-35岁,36-40岁,41-45岁,46-50岁,51-55岁,56-60岁,60岁以上。针对每类年龄,本申请实施例在表1中还设置了每类年龄的平均年龄,依次为:0.5岁,3岁,5.5岁,9.5岁,14岁,17岁,20.5岁,24岁,28岁,33岁,38岁,43岁,48岁,53岁,58岁,60岁。
Figure PCTCN2018114368-appb-000003
表1
本申请实施例中,年龄标注的分类以及分类的个数可以根据需要进行划分,仅以将年龄标注分成上述16类为例进行说明,并不起限定作用。
步骤2:构建一个如图2所示的深度神经网络模型,该深度神经网络模型可以划分为性别模型和年龄模型,其中,性别模型和年龄模型均是深度神经网络模型,性别模型、年龄模型均包括卷积层、全连接层、分类层三个部分。
如图2所示,性别模型包括conv1、conv2、conv3和conv4这四个卷积层,FC1和FC2这两个全连接层,以及softmax1这一个分类层。其中,本实施例中的性别模型包括4个卷积层。本申请实施例中,该性别模型中的卷积层的个数可以是两个或两个以上任意数,具体可以根据需要灵活设置。该性别模型中的全连接层的个数可以是一个或一个以上任意数,具体可以根据需要灵活设 置。对性别模型进行性别训练时,最后一个卷积层conv4输出的特征可以输入至FC1,FC1输出的特征再输入至FC2,最后FC2输出的特征再输入至softmax1进行性别分类。
可选的,年龄模型除了可以包括性别模型的上述4个卷积层之外,还包括conv5这第五个卷积层。此外,该年龄模型还可以包括至少一个全连接层,该至少一个全连接层与年龄模型中最后一个卷积层conv5连接,例如图2中示出的FC3和FC4这两个全连接层。此外,年龄模型还可以包括至少一个分类层,例如图2中示出的分类层softmax2,softmax2连接在最后一个全连接层FC4后面。对年龄模型进行年龄训练时,conv4输出的特征可以输入至conv5,conv5输出的特征再输入至FC3,FC3输出的特征再输入至FC4,最后,FC4输出的特征再输入至softmax2进行年龄分类检测。
步骤3:利用步骤1中得到的标注有性别信息和年龄信息的人脸图像样本,来对步骤2搭建的深度神经网络模型进行训练。
本申请实施例中,深度神经网络模型的训练可以包括2次训练。
第一次训练:将表1中标注有性别信息的人脸图像样本输入至性别模型,从而训练conv1,conv2,onv3,conv4,FC1,FC2和softmax1,使所述性别模型收敛。具体的训练过程可以为:每输入一个人脸图像样本至性别模型,性别模型都可以输出一个性别预测结果,根据该人脸图像样本的性别预测结果与实际性别之间的差距,调整性别模型中各个网络层的权重。然后,再输入一个人脸图像样本至性别模型,利用调整了各个网络层的权重的性别模型,继续进行性别预测和调整各个网络层的权重,直至性别预测结果与该人脸图像样本的实际性别之间的误差小于预设性别误差阈值(例如1%),从而使性别模型收敛,能够学习到性别特征。
一个示例中,性别模型的训练过程可以为:将标注有性别信息的各人脸图像样本分别输入性别模型,得到每一人脸图像样本的性别预测结果。基于每一人脸图像样本的性别预测结果,以及每一人脸图像样本的实际性别,利用预设的损失函数,确定性别损失值。判断确定的性别损失值是否小于预设性别损失阈值。若确定的性别损失值小于预设性别损失阈值,则可确定性别模型收敛。若确定的性别损失值不小于预设性别损失阈值,则调整性别模型 中各个网络层的权重,重新对性别模型的训练,即重新将各人脸图像样本分别输入性别模型,得到每一人脸图像样本的性别预测结果,直至确定的性别损失值小于预设损失阈值为止。
第二次训练:待性别模型收敛后,可以将第一次训练后收敛的性别模型中的conv1,conv2,conv3,conv4的权重进行固定。然后,将标注有年龄信息的上述人脸图像样本输入至年龄模型,来对年龄模型中的conv5,FC3,FC4和softmax2进行训练,使年龄模型收敛。具体的训练过程可以为:每输入一个人脸图像样本至年龄模型,年龄模型都可以输出一个年龄预测结果,根据该人脸图像样本的年龄预测结果与实际年龄之间的差距,调整年龄模型中上述conv5,FC3,FC4和softmax2的权重。这里的实际年龄取表1中的年龄均值,举例来说,某个属于1类的人脸图像,该人脸图像的年龄为2岁,那么以该人脸图像的实际年龄为年龄均值3岁。
然后,再输入一个人脸图像样本至年龄模型,利用调整了conv5,FC3,FC4和softmax2的权重的年龄模型,继续进行年龄预测和调整conv5,FC3,FC4和softmax2的权重的步骤,直至年龄预测结果与该人脸图像的实际年龄之间的误差小于预设年龄误差阈值(例如2%),从而使年龄模型收敛,能够学习到年龄特征。
一个示例中,年龄模型的训练过程可以为:将标注有年龄信息的各人脸图像样本分别输入年龄模型,得到每一人脸图像样本的年龄预测结果。基于每一人脸图像样本的年龄预测结果,以及每一人脸图像样本的实际年龄,利用预设的损失函数,确定年龄损失值。判断确定的年龄损失值是否小于预设年龄损失阈值。若确定的年龄损失值小于预设年龄损失阈值,则可确定年龄模型收敛。若确定的年龄损失值不小于预设年龄损失阈值,则调整年龄模型中各个conv5,FC3,FC4和softmax2的权重,重新对年龄模型的训练,即重新将各人脸图像样本分别输入年龄模型,得到每一人脸图像样本的年龄预测结果,直至确定的年龄损失值小于预设年龄损失阈值为止。
可选地,深度神经网络模型的训练还可以包括第3次训练。
具体的,第三次训练:待年龄模型收敛后,可以选用预设学习率,将年龄模型的学习率设置为该预设学习率。该预设学习率可以为较小的学习率。 利用上述人脸图像样本来对年龄模型进行整体训练,直至该年龄模型再次收敛,从而获得准确的年龄模型。其中,对年龄模型进行整体训练包括对年龄模型中的conv1,conv2,conv3,conv4,conv5,FC3,FC4和softmax2进行训练。第三次训练的主要目的在于:对第一次训练收敛后的conv1,conv2,conv3,conv4的权值,以及第二次训练后收敛的conv5,FC3,FC4和softmax2的权值分别进行微调,实现对年龄模型中各网络层的权值进行微调。对年龄模型中各个网络层的权值更新的幅度与学习率有关。本实施例通过选用较小的预设学习率,从而小幅度的更新各网络层的权值,实现对年龄模型中每个网络层的权值微调。
步骤4:利用步骤3中训练收敛后的年龄模型来对待测的人脸图像进行年龄预估,从而可以由softmax2输出该人脸图像的每个年龄类别(即表1中的16个类别)对应的概率值。
具体的,将待测的人脸图像输入步骤3中训练收敛后的年龄模型中,得到该待测的人脸图像属于每个年龄类别的概率值。
步骤5:利用年龄模型输出的每个年龄类别对应的概率值,以及每个年龄类别对应的年龄,来对该待测的人脸图像的年龄进行估计计算。
一个实施例中,年龄估计计算公式如公式(1)所示:
Figure PCTCN2018114368-appb-000004
其中,MiddleAge i为表1所示的第i个年龄类别对应的平均年龄,p i为本申请实施例中如图2所示的深度神经网络模型输出的第i个年龄类别对应的概率值,i为年龄类别的个数,如表1所示,i大于等于零且小于等于15的整数。
另一个实施例中,从年龄模型输出的每个年龄类别对应的概率值中,选取最大的概率值。将最大的概率值所对应年龄类别的年龄均值作为该待测的人脸图像的估计年龄。
借助于本申请上述实施例的技术方案,本申请实施例考虑到了人脸图像的年龄和性别存在很大相关性,特别是成年人的人脸图像的表象年龄和性别关系更为突出,比如女性相比于男性更注重保养,在男女实际年龄相同的条件下,男女人脸图像的表象年龄可能相差很大。而在社交网络中,图片和视 频中人脸图像的表象年龄往往与真实年龄相差很多。因此为了准确的预估出人脸图像的实际年龄,有必要利用人脸图像的性别信息,来辅助预估人脸图像的年龄。本申请实施例的深度神经网络模型中用于对年龄进行分类的年龄模型在训练时能够在性别信息的监督下进行,从而进一步保证了年龄分类检测的准确度,提升了人脸图像的年龄估计准确度。
本申请实施例中,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。
与上述本申请实施例所提供的方法相对应,参照图3,示出了本申请的一种年龄预估装置实施例的结构框图,具体可以包括如下模块:
第一训练模块31,用于根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,其中,所述性别模型包括至少两个卷积层。
其中,人脸图像样本包括多个人脸图像,每个人脸图像均标注有年龄信息和性别信息。其中,性别模型,用于检测人脸图像的性别,该性别模型可以是一种深度神经网络模型,该性别模型包括至少两个卷积层。本申请实施例通过具有性别信息标注的人脸图像样本来对该性别模型进行性别训练,从而调整性别模型中各个网络层的权重,直至该性别模型收敛,所谓性别模型的收敛,即性别模型输出的性别预测结果与实际性别之间的误差小于预设误差阈值。网络层包括卷积层、全连接层和分类层。分类层即为分类器。
第二训练模块32,用于根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛,其中,所述年龄模型包括所述至少两个卷积层,收敛后的所述年龄模型包括的所述至少两个卷积层的权重,与收敛后的所述性别模型包括的所述至少两个卷积层的权重相同。
其中,年龄模型,用于检测人脸图像的年龄,而为了实现性别信息对年龄预测的监督,本申请实施例的年龄模型和性别模型共用部分卷积层,即上述的至少两个卷积层。其中,该年龄模型同样可以是一种深度神经网络模型, 该年龄模型中的至少两个卷积层经过第一训练模块31的训练,每个卷积层的权重都是对性别预测收敛的。为了实现性别信息对年龄预测的监督,在对年龄模型进行年龄训练时,可以保持该至少两个卷积层中每个卷积层的权重不变,即仍旧是第一训练模块31训练性别模型收敛后的权重。然后,将上述标注有年龄信息的多个人脸图像样本分别输入至年龄模型,来对年龄模型训练,在年龄模型训练过程中不对年龄模型中的上述至少两个卷积层的权重进行修改,而是对年龄模型的其他网络层的权重进行调整,直至调整后的各网络层的权重使得年龄模型收敛。所谓年龄模型的收敛,即年龄模型输出的年龄预测结果与实际年龄之间的误差小于预设年龄误差阈值。
预估模块33,用于根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估。
其中,可以利用经过上述性别信息监督训练而收敛的年龄模型,来对任意一个需要估计年龄的人脸图像进行识别,具体则是将该人脸图像输入至该年龄模型,经过年龄模型的预测,可以输出年龄预估结果。
这样,本申请实施例通过使性别模型和年龄模型共用至少两个卷积层,并通过对性别模型进行训练,使得性别模型收敛;并对年龄模型进行训练,在年龄模型训练过程中保持上述至少两个卷积层的权重不变,仍旧是性别模型收敛后的权重,使得年龄模型的训练过程中得到性别信息的监督,最终利用收敛后的年龄模型来对人脸图像进行年龄预估,能够消除人脸图像的性别差异造成的年龄预估不准确的问题,进而提升年龄预估准确度。
在一种可能的实施方式中,所述性别模型还包括至少一个第一全连接层以及第一分类器,所述第一训练模块31可以包括:
第一训练子模块,用于根据人脸图像样本的性别标注信息对性别模型包括的所述至少两个卷积层、所述至少一个第一全连接层以及所述第一分类器进行性别训练,使所述性别模型收敛。
在一种可能的实施方式中,所述年龄模型还包括至少一个卷积层、至少一个第二全连接层以及第二分类器,所述第二训练模块32可以包括:
第二训练子模块,用于根据人脸图像样本的年龄标注信息对年龄模型包 括的所述至少一个卷积层、所述至少一个第二全连接层以及所述第二分类器进行年龄训练,使所述年龄模型收敛。
在一种可能的实施方式中,根据本申请实施例提供的年龄预估装置还可以包括:
第三训练模块,用于在所述年龄模型收敛后,将所述年龄模型的学习率设置为预设学习率,并根据所述人脸图像样本对所述年龄模型进行二次年龄训练,使所述年龄模型再次收敛。
在一种可能的实施方式中,所述预估模块33可以包括:
预估子模块,用于根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估,得到每个年龄类别对应的概率值;
计算子模块,用于根据每个年龄类别对应的概率值和每个年龄类别对应的年龄,计算所述人脸图像的估计年龄。
在一种可能的实施方式中,所述计算子模块,具体可以用于利用以下公式,计算所述人脸图像的估计年龄meanAge:
Figure PCTCN2018114368-appb-000005
其中,MiddleAge i为第i个年龄类别对应的平均年龄,p i为第i个年龄类别对应的概率值,n为年龄类别的个数。
对于年龄预估装置实施例而言,由于其与年龄预估方法实施例基本相似,所以描述的比较简单,相关之处参见年龄预估方法实施例的部分说明即可。
与上述本申请实施例所提供的方法相对应,根据本申请的另一个实施例,还提供了一种移动终端,如图4所示,该移动终端包括:存储器401、处理器402及存储在所述存储器上并可在所述处理器上运行的年龄预估程序403,所述年龄预估程序403被所述处理器402执行时实现如上述实施例的年龄预估方法的步骤。具体的,该年龄预估方法包括如下步骤:
根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,其中,所述性别模型包括至少两个卷积层;
根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛, 其中,所述年龄模型包括所述至少两个卷积层,收敛后的所述年龄模型包括的所述至少两个卷积层的权重,与收敛后的所述性别模型包括的所述至少两个卷积层的权重相同;
根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估。
本申请实施例通过使性别模型和年龄模型共用至少两个卷积层,并通过对性别模型进行训练,使得性别模型收敛;并对年龄模型进行训练,在年龄模型训练过程中保持上述至少两个卷积层的权重不变,仍旧是性别模型收敛后的权重,使得年龄模型的训练过程中得到性别信息的监督,最终利用收敛后的年龄模型来对人脸图像进行年龄预估,能够消除人脸图像的性别差异造成的年龄预估不准确的问题,进而提升年龄预估准确度。
一个实施例中,如图4所示,移动终端还可以包括:通信接口404和通信总线405。处理器402,通信接口404,存储器401通过通信总线405完成相互间的通信。
上述通信总线可以是外设部件互连标准(Peripheral Pomponent Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
上述通信接口用于上述移动终端与其他设备之间的通信。
上述存储器可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(Non-Volatile Memory,简称NVM),例如至少一个磁盘存储器。可选的,上述存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Ne twork Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Applica tion Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
对于移动终端实施例而言,由于其与年龄预估方法实施例基本相似,所以描述的比较简单,相关之处参见年龄预估方法实施例的部分说明即可。
与上述本申请实施例所提供的方法相对应,根据本申请的另一个实施例,还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有年龄预估程序,所述年龄预估程序被处理器执行时实现如上述实施例的年龄预估方法中的步骤。具体的,该年龄预估方法包括如下步骤:
根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,其中,所述性别模型包括至少两个卷积层;
根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛,其中,所述年龄模型包括所述至少两个卷积层,收敛后的所述年龄模型包括的所述至少两个卷积层的权重,与收敛后的所述性别模型包括的所述至少两个卷积层的权重相同;
根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估。
本申请实施例通过使性别模型和年龄模型共用至少两个卷积层,并通过对性别模型进行训练,使得性别模型收敛;并对年龄模型进行训练,在年龄模型训练过程中保持上述至少两个卷积层的权重不变,仍旧是性别模型收敛后的权重,使得年龄模型的训练过程中得到性别信息的监督,最终利用收敛后的年龄模型来对人脸图像进行年龄预估,能够消除人脸图像的性别差异造成的年龄预估不准确的问题,进而提升年龄预估准确度。
对于计算机可读存储介质实施例而言,由于其与年龄预估方法实施例基本相似,所以描述的比较简单,相关之处参见年龄预估方法实施例的部分说明即可。
与上述本申请实施例所提供的方法相对应,根据本申请的另一个实施例,还提供了一种计算机程序,所述计算机程序被处理器执行时实现如上述实施例的年龄预估方法中的步骤。具体的,该年龄预估方法包括如下步骤:
根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,其中,所述性别模型包括至少两个卷积层;
根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛, 其中,所述年龄模型包括所述至少两个卷积层,收敛后的所述年龄模型包括的所述至少两个卷积层的权重,与收敛后的所述性别模型包括的所述至少两个卷积层的权重相同;
根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估。
本申请实施例通过使性别模型和年龄模型共用至少两个卷积层,并通过对性别模型进行训练,使得性别模型收敛;并对年龄模型进行训练,在年龄模型训练过程中保持上述至少两个卷积层的权重不变,仍旧是性别模型收敛后的权重,使得年龄模型的训练过程中得到性别信息的监督,最终利用收敛后的年龄模型来对人脸图像进行年龄预估,能够消除人脸图像的性别差异造成的年龄预估不准确的问题,进而提升年龄预估准确度。
对于计算机程序实施例而言,由于其与年龄预估方法实施例基本相似,所以描述的比较简单,相关之处参见年龄预估方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。
以上对本申请所提供的一种年龄预估方法和一种年龄预估装置,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (15)

  1. 一种年龄预估方法,其特征在于,包括:
    根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,其中,所述性别模型包括至少两个卷积层;
    根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛,其中,所述年龄模型包括所述至少两个卷积层,收敛后的所述年龄模型包括的所述至少两个卷积层的权重,与收敛后的所述性别模型包括的所述至少两个卷积层的权重相同;
    根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估。
  2. 根据权利要求1所述的方法,其特征在于,所述性别模型还包括至少一个第一全连接层以及第一分类器,所述根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,包括:
    根据人脸图像样本的性别标注信息对所述性别模型包括的所述至少两个卷积层、所述至少一个第一全连接层以及所述第一分类器进行性别训练,使所述性别模型收敛。
  3. 根据权利要求1所述的方法,其特征在于,所述年龄模型除包括所述至少两个卷积层外,还包括至少一个卷积层、至少一个第二全连接层以及第二分类器,所述根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛,包括:
    根据人脸图像样本的年龄标注信息对所述年龄模型包括的所述至少一个卷积层、所述至少一个第二全连接层以及所述第二分类器进行年龄训练,使所述年龄模型收敛。
  4. 根据权利要求1所述的方法,其特征在于,所述根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估之前,所述方法还包括:
    在所述年龄模型收敛后,将所述年龄模型的学习率设置为预设学习率,并根据所述人脸图像样本对所述年龄模型进行二次年龄训练,使所述年龄模型再次收敛。
  5. 根据权利要求1所述的方法,其特征在于,所述根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估,包括:
    根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估,得到每个年龄类别对应的概率值;
    根据每个年龄类别对应的概率值和每个年龄类别对应的年龄,计算所述人脸图像的估计年龄。
  6. 根据权利要求5所述的方法,其特征在于,所述根据每个年龄类别对应的概率值和每个年龄类别对应的年龄,计算所述人脸图像的估计年龄,包括:
    利用以下公式,计算所述人脸图像的估计年龄meanAge:
    Figure PCTCN2018114368-appb-100001
    其中,MiddleAge i为第i个年龄类别对应的平均年龄,p i为第i个年龄类别对应的概率值,n为年龄类别的个数。
  7. 一种年龄预估装置,其特征在于,包括:
    第一训练模块,用于根据人脸图像样本对性别模型进行性别训练,使所述性别模型收敛,其中,所述性别模型包括至少两个卷积层;
    第二训练模块,用于根据所述人脸图像样本对年龄模型进行年龄训练,使所述年龄模型收敛,其中,所述年龄模型包括所述至少两个卷积层,收敛后的所述年龄模型包括的所述至少两个卷积层的权重,与收敛后的所述性别模型包括的所述至少两个卷积层的权重相同;
    预估模块,用于根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估。
  8. 根据权利要求7所述的装置,其特征在于,所述性别模型还包括至少一个第一全连接层以及第一分类器,所述第一训练模块包括:
    第一训练子模块,用于根据人脸图像样本的性别标注信息对所述性别模型包括的所述至少两个卷积层、所述至少一个第一全连接层以及所述第一分类器进行性别训练,使所述性别模型收敛。
  9. 根据权利要求7所述的装置,其特征在于,所述年龄模型还包括至少一个卷积层、至少一个第二全连接层以及第二分类器,所述第二训练模块包括:
    第二训练子模块,用于根据人脸图像样本的年龄标注信息对所述年龄模 型包括的所述至少一个卷积层、所述至少一个第二全连接层以及所述第二分类器进行年龄训练,使所述年龄模型收敛。
  10. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    第三训练模块,用于在所述年龄模型收敛后,将所述年龄模型的学习率设置为预设学习率,并根据所述人脸图像样本对所述年龄模型进行二次年龄训练,使所述年龄模型再次收敛。
  11. 根据权利要求7所述的装置,其特征在于,所述预估模块包括:
    预估子模块,用于根据收敛后的所述年龄模型对输入的人脸图像进行年龄预估,得到每个年龄类别对应的概率值;
    计算子模块,用于根据每个年龄类别对应的概率值和每个年龄类别对应的年龄,计算所述人脸图像的估计年龄。
  12. 根据权利要求11所述的装置,其特征在于,所述计算子模块,具体用于利用以下公式,计算所述人脸图像的估计年龄meanAge:
    Figure PCTCN2018114368-appb-100002
    其中,MiddleAge i为第i个年龄类别对应的平均年龄,p i为第i个年龄类别对应的概率值,n为年龄类别的个数。
  13. 一种移动终端,其特征在于,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的年龄预估程序,所述年龄预估程序被所述处理器执行时实现如权利要求1至6中任一项所述的年龄预估方法的步骤。
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有年龄预估程序,所述年龄预估程序被处理器执行时实现如权利要求1至6中任一项所述的年龄预估方法中的步骤。
  15. 一种计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至6中任一项所述的年龄预估方法中的步骤。
PCT/CN2018/114368 2017-11-09 2018-11-07 年龄预估方法和装置 Ceased WO2019091402A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/762,706 US11587356B2 (en) 2017-11-09 2018-11-07 Method and device for age estimation

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711100297.9A CN108052862B (zh) 2017-11-09 2017-11-09 年龄预估方法和装置
CN201711100297.9 2017-11-09

Publications (1)

Publication Number Publication Date
WO2019091402A1 true WO2019091402A1 (zh) 2019-05-16

Family

ID=62118786

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/114368 Ceased WO2019091402A1 (zh) 2017-11-09 2018-11-07 年龄预估方法和装置

Country Status (3)

Country Link
US (1) US11587356B2 (zh)
CN (1) CN108052862B (zh)
WO (1) WO2019091402A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112036293A (zh) * 2020-08-27 2020-12-04 北京金山云网络技术有限公司 年龄估计方法、年龄估计模型的训练方法及装置
CN113920562A (zh) * 2021-09-24 2022-01-11 深圳数联天下智能科技有限公司 年龄预测模型的训练方法、年龄预测方法及装置
CN114399808A (zh) * 2021-12-15 2022-04-26 西安电子科技大学 一种人脸年龄估计方法、系统、电子设备及存储介质
CN116561347A (zh) * 2023-07-07 2023-08-08 广东信聚丰科技股份有限公司 基于用户学习画像分析的题目推荐方法及系统
US12475687B2 (en) 2021-06-16 2025-11-18 Beijing Baidu Netcom Science Technology Co., Ltd. Method and apparatus for training classification model and data classification

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108052862B (zh) 2017-11-09 2019-12-06 北京达佳互联信息技术有限公司 年龄预估方法和装置
CN109086680A (zh) * 2018-07-10 2018-12-25 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质和电子设备
CN109034078B (zh) * 2018-08-01 2023-07-14 腾讯科技(深圳)有限公司 年龄识别模型的训练方法、年龄识别方法及相关设备
JP7326867B2 (ja) * 2019-05-21 2023-08-16 富士通株式会社 情報処理装置、情報処理プログラム及び情報処理方法
CN110532970B (zh) * 2019-09-02 2022-06-24 厦门瑞为信息技术有限公司 人脸2d图像的年龄性别属性分析方法、系统、设备和介质
CN111914772B (zh) * 2020-08-06 2024-05-03 北京金山云网络技术有限公司 识别年龄的方法、年龄识别模型的训练方法和装置
US11989973B2 (en) * 2021-08-31 2024-05-21 Black Sesame Technologies Inc. Age and gender estimation using a convolutional neural network
CN114283479A (zh) * 2021-12-28 2022-04-05 重庆中科云从科技有限公司 一种年龄分段属性预测方法、装置、介质及设备
CN114232281A (zh) * 2022-01-13 2022-03-25 合肥美菱物联科技有限公司 一种洗衣机安全保护控制方法
CN114694215B (zh) * 2022-03-16 2025-08-26 北京金山云网络技术有限公司 年龄估计模型的训练及估计方法、装置、设备及存储介质
CN115293260B (zh) * 2022-08-03 2026-04-07 履安科技有限公司 年龄预测模型训练方法、装置、设备及存储介质
CN117115466B (zh) * 2023-09-11 2025-07-25 四川大学 基于隐变量模型的头侧x光片年龄性别估计方法与系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150139485A1 (en) * 2013-11-15 2015-05-21 Facebook, Inc. Pose-aligned networks for deep attribute modeling
CN105095833A (zh) * 2014-05-08 2015-11-25 中国科学院声学研究所 用于人脸识别的网络构建方法、识别方法及系统
CN105426872A (zh) * 2015-12-17 2016-03-23 电子科技大学 一种基于相关高斯过程回归的面部年龄估计方法
CN106951825A (zh) * 2017-02-13 2017-07-14 北京飞搜科技有限公司 一种人脸图像质量评估系统以及实现方法
CN108052862A (zh) * 2017-11-09 2018-05-18 北京达佳互联信息技术有限公司 年龄预估方法和装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106384080A (zh) * 2016-08-31 2017-02-08 广州精点计算机科技有限公司 一种基于卷积神经网络的表观年龄估计方法及装置
CN106529402B (zh) * 2016-09-27 2019-05-28 中国科学院自动化研究所 基于多任务学习的卷积神经网络的人脸属性分析方法
CN106503669B (zh) * 2016-11-02 2019-12-10 重庆中科云丛科技有限公司 一种基于多任务深度学习网络的训练、识别方法及系统
CN106548234A (zh) * 2016-11-17 2017-03-29 北京图森互联科技有限责任公司 一种神经网络剪枝方法及装置
US10360494B2 (en) * 2016-11-30 2019-07-23 Altumview Systems Inc. Convolutional neural network (CNN) system based on resolution-limited small-scale CNN modules
CN108197592B (zh) * 2018-01-22 2022-05-27 百度在线网络技术(北京)有限公司 信息获取方法和装置
US20190259384A1 (en) * 2018-02-19 2019-08-22 Invii.Ai Systems and methods for universal always-on multimodal identification of people and things

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150139485A1 (en) * 2013-11-15 2015-05-21 Facebook, Inc. Pose-aligned networks for deep attribute modeling
CN105095833A (zh) * 2014-05-08 2015-11-25 中国科学院声学研究所 用于人脸识别的网络构建方法、识别方法及系统
CN105426872A (zh) * 2015-12-17 2016-03-23 电子科技大学 一种基于相关高斯过程回归的面部年龄估计方法
CN106951825A (zh) * 2017-02-13 2017-07-14 北京飞搜科技有限公司 一种人脸图像质量评估系统以及实现方法
CN108052862A (zh) * 2017-11-09 2018-05-18 北京达佳互联信息技术有限公司 年龄预估方法和装置

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112036293A (zh) * 2020-08-27 2020-12-04 北京金山云网络技术有限公司 年龄估计方法、年龄估计模型的训练方法及装置
US12475687B2 (en) 2021-06-16 2025-11-18 Beijing Baidu Netcom Science Technology Co., Ltd. Method and apparatus for training classification model and data classification
CN113920562A (zh) * 2021-09-24 2022-01-11 深圳数联天下智能科技有限公司 年龄预测模型的训练方法、年龄预测方法及装置
CN113920562B (zh) * 2021-09-24 2024-04-30 深圳数联天下智能科技有限公司 年龄预测模型的训练方法、年龄预测方法及装置
CN114399808A (zh) * 2021-12-15 2022-04-26 西安电子科技大学 一种人脸年龄估计方法、系统、电子设备及存储介质
CN116561347A (zh) * 2023-07-07 2023-08-08 广东信聚丰科技股份有限公司 基于用户学习画像分析的题目推荐方法及系统
CN116561347B (zh) * 2023-07-07 2023-11-07 广东信聚丰科技股份有限公司 基于用户学习画像分析的题目推荐方法及系统

Also Published As

Publication number Publication date
US11587356B2 (en) 2023-02-21
US20210174066A1 (en) 2021-06-10
CN108052862A (zh) 2018-05-18
CN108052862B (zh) 2019-12-06

Similar Documents

Publication Publication Date Title
WO2019091402A1 (zh) 年龄预估方法和装置
CN110147700B (zh) 视频分类方法、装置、存储介质以及设备
CN110276264B (zh) 一种基于前景分割图的人群密度估计方法
KR102445468B1 (ko) 부스트 풀링 뉴럴 네트워크 기반의 데이터 분류 장치 및 그 데이터 분류 장치를 위한 뉴럴 네트워크 학습 방법
WO2020253127A1 (zh) 脸部特征提取模型训练方法、脸部特征提取方法、装置、设备及存储介质
US20150116350A1 (en) Combined composition and change-based models for image cropping
CN110956615B (zh) 图像质量评估模型训练方法、装置、电子设备及存储介质
CN108491874A (zh) 一种基于生成式对抗网络的图像单分类方法
CN113743474A (zh) 基于协同半监督卷积神经网络的数字图片分类方法与系统
WO2019228040A1 (zh) 一种面部图像评分方法及摄像机
CN112488241A (zh) 一种基于多粒度融合网络的零样本图片识别方法
CN105225222A (zh) 对不同图像集的感知视觉质量的自动评估
CN107743225B (zh) 一种利用多层深度表征进行无参考图像质量预测的方法
CN111160229A (zh) 基于ssd网络的视频目标检测方法及装置
CN106897746A (zh) 数据分类模型训练方法和装置
WO2023088174A1 (zh) 目标检测方法及装置
CN112183283A (zh) 一种基于图像的年龄估计方法、装置、设备及存储介质
CN114399697A (zh) 一种基于运动前景的场景自适应目标检测方法
CN115862119A (zh) 基于注意力机制的人脸年龄估计方法及装置
CN111401343A (zh) 识别图像中人的属性的方法、识别模型的训练方法和装置
CN113033444A (zh) 年龄估计方法、装置和电子设备
CN113327212A (zh) 人脸驱动、模型的训练方法、装置、电子设备及存储介质
CN112950567A (zh) 质量评价方法、装置、电子设备及存储介质
WO2021217937A1 (zh) 姿态识别模型的训练方法及设备、姿态识别方法及其设备
TWI803243B (zh) 圖像擴增方法、電腦設備及儲存介質

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18875362

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18875362

Country of ref document: EP

Kind code of ref document: A1