I used teachable machine to train it to recognize my bottle and my white ipod. It was more of a testing period for me. I used the image classifier and added speech detection to say what it said when it worked. The color test showed that it’s not too accurate but then again, it recognizes fairly well. Neutral and yellow bottle seems to be more common scenarios than the white ipod.

//

function draw() {
if (video) {
// We need to flip the webcam view
translate(size, 0); // move to far corner
scale(-1.0, 1.0); // flip x-axis backwards

// Draw the image from the video
image(video, 0, 0);

// Make a prediction from square canvas
predictVideo(canvas.elt);

if (text == “0”)
{fill(245, 209, 198);
foo.speak(‘neutral’);

}} else if (text == “1”)
{fill(255, 207, 255);
foo.speak(‘neutral’);}
// {sound1.play();

else if (text == “2”)
{fill(255, 255, 255);
foo.speak(‘yellow bottle’);

}
else if (text == “3”) { fill(255, 200, 200);
foo.speak(‘white ipod’);
// sound3.play();
}
ellipse(50, 50,50);
}

//

NYU 2018–2020