Coding Challenge #158: Shape Classifier Neural Network with ml5.js | Summary and Q&A

137.4K views
December 3, 2020
by
The Coding Train
YouTube video player
Coding Challenge #158: Shape Classifier Neural Network with ml5.js

TL;DR

In this video, the presenter demonstrates how to train a convolutional neural network using p5.js to recognize shapes such as circles, squares, and triangles.

Install to Summarize YouTube Videos and Get Transcripts

Key Insights

  • 😒 The presenter uses Processing to generate a dataset by programmatically creating shapes and saving them as images.
  • 🚂 The ml5 library in p5.js is utilized to train a convolutional neural network model using the dataset.

Transcript

[BLOWS TRAIN WHISTLE] Hello, and welcome to a 2020 substitute train whistle Coding Train Coding. I am so excited for you to watch this one. I just finished making it. So I'm just recording a little intro here to show you the end result, because this one might be kind of long. So you can see, ultimately, where I get to. I have a p5.js sketch that is... Read More

Questions & Answers

Q: What tools are used to generate the dataset?

The presenter uses Processing, a Java-based programming environment, to programmatically generate shapes and save them as images.

Q: What shapes does the neural network recognize?

The neural network is trained to recognize circles, squares, and triangles.

Q: How is the dataset loaded into the p5.js sketch?

The dataset images are loaded using the preload() function in p5.js, and the ml5 library's loadModel() function is used to load the pre-trained neural network model.

Q: Can the model be used to classify shapes drawn on a canvas?

Yes, the presenter demonstrates how shapes drawn on a canvas can be classified by the trained model using the ml5 library's classify() function.

Summary & Key Takeaways

  • The presenter collects a dataset by generating shapes programmatically using Processing and saves them as images.

  • The dataset is then used to train a convolutional neural network model using the ml5 library in p5.js.

  • After training, the model is able to classify shapes drawn on a canvas, and the presenter shows examples of it recognizing circles, squares, and triangles.

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Explore More Summaries from The Coding Train 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on: