Object Detection Using Machine Learning
Overview
Built a real-time object detection system that runs entirely in the browser. Uses live camera input via WebRTC and runs ML inference on-device with ml5.js — no frames are ever sent to a cloud API.
The problem it solves
Most object detection demos send every camera frame to a cloud API for processing. That introduces latency, costs money at scale, and raises privacy concerns. This system eliminates the round-trip entirely by running the model locally in the browser.
How it works
- WebRTC captures live video from the device camera
- ml5.js runs the pre-trained COCO-SSD model directly in the browser via TensorFlow.js
- Detected objects are overlaid on the video feed in real time
Key results
- Zero server dependency — all inference happens on the client
- Reduced latency — no network round-trip for each frame
- Privacy-preserving — camera data never leaves the device
Stack
- JavaScript
- WebRTC (camera input)
- ml5.js (client-side ML)
- TensorFlow.js (underlying inference engine)