Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Load the prediction model
mobilenet.load().then(model => {
// Now we can keep checking the camera feed at regular intervals, like this:
model.classify(video).then(predictions => {
const topResult = predictions[0];
if (topResult.className === 'llama') {
// Woo! Llama! NB. We can also get the confidence value from the `probability`
...
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment