xxxxxxxxxx
35
let classifier;
let video;
let label= '';
let osc
function preload(){
classifier =
ml5.iamgeClassifier("MobileNet");
}
function setup() {
createCanvas(400, 400);
video = createCapture(VIDEO);
vide.hide();
classifier.classifyStart(video, gotResult);
textSize(24)
}
function draw() {
background(220);
image(viedo,0,0)
text(label,20,20)
}
function gotResult(result) {
console.log(result)
label = result[0].label;
if (label == 'Eyeybrow') {
osc.freq(200);
}
}