A project that connects the camera stream to an object detector, including anchor decoding, NMS and drawing boxes. It teaches the trade-off between accuracy and speed and the effect of the confidence threshold.
Classify images and detect objects with real ONNX models in your browser, try quantization and pruning, and compare edge with cloud.
Webcam object detector
Real-time COCO object detection from the webcam inside the browser with EfficientDet-Lite0.
Educational draft content that needs expert review before it is used as an academic reference. Specifications, versions and licences change; check the official source. No experimental result is shown here unless it was actually run.
Hardware
- A webcam
- A computer with a modern browser
Software
- ONNX Runtime Web
- JavaScript
Architecture
Video frame → resize to 320 → normalization (x−127)/128 → model → anchor decoding → NMS → draw boxes.
Suggested datasets (check their licences)
- COCO (for evaluation; check the licence)
Implementation steps
- Ask for camera permission only on click
- Run a requestAnimationFrame loop that skips frames when behind
- Decode the outputs and apply NMS
- Draw the boxes and names
- Show the frame rate
Expected deliverables
A detector that runs on the camera stream with a frame-rate display and an adjustable confidence threshold.
Evaluation metrics
- mAP on a manually labelled sample (if possible)
- FPS and median latency
Limits
- Performance depends on your device
- Knows COCO classes only
- Lighting affects quality
Ideas to extend
- Track objects between frames
- Count people crossing a line
- Compare with a classification-only model
Frames are processed in the browser only. Tell people who appear in front of the camera before the experiment.
Related technologies
Image and audio processing in the experiments runs inside your browser. Your images and audio are never uploaded and conversations are not stored. Privacy
