Using Teachable Machine in the d.school classroom

Michelle Carney
3 min readNov 5, 2019

--

Teachable Machine is an amazing tool and resource to introduce AI and Machine Learning (ML) to people who have never had the opportunity to build their own model. It works in the browser, with a webcam, and within a few minutes you can quickly understand how machines “learn” through a simple classification demo.

But what does this mean for professionals, who might already be a doctor or teacher, and wanting to understand what AI really is and how to apply it to their domain?

As a part of the Designing Machine Learning course at the Stanford d.school, we have included some guiding questions to help those with professional backgrounds understand how a tool like Teachable Machine can apply to their work.

Step 1. Let’s train a model together!

A simple model I typically live demo on teachable machine is training it on two categories: my hand holding up all 5 fingers (“highfive!” category) and my hand holding up just 1 finger (“pointing” category). See a video example below.

Estimated time: 10 mins

Guiding questions:

  • What is going on in your own words?
  • What is the model “learning”?
  • What happens when we only use a few examples in each category (n=20)? A bunch of examples in each category (n=500)?
Youtube Demo of Teachable Machine — how to train the model on “highfive” and “pointing.” Try for yourself at teachablemachine.withgoogle.com

Step 2: What happens when we “break” it?

Ok, now what we’ve tried it with “pointing” and with “highfive” … but how does the computer classify 2 fingers? 3 fingers? 4 fingers?

It seems like somewhere between 3 and 4 fingers it it classifies my hand as “1 finger/pointing” category 50% of the time, and “5 finger/highfive” category 50% of the time. But why is that?

Gif of teachable machine classifying number of fingers held up

Estimated time: 5 mins

Guiding questions:

  • Why does it classify 3 fingers as the “pointing”/1 finger category?
  • Does THIS machine have a concept of fingers? How about hands?
  • What would it take to have it recognize different fingers?
  • Even if we trained it on all 5 fingers, what might it still be missing?
  • When would we want to use a finger-classification? Who would want to use it? Why?

Step 3: Play around and apply to your domain!

What are some other things you might have around that you would want to train a classifier on (there might be pens vs pencils near by, or green vs yellow sticky notes!)? Go ahead and try with a new example of your own — you can work in teams too and try to understand, in your own words, what is the machine “learning” and why.

Now think about your domain: are there ways you could see something like this helping your practice or the people you work with?

Estimated time: 30 mins

Guiding questions:

  • What happens when you change the ‘background’? Go into another room or rotate your computer and try again. What’s happening?
  • What are some ways you think this could help your field? Who would want to use it? Why would they want to use it?
  • What would they need as the ‘training’ data? How much of it would they need?(For example — say you are a dermatologist: would you need only 20 pictures of healthy moles compared to 20 pictures of unhealthy moles? or do they need more? What are the ways that dermatologists talk about moles and how can you make sure that is represented in your data set?)
  • What are some ways this might misclassify something? What would be a false positive or false negative? Would that be acceptable? How might you design ways to prevent that? (see back to the Confusion Matrix)
  • What is the form factor you’d want it to take? Does a laptop and web camera work, or would you need something smaller that would fit into the space? Does it need to be a camera? What about another type of sensor (weight, photosensor, etc)

Hope this helps in teaching the next generation of folks excited about applying AI to their domain!

--

--

Michelle Carney

Founder, Machine Learning and UX @mluxmeetup. Member @feministai. UXR @GoogleAI. Lecturer @Stanforddschool. Former @CTSPBerkeley @AFOGBerkeley @BerkeleyISchool