This application is designed to provide real-time feedback on exercise form using computer vision and machine learning techniques. It consists of a backend server that processes video input and a frontend interface that allows users to interact with the system.
├── README.md
├── .gitignore
├── src
│ ├── feedback_ai.py
│ ├── form_checkers
│ │ ├── __init__.py
│ │ ├── _utilityFunctions.py
│ │ ├── benchpress_formChecker.py
│ │ ├── bentOver_FormChecker.py
│ │ └── squat_formChecker.py
│ ├── frontend
│ │ ├── eslint.config.mjs
│ │ ├── next.config.ts
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── postcss.config.mjs
│ │ ├── public
│ │ ├── src
│ │ │ └── app
│ │ │ ├── components
│ │ │ │ ├── countdown.tsx
│ │ │ │ ├── exercise-video.tsx
│ │ │ │ ├── formChecker_button.tsx
│ │ │ │ ├── navbar.tsx
│ │ │ │ └── webcam-feed.tsx
│ │ │ ├── exercises
│ │ │ │ ├── bench-press
│ │ │ │ │ ├── form_checker
│ │ │ │ │ │ └── page.tsx
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── bent-over-barbell-row
│ │ │ │ │ ├── form_checker
│ │ │ │ │ │ └── page.tsx
│ │ │ │ │ └── page.tsx
│ │ │ │ └── squat
│ │ │ │ ├── form_checker
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── globals.css
│ │ │ ├── layout.tsx
│ │ │ └── page.tsx
│ │ └── tsconfig.json
│ ├── init_functions.py
│ ├── pose_estimator.py
│ ├── pose_estimator_supine.py
│ ├── requirements.txt
│ └── server.py
├── trained_models
│ └── yolo26s-pose.ptCreate a venv and download the required libraries:
python3 -m venv .venv
source .venv/bin/activate
cd src
pip install -r requirements.txtTo test the application, it is required that the backend as well as the frontend uses a secure tunnel to be able to request camera access on a webbrowser. Follow the next steps to ensure that the whole application is secure:
cd src
uvicorn server:app --reload --port 8000brew install cloudflared
cloudflared tunnel --url http://localhost:8000winget install --id Cloudflare.cloudflared
cloudflared tunnel --url http://localhost:8000Copy the link from your cloudflare Tunnel and reuse it.
cd src/frontend
NEXT_PUBLIC_BACKEND_WS_URL=YOUR_CLOUDFLARE_LINK npm run devYou can use ngrok. For more information look up the ngrok Website or if you have already installed ngrok do following:
ngrok http 3000