Thesis — Comparison of Machine Learning Frameworks for In-browser Model Execution¶
Why In Browser?¶
Everything runs locally — no cloud, no API keys, no install. Short answer: PLOC
-
Privacy
Data never leaves the device. User inputs stay local.
-
Latency
No round-trip to server. Instant predictions.
-
Offline
Works without internet after initial load.
-
Cost
No server bills. Free inference for everyone.
-
3 Runtimes
TensorFlow.js · ONNX Runtime Web · LiteRT.js
Details
- TensorFlow.js — Google, largest AI/ML ecosystem, tensor ops
- ONNX Runtime Web — Microsoft, ONNX format, broad backend support
- LiteRT.js — Google, next-gen WebAI runtime, .tflite models
-
3 Frameworks
Transformers.js · MediaPipe Tasks · ML5.js
Details
- Transformers.js — HuggingFace, wraps ONNX Runtime Web, pipeline APIs
- MediaPipe Tasks — Google, wraps LiteRT, task-specific APIs
- ML5.js — Community, wraps TensorFlow.js, friendly API
-
5 Backends
-
6 Metrics
Load time · First inference · Median latency · Memory · Backend · Accuracy
Details
- Load time — Model download + init duration
- First inference — First timed sample (cold start, shader/JIT compile cost)
- Median latency — p50 (and p95) over 30 measured runs; warmups timed but excluded
- Memory delta — Heap usage before/after inference
- Backend detection — Which backend actually served the inference
- Accuracy & score — Per-image ground-truth verdicts; composite score = latency × accuracyAt1
Explore the project¶
-
Project components: prototype, ml-browser-check, bench-proto, planned app.
-
Decision logs, deep dives, and architectural findings captured throughout development.
-
Structure, outline, research questions, and comparison criteria for the thesis.
Companion repositories¶
-
All related source code.
-
Will be released once the work is complete.