Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

ml5.js: KNN Classification Part 3

18.0K views
•
February 7, 2019
by
The Coding Train
YouTube video player
ml5.js: KNN Classification Part 3

TL;DR

Training a KNN model using head gestures for control, saving the model for reuse, and implementing classification in p5.

Transcript

[BELL RINGS] Welcome back. I'm going to finish this ml5 KNN classification example for like a gesture-based controller. So I just-- in between the last video and this one, I just sort of trained a quick KNN model where if my head is up here, it registers as up. If my head is down here, it registers as down. Over here would be to the left, and over ... Read More

Key Insights

  • 🛟 MobileNet serves as an essential image classification model within the tutorial.
  • 🤟 Training a KNN model involves mapping specific gestures to corresponding labels.
  • 👻 Saving the trained model allows for future reuse and prevents data loss.
  • 😑 The tutorial highlights the process of loading and utilizing pre-trained models for classification.
  • 🪩 CSS transforms are employed to mirror images and provide the desired visual effect.
  • 🐛 Bug fixes and workarounds are part of the tutorial to address technical challenges.
  • 🖐️ Data collection and training play a crucial role in refining the KNN model's accuracy.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: How does the KNN model differentiate head gestures for control?

The KNN model registers different gestures based on the head's position - up, down, left, and right by mapping them to specific labels through training.

Q: Why is saving the trained model crucial?

Saving the trained KNN model in JSON format preserves all the learned data, ensuring that it can be reused without having to retrain it constantly.

Q: How does the protagonist handle the bug encountered during the tutorial?

After encountering a bug with saving large JSON files, the creator addressed it by limiting the number of training images until a newer version of ml5 resolved the issue.

Q: What role does MobileNet play in the classification process?

MobileNet provides image features for classification, with its logits being used to build a database that the KNN model utilizes to classify new images based on proximity.

Summary & Key Takeaways

  • Demonstrates training a KNN model using head gestures for control.

  • Illustrates the importance of saving the model for future use.

  • Implements classification using the KNN model in the p5.js environment.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from The Coding Train 📚

8.1: Fractals - The Nature of Code thumbnail
8.1: Fractals - The Nature of Code
The Coding Train
9.4: Genetic Algorithm: Looking at Code - The Nature of Code thumbnail
9.4: Genetic Algorithm: Looking at Code - The Nature of Code
The Coding Train
Classifying Poses with ml5.js Part 2 thumbnail
Classifying Poses with ml5.js Part 2
The Coding Train
ITP/IMA Winter Show 2018 thumbnail
ITP/IMA Winter Show 2018
The Coding Train
Coding Challenge #126: Toothpicks thumbnail
Coding Challenge #126: Toothpicks
The Coding Train
Coding Challenge #116: Lissajous Curve Table thumbnail
Coding Challenge #116: Lissajous Curve Table
The Coding Train

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.