📦 Day 7

What AND Where

Until now the AI just said what a whole picture is. But a self-driving car needs to know where the people, cars, and signs are — with a box around each. That's object detection. Let's learn how we draw those boxes and grade them.

↓ let's detect
🏷️ The pro wordFinding and locating objects is object detection. The rectangles are bounding boxes, the overlap score is IoU (Intersection over Union), and removing duplicate boxes is Non-Max Suppression (NMS).
🔀 Two Jobs

Classification vs Detection

Same picture, two different questions. Classification gives the whole image one label. Detection finds every object and draws a box around each, with its own label. Tap the button to switch!

mode: classification
Classification = one answer for the whole picture ("a street 🏙️"). Detection = many answers, each with a box saying exactly where ("car here, person there, dog there").
🎯 Lab · The Overlap Score

How good is a box? The overlap score

A detection is only good if its box actually lands on the object. We grade it with the overlap score: how much your box and the correct box share, divided by the total space they cover. Drag your cyan box onto the green target (drag the middle to move, the corner to resize).

Overlap score (grown-ups call it IoU)
0%
🎯 Challenge: get the overlap score to 80%+. Perfect overlap = 100%. No overlap = 0%.
🔍 Curious? The exact recipe

IoU = area they share ÷ area they cover together. "Intersection over Union." If the boxes are identical, shared = total, so IoU = 1 (100%). If they don't touch, shared = 0, so IoU = 0. Detectors usually count a box as "correct" if IoU ≥ 50%.

🥊 Boss Build · Box It Up

Be the detector

Here's a scene with 3 objects. Drag each colored box onto the matching object. Your score is the average overlap across all three — get it to 70%+ to win, just like a real detector aims for.

Avg overlap: 0%
🔬 Real Model Lab

A real detector draws the boxes

This is YOLOS — a real object detector — running on your device. Point your camera at your desk, your room, your pets. It finds each object, draws a box, and labels it with a confidence score, live. (~10 MB one-time download; then cached and offline.)

not loaded
🚀 Beyond the Basics

How the pros really do it

Drawing and scoring boxes by hand shows the idea. Real detectors are trained networks:

🟢

Box + IoU by hand (what you did)

✅ Shows how detection is graded. ⚠️ A person can't box millions of images.

📦

Two-stage detectors

Faster R-CNN - very accurate, a bit slower.

One-stage and transformers (AI)

YOLO, SSD, RetinaNet (fast), DETR (transformer). ✅ Real-time. Judged by mAP.

🏷️ Pro names to look upbounding box · IoU · NMS · YOLO / Faster R-CNN / DETR.

🎉 Day 7 Complete!

You leveled up from what to where: object detection with boxes, and the overlap score (IoU) that grades every one.

Day 8: The 3 Flavors of Vision →
Tomorrow: boxes are just one way to "see." Next you'll compare all three: classification, detection, and segmentation (coloring every pixel). 🖼️
AI Adventure · Module 1 · Day 7 — made for young inventors 🚀