Real-time yoga pose classification in the browser. The model runs client-side with TensorFlow.js — the webcam feed never leaves the machine.
| Path | Role |
|---|---|
index.html |
The live detection page |
learn.js |
Loads the model and runs inference on the webcam stream |
modelCreation/dataCollection.js |
Captures training samples from the webcam |
modelCreation/modelTraining.js |
Trains the classifier in-browser |
modelCreation/modelDeploy.js, modelDeploy2.js |
Exports the trained model |
modelv2/model2.json + model.weights2.bin |
The trained model, committed and ready to load |
The whole loop — collect, train, deploy, run — happens in the browser, so there is no Python step anywhere.
- TensorFlow.js for training and inference
- Webcam capture via
getUserMedia - Plain HTML, CSS and JavaScript
The page loads model files over fetch, so opening index.html directly will fail on CORS. Serve the folder instead:
python -m http.server 8000Then open http://localhost:8000. Allow camera access when prompted.
Any static server works, for example:
npx serve- Open the data collection page and record samples for each pose
- Run training — it happens live in the browser
- Export, and drop the output into
modelv2/
- Accuracy depends heavily on lighting and camera angle.
- The pose set is fixed to whatever the committed model was trained on.
See LICENSE in this repository.