For the complete documentation index, see llms.txt. This page is also available as Markdown.

Key Points and Meshes

Named landmarks and dense 3D surfaces on an object

Some abilities do not answer with a box but with a set of points: the joints of a body, the eyes and ears of a face, the hundreds of vertices of a face's surface. Named landmarks come as key points, dense surfaces as meshes.

Key points

A body-points ability run on a person returns the person's joints, each a named point in the frame:

The person in the lobby with 17 dots on her nose, eyes, ears, shoulders, elbows, wrists, hips, knees and ankles, joined into a stick figure
The 17 key points of eyepop.person.2d-body-points:latest. The person is generated.

(The response lists all 17 points; five are shown.)

keyPoints is a list of groups. Each group is one set of landmarks that belong together, such as one body's skeleton or one face's features, with its points in points. The order of the points within a group is fixed by the ability, so the same index always names the same landmark.

Key
Type
Meaning

confidence

number

How certain the model is of the group as a whole

category

string

The group's category, when the Pop or ability names one

points

array

The landmarks

Each point:

Key
Type
Meaning

classLabel

string

Which landmark: nose, left shoulder, right ankle

confidence

number

How certain the model is of this landmark

x, y

number

Its position, in source pixels like every other position

z

number

Its depth relative to the other points of the group, when the ability estimates one

Left and right are the subject's own. The person's left shoulder above is at x 629, on the right side of the image, because she faces the camera.

Depth of a key point

A 3D body-points ability adds a z to each point:

z places the points of one group relative to each other, in the model's own scale: here the hips are near 0, and the nose, which is closer to the camera, is at -283. It is not a distance from the camera and not in meters; compare z values only within one group. For positions in meters, see Depth and World Coordinates.

Meshes

A mesh is a dense set of 3D points covering a surface. A face mesh ability run on a face returns 478 of them:

(Two of the 478 points are shown.)

Key
Type
Meaning

confidence

number

The model's score for the mesh. Its scale is the model's own and is not limited to 0–1

category

string

The mesh's category, when the Pop or ability names one

points

array

The vertices, each with x, y and z

Mesh points have no names. Like key points, they come in a fixed order, so the same index is the same spot on the face in every frame. x and y are source pixels and z is relative depth, as for key points.

Example: shoulder width in pixels

Because points are named, measuring between landmarks is a lookup and a subtraction:

The distance is in pixels of the image. A person farther from the camera has narrower shoulders in pixels; for a measurement in meters, use world coordinates.

Next steps

Last updated