Machine Learning Workshop by AndreasRef
ml5js
Templates, examples and exercises
0) p5js online editor
1) Train a classification algorithm
Exercise 1: Train a classifier to distinguish between two different classes. Make the sketch output a descriptive text for each class.
Exercise 2: Try to change the Webcam classifier + image example so it outputs images that represent your two classes
2) MobileNet pretrained classification
3) Train a regression algorithm
Exercise 3: Train the regressor and use the continuous output value slider.value() to control something. It is okay to leave the code as it is, and just focus on training the system
4) PoseNet pose detection
Exercise 4: Pick A or B
A) Edit the "Simple template" and use the x-y value of a bodypart to control something (e.g. the position of some images)
B) Use "Classify poses" as a starting point and make something happen for three different (yoga?) poses
5) Beyond ml5js: Sound, speech and face
Exercise 5A: Use one of the values from the four emotions (angryVal, sadVal, surprisedVal or happyVal) from the "Pretrained Facial Emotions" example to control something.
Exercise 5B: Discuss ideas for a project you could build using speech recognition (a game, a service, a campaign site or something else) and try to build a small part of it to prove the interaction.
6) Start prototyping!
Exercise 6 (group):
Get into groups, do a quick brainstorm, pick a concept and build a small prototype that shows a key interaction of your idea. You can make something creative, useful and/or silly - up to you - just make sure it has a machine learning component somewhere! It is okay to build something on top of a previous exercise. How much coding you do is up to you, if you don't feel comfortable, you can choose to focus on training the interactions. Informal mini-presentations start at 16:20.
7) If we have time...
Having issues running the examples?
Webcam access on Windows 10: Select Start > Settings > Privacy > Camera. Set "Let apps use my camera" to "On". Make sure Chrome has access to use the camera.
Older computers with less powerful graphics cards might run out of memory if you record hundreds or thousands of examples from the webcam, especially on Windows. If it happens, switch to another computer or be more modest when recording training data.
Other links