CN108399379B - Method and device for identifying face age and electronic equipment - Google Patents

Method and device for identifying face age and electronic equipment Download PDF

Info

Publication number
CN108399379B
CN108399379B CN201810136268.6A CN201810136268A CN108399379B CN 108399379 B CN108399379 B CN 108399379B CN 201810136268 A CN201810136268 A CN 201810136268A CN 108399379 B CN108399379 B CN 108399379B
Authority
CN
China
Prior art keywords
age
probability distribution
face
image
facial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810136268.6A
Other languages
Chinese (zh)
Other versions
CN108399379A (en
Inventor
张韵璇
李�诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sensetime Technology Development Co Ltd
Original Assignee
Beijing Sensetime Technology Development 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 Beijing Sensetime Technology Development Co Ltd filed Critical Beijing Sensetime Technology Development Co Ltd
Priority to PCT/CN2018/098665 priority Critical patent/WO2019029459A1/en
Publication of CN108399379A publication Critical patent/CN108399379A/en
Priority to US16/236,292 priority patent/US11003890B2/en
Application granted granted Critical
Publication of CN108399379B publication Critical patent/CN108399379B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • G06F18/24143Distances to neighbourhood prototypes, e.g. restricted Coulomb energy networks [RCEN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/28Determining representative reference patterns, e.g. by averaging or distorting; Generating dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/178Human faces, e.g. facial parts, sketches or expressions estimating age from face image; using age information for improving recognition

Landscapes

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

Abstract

The embodiment of the application discloses a method, a device, an electronic device and a computer readable medium for identifying the age of a face, wherein the method comprises the following steps: acquiring the estimated age of an image to be identified; selecting N image samples from an image sample set with a known age according to the estimated age and two or more preset age differences, wherein N is not less than 2; acquiring an age comparison result between the image to be identified and the selected N image samples; and obtaining probability information for determining the face age attribute information of the person according to the statistical information formed by the comparison result.

Description

Method and device for identifying face age and electronic equipment
Technical Field
The present application relates to computer vision technology, and more particularly, to a method for identifying a facial age, a medium, an apparatus for identifying a facial age, and an electronic device.
Background
The face attribute information identifies information such as sex, age, expression, and race presented by the face of a person in an image.
Face attribute information recognition is a research topic in the field of computer vision, and identifying the age of a face in an image is an important branch in face attribute information recognition.
Currently, a network model for identifying facial age generally adopts a deep learning method to identify facial age according to facial features such as wrinkles of forehead, mouth corner and eye corner. When the network model is trained, the images used for training mostly need to be preprocessed, so that the faces contained in the images used for training are usually front faces and the five sense organs are clear.
However, in real-world environments, the human faces in many images may have various angular deflections and various degrees of blurring, and the above network model is not generally well suited for face age recognition on such images, so that the face age in an image needs to be recognized by human judgment of a relevant person (such as a annotator).
Therefore, how to quickly and accurately identify the age of the face in the image is a significant technical problem.
Disclosure of Invention
The embodiment of the application provides a technical scheme for identifying the face age.
According to one aspect of the embodiments of the present application, there is provided a method for identifying a facial age, the method including: acquiring the estimated age of an image to be identified; selecting N image samples from an image sample set with a known age according to the estimated age and two or more preset age differences, wherein N is not less than 2; acquiring an age comparison result between the image to be identified and the selected N image samples; and obtaining probability information for determining the face age attribute information of the person according to the statistical information formed by the comparison result.
In one embodiment of the present invention, the obtaining probability information for determining the face age attribute information of the person from the statistical information formed by the comparison result includes: obtaining a first posterior probability distribution of the face age according to a first prior probability distribution of a preset face age and a first likelihood function formed based on the comparison result; wherein the face age posterior probability distribution is used to determine face age attribute information of the person.
In another embodiment of the present invention, the obtaining the estimated age of the image to be identified includes:
and inputting the image to be recognized into a neural network model, and determining the estimated age of the image to be recognized according to the output information of the neural network model.
In still another embodiment of the present invention, the output information of the neural network model includes: a second posterior probability distribution of facial age.
In another embodiment of the present invention, the processing operation performed by the neural network model for the input image to be recognized includes: acquiring facial features of a person in an image to be recognized; for each preset age category, judging the probability that the facial features belong to the facial features exceeding the age category, wherein all the probabilities form the likelihood value of a second likelihood function; and generating a second posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability.
In another embodiment of the present invention, the determining, for each of the preset age categories, a probability that the facial feature belongs to a facial feature exceeding the age category includes: classifying the facial features by utilizing a first full-connection layer aiming at each preset age category; and carrying out normalization processing on the classification processing result by using a sigmoid function to obtain the probability that the facial features belong to the facial features exceeding the age category.
In still another embodiment of the present invention, the generating a second posterior probability distribution of the age of the face according to a second prior probability distribution of the preset age of the face and a second likelihood function formed based on the probability includes: and calculating a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability according to a Bayesian formula to generate a second posterior probability distribution of the face age.
In still another embodiment of the present invention, the calculating a second prior probability distribution of a preset face age according to a bayesian formula and a second likelihood function formed based on the probabilities to generate a second posterior probability distribution of the face age includes: calculating a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability by using a second full-connection layer based on a logarithm Bayes formula; restoring the computed result output by the second fully-connected layer to a second posterior probability distribution of facial age using a softmax function.
In another embodiment of the present invention, the determining the estimated age of the image to be recognized according to the output information of the neural network model includes: determining a median of a second posterior probability distribution of the facial age, and taking the median as an estimated age; or performing weighted calculation on a second posterior probability distribution of the face age, and determining the estimated age according to the weighted calculation result; or taking the age corresponding to the maximum probability in the second posterior probability distribution of the face age as the estimated age; or performing confidence calculation on the second posterior probability distribution of the facial age, determining an age interval according to the confidence calculation result, and selecting an age from the age interval as an estimated age.
In another embodiment of the present invention, the training process of the neural network model includes: selecting M image samples with known face ages from an image sample set according to the known face ages of the input image samples and two or more preset age differences, wherein M is not less than 2; acquiring age comparison results between the input image samples and the selected M image samples; obtaining a third posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a third likelihood function formed based on the comparison result; and performing supervised learning on a neural network model according to the third posterior probability distribution of the face age.
In yet another embodiment of the present invention, the training process further comprises: supervised learning of a neural network model is performed based on known facial ages of the input image samples.
In yet another embodiment of the present invention, the N image samples include: the image processing method comprises the following steps of N1 image samples with the age greater than the predicted age and N2 image samples with the age less than the predicted age, wherein the sum of N1 and N2 is N.
In another embodiment of the present invention, when N is an even number, N1 is equal to N2, and for any one of the N1 image samples whose ages are greater than the estimated age, N2 image samples whose ages are less than the estimated age have the same age difference and the age differences are opposite.
In another embodiment of the present invention, the obtaining of the comparison result of the age size between the image to be identified and the selected N image samples includes: acquiring an age comparison result between the image to be identified and the selected N image samples in a mode of receiving input information; wherein the input information includes: and manually comparing the age of the image to be identified with the age of the selected N image samples to form a comparison result.
In still another embodiment of the present invention, the obtaining a first posterior probability distribution of the face age according to a first prior probability distribution of a preset face age and a first likelihood function formed based on the comparison result includes: and calculating a first prior probability distribution of the preset face age according to a Bayesian formula and a first likelihood function formed based on the comparison result to generate a first posterior probability distribution of the face age.
In yet another embodiment of the present invention, the first prior probability distribution of face age comprises: a uniform probability distribution for each of the age categories set in advance.
In yet another embodiment of the present invention, the method further comprises: filtering out a first posterior probability distribution of invalid facial ages; wherein the first posterior probability distribution of ineffective facial ages comprises: a first posterior probability distribution of facial age of a parabolic shape with a downward opening is formed.
In yet another embodiment of the present invention, the method further comprises: determining face age attribute information of the person from a first posterior probability distribution of face ages; and marking the age attribute information of the image to be identified according to the age attribute information of the face.
In still another embodiment of the present invention, the determining the face age attribute information of the person based on the first posterior probability distribution of the face age includes: determining a median of a first posterior probability distribution of the face age, and taking the median as the face age of the image to be recognized; or performing weighting calculation on the first posterior probability distribution of the face age, and determining the face age of the image to be recognized according to the weighting calculation result; or, taking the age corresponding to the maximum probability in the first posterior probability distribution of the face age as the face age of the image to be identified; or performing confidence calculation on the second posterior probability distribution of the face age, and determining an age interval to which the face age of the image to be recognized belongs according to the confidence calculation result.
In a further embodiment of the invention, the slope of the first likelihood function and/or the second likelihood function is a value between 0.1 and 0.6.
According to another aspect of the embodiments of the present application, there is provided a method for identifying facial age, the method being performed by a neural network model, and the processing operations performed by the neural network model include: acquiring facial features of a person in an image to be recognized; for each preset age category, judging the probability that the facial features belong to the facial features exceeding the age category, wherein all the probabilities form the likelihood value of a second likelihood function; and generating a second posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability.
In one embodiment of the present invention, the determining, for each of the preset age categories, a probability that the facial feature belongs to a facial feature exceeding the age category includes: classifying the facial features by utilizing a first full-connection layer aiming at each preset age category; and carrying out normalization processing on the classification processing result by using a sigmoid function to obtain the probability that the facial features belong to the facial features exceeding the age category.
In still another embodiment of the present invention, the generating a second posterior probability distribution of the age of the face according to a second prior probability distribution of the preset age of the face and a second likelihood function formed based on the probability includes: and calculating a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability according to a Bayesian formula to generate a second posterior probability distribution of the face age.
In still another embodiment of the present invention, the calculating a second prior probability distribution of a preset face age according to a bayesian formula and a second likelihood function formed based on the probabilities to generate a second posterior probability distribution of the face age includes: calculating a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability by using a second full-connection layer based on a logarithm Bayes formula; restoring the computed result output by the second fully-connected layer to a second posterior probability distribution of facial age using a softmax function.
In another embodiment of the present invention, the training process of the neural network model includes: selecting M image samples with known face ages from an image sample set according to the known face ages of the input image samples and two or more preset age differences, wherein M is not less than 2; acquiring age comparison results between the input image samples and the selected M image samples; obtaining a third posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a third likelihood function formed based on the comparison result; and performing supervised learning on a neural network model according to the third posterior probability distribution of the face age.
In yet another embodiment of the present invention, the training process further comprises: filtering out a third posterior probability distribution of invalid facial ages; and said supervised learning of the neural network model according to the third posterior probability distribution of the facial age comprises: performing supervised learning on the neural network model according to the third posterior probability distribution of the filtered face age; wherein the third posterior probability distribution of ineffective facial ages comprises: a third posterior probability distribution of facial age of a parabolic shape with downward opening is formed.
In yet another embodiment of the present invention, the training process further comprises: supervised learning of a neural network model is performed based on known facial ages of the input image samples.
According to another aspect of embodiments of the present application, there is provided an apparatus for identifying a facial age, and the apparatus includes: the acquisition estimated age module is used for acquiring the estimated age of the image to be identified; the selected image sample module is used for selecting N image samples from an image sample set with a known age according to the estimated age and two or more preset age differences, wherein N is not less than 2; the acquisition comparison result module is used for acquiring an age comparison result between the image to be identified and the selected N image samples; and the probability information generation module is used for obtaining probability information used for determining the face age attribute information of the person according to the statistical information formed by the comparison result.
In an embodiment of the present invention, the probability information generating module is specifically configured to obtain a first posterior probability distribution of the face age according to a first prior probability distribution of a preset face age and a first likelihood function formed based on the comparison result; wherein the face age posterior probability distribution is used to determine face age attribute information of the person.
In yet another embodiment of the present invention, the apparatus further comprises: the first filtering module is used for filtering a first posterior probability distribution of invalid face ages; wherein the first posterior probability distribution of ineffective facial ages comprises: a first posterior probability distribution of facial age of a parabolic shape with a downward opening is formed.
In yet another embodiment of the present invention, the apparatus further comprises: an age attribute determining module for determining facial age attribute information of the person according to a first posterior probability distribution of facial age; and the marking module is used for marking the age attribute information of the image to be identified according to the age attribute information of the face.
According to another aspect of the embodiments of the present application, there is provided an apparatus for identifying a facial age, the apparatus being used for implementing a neural network model, and the apparatus including: the facial feature acquisition module is used for acquiring the facial features of the person in the image to be identified; the judging probability module is used for judging the probability that the facial features belong to the facial features exceeding the age category according to each preset age category, and all the probabilities form the likelihood value of the second likelihood function; and the posterior probability distribution forming module is used for generating a second posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability.
In one embodiment of the present invention, the apparatus further comprises: a training module to: selecting M image samples with known face ages from an image sample set according to the known face ages of the input image samples and two or more preset age differences, wherein M is not less than 2; acquiring age comparison results between the input image samples and the selected M image samples; obtaining a third posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a third likelihood function formed based on the comparison result; and performing supervised learning on a neural network model according to the third posterior probability distribution of the face age.
In yet another embodiment of the present invention, the apparatus further comprises: the second filtering module is used for filtering a third posterior probability distribution of the invalid face age; the training module carries out supervised learning on the neural network model according to the third posterior probability distribution of the filtered face age; wherein the third posterior probability distribution of ineffective facial ages comprises: a third posterior probability distribution of facial age of a parabolic shape with downward opening is formed.
According to another aspect of embodiments of the present application, there is provided an electronic device including: a memory for storing a computer program; a processor for executing a computer program stored in the memory, and when the computer program is executed, the following instructions are executed: instructions for obtaining an estimated age of the image to be identified; instructions for selecting N image samples from an image sample set with a known age according to the estimated age and two or more preset age differences, wherein N is not less than 2; instructions for obtaining an age comparison between the image to be identified and the selected N image samples; and obtaining probability information for determining face age attribute information of the person based on statistical information formed by the comparison result.
In one embodiment of the present invention, the instruction for obtaining probability information for determining the face age attribute information of the person based on the statistical information formed by the comparison result includes: instructions for obtaining a first posterior probability distribution of the face age from a first prior probability distribution of a preset face age and a first likelihood function formed based on the comparison result; wherein the face age posterior probability distribution is used to determine face age attribute information of the person.
In yet another embodiment of the present invention, the executed instructions further comprise: instructions for filtering out a first posterior probability distribution of invalid facial ages; wherein the first posterior probability distribution of ineffective facial ages comprises: a first posterior probability distribution of facial age of a parabolic shape with a downward opening is formed.
In yet another embodiment of the present invention, the executed instructions further comprise: instructions for determining face age attribute information of the person from a first posterior probability distribution of face ages; and instructions for labeling age attribute information of the image to be identified according to the age attribute information of the face.
According to another aspect of embodiments of the present application, there is provided an electronic device including: a memory for storing a computer program; a processor for executing a computer program stored in the memory, and when the computer program is executed, the following instructions are executed by a neural network model: instructions for obtaining facial features of a person in an image to be identified; instructions for determining, for each age category set in advance, a probability that the facial feature belongs to a facial feature that exceeds the age category, and all probabilities forming likelihood values of a second likelihood function; and generating a second posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a second likelihood function formed based on the probabilities.
In one embodiment of the invention, the computer program, when executed, further executes instructions for training a neural network model, and the instructions for training a neural network model comprise: instructions for selecting M image samples of known face age from the image sample set according to the known face age of the input image sample and two or more preset age differences, wherein M is not less than 2; instructions for obtaining an age-size comparison between the input image sample and the selected M image samples; instructions for obtaining a third posterior probability distribution of the face age from a second prior probability distribution of a preset face age and a third likelihood function formed based on the comparison result; instructions for supervised learning of a neural network model according to a third posterior probability distribution of the facial age.
In one embodiment of the present invention, the computer program, when executed, further performs: instructions for filtering out invalid third likelihood functions formed based on the comparison results; the instruction for supervised learning of the neural network model according to the third posterior probability distribution of the facial age is specifically: instructions for performing supervised learning of the neural network model according to a third posterior probability distribution of the filtered facial age; wherein the invalid third likelihood function comprises: forming a third likelihood function of a parabolic shape with the opening facing downwards.
According to another aspect of embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described method.
Based on the method for identifying the facial age, the device for identifying the facial age, the electronic equipment and the computer storage medium, the method selects the image samples with certain age difference with the estimated age by utilizing the estimated age of the image to be identified (such as an image to be labeled), and obtains the comparison result of the age sizes between the image to be identified and each image sample, and since the statistical information formed according to the comparison result of the age sizes is the objective statistical result, the attribute information of the facial age can be objectively and reasonably deduced by utilizing the statistical information; more specifically, the age comparison result and the age gap between the estimated age of the image to be recognized and the selected image sample conform to a likelihood function (e.g., a logistic function), so that the likelihood function can be formed by using the age comparison result, and the face age posterior probability distribution can be formed by using the likelihood function and the face age prior probability distribution by using a total probability formula; furthermore, the method and the device can objectively and reasonably estimate the face age attribute information of the face age of the person in the image to be recognized or the age bracket to which the face age belongs based on the posterior probability distribution of the face age.
The technical solution of the present application is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description, serve to explain the principles of the application.
The present application may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
FIG. 1 is a schematic diagram of an application scenario of the present application;
FIG. 2 is a schematic diagram of another application scenario of the present invention;
FIG. 3 is a statistical chart of recognition results of facial ages of persons in a human recognition image;
FIG. 4 is a block diagram of an exemplary device implementing embodiments of the present application;
FIG. 5 is a flow chart of one embodiment of the method of the present application;
FIG. 6 is a flow chart of another embodiment of the method of the present application;
FIG. 7 is a schematic diagram of generating a first posterior probability distribution of facial age of the present application;
FIG. 8 is a first posterior probability distribution of facial age for each image to be identified of the present application;
FIG. 9 is a schematic diagram of a neural network model of the present application;
FIG. 10 is a schematic diagram of a likelihood function and a face age posterior probability distribution for two image samples of the present application;
FIG. 11 is a schematic diagram of the structure of one embodiment of the apparatus of the present application;
fig. 12 is a schematic structural view of another embodiment of the device of the present application.
Detailed Description
Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
The embodiments of the application are applicable to computer systems/servers operable with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with the computer system/server include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set top boxes, programmable consumer electronics, network pcs, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above systems, and the like.
The computer system/server may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, and data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Referring initially to FIG. 1, one application scenario in which embodiments of the present application may be implemented is schematically illustrated.
In fig. 1, the image 2, the image Z, and the image Z are all images of unknown ages in the image set, and the image 1, the image 2, the image Z, and the image Z are all images including human faces, the human faces in the images may be front faces, and there may be deflections at various angles, and in addition, there is a certain difference in the degrees of clarity of the human faces in the images. The annotator 100 needs to perform face age annotation on each of the images 1, 2, and Z, so that each of the images 1, 2, and Z in the image set is an image labeled with face age information, for example, the annotator labels Y1 for the face age of the image 1, Y2 for the face age of the image 2, and Yz for the face age of the image Z.
Referring next to fig. 2, another application scenario in which embodiments according to the present application may be implemented is schematically illustrated.
In fig. 2, the image 1, the image 2, the image Z, and the image Z are all images of unknown ages in the image set, and the image 1, the image 2, the image Z, and the image Z are all images including human faces, the human faces in the images may be front faces, and there may be deflections at various angles, and in addition, there is a certain difference in the degrees of clarity of the human faces in the images. The prediction of the face age for the image 1, the image 2, the image Z and the facial age corresponding to the image Z can be realized by the pre-trained neural network model 200, that is, the face ages of the image 1, the image 2, the image Z and the facial age corresponding to the image Z are predicted according to the output information of the neural network model 200, for example, the predicted face age Y11 corresponding to the image 1, the predicted face age Y22, the image 2 and the predicted facial age Yzz corresponding to the image Z can be obtained by inputting the image 1, the image 2, the image Z and the facial age corresponding to the neural network model 200 and processing the output information of the neural network model 200.
However, it is fully understood by those skilled in the art that the applicable scenarios for the embodiments of the present application are not limited by any aspect of this framework.
If an image containing a face of a person is presented to any volunteer to determine the age of the face of the person in the image (i.e., the age exhibited by the face, and the age of the face of the person may also be referred to as the age of the person), the volunteer will typically determine the age of the face through facial features such as wrinkles on the forehead, the corners of the mouth, and the corners of the eyes. Although there are many details that can be used to determine the age of the face, subjective guessing of the details of the face, and additional factors such as image quality limitation, etc. often result in the age of the face estimated by the volunteer being greatly different from the age of the real face; moreover, the estimated facial ages of different volunteers sometimes differ greatly.
In an actual user survey, 1000 images containing faces of people are selected from an image sample set in advance, and each image is labeled with the age of the real face, that is, the real age of the people in the image is known, please take the following two experiments for 30 volunteers:
experiment a, please refer to 30 volunteers to directly estimate the age of the face of a person in 1000 images, and reflect the difference between the age of the face estimated by each volunteer and the age of the real face of the image by using a two-dimensional coordinate graph shown in fig. 3. In the two-dimensional graph shown in fig. 3, the abscissa represents the true age labeled for the image, and the ordinate represents the estimated facial age of the volunteer.
As can be seen from FIG. 3, the age directly estimated by the volunteers is different from the real age, and some differences reach 20-30 years.
If the facial age labeling is performed on the images in the image sample set in the experiment a manner, the reliability of the labeling information of the images in the image sample set is greatly challenged; however, if the age prediction is performed by using the experiment a, the accuracy of the prediction is more challenging.
Experiment b, randomly selecting two images from 1000 images each time, and please judge the face age of the person in which one of the two images is older/younger by 30 volunteers. A summary of the results of the comparison of all volunteers gives: under the condition that the difference between the real ages of the two images is larger, the judgment accuracy of the volunteer is higher, and further data mining processing can be carried out according to the comparison result to obtain: the functional relationship between the judgment accuracy of the volunteer and the age difference of the person in the two images satisfies a logistic function, for example, the curve in fig. 4 is a curve of the logistic function, and the dots in fig. 4 are discrete points formed according to the judgment result of the volunteer, and the logistic function, i.e., the likelihood function, can be fitted according to all the discrete points.
According to the technical scheme for identifying the facial age, the image samples with certain age difference with the estimated age are selected by utilizing the estimated age of the image to be identified (such as the image to be labeled), and the age comparison result between the image to be identified and each image sample is obtained, and the age comparison result and the age difference between the estimated age of the image to be identified and the selected image sample conform to a likelihood function (such as a logistic function), so that the age comparison result of the application can form a likelihood function, and the likelihood function and the face age prior probability distribution can form a posterior probability distribution of the facial age by utilizing a total probability formula; furthermore, the method and the device can objectively and reasonably estimate the face age attribute information of the face age of the person in the image to be recognized or the age bracket to which the face age belongs based on the posterior probability distribution of the face age.
If the facial age attribute information is used for carrying out facial age labeling on the images in the image sample set, on one hand, the time required for a labeling person to judge which image of the two images is older/younger is often less for the reason that the labeling person is required to directly estimate the facial age of the person in the images, and on the other hand, the result of the labeling person judging which image of the two images is older/younger is often more accurate for the reason that the labeling person is required to directly estimate the facial age of the person in the images, so that the method and the device are beneficial to improving the efficiency of labeling and improving the reliability of the labeling information of the images in the image sample set.
In addition, the present application may utilize a neural network model to obtain facial features of a person in an image to be recognized, and determine, for each preset age category (e.g., each integer age in 1-70 years, and further, for example, each integer age in 1-100 years, etc.), a probability that the facial features belong to facial features that exceed the age category, and then the neural network model may form a likelihood function with the obtained probabilities, and further, the neural network model may generate a posterior probability distribution of the facial age by using a priori probability distribution of the facial age and the likelihood function that are preset; if the face age of the person in the image to be recognized is determined by utilizing the face age posterior probability distribution, the age estimation based on the neural network model can be realized, and the accuracy of the age estimation is favorably improved; further, if the age of the face determined based on the neural network model is used as the estimated age in the labeling process, the age of the face determined based on the neural network model is often more accurate, so that the image sample selected from the image sample set and having a certain age difference with the image to be identified is often closer to an objective condition, and the reliability of the labeling information of the image in the image sample set is further improved.
Exemplary device
Fig. 5 illustrates an exemplary device 500 suitable for implementing the present application, where the device 500 may be a mobile terminal (e.g., a smart mobile phone, etc.), a personal computer (PC, e.g., a desktop or notebook computer, etc.), a tablet, a server, and so forth. In fig. 5, the apparatus 500 includes one or more processors, a communication section, and the like, and the one or more processors may be: one or more Central Processing Units (CPUs) 501, and/or one or more image processors (GPUs) 513, etc., which may perform various appropriate actions and processes according to executable instructions stored in a Read Only Memory (ROM)502 or loaded from a storage section 508 into a Random Access Memory (RAM) 503. The communication portion 512 may include, but is not limited to, a network card, which may include, but is not limited to, an ib (infiniband) network card. The processor may communicate with the read only memory 502 and/or the random access memory 530 to execute executable instructions, communicate with the communication portion 512 via the bus 504, and communicate with other target devices via the communication portion 512 to accomplish the steps of the present application. In one optional example, the steps performed by the processor include: acquiring the estimated age of an image to be identified; selecting N image samples from an image sample set with a known age according to the estimated age and two or more preset age differences, wherein N is not less than 2; acquiring age comparison results between the image to be identified and each selected image sample; obtaining a first posterior probability distribution of the face age according to a first prior probability distribution of a preset face age and a first likelihood function formed based on the comparison result; wherein the first posterior probability distribution of the face age is used to determine face age attribute information of the person. In another optional example, the processor performs a corresponding processing operation on the input image to be recognized through the neural network model, the processing operation including: acquiring facial features of a person in an image to be recognized; for each preset age category, judging the probability that the facial features belong to the facial features exceeding the age category, wherein all the probabilities form the likelihood value of a likelihood function; and generating a second posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a second likelihood function formed based on the likelihood values. The first prior probability distribution of the face age in the present application may refer to a probability value that the face age belongs to each age category, which is set in advance according to prior knowledge before seeing an image to be recognized.
In addition, in the RAM503, various programs and data necessary for the operation of the apparatus can be stored. The CPU501, ROM502, and RAM503 are connected to each other via a bus 504. The ROM502 is an optional module in case of the RAM 503. The RAM503 stores or writes executable instructions into the ROM502 at run-time, which causes the central processing unit 501 to perform the steps included in the object segmentation method described above. An input/output (I/O) interface 505 is also connected to bus 504. The communication unit 512 may be provided integrally with or provided with a plurality of sub-modules (e.g., a plurality of IB network cards) and connected to the bus.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted in the storage section 508 as necessary.
It should be particularly noted that the architecture shown in fig. 5 is only an optional implementation manner, and in a specific practical process, the number and types of the components in fig. 5 may be selected, deleted, added or replaced according to actual needs; in the case of different functional component settings, separate settings or integrated settings may be used, for example, the GPU and the CPU may be separately provided, and for example, the GPU may be integrated on the CPU, the communication unit may be separately provided, or the GPU may be integrally provided on the CPU or the GPU. These alternative embodiments are all within the scope of the present application.
In particular, according to the embodiments of the present application, the processes described below with reference to the flowcharts can be implemented as a computer software program, for example, the embodiments of the present application include a computer program product including a computer program tangibly embodied on a machine-readable medium, the computer program including program code for executing the steps shown in the flowcharts, the program code may include instructions corresponding to the steps provided in the present application, and one specific example of the instructions included in the program code is: instructions for obtaining an estimated age of the image to be identified; instructions for selecting N image samples from an image sample set of known age according to the estimated age and two or more preset age differences, wherein N is not less than 2; instructions for obtaining an age comparison between the image to be identified and each selected image sample; instructions for obtaining a first posterior probability distribution of the face age from a first prior probability distribution of a preset face age and a first likelihood function formed based on the comparison result; wherein the face age posterior probability distribution is used to determine face age attribute information of the person; another specific example of instructions included in the program code is: instructions for obtaining facial features of a person in an image to be identified; instructions for determining, for each age category set in advance, a probability that the facial feature belongs to a facial feature that exceeds the age category, and all probabilities forming likelihood values of a second likelihood function; and generating a second posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a second likelihood function formed based on the probabilities.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. When the computer program is executed by the Central Processing Unit (CPU)501, the above-described instructions described in the present application are executed.
Exemplary embodiments
The technical solution for identifying the facial age provided by the present application may be implemented by an electronic device such as a smart mobile phone, a desktop computer, a notebook computer, a tablet computer, or a server, which is capable of running a computer program (also referred to as program code), and the computer program may be stored in a computer-readable storage medium such as a flash memory, a cache, a hard disk, or an optical disk.
The following describes a technical solution for identifying facial age provided by the present application with reference to fig. 6 to 12.
In fig. 6, S600, the estimated age of the image to be recognized is obtained.
In an alternative example, step S600 in the present application may be performed by the processor calling the instruction stored in the memory for obtaining the estimated age of the image to be recognized, or may be performed by the obtain estimated age module 1100 executed by the processor.
The image to be recognized in the application can be a picture, a photo, a video frame in a video, or the like. The image to be recognized is an image containing a human face, and the human face in the image to be recognized can be a front face and can also have deflection of various angles; in addition, the definition of the face in the image to be recognized can be very good, and a certain degree of deficiency can exist.
In an alternative example, the estimated age of the image to be identified obtained by the obtain estimated age module 1100 may be determined by using the existing estimated age method, and two specific examples are described below:
specifically, a, it is set that Y classifiers are preset for 1 to Y years (for example, 1 to 70 years, 1 to 80 years, 1 to 100 years, and the like), each classifier corresponds to an integer age in 1 to Y years (that is, the kth classifier corresponds to k years), the images to be recognized are classified by using the Y classifiers, each classifier outputs a probability value, and the probability value output by any classifier is used to indicate that the age of a person in the images to be recognized is the probability corresponding to the classifier, so that the acquiring estimated age module 1100 can acquire Y probabilities by using the Y classifiers, and the acquiring estimated age module 1100 can use the age corresponding to the maximum probability in the Y probabilities as the estimated age of the images to be recognized.
In a specific example b, it is preset that Y classifiers are set for 1 to Y years (for example, 1 to 70 years, 1 to 80 years, 1 to 100 years, and the like), each classifier corresponds to an integer age in 1 to Y years, the Y classifiers are used to classify the image to be recognized respectively, each classifier outputs a probability value, and the probability value output by any classifier is used to indicate that the age of the person in the image to be recognized is greater than the probability of the age corresponding to the classifier, so that the estimated age obtaining module 1100 can obtain Y probabilities through the Y classifiers, and the estimated age obtaining module 1100 can perform summation calculation on the Y probabilities, and obtain the estimated age of the image to be recognized according to the calculation result.
In an alternative example, the obtaining estimated age module 1100 may also determine the estimated age of the image to be recognized in a manner different from the above-mentioned conventional method for predicting age, for example, the obtaining estimated age module 1100 inputs the image to be recognized as an input image into the neural network model of the present application, and the obtaining estimated age module 1100 determines the estimated age of the image to be recognized according to a posterior probability distribution of a face age output by the neural network model; a specific example of the operations performed by the neural network model provided in the present application is described in detail below:
operation a, the neural network model in the application acquires the facial features of the person in the image to be recognized.
In an alternative example, operation a in the present application may be performed by the processor invoking instructions stored in the memory for acquiring facial features of a person in an image to be recognized, or may be performed by the acquire facial features module 1200 executed by the processor.
In an alternative example, the Neural network model (e.g., the acquiring facial feature module 1200) may acquire facial features of a person in an image to be recognized through a CNN (Convolutional Neural network) included in the Neural network model, for example, the Neural network model may acquire 128-dimensional facial features through a CNN (i.e., the acquiring facial feature module 1200 may be specifically the CNN), and the like.
And b, judging the probability that the obtained facial features belong to the facial features exceeding the age category for each preset age category, wherein all the probabilities are the likelihood values of the second likelihood function.
In an alternative example, operation b in this application may be performed by the processor calling an instruction stored in the memory for determining, for each preset age category, a probability that the facial feature belongs to a facial feature exceeding the age category, or may be performed by the determination probability module 1210 executed by the processor.
In an optional example, the neural network model may classify, by using a first full link layer and a sigmoid function included in the neural network model (that is, the determination probability module 1210 may specifically be the first full link layer and the sigmoid function), the facial features acquired by the facial feature acquisition module 1200 for each integer age in a preset age interval, so as to obtain a probability value that a person in the image to be processed exceeds each integer age, and all the probability values may form a likelihood value of the person in the image to be processed for each preset age; for example, for 0-70 years old, the neural network model may use the first fully connected layer and the sigmoid function to obtain a probability value that the person in the image to be processed is over 0 years old, a probability value over 1 year old, a probability value over 2 years old, and a probability value over 70 years old, and the 70 probability values form a 70-dimensional likelihood value.
And c, generating a second posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a second likelihood function formed by the likelihood values obtained in the operation b.
In an alternative example, operation c of the present application may be performed by the processor calling the instruction stored in the memory for generating the second posterior probability distribution of the face age according to the preset second prior probability distribution of the face age and the second likelihood function formed based on the probability, or by the forming posterior probability distribution module 1220 executed by the processor.
In an alternative example, the neural network model (e.g., the posterior probability distribution forming module 1220) may calculate a second prior probability distribution of the preset face age and a second likelihood function using a bayesian formula (e.g., a bayesian formula shown in formula (1) below), so that the neural network model may generate and output the second posterior probability distribution of the face age; specifically, the neural network model may use a second fully-connected layer included therein to calculate a second prior probability distribution of a preset face age and a second likelihood function formed by the likelihood values according to a logarithmized bayesian formula (e.g., the following formula (2)), and use a softmax function to normalize a calculation result output by the second fully-connected layer to form and output a second posterior probability distribution of the face age; that is, the second fully-connected layer and the softmax function (that is, the posterior probability distribution forming module 1220 may specifically include the second fully-connected layer and the softmax function) together implement the process of obtaining the posterior probability distribution of the face age by calculating the second prior probability distribution of the preset face age and the second likelihood function according to the bayesian formula.
Figure GDA0002380823300000161
log P(a∣I)=-log Z+log P(a)+Σkfk(I)logP(Ek=1∣a)+(1-fk(I))log P(Ek=0∣a)
(2)
In the above equations (1) and (2), p (a | I) and p (a | E)k) Each representing a posterior probability distribution of the face age of the image I to be recognized based on the age a (i.e., given age/real age/known age), K being an integer age in the age interval, K being the number of ages in the age interval (e.g., 70 or 80 or 100, etc.), K also typically being the maximum age in the age interval, P (E)k| a) denotes the number one at age a and age kTwo likelihood functions, Z being a coefficient, e.g. Z ═ P (E)k=0∣a)+P(Ek1 | a), p (a) denotes a pre-set face age prior probability distribution, and the face age prior probability distribution may be a uniform probability distribution for each age category in the age interval, e.g. for each integer age in 1-100 or 1-70, Ek1 denotes that the face age of the image to be recognized is older than k, and Ek0 denotes that the age of the face of the image to be recognized is smaller than k years old, P (E)k1 | a) represents the probability that the face age of the image to be recognized is greater than k years old, P (E)k0 | a) represents the probability that the face age of the image to be recognized is smaller than k years old, fk(I) The output information of the kth classifier for the image I to be recognized, i.e. the likelihood value corresponding to the kth year of age, is represented.
In an alternative example, the slope of the second likelihood function in the present application may be any value from 0.1 to 0.6, for example, the slope of the second likelihood function is 0.36, and the slope of the second likelihood function determines the parameters of the second fully-connected layer.
The obtaining estimated age module 1100 may determine the estimated age of the image to be recognized based on a posterior probability distribution of a face age output by the neural network model by using various existing implementation manners, and in a specific example, the obtaining estimated age module 1100 determines a median of the posterior probability distribution of the face age output by the neural network model, and takes the median as the predicted face age of the person; in another specific example, the obtain pre-estimated age module 1100 performs weighting calculation on the posterior probability distribution of the face age output by the neural network model, and determines the predicted face age of the person according to the weighting calculation result; in another specific example, the obtain pre-estimated age module 1100 uses an age corresponding to a maximum probability in a posterior probability distribution of the face age output by the neural network model as the predicted face age of the person; in another specific example, the obtaining estimated age module 1100 performs confidence calculation on the posterior probability distribution of the facial age output by the neural network model, and determines an age interval to which the predicted facial age of the person belongs according to the confidence calculation result, and then the obtaining estimated age module 1100 may select an age from the age interval as the estimated age, for example, select an intermediate age from the age interval as the estimated age. The present application does not limit the specific implementation of the obtain estimated age module 1100 to determine the estimated age of the image to be identified based on the posterior probability distribution of the facial age.
The training process of the neural network model in the present application is described in the following training examples.
S610, selecting N image samples from the image sample set with the known age according to the estimated age and two or more preset age differences.
In an alternative example, step S610 of the present application may be performed by the processor calling an instruction stored in the memory for selecting an image sample from the image sample set, or may be performed by the image sample selecting module 1110 executed by the processor.
In an optional example, a plurality of image samples are set in an image sample set of the present application, each image sample should generally include a human face, and the human face in the image sample may be a front face or may have a deflection of various angles; in addition, the definition of the face in the image sample may be very good, and may also be deficient to some extent. Also, each image sample in the set of image samples is typically an image sample of a known age, e.g., all image samples in the set of image samples are typically labeled with a true age. The select image sample module 1110 generally selects the number of image samples from the image sample set according to the estimated age, which is not less than 2; for example, the select image samples module 1110 selects 6 image samples from the set of image samples according to the estimated age.
It should be particularly noted that the greater the number of image samples selected by the image sample selecting module 1110 from the image sample set, the narrower the width of the peak portion of the curve presented by the obtained posterior probability distribution of the facial age is, which is beneficial to improving the accuracy of the estimated age; however, the greater the number of image samples selected from the image sample set by the select image sample module 1110, the longer the time required to determine the comparison result of the age sizes between the image to be recognized and all the image samples, and the present application can determine the number of image samples selected from the image sample set by balancing the efficiency of recognizing the age of the face and the accuracy of recognizing the age of the face.
In an alternative example, the choose image samples module 1110 selects all image samples from the image sample set, and should include N2 image samples with age less than the pre-estimated age, and the sum of N1 and N2 is N, while including N1 image samples with age greater than the pre-estimated age.
In an alternative example, in the case where the number of all image samples selected from the image sample set by the select image samples module 1110 is an even number, the number of image samples with age greater than the pre-estimated age N1 is equal to the number of image samples with age less than the pre-estimated age N2. In addition, for any one of the N1 image samples with ages greater than the estimated age, there should be one image sample with the same age difference and opposite age difference in the N2 image samples with ages less than the estimated age, for example, in case the image sample selecting module 1110 needs to select 6 images from the image sample set, the image sample selecting module 1110 may select 6 image samples from the image sample set according to the age difference settings of the estimated age-10, the estimated age-6, the estimated age-5, the estimated age +10, the estimated age +6, and the estimated age + 5.
In some application scenarios, there may be no image samples in the image sample set that meet a predetermined age difference, for example, when the estimated age is 4 years old, the selected image sample module 1110 may not select the corresponding image sample from the image sample set according to the predetermined image sample selection policies of estimated age-10, estimated age-6 and estimated age-5, at this time, the selected image sample module 1110 should select (e.g., randomly select) 3 images with different age differences from the image sample set with the smallest age to the image sample with the estimated age as much as possible, for example, the selected image sample module 1110 selects 3 image samples from the image sample set according to the image sample selection policies of estimated age-3, estimated age-2 and estimated age-1, and if the estimated age is 2 years old, the difference between the age of the 3 selected image samples from the image sample selecting module 1110 and the estimated age is the same; as another example, in the case where the estimated age is 64 years and the age of the image samples in the set of image samples is 70 years at the maximum, the choose image sample module 1110 cannot choose a corresponding image sample from the image sample set according to the selection strategy of the age +10, age +6 and age +5, the select image samples module 1110 should select (e.g., randomly select) 3 images with different age differences as much as possible from the image samples from the pre-estimated age to the maximum age (e.g., 70 years), for example, the select image sample module 1110 selects 3 image samples from the image sample set according to the selection strategy of the image samples with the estimated age +3, the estimated age +2 and the estimated age +1, if the estimated age is 68 years, the difference between the age of the 3 selected image samples and the estimated age may be the same in the selected image sample module 1110.
The image sample selection strategy of the image sample selection module 1110 for selecting an image sample from the image sample set can be flexibly changed according to actual requirements, and the specific implementation manner of selecting the image sample from the image sample set by the image sample selection module 1110 is not limited in the present application.
S620, obtaining the age comparison result between the image to be identified and the selected N image samples.
In an alternative example, step S620 in the present application may be performed by the processor calling an instruction stored in the memory for obtaining an age comparison result between the image to be recognized and the selected N image samples, or may be performed by the comparison result obtaining module 1120 executed by the processor.
In an optional example, the obtain comparison result module 1120 may obtain the comparison result of the age size between the image to be recognized and the selected N image samples by receiving the input information; the comparison result may be formed by manually comparing the age of the image to be recognized with the age of the selected N image samples.
In an alternative example, the selected image sample module 1110 selects 6 image samples from the image sample set to be displayed to the annotating person, for example, the selected 6 image samples from the selected image sample module 1110 are displayed in the image comparison interface; for each image sample, the annotator determines whether the facial age of the person in the image sample exceeds the facial age of the person in the image to be identified, so that the annotator can give 6 determination results, and by inputting the 6 determination results (for example, the annotator clicks a corresponding option in the image comparison interface, etc.), the comparison result obtaining module 1120 can successfully obtain the comparison result of the age size between the image to be identified and the selected 6 image samples. The present application does not limit the specific implementation manner of the module 1120 for obtaining the comparison result of age size.
S630, obtaining probability information for determining attribute information of the face age of the person according to statistical information formed by the comparison result, for example, obtaining a first posterior probability distribution of the face age according to a first prior probability distribution of a preset face age and a first likelihood function formed based on the comparison result.
In an alternative example, step S630 in the present application may be performed by the processor calling an instruction stored in the memory for obtaining probability information for determining face age attribute information of a person according to statistical information formed by the comparison result, or may be performed by the probability information generation module 1130 executed by the processor, and the probability information (such as a face age posterior probability distribution) generated by the probability information generation module 1130 may be used for determining face age attribute information of a person in an image to be recognized.
In an alternative example, the slope of the first likelihood function in the present application may be any value from 0.1 to 0.6, for example, the slope of the first likelihood function is 0.36.
In an alternative example, the generation probability information module 1130 may calculate a first prior probability distribution of the preset face age according to a bayesian formula and a first likelihood function formed based on the comparison result, thereby generating a first posterior probability distribution of the face age.
In one optional example, the generate probability information module 1130 may generate a first posterior probability distribution of face age using the following equation (3):
Figure GDA0002380823300000201
in the above formula (3), a represents the estimated age, P (a | C)kmP (a) represents a first posterior probability distribution of the face age for the age k of the mth image sample in case of the estimated age a, P (a) represents a first prior probability distribution of the face age for the estimated age a, and P (a) may be a uniform probability distribution for each age category in a pre-set age interval, e.g., a uniform probability distribution for each integer age in the age interval 1-100 or 1-70 or 1-80, etc., M represents the number of image samples taken from the set of image samples, M represents the mth image sample selected from the set of image samples, k represents the known age/true age of the selected image sample, P (C)km| a) represents the likelihood value corresponding to the m-th image sample based on the known age k in the case of the estimated age a, CkmComparing the image to be identified with the known age k of the mth image sample;
at CkmWhen the sample is 1 (i.e., the mth image sample is older than the estimated age a), CkmThe corresponding first likelihood function may be expressed in the form of the following equation (4):
P(Ckm∣a)=σ(β(a-k))/Z (4)
at CkmWhen the current age is 0 (i.e., the real age of the mth image sample is smaller than the estimated age a), CkmThe corresponding first likelihood function may be expressed in the form of the following equation (5):
P(Ckm∣a)=σ(β(k-a))/Z (5)
in the above formula(4) And equation (5), σ (·) represents a logistic function, i.e., σ (·) is 1/(1+ e)-bx) Wherein b is the slope of the logistic function, and the value range of b can be 0.1-0.6, for example, b is 0.36; β represents the slope of the first likelihood function, for example, β (a-k) and β (k-a) represent the product of the slope β of the first likelihood function and (a-k) and the product of the slope β and (k-a), respectively; and β (k-a) and β (a-k) can be considered as age differences with weights; z is a coefficient, e.g. Z ═ P (E)k=0∣a)+P(Ek=1∣a)。
In the case of selecting 6 image samples from the image sample set, a specific example of the above formula (3) can be as shown in fig. 7. In fig. 7, the leftmost image on the upper side is the image to be identified, and due to space and other factors, fig. 7 only shows 4 image samples (e.g., the rightmost 4 images on the upper side in fig. 7) from the 6 image samples selected by the image sample selecting module 1110 from the image sample set, and the known ages of the leftmost two images in the 4 images are smaller than the estimated age of the image to be identified, and the known ages of the rightmost two images in the 4 images are larger than the estimated age of the image to be identified; the likelihood functions corresponding to each of the 4 rightmost images on the upper side may be represented as 4 rightmost graphs on the lower side in fig. 7, and the probability information generating module 1130 obtains a first posterior probability distribution of the face age of the image to be recognized after multiplying all the 6 likelihood functions by a preset face age prior probability distribution, where the first posterior probability distribution of the face age may be represented as a curve with a peak on the leftmost side on the lower side in fig. 7.
In an optional example, the probability information generating module 1130 generates a first posterior probability distribution of a face age for each image to be recognized, however, in the process of comparing the image to be recognized with the selected image sample by the annotator, due to reasons such as an input error of the comparison result or a subjective recognition error, the comparison result may be inconsistent with each other, for example, when the annotator performs a judgment on the image to be recognized and the image sample with an estimated age of-6, the image to be recognized is considered to be younger than the image sample, and when performs a judgment on the image to be recognized and the image sample with an estimated age of +6, the image to be recognized is considered to be older than the image sample; the existence of conflicting determinations may result in the first posterior probability distribution of facial age generated by the generate probability information module 1130 not exhibiting a curve with peaks; in fig. 8, for example, the generate probability information module 1130 generates a first posterior probability distribution of face age for each of 6 images to be recognized, and the first posterior probability distribution of the face age corresponding to the 5 images to be identified are all curves with peaks, and the first posterior probability distribution of the face age corresponding to the last 1 image to be recognized appears as a parabola with the opening downward, the first posterior probability distribution of the face age is an invalid face age posterior probability distribution, which should be filtered by the first filtering module 1140 or corresponding instructions for filtering the invalid first posterior probability distribution of the face age, that is, the determine age attribute module 1150, or corresponding instructions for determining age attribute information, should not use such a first posterior probability distribution of facial ages to determine age attribute information for a person in an image to be identified. The determine age attribute module 1150 determines the age attribute information of the face of the person according to the first posterior probability distribution of the effective age of the face, and performs a labeling operation on the image to be recognized via the labeling module 1160 or an instruction for labeling the age attribute information of the image to be recognized. The specific implementation of the age attribute determining module 1150 determining the facial age attribute information of the person according to the first posterior probability distribution of the effective facial age may refer to the specific implementation of the above-mentioned obtaining the posterior probability distribution of the facial age output by the estimated age module 1100 according to the neural network model to determine the estimated age of the image to be recognized, and will not be described again here.
In an alternative example, the training process of the neural network model in the present application may be performed by the processor calling the instructions stored in the memory for training the neural network model, or may be performed by the training module 1240 executed by the processor, and one training process of the neural network model may include the following operations:
setting up a neural network model in the present application is shown in fig. 9, and includes: the method comprises the following steps that (1) a CNN, a first full connection layer, a sigmoid layer, a second full connection layer and a softmax layer are formed; in addition, a plurality of image samples are set in the image sample set in the application, under a normal condition, each image sample contains a human face, and the human face in the image sample can be a front face and can also have deflection of various angles; in addition, the definition of the face in the image sample may be very good, and may also be deficient to some extent. Also, each image sample in the set of image samples is typically an image sample of a known age, e.g., all image samples in the set of image samples are typically labeled with a true age.
First, the training module 1240 selects an image sample from the image sample set as an input image sample to input into the neural network model, and the CNN in the neural network model obtains facial features of a person in the input image sample, so that the CNN outputs facial features with a certain dimension, for example, the CNN outputs 128-dimensional facial features. In addition, the training module 1240 should select M image samples (6 image samples for example) of known facial ages from the image sample set according to the known facial ages of the input image samples and two or more preset age differences (6 age differences for example are described below);
secondly, the first fully-connected layer and the sigmoid layer in the neural network model classify the facial features output by the CNN for each integer age in a preset age interval (e.g., 1-70), so that the sigmoid layer outputs a probability value that the person in the input image sample is over each integer age, for example, for 1-70 years, the sigmoid layer outputs a probability value that the person in the input image sample is over 1 year, a probability value over 2 years, a probability value over 3 years, an integral year, and a probability value over 70 years, wherein the 70 probability values form a 70-dimensional likelihood value, such as Hyperplane response in fig. 9;
thirdly, a second full-link layer and a softmax layer in the neural network model utilize a Bayesian formula together to calculate a second prior probability distribution of the preset face age and a third likelihood function formed by the likelihood values, and therefore the softmax layer outputs a third posterior probability distribution of the face age; wherein each parameter in the second fully-connected layer is generally determined according to the slope of the third likelihood function, and the slope of the third likelihood function may be a value between 0.1 and 0.6, such as the slope of the third likelihood function is 0.36;
finally, the training module 1240 may use the third posterior probability distribution of the real face age formed by the selected 6 image samples and the input image sample, and use the third posterior probability distribution of the face age to make the neural network model perform supervised learning; specifically, the training module 1240 may provide the second posterior probability distribution of the face age and the third posterior probability distribution of the face age to the loss function, thereby implementing supervised learning based on the posterior probability distribution of the face age; the third posterior probability distribution of the facial age should be the third posterior probability distribution of the valid facial age after the filtering operation is performed by the second filtering module 1230 or the corresponding instruction of the third posterior probability distribution for filtering the invalid facial age, i.e., the training module 1240 should not perform supervised learning by using the third posterior probability distribution of the facial age.
The loss function can be expressed as the following equation (6):
LKL=DKL(Pgt(a)||P(a∣I))=-ΣaPgt(a)log P(a∣I)-Const (6)
in the above formula (6), LKLRepresenting a loss function, DKL(. indicates. cross entropy), a is the true age of the input image sample, Pgt(a) A third posterior probability distribution representing the age of the face, P (a | I) a second posterior probability distribution representing the age of the face, Const being a constant value.
Because the information contained in the face age posterior probability distribution is often more than that of a specific age or age group, supervised learning of the neural network model by using the face age posterior probability distribution tends to make more contents that the neural network model can learn, so that the face age posterior probability distribution output by the successfully trained neural network model is closer to the real face age posterior probability distribution; furthermore, when the age estimation/prediction is carried out by using the posterior probability distribution of the face age, the accuracy of the age estimation/prediction is favorably improved.
In addition, since the input image sample is labeled with a real age, the training module 1240 may also perform supervised learning on the neural network model using a comparison result (i.e., a likelihood value) based on the real age and the real age of the selected image sample, and specifically, the training module 1240 may respectively provide the comparison result based on the real age and the real age of the selected image sample and the likelihood value output based on the first fully-connected layer and the sigmoid layer to the loss function, thereby implementing the supervised learning of the real age; the loss function can be expressed as the following equation (7):
Figure GDA0002380823300000241
in the above equation (7), Costk(agt) The function can be defined as if | agtK | < L, the function value is 0, otherwise the function value is 1, k represents the kth classifier in the first fully-connected layer, k can also be understood as k years old, L can be set to 3, fk(I)=<wk,φ(I)>,wkIs the weight value for the kth classifier in the first fully-connected layer and the sigmoid layer, phi (I) represents the facial features of the input image sample, i.e. facial feature vector, agtIs the true age of the person in the input image sample.
According to the method and the device, the neural network model is supervised and learned by using the comparison result (namely the likelihood value) of the real age of the input image sample and the real age of the selected image sample, so that the accuracy of forming the likelihood value by the neural network model is improved, and the face age posterior probability distribution formed by the second full-link layer and the softmax layer is closer to the real face age posterior probability distribution.
After the training module 1240 successfully trains the neural network model, the likelihood functions formed by the neural network model for the upper and lower two input image samples at the leftmost side of fig. 10 can be shown as the upper and lower two graphs at the middle position of fig. 10, the true likelihood functions of the upper and lower two input image samples at the leftmost side of fig. 10 can be shown as the upper and lower two graphs at the leftmost side of fig. 10, and the final face age posterior probability distribution formed by the neural network model can be shown as the upper and lower two graphs at the rightmost side of fig. 10. As can be seen from fig. 10, although the face in the top left input image sample in fig. 10 has a certain rotation angle, and the face in the bottom left input image sample in fig. 10 is somewhat blurred, if the face age posterior probability distribution output by the neural network model is used to estimate the face ages of the persons in the two input image samples, the face ages can be substantially matched with the real ages of the persons in the input image samples.
The methods and apparatus, electronic devices, and computer-readable storage media of the present application may be implemented in a number of ways. For example, the methods and apparatus, electronic devices, and computer-readable storage media of the present application may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present application are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present application may also be embodied as a program recorded in a recording medium, the program including machine-readable instructions for implementing a method according to the present application. Thus, the present application also covers a recording medium storing a program for executing the method according to the present application.
The description of the present application has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the application in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the application and the practical application, and to enable others of ordinary skill in the art to understand the application for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (42)

1. A method for identifying facial age, comprising:
acquiring the estimated age of an image to be identified;
selecting N image samples from an image sample set with a known age according to the estimated age and two or more preset age differences, wherein N is not less than 2;
acquiring an age comparison result between the image to be identified and the selected N image samples;
and obtaining probability information for determining the face age attribute information of the person according to the statistical information formed by the comparison result.
2. The method of claim 1, wherein obtaining probability information for determining facial age attribute information of a person based on statistical information formed from the comparison comprises:
obtaining a first posterior probability distribution of the face age according to a first prior probability distribution of a preset face age and a first likelihood function formed based on the comparison result;
wherein the face age posterior probability distribution is used to determine face age attribute information of the person.
3. The method of claim 1, wherein obtaining the estimated age of the image to be identified comprises:
and inputting the image to be recognized into a neural network model, and determining the estimated age of the image to be recognized according to the output information of the neural network model.
4. The method of claim 3, wherein the output information of the neural network model comprises: a second posterior probability distribution of facial age.
5. The method of claim 4, wherein the processing operations performed by the neural network model for the input image to be recognized comprise:
acquiring facial features of a person in an image to be recognized;
for each preset age category, judging the probability that the facial features belong to the facial features exceeding the age category, wherein all the probabilities form the likelihood value of a second likelihood function;
and generating a second posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability.
6. The method according to claim 5, wherein the determining, for each preset age category, the probability that the facial feature belongs to a facial feature exceeding the age category comprises:
classifying the facial features by utilizing a first full-connection layer aiming at each preset age category;
and carrying out normalization processing on the classification processing result by using a sigmoid function to obtain the probability that the facial features belong to the facial features exceeding the age category.
7. The method of claim 5, wherein generating a second posterior probability distribution of face age from a second prior probability distribution of preset face age and a second likelihood function formed based on the probabilities comprises:
and calculating a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability according to a Bayesian formula to generate a second posterior probability distribution of the face age.
8. The method of claim 7, wherein calculating a second prior probability distribution of a preset face age according to a Bayesian formula and a second likelihood function formed based on the probabilities to generate a second posterior probability distribution of the face age comprises:
calculating a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability by using a second full-connection layer based on a logarithm Bayes formula;
restoring the computed result output by the second fully-connected layer to a second posterior probability distribution of facial age using a softmax function.
9. The method of claim 4, wherein determining the estimated age of the image to be identified from the output information of the neural network model comprises:
determining a median of a second posterior probability distribution of the facial age, and taking the median as an estimated age; or
Performing weighted calculation on the second posterior probability distribution of the face age, and determining the estimated age according to the weighted calculation result; or
Taking the age corresponding to the maximum probability in the second posterior probability distribution of the face age as the estimated age; or
And performing confidence calculation according to the second posterior probability distribution of the facial age, determining an age interval according to the confidence calculation result, and selecting an age from the age interval as an estimated age.
10. The method of claim 3, wherein the training process of the neural network model comprises:
selecting M image samples with known face ages from an image sample set according to the known face ages of the input image samples and two or more preset age differences, wherein M is not less than 2;
acquiring age comparison results between the input image samples and the selected M image samples;
obtaining a third posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a third likelihood function formed based on the comparison result;
and performing supervised learning on a neural network model according to the third posterior probability distribution of the face age.
11. The method of claim 10, wherein the training process further comprises:
supervised learning of a neural network model is performed based on known facial ages of the input image samples.
12. The method of any of claims 1 to 11, wherein the N image samples comprise: the image processing method comprises the following steps of N1 image samples with the age greater than the predicted age and N2 image samples with the age less than the predicted age, wherein the sum of N1 and N2 is N.
13. The method according to claim 12, wherein when N is an even number, N1 is equal to N2, and for any one of N1 image samples older than the estimated age, N2 image samples younger than the estimated age have image samples with the same age difference and opposite age difference.
14. The method according to any one of claims 1 to 11, wherein the obtaining of the comparison result of the age size between the image to be identified and the selected N image samples comprises:
acquiring an age comparison result between the image to be identified and the selected N image samples in a mode of receiving input information;
wherein the input information includes: and manually comparing the age of the image to be identified with the age of the selected N image samples to form a comparison result.
15. The method according to any one of claims 2 to 11, wherein the obtaining a first posterior probability distribution of the face age according to a first prior probability distribution of a preset face age and a first likelihood function formed based on the comparison result comprises:
and calculating a first prior probability distribution of the preset face age according to a Bayesian formula and a first likelihood function formed based on the comparison result to generate a first posterior probability distribution of the face age.
16. The method of any of claims 2 to 11, wherein the first prior probability distribution of facial age comprises: a uniform probability distribution for each of the age categories set in advance.
17. The method according to any one of claims 2 to 11, further comprising:
filtering out a first posterior probability distribution of invalid facial ages;
wherein the first posterior probability distribution of ineffective facial ages comprises: a first posterior probability distribution of facial age of a parabolic shape with a downward opening is formed.
18. The method according to any one of claims 2 to 11, further comprising:
determining face age attribute information of the person from a first posterior probability distribution of face ages;
and marking the age attribute information of the image to be identified according to the age attribute information of the face.
19. The method of claim 18, wherein determining the facial age attribute information of the person based on the first posterior probability distribution of facial age comprises:
determining a median of a first posterior probability distribution of the face age, and taking the median as the face age of the image to be recognized; or
Performing weighting calculation on the first posterior probability distribution of the face age, and determining the face age of the image to be recognized according to the weighting calculation result; or
Taking the age corresponding to the maximum probability in the first posterior probability distribution of the face age as the face age of the image to be identified; or
And performing confidence calculation according to the second posterior probability distribution of the face age, and determining an age interval to which the face age of the image to be recognized belongs according to the confidence calculation result.
20. Method according to any of claims 2 to 11, characterized in that the slope of the first likelihood function and/or the second likelihood function is a value between 0.1-0.6.
21. A method for identifying facial age, the method being performed by a neural network model, and the processing operations performed by the neural network model comprising:
acquiring facial features of a person in an image to be recognized;
for each preset age category, judging the probability that the facial features belong to the facial features exceeding the age category, wherein all the probabilities form the likelihood value of a second likelihood function;
and generating a second posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability.
22. The method according to claim 21, wherein the determining, for each preset age category, the probability that the facial feature belongs to a facial feature exceeding the age category comprises:
classifying the facial features by utilizing a first full-connection layer aiming at each preset age category;
and carrying out normalization processing on the classification processing result by using a sigmoid function to obtain the probability that the facial features belong to the facial features exceeding the age category.
23. The method of claim 21, wherein generating a second posterior probability distribution of face age from a second prior probability distribution of preset face age and a second likelihood function formed based on the probabilities comprises:
and calculating a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability according to a Bayesian formula to generate a second posterior probability distribution of the face age.
24. The method of claim 23, wherein calculating a second prior probability distribution of a preset face age according to a bayesian formula and a second likelihood function formed based on the probabilities to generate a second posterior probability distribution of the face age comprises:
calculating a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability by using a second full-connection layer based on a logarithm Bayes formula;
restoring the computed result output by the second fully-connected layer to a second posterior probability distribution of facial age using a softmax function.
25. The method of any one of claims 21 to 24, wherein the training process of the neural network model comprises:
selecting M image samples with known face ages from an image sample set according to the known face ages of the input image samples and two or more preset age differences, wherein M is not less than 2;
acquiring age comparison results between the input image samples and the selected M image samples;
obtaining a third posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a third likelihood function formed based on the comparison result;
and performing supervised learning on a neural network model according to the third posterior probability distribution of the face age.
26. The method of claim 25, wherein the training process further comprises:
filtering out a third posterior probability distribution of invalid facial ages;
and said supervised learning of the neural network model according to the third posterior probability distribution of the facial age comprises:
performing supervised learning on the neural network model according to the third posterior probability distribution of the filtered face age;
wherein the third posterior probability distribution of ineffective facial ages comprises: a third posterior probability distribution of facial age of a parabolic shape with downward opening is formed.
27. The method of claim 25, wherein the training process further comprises:
supervised learning of a neural network model is performed based on known facial ages of the input image samples.
28. An apparatus for identifying facial age, comprising:
the acquisition estimated age module is used for acquiring the estimated age of the image to be identified;
the selected image sample module is used for selecting N image samples from an image sample set with a known age according to the estimated age and two or more preset age differences, wherein N is not less than 2;
the acquisition comparison result module is used for acquiring an age comparison result between the image to be identified and the selected N image samples;
and the probability information generation module is used for obtaining probability information used for determining the face age attribute information of the person according to the statistical information formed by the comparison result.
29. The apparatus according to claim 28, wherein the probability information generating module is specifically configured to obtain a first posterior probability distribution of the face age according to a first prior probability distribution of a preset face age and a first likelihood function formed based on the comparison result;
wherein the face age posterior probability distribution is used to determine face age attribute information of the person.
30. The apparatus of claim 29, further comprising:
the first filtering module is used for filtering a first posterior probability distribution of invalid face ages;
wherein the first posterior probability distribution of ineffective facial ages comprises: a first posterior probability distribution of facial age of a parabolic shape with a downward opening is formed.
31. The apparatus of any one of claims 29 to 30, further comprising:
an age attribute determining module for determining facial age attribute information of the person according to a first posterior probability distribution of facial age;
and the marking module is used for marking the age attribute information of the image to be identified according to the age attribute information of the face.
32. An apparatus for identifying facial age, the apparatus being configured to implement a neural network model, and the apparatus comprising:
the facial feature acquisition module is used for acquiring the facial features of the person in the image to be identified;
the judging probability module is used for judging the probability that the facial features belong to the facial features exceeding the age category according to each preset age category, and all the probabilities form the likelihood value of the second likelihood function;
and the posterior probability distribution forming module is used for generating a second posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a second likelihood function formed based on the probability.
33. The apparatus of claim 32, further comprising: a training module to:
selecting M image samples with known face ages from an image sample set according to the known face ages of the input image samples and two or more preset age differences, wherein M is not less than 2;
acquiring age comparison results between the input image samples and the selected M image samples;
obtaining a third posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a third likelihood function formed based on the comparison result;
and performing supervised learning on a neural network model according to the third posterior probability distribution of the face age.
34. The apparatus of claim 33, further comprising:
the second filtering module is used for filtering a third posterior probability distribution of the invalid face age;
the training module carries out supervised learning on the neural network model according to the third posterior probability distribution of the filtered face age;
wherein the third posterior probability distribution of ineffective facial ages comprises: a third posterior probability distribution of facial age of a parabolic shape with downward opening is formed.
35. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing a computer program stored in the memory, and when the computer program is executed, the following instructions are executed:
instructions for obtaining an estimated age of the image to be identified;
instructions for selecting N image samples from an image sample set with a known age according to the estimated age and two or more preset age differences, wherein N is not less than 2;
instructions for obtaining an age comparison between the image to be identified and the selected N image samples;
and obtaining probability information for determining face age attribute information of the person based on statistical information formed by the comparison result.
36. The electronic device of claim 35, wherein the instructions for obtaining probability information for determining facial age attribute information of the person based on statistical information formed from the comparison result comprise:
instructions for obtaining a first posterior probability distribution of the face age from a first prior probability distribution of a preset face age and a first likelihood function formed based on the comparison result;
wherein the face age posterior probability distribution is used to determine face age attribute information of the person.
37. The electronic device of claim 36, wherein the executed instructions further comprise:
instructions for filtering out a first posterior probability distribution of invalid facial ages;
wherein the first posterior probability distribution of ineffective facial ages comprises: a first posterior probability distribution of facial age of a parabolic shape with a downward opening is formed.
38. The electronic device of any of claims 36-37, wherein the executed instructions further comprise:
instructions for determining face age attribute information of the person from a first posterior probability distribution of face ages; and instructions for labeling age attribute information of the image to be identified according to the age attribute information of the face.
39. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing a computer program stored in the memory, and when the computer program is executed, the following instructions are executed by a neural network model:
instructions for obtaining facial features of a person in an image to be identified;
instructions for determining, for each age category set in advance, a probability that the facial feature belongs to a facial feature that exceeds the age category, and all probabilities forming likelihood values of a second likelihood function;
and generating a second posterior probability distribution of the face age according to a second prior probability distribution of the preset face age and a second likelihood function formed based on the probabilities.
40. The electronic device of claim 39, wherein the computer program, when executed, further executes instructions for training a neural network model, and wherein the instructions for training a neural network model comprise:
instructions for selecting M image samples of known face age from the image sample set according to the known face age of the input image sample and two or more preset age differences, wherein M is not less than 2;
instructions for obtaining an age-size comparison between the input image sample and the selected M image samples;
instructions for obtaining a third posterior probability distribution of the face age from a second prior probability distribution of a preset face age and a third likelihood function formed based on the comparison result;
instructions for supervised learning of a neural network model according to a third posterior probability distribution of the facial age.
41. The electronic device of claim 40, wherein the computer program, when executed, further performs:
instructions for filtering out invalid third likelihood functions formed based on the comparison results;
and the instruction for supervised learning of the neural network model according to the third posterior probability distribution of the facial age is specifically:
instructions for performing supervised learning of the neural network model according to a third posterior probability distribution of the filtered facial age;
wherein the invalid third likelihood function comprises: forming a third likelihood function of a parabolic shape with the opening facing downwards.
42. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of the preceding claims 1-27.
CN201810136268.6A 2017-08-11 2018-02-09 Method and device for identifying face age and electronic equipment Active CN108399379B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/098665 WO2019029459A1 (en) 2017-08-11 2018-08-03 Method and device for recognizing facial age, and electronic device
US16/236,292 US11003890B2 (en) 2017-08-11 2018-12-28 Method and apparatus for facial age identification, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2017106875871 2017-08-11
CN201710687587 2017-08-11

Publications (2)

Publication Number Publication Date
CN108399379A CN108399379A (en) 2018-08-14
CN108399379B true CN108399379B (en) 2021-02-12

Family

ID=63096452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810136268.6A Active CN108399379B (en) 2017-08-11 2018-02-09 Method and device for identifying face age and electronic equipment

Country Status (3)

Country Link
US (1) US11003890B2 (en)
CN (1) CN108399379B (en)
WO (1) WO2019029459A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10949649B2 (en) * 2019-02-22 2021-03-16 Image Metrics, Ltd. Real-time tracking of facial features in unconstrained video
CN109947510A (en) * 2019-03-15 2019-06-28 北京市商汤科技开发有限公司 A kind of interface recommended method and device, computer equipment
CN110321778B (en) * 2019-04-26 2022-04-05 北京市商汤科技开发有限公司 Face image processing method and device and storage medium
CN110287942B (en) * 2019-07-03 2021-09-17 成都旷视金智科技有限公司 Training method of age estimation model, age estimation method and corresponding device
CN110532970B (en) * 2019-09-02 2022-06-24 厦门瑞为信息技术有限公司 Age and gender attribute analysis method, system, equipment and medium for 2D images of human faces
CN113128278A (en) * 2019-12-31 2021-07-16 华为技术有限公司 Image identification method and device
US11687778B2 (en) 2020-01-06 2023-06-27 The Research Foundation For The State University Of New York Fakecatcher: detection of synthetic portrait videos using biological signals
CN111553838A (en) * 2020-05-08 2020-08-18 深圳前海微众银行股份有限公司 Model parameter updating method, device, equipment and storage medium
CN112163462A (en) * 2020-09-08 2021-01-01 北京数美时代科技有限公司 Face-based juvenile recognition method and device and computer equipment
CN112651372A (en) * 2020-12-31 2021-04-13 北京眼神智能科技有限公司 Age judgment method and device based on face image, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567719A (en) * 2011-12-26 2012-07-11 东南大学 Human age automatic estimation method based on posterior probability neural network
US9514356B2 (en) * 2014-09-05 2016-12-06 Huawei Technologies Co., Ltd. Method and apparatus for generating facial feature verification model

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8121618B2 (en) * 2009-10-28 2012-02-21 Digimarc Corporation Intuitive computing methods and systems
US11430260B2 (en) * 2010-06-07 2022-08-30 Affectiva, Inc. Electronic display viewing verification
US10401860B2 (en) * 2010-06-07 2019-09-03 Affectiva, Inc. Image analysis for two-sided data hub
EP2731072A4 (en) * 2011-07-07 2015-03-25 Kao Corp Face impression analysis method, cosmetic counseling method, and face image generation method
US9311564B2 (en) * 2012-10-05 2016-04-12 Carnegie Mellon University Face age-estimation and methods, systems, and software therefor
US20150359483A1 (en) * 2013-09-13 2015-12-17 Genocosmetics Lab Sl Methods and systems for improving perceived age based on phenotypic and genetic features of the skin
US10277476B2 (en) * 2014-01-06 2019-04-30 Cisco Technology, Inc. Optimizing network parameters based on a learned network performance model
CN105096304B (en) * 2014-05-22 2018-01-02 华为技术有限公司 The method of estimation and equipment of a kind of characteristics of image
CN107735795B (en) * 2015-07-02 2021-11-26 北京市商汤科技开发有限公司 Method and system for social relationship identification
CN106384080A (en) * 2016-08-31 2017-02-08 广州精点计算机科技有限公司 Apparent age estimating method and device based on convolutional neural network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567719A (en) * 2011-12-26 2012-07-11 东南大学 Human age automatic estimation method based on posterior probability neural network
US9514356B2 (en) * 2014-09-05 2016-12-06 Huawei Technologies Co., Ltd. Method and apparatus for generating facial feature verification model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Cross-Age Face Verification by Coordinating with Cross-Face Age Verification";Du, Liang;《Proc of the IEEE Computer Society》;20151231;全文 *

Also Published As

Publication number Publication date
US11003890B2 (en) 2021-05-11
WO2019029459A1 (en) 2019-02-14
US20190138787A1 (en) 2019-05-09
CN108399379A (en) 2018-08-14

Similar Documents

Publication Publication Date Title
CN108399379B (en) Method and device for identifying face age and electronic equipment
CN108229322B (en) Video-based face recognition method and device, electronic equipment and storage medium
CN108229296B (en) Face skin attribute identification method and device, electronic equipment and storage medium
US9449432B2 (en) System and method for identifying faces in unconstrained media
CN108399383B (en) Expression migration method, device storage medium, and program
WO2018121690A1 (en) Object attribute detection method and device, neural network training method and device, and regional detection method and device
CN108229297B (en) Face recognition method and device, electronic equipment and computer storage medium
WO2017215668A1 (en) Posture estimation method and apparatus, and computer system
US9311564B2 (en) Face age-estimation and methods, systems, and software therefor
WO2018219180A1 (en) Method and apparatus for determining facial image quality, as well as electronic device and computer storage medium
JP2020522285A (en) System and method for whole body measurement extraction
WO2020019765A1 (en) Depth estimation method and apparatus for binocular image, and device, program and medium
US8599255B2 (en) Video surveillance system based on Gaussian mixture modeling with two-type learning rate control scheme
WO2021196721A1 (en) Cabin interior environment adjustment method and apparatus
CN108985190B (en) Target identification method and device, electronic equipment and storage medium
CN108228684B (en) Method and device for training clustering model, electronic equipment and computer storage medium
CN108491872B (en) Object re-recognition method and apparatus, electronic device, program, and storage medium
CN114612743A (en) Deep learning model training method, target object identification method and device
JP2007048172A (en) Information classification device
Lin et al. A gender classification scheme based on multi-region feature extraction and information fusion for unconstrained images
CN111814653A (en) Method, device, equipment and storage medium for detecting abnormal behaviors in video
RU2768797C1 (en) Method and system for determining synthetically modified face images on video
US11676161B2 (en) Combined light and heavy models for image filtering
CN110232407B (en) Image processing method and apparatus, electronic device, and computer storage medium
Khan et al. Critical Evaluation of Frontal Image-Based Gender Classification Techniques

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: Room 1101-1117, 11 / F, No. 58, Beisihuan West Road, Haidian District, Beijing 100080

Patentee after: BEIJING SENSETIME TECHNOLOGY DEVELOPMENT Co.,Ltd.

Address before: Room 710-712, 7th floor, No. 1 Courtyard, Zhongguancun East Road, Haidian District, Beijing

Patentee before: BEIJING SENSETIME TECHNOLOGY DEVELOPMENT Co.,Ltd.

CP02 Change in the address of a patent holder