Last active
October 31, 2018 14:39
-
-
Save poshaughnessy/41955844f0c34d7020e63d17cc4ade69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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