Age recognition method, training method and device for age recognition model
By using preset samples and loss function training in the age recognition model, the predicted size relationship between the actual age output by the model and multiple preset ages meets the specified conditions, solving the problem of poor age recognition accuracy in the existing technology. , achieving higher age recognition accuracy.
Patent Information
- Application Number
- CN202011004890.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-21
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2040-09-21
AI Technical Summary
The prior art regards tasks as classification or regression tasks in age recognition, and fails to effectively consider the correlation between different ages and non-stationary changes in age growth, resulting in poorer age recognition accuracy.
The age recognition model is trained through preset samples and loss functions. The predicted size relationship between the actual age output by the model and multiple preset ages meets the specified conditions. The specific steps include obtaining the image to be processed and inputting it to the pre-trained age recognition model. , the output is used to determine the age of the target subject.
This method can more accurately depict the correlation between different ages and actual age, reflect the changing characteristics of objects with age, thereby improving the estimation accuracy of the age recognition model.
Smart Images

Figure CN112085000B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an age recognition method, and a training method and device for an age recognition model. Background Art
[0002] Age, as an important facial attribute, has important applications in human-computer interaction, smart business, security monitoring, entertainment and other fields. In related technologies, the age of a person in an image can be estimated through a deep learning model; during the training process, the deep learning model regards the age recognition task as a classification task or a regression task, calculates the loss value of age recognition, and then trains the deep learning model based on the loss value. However, since the correlation between different ages is not taken into account when the age recognition task is regarded as a classification task, it is difficult to describe the non-stationary changes of age growth when the age recognition task is regarded as a regression task, resulting in poor accuracy of age recognition. Summary of the invention
[0003] The purpose of the present invention is to provide an age recognition method, a training method and a device for an age recognition model to improve the accuracy of age recognition.
[0004] In a first aspect, an embodiment of the present invention provides an age recognition method, the method comprising: obtaining an image to be processed containing a target object; inputting the image to be processed into a pre-trained age recognition model to obtain an output result, and determining the age of the target object based on the output result; wherein the age recognition model is trained by preset samples and loss functions; the label of the sample comprises: the actual size relationship between the actual age of the object in the sample and a plurality of preset ages; the loss function is used to constrain: the predicted size relationship between the actual age of the object and a plurality of preset ages output by the age recognition model satisfies specified conditions.
[0005] In an optional embodiment, the label of the above-mentioned sample specifically includes: multiple preset ages, and a probability value corresponding to each preset age; wherein the probability value is used to indicate the probability that the actual age is greater than, equal to or less than the preset age; the above-mentioned specified conditions include: if among the preset ages, the difference between the first age and the actual age is less than the difference between the second age and the actual age; the probability value corresponding to the first age output by the above-mentioned age recognition model is greater than the probability value corresponding to the second age.
[0006] In an optional implementation, the label of the sample is determined by: obtaining the actual age of the object in the sample; and determining the probability value corresponding to each preset age among multiple preset ages by the following formula:
[0007]
[0008] Among them, yi Represents the probability value corresponding to the preset age i in the sample label, a represents the actual age; i∈[1,…,N-1], N represents the total number of multiple preset ages in the sample label.
[0009] In an optional embodiment, the above-mentioned output result includes: multiple preset ages, and the predicted probability corresponding to each preset age; the above-mentioned step of determining the age of the target object based on the output result includes: determining the number of preset ages whose predicted probability is greater than a preset probability threshold from the predicted probability corresponding to each preset age in the output result; and taking the sum of the determined number and one as the age of the target object.
[0010] In a second aspect, an embodiment of the present invention provides a training method for an age recognition model, the training method comprising: obtaining a sample set; each sample in the sample set carries a label, the label comprising: the actual size relationship between the actual age of the object in the sample and multiple preset ages; based on the sample set and a preset loss function, training an initial model to obtain an age recognition model; the loss function is used to constrain: the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model meets specified conditions.
[0011] In an optional embodiment, the label of the above-mentioned sample specifically includes: multiple preset ages, and a probability value corresponding to each preset age; wherein the probability value is used to indicate the probability that the actual age is greater than, equal to or less than the preset age; the above-mentioned specified conditions include: if among the preset ages, the difference between the first age and the actual age is less than the difference between the second age and the actual age; the probability value corresponding to the first age output by the age recognition model is greater than the probability value corresponding to the second age.
[0012] In an optional embodiment, the above-mentioned step of training the initial model based on the sample set and the preset loss function to obtain the age recognition model includes: determining the training sample based on the sample set; inputting the training sample into the initial model and outputting the prediction result; the prediction result includes: a predicted size relationship between the actual age of the object in the training sample and multiple preset ages; determining the loss amount according to the prediction result and the loss function; updating the weight parameters of the initial model according to the loss amount; and continuing to execute the step of determining the training sample based on the sample set until the loss amount converges to obtain the age recognition model.
[0013] In an optional embodiment, the above-mentioned predicted size relationship between the actual age of the object in the training sample and multiple preset ages includes: a probability value corresponding to each preset age in the predicted multiple preset ages; the above-mentioned step of determining the loss amount based on the prediction result and the loss function includes: determining a first loss value based on the difference in probability values of every two adjacent preset ages among the multiple preset ages; determining a second loss value based on the gap between the probability value of each preset age and the label of the training sample; determining the loss amount based on the first loss value and the second loss value.
[0014] In an optional embodiment, the step of determining the first loss value based on the difference between the probability values of every two adjacent preset ages among the plurality of preset ages comprises: calculating the first loss value by the following formula:
[0015]
[0016] Among them, L1 represents the first loss value, represents the predicted probability corresponding to the preset age i in the prediction result, represents the predicted probability corresponding to the preset age i-1 in the predicted result; K represents the total number of multiple preset ages in the predicted result; max represents the maximum value operation.
[0017] In an optional implementation, the step of determining the second loss value according to the difference between the probability value of each preset age and the label of the training sample includes: calculating the second loss value by the following formula:
[0018]
[0019] Among them, L2 represents the second loss value, Indicates the probability value corresponding to the preset age i in the prediction result, y i represents the probability value corresponding to the preset age i in the label of the training sample; K represents the total number of multiple preset ages; log represents the logarithm with base 2.
[0020] In a third aspect, an embodiment of the present invention provides an age recognition device, which includes: an image acquisition module, used to acquire an image to be processed containing a target object; an age determination module, used to input the image to be processed into a pre-trained age recognition model to obtain an output result, and determine the age of the target object based on the output result; wherein the age recognition model is trained by preset samples and loss functions; the label of the sample includes: the actual size relationship between the actual age of the object in the sample and multiple preset ages; the loss function is used to constrain: the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model meets specified conditions.
[0021] In a fourth aspect, an embodiment of the present invention provides a training device for an age recognition model, the training device comprising: a sample set acquisition module, used to acquire a sample set; each sample in the sample set carries a label, the label comprising: the actual size relationship between the actual age of the object in the sample and multiple preset ages; a model training module, used to train an initial model based on the sample set and a preset loss function to obtain an age recognition model; the loss function is used to constrain: the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model meets specified conditions.
[0022] In a fifth aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the age recognition method described in any one of the aforementioned embodiments or the age recognition model training method described in any one of the aforementioned embodiments.
[0023] In a sixth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the age recognition method described in any one of the aforementioned embodiments or the age recognition model training method described in any one of the aforementioned embodiments.
[0024] The embodiments of the present invention bring the following beneficial effects:
[0025] The present invention provides an age recognition method, an age recognition model training method and a device, firstly obtaining an image to be processed containing a target object; then inputting the image to be processed into a pre-trained age recognition model to obtain an output result, and determining the age of the target object based on the output result; the age recognition model is trained by a preset sample and a loss function; the label of the sample includes: the real size relationship between the actual age of the object in the sample and multiple preset ages; the loss function is used to constrain: the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model satisfies a specified condition. In the process of training, the age recognition model in this method regards the age recognition task as a task of predicting the size relationship between the actual age of the object and multiple preset ages. Compared with the classification task and the regression task, this task can more accurately characterize the correlation between different ages and the actual age, and can also reflect the changing characteristics of the object as the age increases, thereby improving the accuracy of the age estimation of the age recognition model.
[0026] Other features and advantages of the present invention will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present invention.
[0027] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically listed below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 A flowchart of an age recognition method provided by an embodiment of the present invention;
[0030] Figure 2 A flowchart of another age recognition method provided by an embodiment of the present invention;
[0031] Figure 3 A flowchart of a method for training an age recognition model provided by an embodiment of the present invention;
[0032] Figure 4 A schematic diagram of a network structure of an initial model provided by an embodiment of the present invention;
[0033] Figure 5 A flowchart of another method for training an age recognition model provided by an embodiment of the present invention;
[0034] Figure 6 A schematic diagram of the structure of an age recognition device provided by an embodiment of the present invention;
[0035] Figure 7 A schematic diagram of the structure of a training device for an age recognition model provided by an embodiment of the present invention;
[0036] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0038] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] As an important biometric recognition technology, automatic face age recognition has become a hot research topic in the field of pattern recognition and computer vision. The definition of face age recognition problem usually refers to the use of computer vision and other technologies to automatically estimate the actual age of the face in the image based on the input face image.
[0040] In actual implementation, age recognition is a special pattern recognition problem. Specifically, if different ages are regarded as different categories, then the age recognition problem can be regarded as a classification task. For example, assuming that the preset age span in the training data set is 1 to 100 years old, then age recognition can be regarded as a 100-category multi-classification problem on the training data set; at the same time, a person's age represents the time he has experienced from birth to the present, which is a continuous process. Therefore, the age recognition problem can also be formalized as a regression problem.
[0041] Existing age recognition algorithms usually treat the age recognition task as a classification task or a regression task to perform age recognition. In the related art, two age recognition algorithms are provided. The first is the traditional face age recognition algorithm, which generally requires manual extraction of facial features (such as active appearance features, anthropometric features, bio-inspired features, etc.) in the face image, and then training a classifier or regressor from facial features to age. The age of the face in the face image can be estimated through the classifier or regressor, but this method cannot extract the high-level semantic information of the face, resulting in low accuracy of the age recognition result obtained by this method.
[0042] The second is a face age recognition algorithm based on deep learning, which estimates the age of a person in an image through a deep learning model. The deep learning model is usually a convolutional neural network, which can establish a mapping relationship between an input face and age. During the training process, the deep learning model regards the age recognition task as a classification task or a regression task, calculates the loss value of age recognition, and then trains the deep learning model based on the loss value. However, regarding the age recognition task as a classification task actually means that different ages are regarded as independent tasks, without considering the correlation between different ages (for example, the similarity between faces of similar ages is greater than the similarity between faces of large age gaps). At the same time, the appearance of a face changes in different ways at different ages. In childhood, as age increases, the most significant change in the face is the change in shape. After adulthood, as age increases, the skin texture change (wrinkles) on the face is the most obvious change. However, it is difficult for regression tasks to describe this non-stationary change in facial appearance with age, resulting in poor accuracy in age recognition.
[0043] Based on the above problems, the embodiments of the present invention provide an age recognition method, an age recognition model training method and a device. The technology can be applied to age recognition scenarios in the fields of human-computer interaction, smart business, security monitoring and entertainment. To facilitate understanding of this embodiment, an age recognition method disclosed in the embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps:
[0044] Step S102, obtaining an image to be processed containing a target object.
[0045] The above-mentioned image to be processed may be a picture or photo taken by a video camera or a camera, or a video frame in a video file; the target object contained in the image to be processed may be a person or a face, and the face may be a front face, a side face, an upper half face or a lower half face, etc., or a face with various expressions, such as a smiling face, a crying face, etc. In specific implementation, the image to be processed may be captured and transmitted by a camera or a camcorder connected to the communication device, or may be obtained from a storage device storing the image to be processed that has been captured, or may be obtained from a storage device storing a video file.
[0046] Step S104, inputting the image to be processed into a pre-trained age recognition model to obtain an output result, and determining the age of the target object based on the output result; wherein the age recognition model is trained by preset samples and loss functions; the label of the sample includes: the actual size relationship between the actual age of the object in the sample and multiple preset ages; the loss function is used to constrain: the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model meets specified conditions.
[0047] The above-mentioned age recognition model can be a deep learning model or a neural network model, etc. The age recognition model is obtained by machine learning training through samples in a preset sample set and a preset loss function. The sample set contains multiple samples, each sample carries a label, and the label is used to indicate the age of the object in the sample. The label includes the actual size relationship between the actual age of the object in the sample and multiple preset ages. It can also be understood that the label includes multiple preset ages and the actual size relationship between each preset age and the actual age.
[0048] In specific implementation, the range of multiple preset ages can be set according to user needs, and can be set to 0 to 100 years old, or 1 to 80 years old, etc.; the actual age of the object in the above sample can be the age value marked by the labeler, or it can be the actual age of the object obtained from the website or social software; the true size relationship between each preset age and the actual age can be expressed by the difference between the preset age and the actual age, and can be expressed by the first value or the second value (for example, 1 means that the preset age is less than the actual age, and 0 means that the preset age is greater than or equal to the actual age), or it can be expressed by the degree of proximity between the preset age and the actual age, which is not specifically limited here. The true size relationship between the actual age in the above label and multiple preset ages can reflect the characteristics of age change over time, characterize an ordinal regression property of age change, and is more in line with the characteristics of age itself.
[0049] In the training process of the age recognition model, it is necessary to determine a sample from the sample set, input the sample into the initial model of the age recognition model, and output an age prediction result, which includes multiple preset ages and the predicted size relationship between the actual age of the object in the sample and each preset age; then based on the age prediction result, the label of the sample and the loss function, the loss amount is obtained, and the weight parameters of the initial model are adjusted based on the loss amount until the loss amount converges to obtain the age recognition model. In the training process, the above loss function can make the predicted size relationship between the actual age and multiple preset ages in the age prediction result output by the age recognition model meet the specified conditions, thereby ensuring the rationality of the output result of the age recognition model.
[0050] In some embodiments, the above-mentioned specified condition can be that in the result output by the age recognition model, the size relationship between the actual age and the preset age shows a decreasing trend in the order of the preset ages from small to large. For example, multiple preset ages are 0-30 years old, and the actual age is 10 years old, then the predicted size relationship between 0 and 10 years old is greater than the predicted size relationship between 1 and 10 years old, and the predicted size relationship between 1 and 10 years old is greater than the predicted size relationship between 2 and 10 years old, and so on and so forth, it can be concluded that the predicted size relationship between 29 and 10 years old is greater than the predicted size relationship between 30 and 10 years old. It can be understood that when a person's actual age is 10 years old, this person must have experienced 0 to 9 years old, and the probability of having experienced 0 years old is greater, so the predicted size relationship between 0 and 10 years old is the largest, and the predicted size relationship will decrease successively with age, thereby reflecting the changing characteristics of age.
[0051] The above-mentioned specified condition may also be that in the result output by the age recognition model, among the predicted size relationships between multiple preset ages and actual ages, the closer the preset age is to the actual age, the larger the value corresponding to the predicted size relationship is.
[0052] In a specific implementation, the output result obtained by the pre-trained age recognition model based on the image to be processed includes: multiple preset ages, and the predicted size relationship between the actual age of the predicted target object and each preset age; the output result satisfies the above specified conditions. When determining the age of the target object, the maximum value of the preset ages greater than the preset threshold in the preset size relationship in the output result can be determined as the age of the target object; the age of the target object can be determined based on the number of preset ages greater than the preset threshold in the output result, and the specific age determination rule can be set according to user needs.
[0053] The embodiment of the present invention provides an age recognition method, firstly obtaining an image to be processed containing a target object; then inputting the image to be processed into a pre-trained age recognition model to obtain an output result, and determining the age of the target object based on the output result; the age recognition model is trained by a preset sample and a loss function; the label of the sample includes: the real size relationship between the actual age of the object in the sample and multiple preset ages; the loss function is used to constrain: the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model satisfies a specified condition. In the training process of the age recognition model in this method, the age recognition task is regarded as a task of predicting the size relationship between the actual age of the object and multiple preset ages. Compared with the classification task and the regression task, this task can more accurately characterize the correlation between different ages and the actual age, and can also reflect the changing characteristics of the object as the age increases, thereby improving the accuracy of the age estimation of the age recognition model.
[0054] The embodiment of the present invention also provides another age recognition method, which is implemented on the basis of the method in the above embodiment; the method focuses on describing the specific process of determining the age of the target object based on the output result (specifically implemented through the following steps S206-S208); Figure 2 As shown, the method comprises the following specific steps:
[0055] Step S202: acquiring an image to be processed containing a target object.
[0056] Step S204, inputting the above-mentioned image to be processed into a pre-trained age recognition model to obtain an output result; the output result includes: multiple preset ages, and the prediction probability corresponding to each preset age.
[0057] The ranges of multiple preset ages included in the above output results can be the same as the ranges of multiple preset ages in the labels of the samples used when training the age recognition model. The ranges of the multiple preset ages are set according to user needs and can be set to 0 to 100 years old, or 1 to 80 years old, etc. The predicted probability corresponding to each preset age in the above output results can be used to characterize: the probability value that the actual age of the target object is greater than the preset age. The probability value corresponding to the preset age in the output result (equivalent to the above predicted probability) meets the specified condition, and the specified condition can be: if the difference between the first age and the actual age in the multiple preset ages is less than the difference between the second age and the actual age, the probability value corresponding to the first age is greater than the probability value corresponding to the second age, that is, the probability value of the actual age being greater than the first age is greater than the probability value of the actual age being greater than the second age, thereby ensuring that the probability value in the output result is in a decreasing trend according to the order of the preset ages from the smallest to the smallest.
[0058] In practical applications, this decreasing trend is more in line with age characteristics. If the preset age is older than the actual age, it means that the target object has not experienced the preset age, and the probability value of the actual age being greater than the preset age is naturally smaller, and the older the preset age is, the smaller the probability corresponding to the preset age is; if the preset age is younger than the actual age, it means that the target object has experienced the preset age, and the probability of the actual age being greater than the preset age is naturally larger, and the younger the preset age is, the larger the probability value corresponding to the preset age is.
[0059] Step S206, determining the number of preset ages whose predicted probabilities are greater than a preset probability threshold from the predicted probabilities corresponding to each preset age in the output results.
[0060] The above-mentioned preset probability threshold can be an empirical value or a value set by the user according to needs, such as 0.5. In the output result, it is determined in turn whether the predicted probability corresponding to each preset age is greater than the preset probability threshold. If it is greater, the preset age is recorded; then the number of recorded preset ages is counted.
[0061] Step S208: The sum of the determined number and one is used as the age of the target object.
[0062] The above-mentioned age recognition method first obtains an image to be processed containing a target object; then inputs the image to be processed into a pre-trained age recognition model to obtain an output result; the output result includes: multiple preset ages and the prediction probability corresponding to each preset age; then, from the prediction probability corresponding to each preset age in the output result, the number of preset ages whose prediction probability is greater than the preset probability threshold is determined; and the sum of the determined number and one is used as the age of the target object. This method can obtain an accurate age recognition value by determining the age of the target object from the output results that meet the specified conditions.
[0063] In view of the above-mentioned embodiment of the age recognition method, the embodiment of the present invention also provides a method for training an age recognition model, such as Figure 3 As shown, the training method includes the following steps:
[0064] Step S302, obtaining a sample set; each sample in the sample set carries a label, and the label includes: the actual size relationship between the actual age of the object in the sample and multiple preset ages.
[0065] The above sample set contains a large number of samples, each of which contains a sample image and a label corresponding to the sample image, and the label is used to indicate the actual size relationship between the actual age of the object in the sample and multiple preset ages. In specific implementation, the label of the sample specifically includes: multiple preset ages, and a probability value corresponding to each preset age; wherein the probability value is used to indicate the probability that the actual age is greater than, equal to, or less than the preset age, and specifically, the probability value can be represented by a first numerical value and a second numerical value, the first numerical value represents the probability that the actual age is greater than the preset age, and the second numerical value represents the probability that the actual age is less than or equal to the preset age, for example, the first numerical value can be 1, and the second numerical value can be 0.
[0066] In practical applications, the actual age of the object in the sample can be converted into an ordinal regression label (equivalent to the label of the above sample) by training a binary classifier for each preset age. The task of the binary classifier is to determine whether the actual age of the object in the sample is greater than the preset age value. If it is greater, the probability value corresponding to the preset age is marked as 1, otherwise, the probability value corresponding to the preset age is marked as 0; then the judgment results of each binary classifier are fused to obtain the probability values corresponding to multiple preset ages. In specific implementation, the label of the above sample can be determined in the following way:
[0067] Step 10, obtaining the actual age of the subjects in the sample.
[0068] The above sample is any sample in the sample set, which includes a sample image. The sample image contains an object. The actual age of the object can be obtained after multiple labelers label the age of the object in the sample image. In the specific implementation, assuming that the multiple preset ages are 1 to 80 years old, for each sample image in the sample set, n labelers can be hired to label the age of the object in the sample image respectively, and n labeling results can be obtained. represents the labeling result of the kth labeler, which is an integer between 1 and 80, representing 1 to 80 years old respectively; then take The average value a is taken as the actual age of the objects in the sample image:
[0069]
[0070] in, Represents the rounding down operation on *.
[0071] Step 11, determine the probability value corresponding to each preset age among multiple preset ages by the following formula:
[0072]
[0073] Among them, y i Represents the probability value corresponding to the preset age i in the sample label, a represents the actual age; i∈[1,…,N], N represents the total number of multiple preset ages in the sample label.
[0074] For example, if the actual age of the object in the sample is 10 years old, the multiple preset ages in the sample's label range from 1 to 80 years old, and the total number of the multiple preset ages is 80, then the sample's label is an 80-bit vector, which can be expressed as [1,1,1,1,1,1,1,1,0,0,…,0,0]. The first element in the sample's label represents the probability value when the preset age is 1, the second element represents the probability value when the preset age is 2, and so on. The 80th element represents the probability value when the preset age is 80. In the sample's label, only the probability values corresponding to the first 9 preset ages are 1.
[0075] In some embodiments, in order to reduce the amount of calculation, the total number of preset ages in the sample label can be one less than the total number of preset ages used by the annotator when annotating. That is, if the preset age used by the annotator when annotating is 1-80 years old, the total number is 80, then the preset age in the sample label is 1-79 years old, the total number is 79.
[0076] Step S304, based on the sample set and a preset loss function, an initial model is trained to obtain an age recognition model; the loss function is used to constrain that the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model meets specified conditions.
[0077] In a specific implementation, the above-mentioned initial model may include a feature extraction layer and an output layer; wherein the feature extraction layer is used to extract features from an input image (equivalent to a sample image input into the initial model) to obtain feature data of the input image; and the output layer is used to output an age prediction result based on the feature data. The feature extraction layer includes a convolution layer and an activation function layer connected in sequence. The feature extraction layer can extract image features of the input image to obtain high-level semantic information of the image features. In order to improve the performance of the feature extraction layer, the feature extraction layer usually includes multiple groups of convolution layers and activation function layers connected in sequence. The activation function layer in the feature extraction layer can perform a function transformation on the image features output by the convolution layer. The transformation process can break the linear combination of the convolution layer input. The activation function layer can specifically be a Sigmoid function, a tanh function, a Relu function, etc.
[0078] The output layer includes one or more fully connected layers, and the fully connected layer can obtain an age prediction vector of a specified dimension. In some embodiments, in order to make the value of each element in the age prediction vector within the range of 0 to 1, an activation function layer can be connected to the last fully connected layer in the output layer, and a sigmoid function can be used in the activation function layer.
[0079] In the specific implementation, the number of feature extraction layers included in the initial model, the number of groups of sequentially connected convolutional layers and activation function layers included in each feature extraction layer, and the number of fully connected layers in the output layer can be determined according to the speed and accuracy of data processing. Generally, the more numbers or groups, the deeper the overall network structure of the model will be and the better the performance will be, but the calculation speed will decrease.
[0080] like Figure 4 The figure shows the network structure diagram of the initial model including 4 feature extraction layers and 2 fully connected layers. Figure 4 The four feature extraction layers are Block1, Block2, Block3 and Block4; the two fully connected layers are FC1 and FC2. The sample image is input into Block1, and the feature data is output through Block2, Block3 and Block4 in turn. The feature data is input into FC1 to obtain a feature vector with a dimension of c (the value of c is set according to the task requirements, and the larger the c value, the better the effect). The feature vector is also the image feature of the extracted sample. The image feature is input into FC2 to obtain the age prediction result of the object in the sample image. The dimension of the age prediction result is consistent with the number of multiple preset ages. Among them, the dimension of the data output by Block4 is usually large, and FC1 can be understood as a dimensionality reduction process, that is, reducing the data output by Block4 to c dimension.
[0081] During the training process of the age recognition model, the sample is input into the initial model to obtain the age prediction result of the object in the sample, which includes the predicted size relationship between the actual age of the object and multiple preset ages; then the weight parameters of the initial model are updated through the loss amount obtained by the label of the sample, the age prediction result and the preset loss function, and the age recognition model is obtained when the loss amount converges; the loss function is used to constrain the age prediction result to meet the specified conditions.
[0082] The above-mentioned age recognition model first obtains a sample set; each sample in the sample set carries a label, and the label includes the actual size relationship between the actual age of the object in the sample and multiple preset ages; then, based on the sample set and a preset loss function, the initial model is trained to obtain an age recognition model, and the loss function is used to constrain the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model to meet specified conditions. During the training process of the age recognition model in this method, the age recognition task is regarded as a task of predicting the size relationship between the actual age of the object and multiple preset ages. This task can well characterize the correlation between different ages and the actual age, and can also reflect the changing characteristics of the object as the age increases, thereby improving the accuracy of the age recognition model in estimating age.
[0083] The embodiment of the present invention also provides another training method for an age recognition model, which is implemented on the basis of the method in the above embodiment; the method focuses on describing the specific process of training the initial model based on the sample set and the preset loss function to obtain the age recognition model (specifically implemented by the following steps S502-S508); Figure 5 As shown, the training method includes the following specific steps:
[0084] Step S502: determine training samples based on the sample set.
[0085] The above training sample is any sample in the sample set, and the training sample carries a label.
[0086] Step S504, input the training sample into the initial model, and output the prediction result; the prediction result includes: the predicted size relationship between the actual age of the object in the training sample and multiple preset ages.
[0087] Step S506, determining the loss amount according to the prediction result and the loss function.
[0088] The above-mentioned predicted size relationship between the actual age of the object in the training sample and multiple preset ages includes: the probability value corresponding to each preset age in the predicted multiple preset ages. The above-mentioned loss function is used to constrain the prediction results to meet specified conditions, and the specified conditions include: if the difference between the first age and the actual age in multiple preset ages is less than the difference between the second age and the actual age; the probability value corresponding to the first age output by the age recognition model is greater than the probability value corresponding to the second age. In specific implementation, in order to obtain a probability value in the range of 0 to 1, the probability corresponding to each preset age in the prediction result can be sent to the sigmoid function to obtain the normalized probability corresponding to each preset age. (R represents a real number, K represents the dimension, which is the total number of preset ages):
[0089]
[0090] in, represents the probability value of the preset age i in the prediction result before normalization; Represents the probability value of the predicted age i in the normalized prediction result.
[0091] In specific implementation, the above step S508 can be implemented by the following steps 20-22:
[0092] Step 20: Determine a first loss value based on a difference between probability values of every two adjacent preset ages among a plurality of preset ages.
[0093] Specifically, the first loss value is calculated by the following formula:
[0094]
[0095] Among them, L1 represents the first loss value, Indicates the probability value corresponding to the preset age i in the prediction result, It represents the probability value corresponding to the preset age i-1 in the prediction result; K represents the total number of multiple preset ages in the prediction result; max represents the maximum value operation.
[0096] When calculating the first loss value, if the difference between the probability value corresponding to the preset age i and the probability value corresponding to the preset age i-1 is less than zero (satisfying the decreasing condition), the first loss value is zero. Through the first loss value, the probability value in the prediction result can be constrained to decrease as the preset age increases, thereby ensuring the rationality of the output result of the age recognition model and ensuring that the output result is more in line with the age characteristics.
[0097] Step 21, determining a second loss value according to the difference between the probability value of each preset age and the label of the training sample.
[0098] In specific implementation, the second loss value can be calculated by the following formula:
[0099]
[0100] Among them, L2 represents the second loss value, Indicates the probability value corresponding to the preset age i in the prediction result, y i represents the probability value corresponding to the preset age i in the label of the training sample; K represents the total number of multiple preset ages; log represents the logarithm with base 2.
[0101] Step 22, determining the loss amount based on the first loss value and the second loss value.
[0102] In a specific implementation, the above loss amount may be the sum of the first loss value and the second loss value, or the product of the first loss value and the first weight plus the product of the second loss value and the second weight, etc.
[0103] Step S508, updating the weight parameters of the initial model according to the above loss amount; continuing to execute the step of determining the training sample based on the sample set until the loss amount converges to obtain the age recognition model.
[0104] Specifically, the derivative of the loss L with respect to all weight parameters W in the initial model can be obtained through the back propagation algorithm: Next, the weight parameters in the initial model are updated through the stochastic gradient descent algorithm:
[0105]
[0106] Among them, W′ represents the updated weight parameter, and α represents the learning rate, which is a manually pre-set hyperparameter, with common values of 0.01, 0.001, etc. The weight parameters in the initial model are updated iteratively through the stochastic gradient descent algorithm until all weight parameters converge to obtain the age recognition model.
[0107] In specific implementation, the samples in the data set can be divided into a training set for training the model and a test set for verifying the model according to a preset ratio (for example, 10:1). The recognition accuracy of the trained age recognition model can be determined through the test set; usually, a test sample can be determined from the test set, and the test sample includes a sample image and a label corresponding to the sample image. The age prediction result can be obtained by inputting the test sample into the trained age recognition model. The age prediction result is compared with the label of the sample to determine whether the age prediction result is correct, and the test sample is continuously determined from the test set until all samples in the test set are selected; the correctness of the test result corresponding to each test sample is counted to obtain the prediction accuracy of the trained age recognition model.
[0108] The above-mentioned age recognition model training method can automatically learn multi-layer semantic features related to age during the training process of the age recognition model, which helps to improve the accuracy of age recognition; at the same time, this method constrains the output results of the model through a preset loss function during the model training process, so that the output results of the model are more in line with the age characteristics, further improving the accuracy of age recognition.
[0109] Corresponding to the above-mentioned embodiment of the age recognition method, the embodiment of the present invention further provides an age recognition device, such as Figure 6 As shown, the device comprises:
[0110] The image acquisition module 60 is used to acquire an image to be processed containing a target object.
[0111] The age determination module 61 is used to input the image to be processed into a pre-trained age recognition model to obtain an output result, and determine the age of the target object based on the output result.
[0112] Among them, the age recognition model is trained by preset samples and loss functions; the label of the sample includes: the actual size relationship between the actual age of the object in the sample and multiple preset ages; the loss function is used to constrain: the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model meets the specified conditions.
[0113] The above-mentioned age recognition device first obtains an image to be processed containing a target object; then inputs the image to be processed into a pre-trained age recognition model to obtain an output result, and determines the age of the target object based on the output result; the age recognition model is trained by a preset sample and a loss function; the label of the sample includes: the actual size relationship between the actual age of the object in the sample and multiple preset ages; the loss function is used to constrain: the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model satisfies the specified conditions. During the training process of the age recognition model in this method, the age recognition task is regarded as a task of predicting the size relationship between the actual age of the object and multiple preset ages. Compared with the classification task and the regression task, this task can more accurately characterize the correlation between different ages and the actual age, and can also reflect the changing characteristics of the object as the age increases, thereby improving the accuracy of the age estimation of the age recognition model.
[0114] Specifically, the labels of the above samples specifically include: multiple preset ages, and a probability value corresponding to each preset age; wherein the probability value is used to indicate the probability that the actual age is greater than, equal to or less than the preset age; the above specified conditions include: if among the preset ages, the difference between the first age and the actual age is less than the difference between the second age and the actual age; the probability value corresponding to the first age output by the age recognition model is greater than the probability value corresponding to the second age.
[0115] Furthermore, the above device also includes a label determination module, which is used to: obtain the actual age of the object in the sample; and determine the probability value corresponding to each preset age among multiple preset ages by the following formula:
[0116]
[0117] Among them, y i Represents the probability value corresponding to the preset age i in the sample label, a represents the actual age; i∈[1,…,N], N represents the total number of multiple preset ages in the sample label.
[0118] Furthermore, the above-mentioned output result includes: multiple preset ages, and the predicted probability corresponding to each preset age; the above-mentioned age determination module 61 is also used to: determine the number of preset ages whose predicted probability is greater than the preset probability threshold from the predicted probability corresponding to each preset age in the output result; and take the sum of the determined number and one as the age of the target object.
[0119] The age recognition device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned age recognition method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0120] Corresponding to the above-mentioned training method embodiment of the age recognition model, the embodiment of the present invention also provides a training device for the age recognition model, such as Figure 7 As shown, the training device comprises:
[0121] The sample set acquisition module 70 is used to acquire a sample set; each sample in the sample set carries a label, and the label includes: the actual size relationship between the actual age of the object in the sample and multiple preset ages.
[0122] The model training module 71 is used to train the initial model based on the sample set and the preset loss function to obtain the age recognition model; the loss function is used to constrain that the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model meets the specified conditions.
[0123] The training device of the above-mentioned age recognition model first obtains a sample set; each sample in the sample set carries a label, and the label includes the actual size relationship between the actual age of the object in the sample and multiple preset ages; then, based on the sample set and a preset loss function, the initial model is trained to obtain an age recognition model, and the loss function is used to constrain the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model to meet specified conditions. During the training process of the age recognition model in this method, the age recognition task is regarded as a task of predicting the size relationship between the actual age of the object and multiple preset ages. This task can well characterize the correlation between different ages and the actual age, and can also reflect the changing characteristics of the object as the age increases, thereby improving the accuracy of the age recognition model in estimating age.
[0124] In a specific implementation, the label of the above-mentioned sample specifically includes: multiple preset ages, and a probability value corresponding to each preset age; wherein the probability value is used to indicate the probability that the actual age is greater than, equal to or less than the preset age; the specified conditions include: if among the preset ages, the difference between the first age and the actual age is less than the difference between the second age and the actual age; the probability value corresponding to the first age output by the age recognition model is greater than the probability value corresponding to the second age.
[0125] Furthermore, the above-mentioned model training module 71 includes: a sample determination unit, which is used to determine the training sample based on the sample set; a result output unit, which is used to input the training sample into the initial model and output the prediction result; the prediction result includes: the predicted size relationship between the actual age of the object in the training sample and multiple preset ages; a loss amount determination unit, which is used to determine the loss amount according to the prediction result and the loss function; a parameter updating unit, which is used to update the weight parameters of the initial model according to the loss amount; continue to execute the step of determining the training sample based on the sample set until the loss amount converges to obtain the age recognition model.
[0126] In a specific implementation, the predicted size relationship between the actual age of the object in the above-mentioned training sample and multiple preset ages includes: the probability value corresponding to each preset age in the predicted multiple preset ages; the above-mentioned loss amount determination unit is used to: determine the first loss value based on the difference in the predicted probabilities of every two adjacent preset ages among the multiple preset ages; determine the second loss value based on the gap between the predicted probability of each preset age and the label of the training sample; determine the loss amount based on the first loss value and the second loss value.
[0127] Furthermore, the above-mentioned loss amount determination unit is also used to calculate the first loss value by the following formula:
[0128]
[0129] Among them, L1 represents the first loss value, Indicates the probability value corresponding to the preset age i in the prediction result, represents the probability value corresponding to the preset age i-1 in the prediction result; K represents the total number of multiple preset ages in the prediction result; max represents the maximum value operation.
[0130] Furthermore, the above-mentioned loss amount determination unit is also used to calculate the second loss value by the following formula:
[0131]
[0132] Among them, L2 represents the second loss value, Indicates the probability value corresponding to the preset age i in the prediction result, y i represents the probability value corresponding to the preset age i in the label of the training sample; K represents the total number of multiple preset ages; log represents the logarithm with base 2.
[0133] The training device for the age recognition model provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned training method embodiment for the age recognition model. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0134] The embodiment of the present invention further provides an electronic device, such as Figure 8 As shown, the electronic device includes a processor and a memory, including a processor 101 and a memory 100, the memory 100 stores machine executable instructions that can be executed by the processor 101, and the processor executes the machine executable instructions to implement the above-mentioned age recognition method or the above-mentioned age recognition model training method.
[0135] Further, Figure 8The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected via the bus 102 .
[0136] The memory 100 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0137] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100 and completes the steps of the method of the above embodiment in combination with its hardware.
[0138] An embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned age recognition method or the above-mentioned age recognition model training method. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0139] The computer program product of the age recognition method, age recognition model training method and device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0140] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0141] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An age recognition method, characterized in that: The method comprises: Acquire an image to be processed containing a target object; Inputting the image to be processed into a pre-trained age recognition model to obtain an output result, and determining the age of the target object based on the output result; The age recognition model is obtained by training with preset samples and loss functions; the labels of the samples include: the real size relationship between the actual age of the object in the sample and multiple preset ages; the loss function is used to constrain: the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model satisfies the specified conditions; The specified conditions include: if, among the preset ages, the difference between the first age and the actual age is smaller than the difference between the second age and the actual age; and the probability value corresponding to the first age output by the age recognition model is greater than the probability value corresponding to the second age.
2. The method according to claim 1, characterized in that The label of the sample specifically includes: a plurality of the preset ages, and a probability value corresponding to each of the preset ages; wherein the probability value is used to indicate the probability that the actual age is greater than, equal to, or less than the preset age.
3. The method according to claim 2, characterized in that The label of the sample is determined as follows: Obtaining the actual age of the subjects in the sample; The probability value corresponding to each of the plurality of preset ages is determined by the following formula: Among them, y i Represents the probability value corresponding to the preset age i in the label of the sample, a represents the actual age; i∈[1,…,N], N represents the total number of the preset ages in the label of the sample.
4. The method according to claim 1, characterized in that: The output result includes: a plurality of the preset ages, and a predicted probability corresponding to each of the preset ages; The step of determining the age of the target object based on the output result comprises: Determine, from the predicted probabilities corresponding to each of the preset ages in the output results, the number of preset ages whose predicted probabilities are greater than a preset probability threshold; The sum of the determined number and one is taken as the age of the target object.
5. A training method for an age recognition model, characterized in that: The training method comprises: Acquire a sample set; each sample in the sample set carries a label, and the label includes: a true size relationship between the actual age of the object in the sample and a plurality of preset ages; Based on the sample set and a preset loss function, an initial model is trained to obtain the age recognition model; the loss function is used to constrain that the predicted size relationship between the actual age of the object and a plurality of preset ages output by the age recognition model satisfies a specified condition; The specified conditions include: if, among the preset ages, the difference between the first age and the actual age is smaller than the difference between the second age and the actual age; and the probability value corresponding to the first age output by the age recognition model is greater than the probability value corresponding to the second age.
6. The training method according to claim 5, characterized in that: The label of the sample specifically includes: a plurality of the preset ages, and a probability value corresponding to each of the preset ages; wherein the probability value is used to indicate the probability that the actual age is greater than, equal to, or less than the preset age.
7. The training method according to claim 5, characterized in that: The step of training an initial model based on the sample set and a preset loss function to obtain the age recognition model comprises: Determining training samples based on the sample set; Input the training sample into the initial model and output a prediction result; the prediction result includes: a predicted size relationship between the actual age of the object in the training sample and a plurality of preset ages; Determining a loss amount according to the prediction result and the loss function; The weight parameters of the initial model are updated according to the loss amount; and the step of determining training samples based on the sample set is continued until the loss amount converges to obtain the age recognition model.
8. The training method according to claim 7, characterized in that: The predicted magnitude relationship between the actual age of the object in the training sample and the plurality of preset ages includes: a probability value corresponding to each of the plurality of predicted preset ages; The step of determining the loss amount according to the prediction result and the loss function comprises: Determine a first loss value based on a difference between probability values of every two adjacent preset ages among the plurality of preset ages; Determining a second loss value according to the difference between the probability value of each of the preset ages and the label of the training sample; A loss amount is determined based on the first loss value and the second loss value.
9. The training method according to claim 8, characterized in that: The step of determining the first loss value based on the difference between the probability values of every two adjacent preset ages among the plurality of preset ages comprises: The first loss value is calculated by the following formula: Wherein, L1 represents the first loss value, represents the probability value corresponding to the preset age i in the prediction result, represents the probability value corresponding to the preset age i-1 in the prediction result; K represents the total number of multiple preset ages in the prediction result; max represents the maximum value operation.
10. The training method according to claim 8, characterized in that: The step of determining a second loss value according to the difference between the probability value of each preset age and the label of the training sample comprises: The second loss value is calculated by the following formula: Wherein, L2 represents the second loss value, represents the probability value corresponding to the preset age i in the prediction result, y i represents the probability value corresponding to the preset age i in the label of the training sample; K represents the total number of multiple preset ages; log represents the logarithm with base 2.
11. An age recognition device, characterized in that: The device comprises: An image acquisition module is used to acquire an image to be processed containing a target object; An age determination module, used for inputting the image to be processed into a pre-trained age recognition model to obtain an output result, and determining the age of the target object based on the output result; The age recognition model is obtained by training with preset samples and loss functions; the labels of the samples include: the real size relationship between the actual age of the object in the sample and multiple preset ages; the loss function is used to constrain: the predicted size relationship between the actual age of the object and multiple preset ages output by the age recognition model satisfies the specified conditions; The specified conditions include: if, among the preset ages, the difference between the first age and the actual age is smaller than the difference between the second age and the actual age; and the probability value corresponding to the first age output by the age recognition model is greater than the probability value corresponding to the second age.
12. A training device for an age recognition model, characterized in that: The training device comprises: A sample set acquisition module is used to acquire a sample set; each sample in the sample set carries a label, and the label includes: a true size relationship between the actual age of the object in the sample and a plurality of preset ages; A model training module, used to train an initial model based on the sample set and a preset loss function to obtain the age recognition model; the loss function is used to constrain that the predicted size relationship between the actual age of the object and a plurality of preset ages output by the age recognition model satisfies a specified condition; The specified conditions include: if, among the preset ages, the difference between the first age and the actual age is smaller than the difference between the second age and the actual age; and the probability value corresponding to the first age output by the age recognition model is greater than the probability value corresponding to the second age.
13. An electronic device, characterized in that: It includes a processor and a memory, the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the age recognition method described in any one of claims 1 to 4 or the age recognition model training method described in any one of claims 5-10.
14. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the age recognition method described in any one of claims 1 to 4 or the age recognition model training method described in any one of claims 5 to 10.
Citation Information
Patent Citations
Age estimation model training method, age estimation method and corresponding device
CN110287942A
KR20200101084A