ml5js / ml5-library

Friendly machine learning for the web! 🤖
https://ml5js.org
Other
6.46k stars 904 forks source link

Example: Simple P5 version of Teachable Machine #25

Closed yining1023 closed 6 years ago

yining1023 commented 6 years ago

Teachable Machine: Teachable Machine

The code is here: https://github.com/googlecreativelab/teachable-machine

I'd like to make a very simple version of it in p5.

cvalenzuela commented 6 years ago

great! I'm currently porting this that can be used as reference too.

yining1023 commented 6 years ago

Thank you!

cvalenzuela commented 6 years ago

I just pushed https://github.com/ITPNYU/p5-deeplearn-js/commit/03df180a434ed50bdcdb1fb97572161f07067c72 that implements the KNN Image Classifier.

demo

The working example is here

@yining1023 I think this will work to port the Teachable Machine to p5. @shiffman what other examples do you think we could build with this?

yining1023 commented 6 years ago

This is amazing! I tried it. It worked perfectly.

shiffman commented 6 years ago

I made some changes to the example and ran into some small issues that I think we could address to make it simpler / easier to use. Will file them here soon!

shiffman commented 6 years ago

Two things to investigate:

I also have some thoughts about working with images in general, will file as a separate issue.

yining1023 commented 6 years ago

I made this teachable machines example that outputs gifs. My next step would be using p5.sound.js to output sounds!

demo

achimkoh commented 6 years ago

@yining1023 When I found out about this library a few weeks ago I thought that a Teachable Machine-like example would be nice, but totally missed that you had already made one! Great job :D I'd be happy to help with expanding this example with p5.sound if you have something going on.

yining1023 commented 6 years ago

@achimkoh that would be great!