Welcome to the Machine Learning module! Writing code typically involves a process of expliciting designing and writing out a series of rules for a computer program to follow. Machine learning, however, involves a process of showing a computer program a large dataset of examples and asking it to learn those very rules.
In this module, you will learn how to train a machine learning model to recognize images and sounds using the following three tools:
Teachable Machine
Ml5.js
p5.js
![](https://lh3.googleusercontent.com/ybFpLQKl9IpNrieJTRCDfI0f6wkVVJ91UOomV_n7a0KWB_idSepPFPqcJLtQ76s5MtFokA2hhnPI9fePqYyyrK6hAdZhUEx51OWK_o0ReVmr03NAlpwmr8DgEceyVV7YvvRTmvU)
Before You Start Coding
Before you start diving into the code, I would suggest doing some reading and research about machine learning and neural networks. Here are a few resources to get you started.
Required Materials
Read and watch the following tutorials.
Teachable Machine and Images
The main material of this module is Teachable Machine from Google Creative Lab.
Watch Teachable Machine 2.0: Making AI easier for everyone
Watch these three short tutorials on gathering data, training the model, and exporting the model.
Teachable Machine models can be used within the p5.js web editor. The following tutorials demonstrate how to train your model and create a sketch that shows an emoji based on what object is seen by your webcam.
Teachable Machine and Audio
Teachable Machine can also be used to train a model to recognize sounds.
Assignment
Your assignment for the Machine Learning Module is:
Train your own machine learning model on images or sounds.
Create a p5.js sketch where the primary mechanism for interaction is the machine learning model. You can change what is on the canvas based on the classification, control a game like in the Snake example, or invent your own interaction.
Document your experience using Teachable Machine, ml5.js, and p5.js in a discussion post. What challenges did you face? What worked well? What didn’t work?
Share your sketch as a new post on this week’s discussion board. Write a ~ 200 word description about what you made and your process. You can write anything, but if you’re stuck here are some guiding questions:
What did you originally intend to create?
Narrate the process of creating your sketch.
What resources and examples did you draw on to create your sketch? What was most helpful / least helpful from this week’s materials.
What problems/discoveries did you encounter along the way?
Paste the link to your discussion post (not just the code) as your assignment submission.