back

SEAMLEGS

Smart Legwear for Exercise Categorization

Timeline

January 2025 - May 2025 (Research ongoing)

Contributions

Built ML pipeline from scratch. Ran user tests on prototype. Collected data and performed EDA

Important Note

SeamLegs is an ongoing research. SeamLegs is adapted from SeamFit: Towards Practical Smart Clothing for Automatic Exercise Logging for lower leg exercises.

Project Snapshot

SeamLegs is smart pants woven with eight capacitive-thread sensors that identify 12 lower-body exercises. Multiple classifiers were tested with our best model reaching 89% accuracy on 150 annotated trials, proving that textile sensing can rival bulkier wearables while remaining comfortable.

Approach

System Design

motivation
hardware

Machine Learning

data collection
EDA
data pre-processing
feature engineering
models

Next Steps

research in progress

System Design

Motivation

Current motion tracking solutions are either too expensive (think specialized labs) or too intrusive (bulky IMU sensors strapped to your body). SeamLegs solves this by integrating capacitive sensing threads into normal leggings, giving you accurate full-body motion data without any of the usual drawbacks.

Hardware

Hardware was provided by Tianhong Catherine Yu, the first name author of SeamFit.

SeamLegs Hardware Setup

Eight insulated capacitive threads are stitched along outer seams and around key joints, connected to a Seeed XIAO nRF52840 microcontroller and dual TI FDC2214 converters sampling at 30 Hz.

Machine Learning

Data Collection

Three participants performed five rounds of each exercise, yielding 150 one-minute recordings aligned with video for ground-truth labeling through Vidat.

Participant 1Participant 2Participant 3

Walking

Walking 1Walking 2Walking 3

Lunges

Lunges 1Lunges 2Lunges 3

EDA

We looked at the raw capacitive thread signals through the naked eye, recognizing patterns.

Exploratory Data Analysis

Clear patterns:

  • Walking up & down stairs
  • Squatting
  • Side Shuffles
  • Sitting Down

Contrary to what we expected:

  • Squats were very different from sitting down
  • Jumping jacks, walking, and jogging produce similar patterns

Data Pre-processing

Recognized that we were getting incorrect readings because of a hardware issue.

Data Pre-processing Issue

Filtering Attempted

  • We tried a moving average filter, but it only “smudged” the outliers, not get rid of them.
  • We ended up using an interquartile range to remove outliers
Data Pre-processing Solution

Feature Engineering

Windowing:

  • 1s windows at 30 Hz with 50% overlap to preserve temporal detail while boosting sample count.

Per-sensor statistics (11 x 8 = 88 features):

  • Central tendency & spread: mean, std, variance, median, range
  • Extrema: max, min, absolute-max
  • Dynamics: zero-crossing count, mean absolute first difference
  • Intensity pattern: smoothed peak count (captures bursty motions)

Label-aware selection pipeline:

  • Top-20 by ANOVA F-score
  • Top-20 by mutual information
  • Top-20 via Recursive Feature Elimination with a 100-tree Random Forest

Models

Model Results

The Random Forest model performed the best at 88.6% overall accuracy, with a macro-F1 of 0.87 using 10-fold cross validation.

Next Steps

Research in Progress

There's a few more things we're working on:

  • Re-engineer SeamLegs to start the sensor from the back panel, reducing connection issues
  • Record new datasets with the updated design, ensuring user-independence and session-independence