FacialFeatures

FacialFeatures[image]

returns a minimal summary of facial features for all detected faces in image.

FacialFeatures[image,features]

returns the specified facial features.

Details and Options

  • FacialFeatures, also known as facial characteristics, can return details about detected faces, including position of eyes, nose, etc. as well as global face features, like age, gender, emotion and more.
  • FacialFeatures[{image1, image2,},] can be used to estimate features in multiple images.
  • Facial features can be global facial characteristics or detailed positions of individual facial parts.
  • FacialFeatures[image,"Properties"] returns all available properties and features. The following features are available.
  • Global features:
  • "Age"estimated age
    "Descriptor"feature vector representation of the face
    "Emotion"the most likely facial emotion
    "Gender"estimated gender
    "Landmarks"an association of the facial landmarks
  • Global feature distributions:
  • "AgeWeights"as a WeightedData object
    "EmotionWeights"an association of key-values emotion->prob
    "GenderWeights"an association of key-values gender->prob
  • Shape properties:
  • "BoundingBox"bounding Rectangle of the face
    "BoundingBoxArea"area of the bounding box
    "Height"face height
    "Image"a crop of image corresponding to the face
    "Position"position of the face given as {x,y}
    "Width"face width
  • Individual facial landmarks coming back as a single point:
  • "LeftEyeCenter"center of the left eye
    "RightEyeCenter"center of the right eye
    "EyeCenter"point at the center of the eyes
    "NoseCenter"point at the center of the nose
    "MouthCenter"point at the center of the mouth
    "MouthLeft"point of the left of the mouth
    "MouthRight"point of the right of the mouth
  • Individual facial landmarks coming back as a list of points:
  • "LeftEyebrowPoints"left eyebrow points
    "LeftEyePoints"left eye points
    "MouthExternalPoints"points of the external part of the mouth
    "MouthInternalPoints"points of the internal part of the mouth
    "NosePoints"points of the nose central line and bridge
    "OutlinePoints"outline of the face
    "RightEyebrowPoints"right eyebrow points
    "RightEyePoints"right eye points
  • Collections of facial landmarks:
  • "EyebrowPoints"an association of left and right eyebrows
    "EyePoints"an association of left and right eyes
    "MouthPoints"an association of the internal and external parts of the mouth
  • By default, the faces are detected using FindFaces and a small padding is added around each bounding box. Use Method{"FaceBoxes"boxes} to specify bounding boxes around faces.
  • Possible values for boxes can be any of the following:
  • Fullthe whole image is assumed to be one face
    {bbox1,}a list of bounding boxes for faces
    fan arbitrary function that returns face bounding boxes
  • FacialFeatures uses machine learning. Its methods, training sets and biases included therein may change and yield varied results in different versions of the Wolfram Language.
  • FacialFeatures 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 allclose all

Basic Examples  (2)

Get a summary of the estimated features:

Estimate a feature on the faces detected in an image:

Scope  (11)

Basic Uses  (6)

Get a summary of the facial features for all the faces found in an image:

Estimate a specific feature:

Estimate multiple features:

Estimate a feature in multiple images:

Estimate multiple features in multiple images:

Use the function as an operator:

Features  (5)

Estimate the age:

Estimate the gender:

Compute a feature vector that describes the face:

Extract bounding box properties:

Estimate the position of facial landmarks:

Options  (3)

Method  (3)

By default, FacialFeatures attempts to detect all the faces present in the image:

Use Method"FaceBoxes"box to specify a face box:

Specify multiple face boxes:

Specify a function to compute the face boxes:

Assume the whole image is a face:

Applications  (4)

Highlight different facial features on top of an image:

Visualize the estimated age distribution for several faces:

Group faces based on their gender:

Create a feature space plot of faces in an image using their facial descriptors:

Properties & Relations  (1)

Use a neural net from the Wolfram Neural Net Repository to extract facial features:

Wolfram Research (2018), FacialFeatures, Wolfram Language function, https://reference.wolfram.com/language/ref/FacialFeatures.html (updated 2020).

Text

Wolfram Research (2018), FacialFeatures, Wolfram Language function, https://reference.wolfram.com/language/ref/FacialFeatures.html (updated 2020).

CMS

Wolfram Language. 2018. "FacialFeatures." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/FacialFeatures.html.

APA

Wolfram Language. (2018). FacialFeatures. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FacialFeatures.html

BibTeX

@misc{reference.wolfram_2024_facialfeatures, author="Wolfram Research", title="{FacialFeatures}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/FacialFeatures.html}", note=[Accessed: 25-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_facialfeatures, organization={Wolfram Research}, title={FacialFeatures}, year={2020}, url={https://reference.wolfram.com/language/ref/FacialFeatures.html}, note=[Accessed: 25-November-2024 ]}