Real-time movement feedback and guided physical therapy sessions powered by computer vision and a custom pose classification neural network.

Demo Video
See It In Action
Watch how the system works in real-time, demonstrating key features and functionality.
- Custom pose classification MLP with 34-value landmark embedding
- Translation and scale invariant preprocessing
- Real-time movement analysis at 30+ FPS
- Intelligent feedback state machine
About the Project
GoodForm AI is an innovative concept for AI-assisted physical therapy that provides real-time movement feedback during exercise sessions. The system uses a custom-built pose classification neural network to analyze user movements and provide instant corrections to ensure proper form.
Technical Architecture
Pose Classification Model
The core of GoodForm is a fully connected neural network (MLP) that classifies human poses from landmark data. Each input contains 17 body landmarks with x, y coordinates and confidence scores (51 total values).
Preprocessing: LandmarksToEmbedding
A custom TensorFlow layer converts raw landmarks into a stable 34-value embedding: • Reshape: [51] → [17, 3] to separate each landmark • Slice: Remove confidence scores, keeping only (x, y) → [17, 2] • Normalize: Apply translation and scale invariance • Flatten: Produce final [34] embedding
Landmark Normalization
The normalization step ensures the model generalizes across different camera positions and subject distances: • Translation invariance: Center pose at (0, 0) using hip midpoint • Scale invariance: Normalize by pose size (max of torso×2.5 or max landmark distance)
MLP Classifier
Dense(128, ReLU6) → Dropout(0.5) → Dense(64, ReLU6) → Dropout(0.5) → Dense(N, Softmax)
ReLU6 caps activations at 6 for numerical stability. Dropout (50%) prevents overfitting during training.
Training Setup
• Optimizer: Adam • Loss: Categorical Cross-Entropy • Metric: Accuracy
Runtime Pipeline
- Camera → RGB frames
- Pose Estimator → 17 landmarks with confidence
- LandmarksToEmbedding → 34-value normalized embedding
- MLP Classifier → Softmax probabilities
- Post-processing → Confidence gating + temporal smoothing
- UI → Real-time feedback, rep counting, progress tracking
Feedback System
The app implements a state machine for intelligent feedback: • NoPose: No pose detected • Tracking: Landmarks stable, monitoring • Classified: Pose identified with confidence • Hold: Detecting hold duration for static poses • Correction: Form deviation detected, showing guidance • RepCount: Counting repetitions for dynamic exercises
The platform was designed to support both individual users and integration with healthcare providers, enabling clinicians and coaches to monitor patient progress remotely.
Technical Architecture
Click any diagram to view full size
Key Features
- 01Custom pose classification MLP with 34-value landmark embedding
- 02Translation and scale invariant preprocessing
- 03Real-time movement analysis at 30+ FPS
- 04Intelligent feedback state machine
- 05Progress tracking and milestone system
- 06Clinician/coach integration support
- 07Rep counting and hold detection
- 08Confidence-gated predictions with temporal smoothing