PoseInsight is an AI-powered movement analysis platform that evaluates exercise form using computer vision, machine learning, deep learning, and generative AI feedback.
The system bridges the gap between raw pose estimation and actionable coaching by transforming human movement into biomechanical insights, exercise classification, repetition counting, movement-quality prediction, injury-risk detection, and Gemini-powered personalized coaching.
PoseInsight deploys an LSTM-based temporal movement quality predictor that analyzes biomechanical feature sequences across time to classify exercise quality beyond frame-level estimation.
PoseInsight supports:
- π₯ Uploaded Video Analysis
- π· Live Webcam Analysis
- π§ ML / DL-based Quality Prediction
β οΈ Injury Risk Detection- π¬ Gemini AI Coaching Feedback
Watch the full live demo here:
PoseInsight Live Demo on YouTube
git clone <your_repo_url>
cd PoseInsight
pip install -r requirements.txt
export GEMINI_API_KEY="your_api_key_here"
streamlit run app.py
PoseInsight/
βββ app.py # Main Streamlit UI
βββ build_dataset.py # Dataset creation pipeline
βββ models_training.ipynb # RF / MLP / LSTM training notebook
βββ requirements.txt
β
βββ core/
β βββ pose_estimator.py # MediaPipe pose engine
β βββ feature_extractor.py # Joint angles + biomechanical features
β βββ classifier.py # Rule-based exercise classification
β βββ rep_segmenter.py # Repetition counting
β βββ quality_predictor.py # LSTM-based temporal quality predictor
β βββ risk_detection.py # Injury risk analysis
β βββ feedback_generator.py # Gemini coaching + risk summary
β
βββ utils/
β βββ draw.py # Pose skeleton overlay
β βββ io_video.py # Upload + webcam processing pipeline
β βββ dataset_writer.py # Dataset export utilities
β
βββ models/
β βββ lstm_quality.pt # Primary deployed model
β βββ random_forest_quality.pkl # Baseline benchmark
β βββ mlp_quality.pt # Experimental benchmark
β βββ model_metadata.json
β
βββ data/ # Good / bad squat + push-up datasets
βββ outputs/ # Processed videos
βββ plots_charts/ # Model comparisons + confusion matrices
βββ project_docs/ # Architecture + reports
Video / Webcam Input
β
MediaPipe Pose Estimation
β
Biomechanical Feature Extraction
β
Rule-Based Exercise Classification
β
Rep Counting + Movement Segmentation
β
LSTM-Based Temporal Quality Prediction
β
Risk Detection
β
Gemini AI Coaching Feedback
β
Interactive Streamlit UI
- MediaPipe BlazePose for real-time landmark extraction
- 33 body landmarks
- Upload + webcam compatible
- Knee angles
- Hip angles
- Elbow angles
- Trunk angle
- Symmetry metrics
- Motion progression
Rule-based baseline detects:
- Squat
- Push-up
- Idle / Unknown
Tracks:
- Squat reps
- Push-up reps
Trained and evaluated:
- Random Forest (baseline)
- MLP (feedforward benchmark)
- LSTM (final deployed temporal model)
Predicted classes:
- Good Squat
- Bad Squat
- Good Push-up
- Bad Push-up
Unlike frame-wise models, LSTM analyzes sequential biomechanical progression over time, enabling more context-aware assessment of movement quality and form consistency.
Examples:
- Forward lean
- Knee asymmetry
- Shallow squat
- Core collapse
- Shoulder strain
Transforms model outputs into:
- Personalized coaching
- Form correction
- Safety recommendations
- Random Forest
- MLP
- LSTM
LSTM is the primary deployed model for real-time and uploaded-video quality prediction due to its ability to capture temporal biomechanical movement patterns across frame sequences.
Random Forest and MLP were benchmarked for comparison, but LSTM best aligns with sequence-aware movement analysis objectives.
- Dataset distribution
- RF / MLP / LSTM comparison
- Confusion matrices
- Training curves
β Upload exercise video β Process full session β Pose overlay β Exercise + reps β Quality prediction β Gemini coaching β Injury risk summary
β Real-time webcam β Fixed-duration movement session β Post-session review β Gemini summary
- Full end-to-end pipeline
- Dataset creation
- RF / MLP / LSTM training
- Uploaded video analysis
- Live webcam analysis
- Quality prediction
- Risk detection
- Gemini AI feedback
- Streamlit deployment
- Larger dataset expansion (Next step)
- FastAPI backend (Next step)
- Docker deployment (Next step)
All processing is intended for local execution to reduce exposure of personal video data.
PoseInsight is an assistive educational system and should not replace:
- Medical diagnosis
- Physical therapy
- Professional coaching
Future improvements include:
- Broader body-type robustness
- Lighting robustness
- More exercise classes
- Larger datasets
- Limited labeled dataset
- Frame-level pose noise
- Rule-based baseline limitations
- Limited labeled sequence data can impact LSTM temporal generalization
- Webcam variability
- FastAPI backend
- Docker deployment
- Expanded dataset
- Multi-exercise support
- Expanded labeled dataset for stronger LSTM and Transformer-based temporal learning
- Mobile deployment
- Real-time corrective audio coaching
Course: Applied Deep Learning University: University of Florida Instructor: Andrea Ramirez-Salgado
Satyabrata Das M.S. Artificial Intelligence Systems University of Florida satyabradas@ufl.edu
