📚 Course contents
AI & Computer Vision, lesson 38 of 52
Claude Vision & Multimodal AI
Introduction
YOLO is a specialist: it finds players and balls thousands of times a second, but it can't tell you what's going on. Claude can look at a picture and describe the scene, read a scoreboard, or explain why a moment matters. Today you'll learn when to call in the detective, how to ask for answers your code can use, and where its limits are.
By the end of this lesson you'll be able to:
- Explain what multimodal means and how a picture is sent in a request
- Compare YOLO and Claude vision honestly: speed, cost, offline, counting, understanding
- Prepare a picture (shrink, encode) and estimate its token cost
- Ask for JSON and validate it strictly
- Choose when to ask Claude instead of asking on every frame
- Explain the privacy question before sending pictures of people
Working principle
Two different kinds of seeing
| YOLO (lesson 23 to lesson 25) | Claude vision | |
|---|---|---|
| Trained for | One job: find these classes, draw boxes | General understanding of pictures and language |
| Output | Boxes and scores, every frame | Words or JSON you ask for |
| Speed | Milliseconds, on your laptop | About a second or more, over the internet |
| Cost | Free to run after training | Pays per picture |
| Knows your pitch | Yes, if trained on it | Only what it can see now |
| Counting, exact positions | Good | Approximate (Anthropic says so) |
| Understanding a situation | No | Yes: "the keeper is out of position" |
| Works offline | Yes | No |
Neither is better. They are good at different things.
What multimodal means
A multimodal model takes more than one kind of input (text and images) and answers in text. You send the picture and the question together. The picture goes in a content block of type image, the question in one of type text.
Pictures cost tokens
A picture is chopped into 28 by 28 pixel patches; each patch is one token. A 640 by 360 picture is 23 by 13 = 299 tokens. A large photo is capped (about 1,568 tokens on older models, up to about 4,784 on newer ones). Cost and speed both grow with tokens, so send no more detail than you need. Shrinking first is free accuracy for your wallet.
When to ask Claude (and when not to)
Never ask on every frame. Ask:
- On a schedule (every 5 seconds, say).
- When your detector is unsure or silent (a possible miss).
- When something important just happened (a goal, a whistle), as a second opinion.
should_ask_claude in Cell 2 does the first two and waits at least a second between calls.
Ask for JSON, validate the JSON
Free text is lovely for people and awful for programs. Ask for a fixed JSON shape, then check it: right keys, right types, sensible ranges, allowed values. Four of our tests are about rejecting broken answers. Anything that crosses a boundary (network, model, user) gets validated.
Know the limits
From Anthropic's own documentation, Claude vision can:
- Be approximate at counting, especially lots of small things.
- Be approximate at exact positions and sizes. Verify before trusting coordinates.
- Make mistakes on small, rotated or low-quality pictures.
- Not identify people. It will describe what it sees but will not name a person from their face.
A ball seen from the far side of a pitch is exactly the kind of small thing that is hard. So expect disagreements, and treat them as a reason to look, not as a verdict.
Privacy, again
A picture of children leaves your school's network and goes to a company's servers. Before you do that: do you have consent (lesson 14)? Can you crop out faces, or send a smaller picture that does not show them? Is a number enough instead of a picture? In India's data protection law, children's data carries stricter duties (lesson 14 explains the dates). When in doubt, send the facts, not the faces.
A good partnership
Your detector finds, fast and cheaply. Claude understands, slowly, and costs money. The best systems let the first filter and the second explain. That is also what lesson 42 (highlights) and lesson 46 (tactics) will do.

