Human Activity Classification from Accelerometer Data
CNN models classifying and predicting activity levels over time from large-scale accelerometer data, before and after knee surgery
A CNN-based pipeline, built for a University of Auckland research collaboration, classifying and predicting activity levels from large-scale accelerometer datasets of pre- and post-osteoarthritis knee surgery patients.
Problem
Researchers studying recovery from osteoarthritis knee surgery had accelerometer recordings from patients both before and after their procedure, but raw accelerometer signal doesn’t answer a clinical question on its own. Turning continuous motion data into activity levels that could be compared across patients and across time needed a model, not a threshold.
Approach
- CNNs over windowed accelerometer signal, treating activity classification as a pattern-recognition problem on the raw time series rather than hand-engineering features from it first.
- Pre/post comparison as the organising structure, so the same classification pipeline ran on both periods and produced directly comparable activity-level outputs rather than two separately tuned models.
- Prediction over time, not just a single classification per recording, so the output traced how activity levels changed across the recovery window rather than giving one static label per patient.
The dataset’s scale made hand-crafted feature engineering a worse bet than letting a CNN learn directly from the signal. The harder part was keeping pre- and post-surgery data processed identically, so any difference in the output reflected the patient’s recovery and not a quirk of the pipeline.
Result
Working CNN models classifying and predicting activity levels across both pre- and post-surgery accelerometer data, giving researchers a consistent, comparable activity measure across the recovery period rather than raw, unlabelled signal.
What I’d do differently
I’d validate the windowing strategy against a few known-activity reference recordings before running it across the full dataset. The window size interacts with how cleanly an activity gets classified, and that was tuned mostly by iterating on model performance rather than checked against ground truth first.