AI-Powered Exercise Analysis Platform
Transform your workouts with AI-powered form analysis using Computer Vision and GPT-4.
# Clone and setup
git clone https://github.com/Jonnydevp/FitPose.git && cd FitPose
# Backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # Add your OPENAI_API_KEY
python main.py
# Frontend (new terminal)
cd src/frontend && npm install && npm run devOpen: http://localhost:5173
- Frontend: React + Vite + Tailwind CSS
- Backend: FastAPI + OpenAI GPT-4 + MediaPipe
- Deploy: Vercel + Railway
User → Frontend (React) → Backend API (FastAPI) → CV Processing → AI Analysis
- Video Upload - user uploads video through web interface
- Video Processing - VideoProcessor extracts movement vectors using MediaPipe
- AI Analysis - vectors are sent to OpenAI for technique analysis
- Results - user receives detailed feedback
- AI exercise form analysis
- Real-time video processing
- Support for multiple exercise types (squats, push-ups, pull-ups)
- REST API with interactive documentation
- Modern responsive UI
GET /healthPOST /api/v1/analyze-exercise
Content-Type: multipart/form-data
file: [video file]# .env
OPENAI_API_KEY=your_openai_api_key_heresource .venv/bin/activate
uvicorn main:app --reload --host 0.0.0.0 --port 8000cd src/frontend
npm run devFor production builds on Vercel, set:
VITE_API_URL=""Then add a Vercel Rewrite (Project Settings → Routing → Rewrites):
- Source:
/api/(.*) - Destination:
https://your-railway-url.up.railway.app/api/$1
With this setup the frontend calls relative paths (same-origin), and Vercel proxies /api/... to Railway. If you prefer not to use rewrites, set VITE_API_URL to https://your-railway-url.up.railway.app instead.
One-Click Deploy:
Manual: See docs/DEPLOYMENT.md
FitPose/
├── main.py # FastAPI entry point
├── requirements.txt # Python dependencies
├── .env.example # Environment template
├── src/
│ ├── backend/ # FastAPI application
│ │ ├── api/ # REST endpoints
│ │ ├── core/ # Configuration
│ │ ├── models/ # Data schemas
│ │ └── services/ # Business logic
│ ├── cv/ # Computer Vision (MediaPipe)
│ ├── ml/ # AI Analysis (OpenAI)
│ └── frontend/ # React application
├── docs/ # Documentation
│ ├── README.md # Detailed setup guide
│ └── DEPLOYMENT.md # Production deployment
└── .github/workflows/ # CI/CD pipeline
- Fork the repository
- Create feature branch:
git checkout -b feature/name - Commit changes:
git commit -m 'Add feature' - Push branch:
git push origin feature/name - Open Pull Request
MIT License - see LICENSE