How SwayLab works

Everyone sways a little when standing still. How much, and how fast, says something about balance. SwayLab measures that sway with a webcam.

The pipeline

  1. Track the body. A pose model (MediaPipe Pose Landmarker) finds 33 body points in every video frame. It runs in a Web Worker inside your browser.
  2. Estimate the centre of mass. Each body segment gets its share of body mass from a standard table (Dempster, via Winter). The weighted average is the centre of mass.
  3. Clean the signal. Frames are moved onto an even 30 Hz grid, the average position is removed, and jitter above 5 Hz is filtered out with a zero-phase Butterworth filter.
  4. Measure the sway. Path length, RMS, speed, range and the 95% ellipse area. All in % of body height, because a webcam has no ruler.

Quality checks

A test only runs while all of these hold. If one fails for more than half a second, the test stops and you repeat it.

Every result shows the measured frame rate and the number of dropped frames, so you can judge the recording yourself.

What it cannot do

Privacy

The pose model and all of its files are served from this site and run on your device. No video, image, pose data or result is uploaded. The site counts page views without cookies and nothing else. Close the tab and your results are gone.

Background

I am Krushal Kalkani. During my MS in Computer Science at Florida Atlantic University I worked on a portable balance system built on a depth camera, and co-authored the paper that validated it against a laboratory motion-capture system:

V. G. Sonar, V. Agrawal, K. Kalkani, J. Hashemi, A. Pandya. "Development, Reliability, and Validity Assessment of a Portable 3D Camera-Based System for Quantifying Postural Sway and Balance." Sensors (MDPI), 2026. doi.org/10.3390/s26133987

SwayLab is a separate, personal project. It shares no code or data with that work. The paper's system had a depth sensor and a lab validation. SwayLab has neither, and this site tries to be exact about what that costs.

Sources