xxxxxxxxxx
17
let video;
let classifier;
let label = "waiting...";
// Load the model
function preload() {
classifier = ml5.imageClassifier('MobileNet', modelReady);
}
function setup() {
createCanvas(640, 520);
// Create the video
video = createCapture(VIDEO);
video.hide();
// Predict the current frame.
classifyVideo();
}