SWATE — A multi-camera 3D human tracking system
Design and implementation of a real-time system for multi-person 3D tracking from synchronised cameras, with a focus on accuracy, performance, and robustness.
Table of contents
Overview
SWATE (Socially-Aware AI for Teamwork Enhancement and Training) is a multi-camera 3D human tracking system that reconstructs and tracks several people in real time as 3D skeletons from synchronised USB cameras. It combines multi-view pose estimation, geometric triangulation, and identity tracking to produce consistent 3D trajectories, and is used as the perception backend for a collaborative training platform.
This post covers the system’s design, the main implementation details, and the lessons learned from building and deploying it.
System design
The goal is to estimate the 3D pose of multiple people in a shared space using calibrated cameras and to maintain consistent identities over time. The system is organised as a real-time pipeline with three main stages, shown in Figure 1.
- Multi-view pose estimation
- 3D reconstruction (triangulation)
- Tracking (identity & smoothing)
Multi-view setup
We use a set of USB cameras placed around the scene, synchronised via a common clock. Each frame is processed independently by a 2D pose estimation modelSidenote:In practice, we use a TensorRT-accelerated version of a YOLO-Pose model, which allows us to run the entire pipeline at ~30 FPS on a single GPU. to detect keypoints, which are then associated across views and triangulated to obtain 3D positions.
# Per-frame pipeline (simplified)
keypoints = [model.infer(frame) for frame in frames]
tracks = associate_keypoints(keypoints)
poses_3d = triangulate(tracks, cameras)
smoothed = tracker.update(poses_3d)Pose estimation
Every camera produces a list of 2D skeletons per frame, each keypoint with a confidence score. Before anything can be triangulated, the detections have to be matched across viewsSidenote:By “multi-view” we mean cameras with overlapping fields of view, enabling triangulation of 3D keypoints from their 2D detections.: which skeleton in camera is the same person as which skeleton in camera ? We score each candidate pair by the symmetric epipolar distance between their keypoints, using the fundamental matrix between the two cameras:
A low distance means the two detections are consistent with a single point in space.
3D reconstruction
Each matched group of detections is triangulated with a confidence-weighted DLT: every camera contributes two linear constraints per keypoint, scaled by the detector’s confidence , and the 3D point is the least-squares solution
Weighting by confidence lets a camera with a clear view outvote one where the person is half occluded.
Implementation
Camera calibration
Triangulation is only as good as the calibration. I wrote a small calibration library that places every camera in one shared 3D space: intrinsics come from ChArUco boards, with MAD-based outlier rejection on the per-view reprojection errors, and extrinsics from pairwise stereo calibrations chained over a spanning tree of the cameras, with loop-closure checks to catch a bad pair. A RANSAC fit of the floor plane then gives the scene a sensible “up”.
Tracking and identity
Identities have to stay stable as people move around and cross paths. Position-based tracking handles the easy cases; when two people come close, appearance re-identification breaks the tie by comparing hue–saturation histograms of each person with the Bhattacharyya distance. Joint positions are smoothed with a One Euro filter, which removes jitter when someone stands still without adding lag when they move quickly.
Optimisation
The whole loop has to fit in a frame budget. The pose model runs through TensorRT, and the geometry (matching, triangulation, filtering) is vectorised so that its cost stays small next to inference.
Results
The system runs live as a desktop app (Tauri and React, with a FastAPI backend) that shows every tracked person as a 3D skeleton in a Three.js viewer, at around 30 frames per second on a single GPU.
Takeaways
- Calibration quality bounds everything downstream; checking it (loop closure, outlier rejection) paid off more than any later tuning.
- Weighting by detector confidence is a cheap way to make triangulation robust to occlusion.
- Identity tracking needs both geometry and appearance: either alone fails when people cross paths.