How nagarjun00/ai-squat-analysis works
SquatLab turns an uploaded side-view squat video into per-frame movement evidence, repetition summaries, and citation-grounded coaching findings. The main workflow runs from browser upload through FastAPI validation and orchestration, computer-vision tracking, then skill-based assessment and structured results. The frontend presents findings alongside a synchronized video overlay; users can also inspect the active standards. The graph includes the documented Ollama and Gemini options and deterministic fallback. Source excerpts establish backend calls and data contracts; some frontend-to-API wiring is supported by the README rather than shown source excerpts.
Main entry points: skill_agent.py Assessment agent · page.tsx Upload and findings · main.py Analysis API · cv_pipeline.py Tracking and reps
Components 13
Consumer interface
- Upload and findings
frontend/src/app/page.tsx - Video overlay
frontend/src/components/AnnotatedVideoPlayer.tsx
Analysis service
- Analysis API
backend/main.py - Video intake
backend/main.py - Tracking and reps
backend/cv_pipeline.py - Evidence schemas
backend/models.py
Coaching assessment
- Assessment agent
backend/skill_agent.py - Rule fallback
backend/skill_agent.py
Movement standards
- Squat standards
skills/squat_standards.md
Other components
- Lifter
- Ollama
- Google Gemini
- Uploaded video
Connections 15
- Lifter → Upload and findings: uploads video
README.md - Upload and findings → Analysis API: requests analysis
README.md - Analysis API → Video intake: validates and stages
backend/main.py - Video intake → Tracking and reps: analyzes video
backend/main.py - Analysis API → Assessment agent: assesses evidence
backend/main.py - Tracking and reps → Evidence schemas: builds evidence
backend/cv_pipeline.py - Assessment agent → Evidence schemas: reads evidence and returns findings
backend/skill_agent.py - Assessment agent → Squat standards: loads rules
README.md - Assessment agent → Ollama: queries optionally
README.md - Assessment agent → Google Gemini: queries optionally
README.md - Assessment agent → Rule fallback: uses when unavailable
backend/skill_agent.py - Analysis API → Upload and findings: returns analysis
README.md - Upload and findings → Video overlay: presents tracked video
README.md - Uploaded video → Video overlay: plays with annotations
frontend/src/components/AnnotatedVideoPlayer.tsx - Upload and findings → Squat standards: offers skill inspection
README.md