Skip to content

Body Pose Recognition

Body pose workflow

Every step of a Body pose project in Studio, from turning on the camera to a deployed pose model.

Try it in Studio
On this page
  1. 1Create projectMotion → Camera → Body pose
  2. 2Connect cameraAllow camera access
  3. 3Collect dataRecord takes
  4. 4Label classesCheck labels and split
  5. 5Create impulseHeld pose or movement
  6. 6TrainGenerate features, then train
  7. 7EvaluateScores on unseen takes
  8. 8Test liveYour webcam, in real time
  9. 9DeployTFLite package
A Body pose project, step by step

This page uses an exercise example: squat, jumping jack and idle (standing still). Each heading below matches a step in Studio.

1. Create the project

  1. Open the menu under your profile picture and choose Create new project.
  2. Type a Project name, for example Home workout.
  3. Choose Motion: Gesture Recognition.
  4. Under Input source, choose Camera. You cannot change the input source later.
  5. Under What will you track?, choose Body pose.
  6. Select Create Project.

Studio opens the project on its dashboard. Camera projects have no Devices step: everything is recorded in the browser.

2. Connect the camera

  1. Open Data acquisition. The page is called Capture: Body pose.
  2. The first time, Studio explains what is saved. Read it and select Got it.
  3. In the Tracking card, choose the Framing: Full body for exercises and standing poses, Upper body for desk posture and arm movements. Choose the tracking model: Full (more accurate) or Lite (faster). Set these before you start the camera.
  4. Select Start camera, and allow camera access when your browser asks.
  5. Step back until your body fills the dashed outline and the status reads Body tracked.

3. Collect data

Each recording is a take. Record many short takes per pose or movement.

  1. Under Take setup, type a Label, for example squat. Studio suggests labels you have used before.
  2. Choose the Capture intent: Hold pose for a position you hold, or Movement for an exercise.
  3. Check the Take length: 3 s for a hold and 5 s for a movement by default. Any length from 2 to 20 s works. For a movement, make the take long enough for one or two full repetitions.
  4. Select Record take, or press Space. The 3-second countdown (Get ready) gives you time to step back into place.
  5. Do the pose or movement until the take ends.

Each take appears in the takes list with its duration, Valid frames and Frame rate. A good take is saved automatically. A take with a problem waits for you: select Save, Discard or Record again.

Aim for at least 10 takes per label. Vary your position a little between takes: stand slightly to the left or right, and turn a few degrees.

Sessions and the test split

Takes are grouped into sessions. Takes from one sitting look alike, so for a fair test:

  1. Record every label in your first session with Split on Auto. Studio puts about one take in five of each label into the testing set.
  2. Later, select New session, change something (the light, your clothes, the person or where the camera stands), set Split to Testing, and record each label a few more times.

Import landmark CSVs instead

You can import pose landmarks recorded elsewhere. Open Data labeling, type a Label for imported CSV and select Import landmark CSVs.

  • Studio's own format works: timestamp, then pose_00_x, pose_00_y, pose_00_z, pose_00_v up to pose_32_v.
  • Exports from other pose tools also work when their columns are named by joint, for example nose_x or left_shoulder_visibility, or by number, for example landmark_11_x. Both shoulders and both hips must be present.
  • The rows must be 33 ms apart (30 rows per second), with at least 15 rows. Studio does not resample imported files.

Video files can't be imported.

4. Label classes

Open Data labeling (the Dataset: Body pose page) to check your data:

  • Class distribution shows how many takes each label has. Keep the labels roughly balanced.
  • The Recording sessions table lists every take, on a Training tab and a Testing tab. Select a take to replay its skeleton and check it.
  • To fix a label, choose a different one for that take. To remove a bad take, delete it.
  • Takes move between Training and Testing a whole session at a time, with Move session to Training/Testing. Rebalance train / test moves takes until each label is about 80 % training and 20 % testing.

Every label needs at least 3 takes so it can be trained, validated and tested.

5. Create impulse

Open Create impulse. A Body pose impulse is camera landmarks in, a Landmarks processing block, and a learning block.

  1. Under What do you want to recognize?, choose:
    • A held pose for postures. Studio uses a Dense learning block and a 1000 ms window.
    • A movement for exercises. Studio uses a Conv1D learning block and sets the window to the typical length of your movement takes.
  2. Check Window and Stride. The window must be at least 500 ms, and should cover one repetition of a movement.
  3. Select Save Impulse.

Then open the Landmarks block in the menu:

SettingWhat it doesDefault
Landmark subsetWhich joints to use: Full body (33), Body (no face) or Upper bodyBody (no face)
Summary of the windowAverages the landmarks over the window, optionally with how much they jitterAverage
Frames per windowHow many moments of a movement the model sees (movement only)20
Include velocityAdds how fast each joint moves (movement only)Off
Use depth (z)Adds the depth estimate. It is noisy from one cameraOff
Include joint visibilityAdds how visible each joint isOn

Select Save parameters, then on Generate features select Generate features.

6. Train

Open the learning block in the menu, check the training settings, and select Start training. Studio holds back whole takes for validation, so the scores show how the model handles takes it has never seen.

7. Evaluate

Open Evaluation. Next to the usual scores and confusion matrix, the card How these scores were measured tells you whether the model was Tested on unseen takes, and shows accuracy per label and per test session.

Watch for these warnings:

  • No testing data: the scores were measured on training data. Record more takes and move a session to Testing.
  • Only one test take for a label: record more takes of that label.
  • Capture sessions in both training and testing: the score may be too optimistic. Test on a separate session.

Model testing runs the model on every take in the testing set.

8. Test live

  1. Open Live classification and select Start live classification.
  2. Step into view and do your poses or exercises. The panel shows each label's share of recent windows, plus Unknown.
  3. For movements, Studio counts each recognised movement this session, so you can see repetitions add up.
  4. The Latest window card shows whether the pose was Recognized, Uncertain or Unknown, and the model's best guess.
  5. Use Minimum confidence to make the model stricter (higher) or more willing to answer (lower). It starts at a value Studio calibrated during training.

9. Deploy

Open Deployment. A Body pose model is built as a Generic TFLite .pe package.

The package expects prepared landmark windows as input, not camera frames. Your app runs body tracking itself, prepares the landmarks the same way Studio does (30 rows per second, 132 values per row), and passes each window to the package, which returns the pose. The package includes the normalisation and the unknown rule.

What next?