Offline first
The app is self-contained: BlazePose and the rest of the pipeline run on the phone, with no cloud round-trip. That removes network latency, so the counter can stay in time with the movement, in the gym or anywhere without a signal.

Honours Project | Mobile cross-platform
A novel mobile application capable of automatically detecting and counting workout exercise repetitions using only a mobile smartphone and its camera. Engineered with an on-device pipeline, it empowers users to track physical performance without reliance on external wearables.
Automated exercise repetition counting (AERC) systems traditionally rely on physical wearables or computationally heavy cloud-based Computer Vision (CV) models that suffer from network latency. The engineering challenge was to build an AERC system capable of running entirely offline and in real-time on a computationally limited smartphone. This required processing live video from a front-facing camera to accurately track complex human movements across various body types, angles, and lighting conditions without draining device resources.
To process video input on a frame-by-frame basis without remote servers, we engineered a custom 5-component architecture:
1 / Pose Detection
Utilises Google's lightweight BlazePose Convolutional Neural Network (CNN) to extract a 33-point 2D skeleton from the video feed in real-time.
2 / Thresholding
Applies the mathematical cosine rule to the coordinate data to calculate internal joint angles, categorising the user's real-time movement phase against predefined exercise thresholds.
3 / Optical Flow
Acts as a fallback mechanism utilising Lucas-Kanade Sparse Optical Flow. If the pose model loses confidence, it tracks pixel movement direction to maintain system state.
4 / State Machine
Evaluates the movement phase to determine the exact exercise moment.
5 / Counter
Increments the user's repetition count only upon the successful completion of a full state cycle.
Current Image
Previous Image
1 / Pose Detection
Utilises Google's lightweight BlazePose Convolutional Neural Network (CNN) to extract a 33-point 2D skeleton from the video feed in real-time.
As a mobile engineer, deploying a Python-based ML prototype into a consumer-ready application required solving several platform-specific challenges. The application, named Pūioio, was built using Flutter to ensure cross-platform availability on both the Google Play Store and Apple App Store from a single codebase.
The app is self-contained: BlazePose and the rest of the pipeline run on the phone, with no cloud round-trip. That removes network latency, so the counter can stay in time with the movement, in the gym or anywhere without a signal.

A custom camera view paints a 2D skeleton on the live feed without blocking the UI thread. A phase tracker on the right shows depth: top, moving, or bottom.

Inspired by a te reo Māori word.
Pūioio
(verb) to be strong, tough, hard, muscular.
Onboarding covers the exercise carousel, rep target, and a 10-second setup countdown. If pose confidence drops, the workout pauses with a 'We've lost you!' warning and resumes when the user is back in frame.

A common flaw in workout tracking is counting "half-reps" or bad form. We designed a strict, unidirectional state machine that prevents backward transitions. If a user fails to reach the required joint angle threshold (e.g., squatting to ≤130° internal knee angle), the state machine halts. The user is mathematically required to complete the full sequence to earn the repetition, ensuring data integrity.
To achieve real-time CV performance on a mobile device, we strictly avoided multi-modal heavy architectures. We utilised a lightweight CNN and implemented a battery-saving pause feature: if the in-frame pose confidence falls below a 0.75 threshold for more than 1.5 seconds, the system dynamically halts inference and state transitions until the user is confidently relocated.
Raw pose estimation data is inherently jittery, leading to false positives. To stabilise the input, we implemented a sliding window algorithm to average movement phases across multiple frames. By tuning the sliding window size to 1 for thresholding and 3 for optical flow, we successfully filtered out anomalous sensor noise without introducing UI lag.
98.89%
Real-world accuracy
1st Place
AI & Machine Learning category at UoA (2022)
100%
Off-by-one accuracy for squats and push-ups