Facial keypoints (iBUG)#

Overview#

The ground truth exposed in this modality is a set of facial landmarks that conforms to the standard created by the Intelligent Behavior Understanding Group (iBUG).

This modality consists of the following files:

Relevant file

Location

face_standard_key_points.json

key_points folder

all_key_points.json

key_points folder

face_standard_key_points.json#

This file contains the locations of 68 landmarks on the face of the generated human subject in the scene. These keypoints conform to the iBUG facial landmark standard.

../_images/iBUG_landmarks.jpeg

The locations of the 68 facial landmarks developed by iBUG. Source: https://ibug.doc.ic.ac.uk/resources/facial-point-annotations/#

The file has the following format:

{
    "version": "2.0.1",
    "face": {
        "standard": {
            // 68 keypoints defining the contours of the face
        }
    }
}

Objects and fields:

  • version: String. Version tracking for this file. Whenever you access this file in a datapoint, make sure to check that the version matches what you expect it to be; otherwise its format and fields may not be recognized.

  • standard: Object. This object contains 68 objects, each identifying a specific keypoint on the face. The keypoint objects are named “01” through “68”, and each one has the same format:

    "07": {
       "global_3d": {
          "x": 0.009309491142630577,
          "y": -0.043830640614032745,
          "z": 0.07293474674224854
       },
       "pixel_2d": {
          "x": 76.14936946250384,
          "y": 45.153700579797146
       },
       "is_visible": "true"
    
    • global_3d: Object. Contains a set of three Floats giving the location of the keypoint in global coordinates: “x”, “y”, and “z”. See About our coordinate systems for details.

    • pixel_2d: Object. Contains a set of two Ints giving the x and y coordinates of the keypoint in the rendered image itself. See About our coordinate systems for details.

    • is_visible: Boolean. Indicates whether the keypoint is visible in the images produced by this camera. The value of this field is false if the keypoint is outside the frame or is on the other side of the body from the camera. Otherwise the value is true, even if there is another object between the keypoint and the camera.

Using this ground truth, you can train your model to recognize individual facial landmarks and trace the outline of important parts of the face. See https://github.com/DatagenTech/dgutils/blob/master/Notebooks/005_facial_keypoints_bounding%20_box.ipynb for some examples on how to work with facial landmarks.

all_key_points.json#

For convenience, this file includes the same set of keypoints as face_standard_key_points.json above, located at this position in the hierarchy:

{
    "face": {
        "standard": {
            // 68 keypoints defining the contours of the face
        }
    }
}

For details on the structure of the keypoint objects, see face_standard_key_points.json above.