{ "cells": [ { "cell_type": "markdown", "id": "17ad4fb5", "metadata": {}, "source": [ "# YOLO26 walkthrough\n", "\n", "This notebook is a beginner-friendly, interactive tour of the **YOLO26** object detection model used in `app.py`.\n", "\n", "By the end of this notebook you will be able to:\n", "\n", "1. Explain what YOLO does and why it's fast enough for real-time video.\n", "2. Describe the three main parts of a YOLO model's architecture (backbone, neck, head).\n", "3. Load the `yolo26n.pt` model and run it on an image.\n", "4. Read and interpret the raw outputs (boxes, classes, confidence scores).\n", "5. Visualize predictions, just like the Streamlit app does.\n", "\n", "> No GPU required; the \"nano\" (`n`) version of YOLO26 used here is small enough to run on a laptop CPU.\n", "\n", "For a deep dive into the architecture and design decisions behind YOLO26, see the paper this notebook draws on: Hidayatullah, P., & Tubagus, R. (2026). [*YOLO26: A Comprehensive Architecture Overview and Key Improvements*](https://arxiv.org/abs/2602.14582). arXiv:2602.14582." ] }, { "cell_type": "markdown", "id": "722bcd53", "metadata": {}, "source": [ "## 1. What is YOLO?\n", "\n", "**YOLO** stands for **You Only Look Once**. Older detection approaches scanned an image many times, looking at hundreds or thousands of overlapping regions to decide \"is there an object here?\". That's accurate but slow.\n", "\n", "YOLO instead looks at the **entire image in a single forward pass** through a neural network and directly predicts:\n", "- **Where** objects are (bounding boxes)\n", "- **What** they are (class labels, e.g. \"person\", \"dog\", \"car\")\n", "- **How confident** the model is (a score from 0 to 1)\n", "\n", "This single-pass design is what makes YOLO fast enough for **real-time** video, like the live webcam feed in `app.py`." ] }, { "cell_type": "markdown", "id": "94f5de8a", "metadata": {}, "source": [ "## 2. The architecture\n", "\n", "YOLO is built from three stages:\n", "\n", " \n", "**Image → [Backbone] → [Neck] → [Head] → Boxes + Classes + Scores**\n", "\n", "\n", "| Stage | Job | Architecture |\n", "|---|---|---|\n", "| **Backbone** | Extracts features from the raw pixels: edges, textures, shapes, at multiple scales. |