How to easily download bulk images for training a model on Teachable Machine

Teachable Machine (TM) is Google’s generous way to make machine learning more accessible. You can train models to recognise images, sounds and body poses by classifying your own input images. As an example, you could teach TM to identify your left and right head movements as two separate classes, which could then be used to control a mini-game of snake in ml5 in your browser. Oh wait, that’s exactly what my internet hero The Coding Train did. Cool stuff!

Install the Chrome Extension

Do that here

Search for something on Google Images

The more generic, the better. The idea is to get LOTS of images. So, if you search for something niche like ‘Jim Carrey painting in his Los Angeles home’, you’ll have a good experience, but it is not really useful for a machine learning model. Unless you are Jim Carrey and you want a computer to play your painting jams every time it sees you painting. Hi, Jim Carrey! Big fan.

Click on the extension and open the zip file

Click on the ‘Download all Images’ extension while in your image search (do this by clicking the little puzzle at the top right of your Chrome Browser to find the extension). Doing this will automatically save a zip file of all of the images on the page to your downloads folder on your mac (or whatever the Windows equivalent is, I don’t actually know how computers work).

Delete all of the irrelevant images

I ended up with 140 images of people doing a tree pose. You could keep scrolling into the Google abyss and repeating the process until you have a good selection. The extension also scanned the icons on the webpage, so go ahead and get rid of them.

Create a new project on Teachable Machine

Go here and click ‘get started’. Choose what kind of project you want to make. Your downloaded images won’t be of much use if you want to do an audio project, but still worth checking out. God, don’t we love Google? And by God, I mean Larry Page and Sergey Brin.

Drag the images into your first class

Give your class a cool name like ‘Tree pose’ or ‘My tears’. Load them up! You can also input images with your face/body via a webcam.

Make your own samples

After going through the motions of the chrome extension and the unzipping and the systemic racism, I decided to stand up on my actual legs and allow them to support my body weight to take live images. Do this at your own discretion. Consult with your Design Doctor to see if it is safe for you to take your gaze off your Figma wireframes for more than a minute.

Train the Model

The next thing you need to do is train your model. Don’t close the tab while this is happening. Depending on the number of your samples, this could take a little while. Once you have trained the model, you can test to see if it can differentiate the two classes. Or maybe you want three or four classes! That’s up to you.

Testing the Model

Once you have trained your model, you can test it out and see if your poses are recognisable. In the end, I had to re-train the tree pose with my own input images manually. I am not sure of how well this bulk upload of images works for poses, I will have to try again someday. Regardless, I think Teachable Machine is such a powerful tool for people from across all disciplines. The interface makes it really understand how your data is being processed and it is definitely worth trying! I will definitely wear a longer skirt the next time I experiment with Teachable Machine!

Product Manager at an EdTech Startup in Seoul / From Melbourne / www.joquinn.com.au / www.koreanpicnic.com