Back to Cs249r Book

Hardware Kits

kits/README.md

latest8.4 KB
Original Source

Hardware Kits

Hands-on Embedded ML Labs for Real Devices

Read Online | PDF


What This Is

The Hardware Kits teach you how to deploy ML models to real embedded devices. You will face actual hardware constraints: limited memory, power budgets, and latency requirements that do not exist in cloud environments.

This is where AI systems meet the physical world.


๐ŸŽ“ What You Will Learn

<table> <thead> <tr> <th width="25%">Concept</th> <th width="75%">What You Do</th> </tr> </thead> <tbody> <tr> <td align="center"><b>๐Ÿ–ผ๏ธ Image Classification</b></td> <td>Deploy CNN models to classify images in real-time on microcontrollers</td> </tr> <tr> <td align="center"><b>๐ŸŽฏ Object Detection</b></td> <td>Run YOLO-style detection on camera-equipped boards</td> </tr> <tr> <td align="center"><b>๐Ÿ—ฃ๏ธ Keyword Spotting</b></td> <td>Build always-on wake word detection with audio DSP</td> </tr> <tr> <td align="center"><b>๐Ÿ‘‹ Motion Classification</b></td> <td>Use IMU sensors for gesture and activity recognition</td> </tr> <tr> <td align="center"><b>๐Ÿ—œ๏ธ Model Optimization</b></td> <td>Quantize and compress models to fit in KB of RAM</td> </tr> <tr> <td align="center"><b>๐Ÿ”‹ Power Management</b></td> <td>Balance accuracy vs battery life for edge deployment</td> </tr> </tbody> </table>

๐Ÿ› ๏ธ Hardware Platforms

<table> <thead> <tr> <th width="25%">Platform</th> <th width="50%">Description</th> <th width="25%">Best For</th> </tr> </thead> <tbody> <tr> <td align="center"><b>Arduino Nicla Vision</b></td> <td>Compact AI camera board with STM32H7</td> <td>Vision projects, ultra-low power</td> </tr> <tr> <td align="center"><b>Seeed XIAO ESP32S3</b></td> <td>Tiny ESP32-S3 with camera support</td> <td>WiFi-connected vision</td> </tr> <tr> <td align="center"><b>Grove Vision AI V2</b></td> <td>No-code AI vision module</td> <td>Rapid prototyping</td> </tr> <tr> <td align="center"><b>Raspberry Pi</b></td> <td>Full Linux SBC for edge AI</td> <td>Complex pipelines, prototyping</td> </tr> </tbody> </table>

๐Ÿš€ Quick Start

For Learners

  1. Pick a platform from the labs
  2. Follow the setup guide for your hardware
  3. Complete the labs in order: Setup โ†’ Image Classification โ†’ Object Detection โ†’ Keyword Spotting

For Contributors

<kbd>cd kits</kbd>

Build HTML site <kbd>ln -sf config/_quarto-html.yml _quarto.yml</kbd> <kbd>quarto render</kbd>

Build PDF <kbd>ln -sf config/_quarto-pdf.yml _quarto.yml</kbd> <kbd>quarto render --to titlepage-pdf</kbd>

Preview with live reload <kbd>quarto preview</kbd>


๐Ÿ”ฌ Labs Overview

Each platform includes progressive labs:

<table> <thead> <tr> <th width="25%">Lab</th> <th width="50%">What You Build</th> <th width="25%">Skills</th> </tr> </thead> <tbody> <tr> <td align="center"><b>Setup</b></td> <td>Hardware setup and environment configuration</td> <td>Toolchain, flashing, debugging</td> </tr> <tr> <td align="center"><b>Image Classification</b></td> <td>CNN-based image recognition</td> <td>Model deployment, inference</td> </tr> <tr> <td align="center"><b>Object Detection</b></td> <td>Real-time object detection</td> <td>YOLO, bounding boxes</td> </tr> <tr> <td align="center"><b>Keyword Spotting</b></td> <td>Audio wake word detection</td> <td>DSP, MFCC features</td> </tr> <tr> <td align="center"><b>Motion Classification</b></td> <td>IMU-based gesture recognition</td> <td>Sensor fusion, time series</td> </tr> </tbody> </table>

๐Ÿ“‚ Directory Structure

text
kits/
โ”œโ”€โ”€ contents/                # Lab content
โ”‚   โ”œโ”€โ”€ arduino/             # Arduino Nicla Vision labs
โ”‚   โ”œโ”€โ”€ seeed/               # Seeed XIAO & Grove Vision labs
โ”‚   โ”œโ”€โ”€ raspi/               # Raspberry Pi labs
โ”‚   โ””โ”€โ”€ shared/              # Shared resources (DSP, features)
โ”œโ”€โ”€ assets/                  # Images, styles, scripts
โ”œโ”€โ”€ config/                  # Quarto configurations
โ”‚   โ”œโ”€โ”€ _quarto-html.yml     # Website config
โ”‚   โ””โ”€โ”€ _quarto-pdf.yml      # PDF config
โ”œโ”€โ”€ tex/                     # LaTeX includes for PDF
โ”œโ”€โ”€ filters/                 # Lua filters
โ””โ”€โ”€ index.qmd                # Landing page

๐Ÿ“š Documentation

<table> <tbody> <tr> <td width="20%" align="center"><b>Learners</b></td> <td><a href="https://mlsysbook.ai/kits">Online Labs</a> ใƒป <a href="https://mlsysbook.ai/kits/assets/downloads/Hardware-Kits.pdf">PDF</a></td> </tr> <tr> <td width="20%" align="center"><b>Contributors</b></td> <td>See build instructions above</td> </tr> </tbody> </table>

๐Ÿค Contributing

We welcome contributions to the hardware labs! To contribute:

  1. Fork and clone the repository
  2. Add or improve lab content in contents/
  3. Test your changes with <kbd>quarto preview</kbd>
  4. Submit a PR with a clear description

<table> <tbody> <tr> <td width="25%" align="center"><b><a href="../README.md">Main README</a></b></td> <td>Project overview and ecosystem</td> </tr> <tr> <td width="25%" align="center"><b><a href="../book/">Textbook</a></b></td> <td>ML Systems concepts and theory</td> </tr> <tr> <td width="25%" align="center"><b><a href="../tinytorch/">TinyTorch</a></b></td> <td>Build ML frameworks from scratch</td> </tr> <tr> <td width="25%" align="center"><b><a href="https://mlsysbook.ai/kits">Website</a></b></td> <td>Read labs online</td> </tr> </tbody> </table>

Contributors

Thanks to these wonderful people who helped improve the hardware kits!

Legend: ๐Ÿชฒ Bug Hunter ยท โšก Code Warrior ยท ๐Ÿ“š Documentation Hero ยท ๐ŸŽจ Design Artist ยท ๐Ÿง  Idea Generator ยท ๐Ÿ”Ž Code Reviewer ยท ๐Ÿงช Test Engineer ยท ๐Ÿ› ๏ธ Tool Builder

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/profvjreddi"> <sub><b>Vijay Janapa Reddi</b></sub></a> ๐Ÿชฒ ๐Ÿง‘โ€๐Ÿ’ป ๐ŸŽจ โœ๏ธ ๐Ÿงช ๐Ÿ› ๏ธ</td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Mjrovai"> <sub><b>Marcelo Rovai</b></sub></a> โœ๏ธ ๐Ÿง‘โ€๐Ÿ’ป ๐ŸŽจ tutorial</td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/salmanmkc"> <sub><b>Salman Chishti</b></sub></a> ๐Ÿง‘โ€๐Ÿ’ป</td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Pratham-ja"> <sub><b>Pratham Chaudhary</b></sub></a> ๐Ÿง‘โ€๐Ÿ’ป</td> </tr> </tbody> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->

Recognize a contributor: Comment on any issue or PR:

@all-contributors please add @username for tool, test, video, or doc

License

Content is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0).

See LICENSE.md for details.