Web Browser

Compare the inference-sdk and inferencejs JavaScript packages for running models in web browsers.

Roboflow provides JavaScript packages for deploying computer vision models in web browsers.

inference-sdk

Uses WebRTC to run inference on your video streams with the Roboflow Cloud and return live results with minimal latency.

  • For live video streams
  • When running Roboflow Workflows, or a model not supported on inferencejs
  • On latency-sensitive use cases with compute-heavy models

<a href="web-inference-sdk.md" class="button primary">Learn more about inference-sdk</a>

inferencejs

Uses Tensorflow.js to run inference on your images and video streams on-device.

  • For images and live video streams
  • On latency-sensitive use cases with light, supported models
  • When internet access isn't continuously available (still required for initial load)

<a href="inferencejs.md" class="button primary">Learn more about inferencejs</a>

Comparison

Featureinference-sdkinferencejs
Processing LocationRoboflow CloudBrowser (On Device)
Processing LatencyConsistent (GPU accelerated)Dependent on user's device
Model SupportAll Roboflow models & Roboflow WorkflowsSupported Models
Device SupportWide (WebRTC is widely supported)Wide (Tensorflow.js is widely supported)
Internet RequiredYes, continuouslyYes, for initial model load only
Network LatencyMinimalNo network latency