Comment

Comment by will-wow

Yeah! AutoML lets you export a TensorFlow.js version of the model to Google cloud storage, and there's a frontend library, tfjs-automl (https://github.com/tensorflow/tfjs/tree/master/tfjs-automl), that downloads the model and sets it up for detections.

Then I'm connecting to the device's webcam with navigator.mediaDevices.getUserMedia, and twice a second send a reference to the video stream object to the detector, which runs inferences locally and returns the coordinates of any detected objects.

There's some glue code to do the whole dance to connect to the camera and model, but after that it works pretty seamlessly, on my desktop and mobile browsers

parent will-wow 6 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton