"FacialAge" (Built-in Classifier)
-
See Also
- Classify
- FacialFeatures
- NetModel
- FindFaces
-
- Classifiers
- FacialGender
- NameGender
- FacialExpression
-
- Predictors
- NameAge
- Related Guides
-
-
See Also
- Classify
- FacialFeatures
- NetModel
- FindFaces
-
- Classifiers
- FacialGender
- NameGender
- FacialExpression
-
- Predictors
- NameAge
- Related Guides
-
See Also
"FacialAge" (Built-in Classifier)
Estimate a person's age from a face in the image.
Classes
Details
- The classifier is applied to the largest face found in the image.
- The classifier is based on the MobileNet Model Trained on UTKFace Large-Scale Face Dataset.
- The classifier may download resources that will be stored in your local object store at $LocalBase, and that can be listed using LocalObjects[] and removed using ResourceRemove.
Examples
open all close allBasic Examples (2)
Determine the age of a person:
Classify["FacialAge", [image]]Obtain the probabilities for the 3 most likely ages:
Classify["FacialAge"][[image], "TopProbabilities" -> 3]Obtain a ClassifierFunction for this classifier:
c = Classify["FacialAge"]Use the classifier function to find the age from an image:
c[[image]]Find the age of many examples at once:
c[{[image], [image]}]Scope (2)
img = [image];faces = ImageTrim[img, #]& /@ FindFaces[img]Use the classifier on each face:
Classify["FacialAge", faces]Load the ClassifierFunction corresponding to the built-in classifier:
c = Classify["FacialAge"]Information[c, "Classes"]Options (2)
ClassPriors (1)
Use a custom ClassPriors to restrict the possible outputs:
Classify["FacialAge", [image], ClassPriors -> <|45 -> 0.5, 46 -> 0.5|>]IndeterminateThreshold (1)
Use a custom IndeterminateThreshold:
Classify["FacialAge", [image], IndeterminateThreshold -> 0.6]See Also
Classify FacialFeatures NetModel FindFaces
Classifiers: FacialGender NameGender FacialExpression
Predictors: NameAge
Related Guides
History
Introduced in 2018 (11.3)