Contents Menu Expand Light mode Dark mode Auto light/dark mode
Datagen documentation
Light Logo Dark Logo

The Datagen SDK

  • Overview
  • Installation

Walkthroughs

  • Quickstart
  • Generate a random datapoint

Usage Guides

  • Accessing the asset catalogs
    • Backgrounds
    • Beards
    • Eyebrows
    • Eyes
    • Glasses
    • Hair
    • Humans
    • Masks

API Reference

  • api
  • api.assets
  • api.catalog
  • api.catalog.attributes

Data request files

  • About
  • Format and structure
    • The data request structure: an overview
    • human
      • id
      • head
        • eyes
        • hair
        • facial_hair
        • eyebrows
        • expression
        • location
        • rotation
    • accessories
    • camera
    • background
    • lights
  • Generating your data
  • Samples

How to use our output

  • Modalities Handbook
    • Where to find the modalities
    • Visible spectrum image
    • Depth map
    • Normal map
    • Semantic segmentation
    • About our coordinate systems
    • Facial keypoints (iBUG)
    • Facial keypoints (MediaPipe)
    • Eye keypoints
    • Head keypoints
    • Ear keypoints
    • Bounding box
    • Actor metadata
    • Camera metadata
  • Playbooks
    • Gaze Estimation

About us

  • About Datagen
  v: latest
Versions
latest
staging-flargenesh
sphinx-book-theme
sdk-importing
flargenesh-api-staging
api-todo-stripping
add_sdk-sample_code
Downloads
html
On Read the Docs
Project Home
Builds
Back to top
Try for free

head#

object

The head object is responsible for constructing the head of the human actor in your scene. These fields define every aspect of what goes into generating a virtual head: the hair color, direction of gaze, facial expression, and so on.

The head object contains the following fields:

"head": {
  "eyes": {
    //Settings that define eye texture, closure, and direction of gaze
  }
  "hair": {
    //Settings that define hair style and color
  }
  "facial_hair": {
    //Settings that define facial hair style and color
  }
  "eyebrows": {
    //Settings that define eyebrow style and color
  }
  "expression": {
    //The expression on the actor's face: type and intensity
  }
  "location": {
    //The position of the face in the scene, using global coordinates
  }
  "rotation": {
    // The rotation of the head about the neck
  }
}

Sample usage

Location in the data request

In the JSON hierarchy of the data request, the head object is found here:

{
  "datapoints": [
    {
      "human": {
        "head": {

        }
      }
    }
  ]
}

A sample complete head object

 "head": {
   "eyes": {
     "id": "73ddd6f7-4866-4cf5-9681-2ce1922247de",
     "target_of_gaze": {
       "direction": {
         "z": 0.0,
         "y": -1.0,
         "x": 0.0
       },
       "distance": 15.0
     },
   "eyelid_closure": 0.5
   },
   "facial_hair": {
     "id": "082671c1-7bce-4942-a5f7-75a7de3d2367",
     "color_settings": {
       "melanin": 0.9,
       "redness": 0.2,
       "whiteness": 0.1,
       "roughness": 0.2,
       "index_of_refraction": 1.4
     }
   },
   "hair": {
     "id": "83a89fae-6f42-4c80-a86b-dff0ef14e969",
     "color_settings": {
       "melanin": 0.9,
       "redness": 0.2,
       "whiteness": 0.1,
       "roughness": 0.2,
       "index_of_refraction": 1.4
     }
   },
   "eyebrows": {
     "id": "77fa29bd-75c7-43f2-8f5a-522b7918beee",
     "color_settings": {
       "melanin": 0.9,
       "redness": 0.2,
       "whiteness": 0.1,
       "roughness": 0.2,
       "index_of_refraction": 1.4
     }
   },
   "location": {
     "x": 0.0,
     "y": -0.38,
     "z": 0.1
   },
   "rotation": {
     "yaw": 15,
     "roll": 0,
     "pitch": 10
   },
   "expression": {
     "name": "anger",
     "intensity": 0.3
   }
 }

The values above will generate a human head tilted slightly down and to the left, with half-closed brown eyes, black hair with the slightest tinge of red, a buzz-cut and partial beard with black, and wearing a mildly angry expression.

Next
eyes
Previous
id
Copyright © 2022-2023, Datagen
Made with Furo