3 ms·
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/tenso
by will-wow 6y ago
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 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