How aman05cody/repsense---ai-gym-coach works
RepSense is a Streamlit workout coach: a user creates a profile, chooses an exercise and targets, then trains in front of a camera while pose-based detectors count reps and report form metrics. The app synchronizes progress, records completed sets, and presents workout history; coaching feedback can be generated by Groq and spoken aloud. The graph preserves all five exercise detectors and the shared exercise abstraction. Main-to-runtime wiring beyond the shown excerpt is marked unverified where necessary; documented product capabilities are retained without implying unsampled calls.
Main entry points: exercise_video_processor.py Video processor · main.py Streamlit dashboard · metrics.py Metrics and set sync · base_exercise.py Exercise abstraction
Components 22
Workout app
- Streamlit dashboard
main.py - Session defaults
services/state/session_defaults.py - Theme and styles
services/ui/style_loader.py
Pose analysis
- Video processor
services/vision/exercise_video_processor.py - Pose landmarker
ml_models/pose_landmarker_full.task - Exercise abstraction
core/base_exercise.py - Squat detector
detectors/squat.py - Push-up detector
detectors/pushup.py - Biceps curl detector
detectors/biceps_curl.py - Shoulder press detector
detectors/shoulder_press.py - Lunge detector
detectors/lunges.py
Workout tracking
- Workout configuration
services/config/workout_config.py - Metrics and set sync
services/tracking/metrics.py
AI coaching
- Voice pipeline
services/coaching/voice_pipeline.py - LLM coach
services/coaching/llm.py - Speech synthesis
services/coaching/tts.py
Profiles and history
- Login wall
services/auth/login_wall.py - Exercise repository
services/persistence/exercise_repository.py - Workout database
Other components
- Athlete
- Browser camera
- Groq API
Connections 32
- Athlete → Streamlit dashboard: uses
README.md - Streamlit dashboard → Login wall: renders login
main.py - Login wall → Exercise repository: gets or creates profile
services/auth/login_wall.py - Streamlit dashboard → Exercise repository: initializes and reads history
main.py - Exercise repository → Workout database: reads and writes
services/persistence/exercise_repository.py - Streamlit dashboard → Session defaults: initializes state
main.py - Streamlit dashboard → Theme and styles: loads styling
main.py - Streamlit dashboard → Workout configuration: uses exercise options
main.py - Browser camera → Video processor: streams frames
README.md - Streamlit dashboard → Video processor: starts video processing
main.py - Video processor → Pose landmarker: loads pose model
services/vision/exercise_video_processor.py - Video processor → Workout configuration: uses pose connections
services/vision/exercise_video_processor.py - Video processor → Squat detector: dispatches by exercise
services/vision/exercise_video_processor.py - Video processor → Push-up detector: dispatches by exercise
services/vision/exercise_video_processor.py - Video processor → Biceps curl detector: dispatches by exercise
services/vision/exercise_video_processor.py - Video processor → Shoulder press detector: dispatches by exercise
services/vision/exercise_video_processor.py - Video processor → Lunge detector: dispatches by exercise
services/vision/exercise_video_processor.py - Squat detector → Exercise abstraction: inherits from
detectors/squat.py - Push-up detector → Exercise abstraction: inherits from
detectors/pushup.py - Biceps curl detector → Exercise abstraction: inherits from
detectors/biceps_curl.py - Shoulder press detector → Exercise abstraction: inherits from
detectors/shoulder_press.py - Lunge detector → Exercise abstraction: inherits from
detectors/lunges.py - Streamlit dashboard → Metrics and set sync: syncs progress
main.py - Metrics and set sync → Video processor: reads latest metrics
services/tracking/metrics.py - Metrics and set sync → Workout configuration: selects metric fields
services/tracking/metrics.py - Metrics and set sync → Exercise repository: saves completed sets
services/tracking/metrics.py - Streamlit dashboard → Voice pipeline: creates coaching pipeline
main.py - Metrics and set sync → Voice pipeline: requests event feedback
services/tracking/metrics.py - Voice pipeline → LLM coach: requests feedback
services/coaching/voice_pipeline.py - Voice pipeline → Speech synthesis: synthesizes speech
services/coaching/voice_pipeline.py - LLM coach → Workout configuration: uses coaching prompt
services/coaching/llm.py - LLM coach → Groq API: sends chat request
services/coaching/llm.py