STAG — Sensor-based Tracking and Analysis of Gait
An unsupervised machine-learning pipeline for classifying farmed red deer (Cervus elaphus) behaviour from wearable tri-axial accelerometer data.
STAG discovers prototypical movement patterns directly from sensor streams using k-means clustering, chains them into higher-order behavioural sequences via a first-order Markov transition model, and runs on a 16 MHz microcontroller at over 4 × 10⁸ classifications per second.
Contents
- Installation
- Usage
- Pipeline
- API Reference
- stag.constants — Project-wide constants, paths and palettes
- stag.local_paths — Machine-specific path resolver
- stag.sync — Sensor synchronisation
- stag.database — Database models and ingestion
- stag.gps — GPS trajectory analysis
- stag.clustering — k-means clustering and evaluation
- stag.analysis — Behavioural sequence analysis
- stag.embedded — Bare-metal Q4.12 nearest-centroid classifier
- stag.utils — Cross-cutting helpers
- Contributing