Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Marcelo Rovai

Rating No ratings yet

No description

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on engineering guide for building real-world Edge AI applications on the Raspberry Pi, from image classification and object detection to running small language models and controlling IoT hardware—ideal for makers, students, and developers who want practical, project-based learning. 【Book Arc】 - **Opening (~0%–9%)**: Introduces the Edge AI concept (fixed-function vs. generative AI) and walks through Raspberry Pi setup—hardware models (Zero 2W, Pi 5), OS installation, remote access (SSH), file transfer, SWAP memory, and camera installation (USB and CSI). This stage solves the "getting started" problem. - **Early (~9%–23%)**: Moves into computer vision fundamentals—setting up TensorFlow Lite, running MobileNet V2 for image classification, and building a custom classifier with Edge Impulse Studio. Then transitions to object detection: training FOMO and YOLOv8 models, exporting to NCNN format, and running live-stream inference on the Pi. - **Early (~23%–32%)**: Applies object detection to a real project (counting bees) with a Raspberry Pi Zero, including dataset preprocessing, training, inference, post-processing, and storing results in an SQLite database. Then shifts to generative AI: installing Ollama and running Small Language Models (SLMs) like Llama 3.2, Gemma 2, and Phi-3.5, plus function calling and a simple RAG implementation. - **Middle (~32%–45%)**: Explores Vision-Language Models (VLMs) at the edge, focusing on Florence-2—its architecture, capabilities (captioning, object detection, region captioning), setup, and practical tasks. Then pivots to hardware: GPIO programming, blinking LEDs, and integrating sensors (DHT22, BMP280) with CircuitPython and Jupyter Notebook. - **Middle (~45%–55%)**: Combines SLMs with physical computing—using natural language to control IoT devices, data logging, and evolving to structured command processing. Covers SLM limitations (knowledge, reasoning, consistency) and enhancement techniques: prompt optimization, chain-of-thought, few-shot learning, and building agents with function calling and response validation. - **Late (~55%–end)**: Deepens into advanced Edge AI—implementing RAG systems for edge devices (including an enhanced weather station application), building an agentic RAG system with a detailed workflow, and fine-tuning SLMs for edge deployment. The book concludes with practical insights on challenges, solutions, and future enhancements. 【Key Takeaways】 - **Edge AI is about running AI locally, not in the cloud** (Opening): The book distinguishes fixed-function AI (reactive, e.g., classification) from generative AI (proactive, e.g., LLMs), and argues the Raspberry Pi's low cost and flexibility make it an ideal edge platform. This frames the entire book's project-based approach. - **Setup is half the battle** (Opening): Detailed guidance on OS installation, SSH remote access, file transfer, and increasing SWAP memory—critical for running AI workloads on constrained hardware. The book assumes you'll need these basics before any AI project. - **TensorFlow Lite is the entry point for on-device vision** (Early): Using MobileNet V2 for image classification demonstrates how to make inferences with a pre-trained model, then test with a custom-trained model. This establishes a reusable pattern for edge inference. - **Edge Impulse Studio simplifies custom model training** (Early): For image classification, the book walks through data collection, dataset design, impulse design (pre-processing + model), and deployment—showing how to go from raw images to a working edge model without deep ML expertise. - **YOLOv8 is the workhorse for object detection** (Early): The book covers installing Ultralytics YOLOv8, testing it, exporting to NCNN format for edge efficiency, and training on custom datasets. A bee-counting project on a Raspberry Pi Zero demonstrates real-world deployment with SQLite logging. - **Small Language Models are feasible on Raspberry Pi** (Early): With Ollama, you can run Llama 3.2, Gemma 2, and Phi-3.5 locally. The book shows how to use the Python library, implement function calling, and add image inputs—making generative AI practical on edge hardware. - **SLMs can control physical hardware** (Middle): By combining GPIO sensors/actuators with an SLM, the book demonstrates natural language interaction for IoT control—from basic sensor analysis to active control and structured command processing. This is the book's most distinctive integration. - **RAG and fine-tuning extend SLM capabilities** (Late): The book addresses SLM limitations (knowledge, reasoning, consistency) and offers solutions: RAG for grounding with external data (e.g., a weather station), agentic RAG for complex workflows, and fine-tuning for domain specialization. These are advanced but essential for production edge AI. 【Reading Tips】 - **Skim the setup chapter if you're experienced with Raspberry Pi** (Opening): The OS installation, SSH, and camera setup are standard; focus instead on the SWAP memory increase and model-specific considerations (Zero vs. Pi 4/5) which are crucial for AI workloads. - **Deep-read the computer vision chapters for reusable patterns** (Early): The image classification and object detection sections establish a workflow—environment setup, model selection, training (Edge Impulse or Ultralytics), export, and inference—that you'll reuse across projects. Pay attention to the NCNN export for edge optimization. - **Treat the SLM chapters as a progression** (Early–Middle): Start with basic Ollama usage, then move to function calling, then to hardware control. The IoT control chapter is where everything clicks—don't skip the GPIO and sensor setup even if you're not a hardware person. - **The RAG and fine-tuning sections are advanced** (Late): If you're new to these concepts, read the RAG implementation carefully (chunking, embeddings, retrieval) but consider the agentic RAG and fine-tuning as reference material for future projects rather than must-do exercises. - **Follow the projects, don't just read** (All): The book's value is in the hands-on projects (bee counting, weather station, IoT control). Have a Pi ready and code along—the excerpts show the structure, but the real learning is in running the code. 【Coverage Limits】 This guide synthesizes the book's structure and key technical themes from the excerpts, but does not cover every code snippet, model configuration, or troubleshooting detail. The excerpts do not include the book's preface, acknowledgments, or the full text of the final fine-tuning chapter.
Page 3
. . . . . . . . . . . . 25 Hardware Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Raspberry Pi Zero 2W . . . . . . . ....
View in text
Page 5
data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 The Impulse Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 Pre...
View in text
Page 3
. . . . . . . . . . . 278 5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 Resources . . . . . . . . . . ....
View in text
Page 8
3 Technical Insights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 Practical Applications . . . . . . . . . . . . . . . . . . . ....
View in text
Page 10
Configuration for SLMs . . . . . . . . . . . . . . . . . . . 474 Lab 16: Ollama Installation and Testing . . . . . . . . . . . . . . . . . . . . . . 474 Week...
View in text
Page 12
we hope this book serves as both a guide and an inspiration. As you embark on this journey, remember that every expert was once a beginner. The learning path...
View in text
Page 17
book Machine Learning Systems, which we invite you to read. “Edge AI Engineering: Hands-on with the Raspberry Pi” is designed as a practical, project- based...
View in text
Page 20
ir capabilities are limited to their specific program- ming. In the first part of this book (Chapters 2-4), we explore fixed-function AI through computer vis...
View in text
Tags
AI categories
edge airaspberry picomputer vision
Publisher: UNIFEI
Publish Year: 2026
Language: English
File Format: PDF
File Size: 12.8 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…