It is 7:40 in the morning and a radiologist is already behind. Overnight the hospital's scanners produced several hundred chest X-rays, and somewhere in that pile — statistically, almost certainly — there is a tumour the size of a grain of rice. Her eyes are good, but they are human eyes: they tire, they skip, they see what they expect to see. Down the hall, a piece of software reviews the same images in ninety seconds and flags eleven of them for a closer look. It never gets tired, never gets bored, and nobody wrote rules telling it what a tumour looks like — it learned from a million labeled examples.
That software is computer vision: the discipline of taking an array of pixel values and extracting meaning from it — a face, a tumour, a stop sign, a defect on a circuit board. The field went from "researchers can recognize handwritten digits" to "self-driving cars and medical imaging diagnostics" in roughly a decade, driven almost entirely by deep learning. What changed was not the cameras and not the pixels; it was the shift from telling machines what to look for to letting them learn it from examples.
This lesson sets the map for the next 29 — what computer vision is, why it stubbornly resisted decades of clever engineering, what happened in 2012 that broke the dam, and how the decade after — from AlexNet through ResNet to ViT, CLIP, and SAM — carried the field into its foundation-model era, where one giant pretrained model does work that used to take a bespoke system per task. Along the way you will run your first "image": eight pixels by eight, built by hand, so you can see for yourself that a picture is nothing more than a grid of numbers.
Strip away the demos and the products, and every computer-vision system does the same thing: it takes an image (or a stream of them) and produces structured output that some downstream decision can consume. The interesting differences lie in what that output looks like. Five canonical tasks cover almost everything practitioners build:
| Task | Output | Example |
|---|---|---|
| Classification | One label per image | "cat" / "dog" |
| Detection | Boxes + labels | "person at (x, y, w, h)" |
| Segmentation | Pixel-wise label map | "this pixel is road, this is sky" |
| Generation | A new image | "a photo of an astronaut on a horse" |
| Multi-modal | Text + image jointly | "describe this picture" |


The course covers all five. Sections 1-2 build classification; Section 3 adds detection; Section 4 adds segmentation; Section 5 generation; Section 6 the modern multi-modal landscape.
Keep this table in your pocket. When someone describes a vision problem — "we need to know whether the weld is defective", "we need to blur every face in the frame" — your first job is to decide which row it belongs to, because that choice determines the architecture you reach for, the labels you must collect, and the metric you will be judged by. Before any of that, though, it is worth being honest about why this problem is hard at all.
Humans recognize a cat from any angle, in any lighting, behind any occlusion. A computer sees a 224 × 224 × 3 array of integers from 0 to 255 — about 150 000 numbers, none of which individually says anything about whiskers. The challenge is the gap between those numbers and "cat", and the gap is wider than intuition suggests because so many things change the numbers without changing the answer:
Walk around the cat and every pixel changes with your viewpoint; wait for dusk and illumination rewrites the numbers again. Step back and the animal shrinks from a thousand pixels to thirty. Let it slip behind the sofa so only the tail shows, or photograph it in a cluttered living room where the background supplies most of the image, and the array changes yet again. And even holding all of that fixed, "cat" is not one appearance but a family of them: a Persian, a Maine Coon, and a hairless Sphynx share a label while sharing remarkably few pixels.
Every one of these variations leaves the label unchanged — it is still a cat — while scrambling the raw numbers dramatically. Two photographs of the same animal can disagree on virtually every pixel, while a cat and a dog shot in the same studio pose can agree on most of them. Whatever a vision system learns, it must be a function that is wildly insensitive to some enormous changes and exquisitely sensitive to some subtle ones. That is the entire difficulty of the field, compressed into one sentence.
To feel the gap yourself, run the cell below. It builds an 8 × 8 "image" out of nothing but a numpy array, prints the raw numbers, then displays them as pixels. Press Run and compare the two panels: the left is what you see, the right is the same picture with the number the computer sees written on every pixel. Then edit the values — change the 0.6 to 0.2, or move the bars — and run it again to watch the "image" change.
The plus sign is obvious to you and completely invisible to the machine — it has no concept of "plus sign", only 64 floating-point numbers. Everything in this course is about closing that gap. Pre-deep-learning systems tried to close it with hand-engineered features (SIFT, HOG, SURF). Deep nets learn the right features directly from data — that one shift is what unlocked the modern era.
It was not for lack of trying. Before 2012, a state-of-the-art vision system was a carefully engineered pipeline: hand-designed feature extractors such as SIFT, HOG, and SURF turned pixels into descriptors, a classical classifier (an SVM or a random forest) made the decision on top of them, and a layer of domain-specific tricks patched up whatever the first two stages missed for each particular task.
Performance plateaued in the high 70s % on ImageNet classification. Each new task required new features, designed by hand, by experts, over months — and a descriptor that worked beautifully for pedestrian detection told you nothing about reading street signs. The field was research-heavy, brittle, and didn't generalize, and everyone inside it knew. Then came the autumn of 2012, and a result that people who were in the room still describe with something like awe.
A ten-point jump, on a benchmark where progress had been measured in fractions of a point, was not an improvement — it was a change of regime. Within five years, ImageNet classification went from "human performance is the goal" to "humans are the bottleneck". By 2017, top models were beating the human baseline. The same architectural ideas powered detection, segmentation, and eventually generation. So what did the neural network know that twenty years of feature engineering didn't?
The honest answer: nothing, at first. What it had was the right shape. Images are not arbitrary arrays of numbers — they have structure, and deep networks (specifically convolutional ones) are built around three properties of that structure. Nearby pixels are highly correlated, so convolutions look only at small local neighborhoods. A cat is a cat whether it sits in the top-left of the frame or the bottom-right, so convolutions reuse the same weights at every spatial position. And visual content is hierarchical: pixels compose into edges, edges into textures, textures into parts, parts into objects, and stacking convolutional layers reproduces that hierarchy automatically.
CNNs (Lesson 4) are the architecture that bakes these three inductive biases into the model — you can think of a CNN as an opinion about images, cast in code, that happens to be correct. Sections 1-4 use CNNs heavily; Sections 5-6 introduce Transformers, which trade some of these biases for flexibility once data and compute are abundant. That trade is the hinge of the whole modern story, and it is worth telling in two acts.
The eight years after AlexNet were a land rush. Every idea that worked for classification was immediately re-aimed at every other task, and the milestones came annually:
| Year | Milestone | Why it mattered |
|---|---|---|
| 2012 | AlexNet | Learned features beat two decades of hand-engineering |
| 2014 | VGG, GANs | Deeper networks; networks that generate images |
| 2015 | ResNet, U-Net, Faster R-CNN | Skip connections unlock 100+ layers; segmentation and detection go deep |
| 2016 | YOLO | Real-time detection in a single forward pass |
| 2017 | Transformer (in NLP) | The architecture that would later cross over to vision |
By 2020 the recipe had stabilized into something almost boring: take a CNN pretrained on ImageNet, replace its final layer, and fine-tune it on your task. It worked so reliably that "train a bespoke model per problem" simply was computer vision. What ended the decade was not a failure of that recipe but a bigger idea arriving from next door.
Around 2020-2023, vision had what NLP had already lived through with GPT: the discovery that one enormous model, pretrained once on internet-scale data, can absorb so much general visual knowledge that whole categories of task-specific training become optional. Three models mark the shift. The Vision Transformer, or ViT (2020), chops an image into 16 × 16 patches and treats them exactly like words in a sentence; it carries weaker built-in assumptions than a CNN, but with enough pretraining data it pulls ahead, and it scales the way language models scale. CLIP (2021) was trained on hundreds of millions of image-caption pairs to match pictures with text, and the result is zero-shot classification: describe your classes in plain English ("a photo of a defective weld") and CLIP classifies images it has never been trained to label, with no dataset and no training run. And the Segment Anything Model, SAM (2023), trained on roughly a billion masks, returns a pixel-perfect mask when you click on any object — or pass a box, or a text prompt via its descendants — even for objects and image types it has never seen; SAM 2 (2024) extends the same promptable interface to video.
Around these three orbit a supporting cast you will meet later in the course: DINOv2, which learns general-purpose visual features from raw images with no labels at all; latent diffusion models (Stable Diffusion and its successors), which turned image generation from a research demo into a consumer product; and LLaVA-class vision-language models, which let a language model literally look at pictures and answer questions about them.
This is why the course is structured the way it is: Sections 1-4 build the CNN-era fundamentals — which still power most deployed systems and which every foundation model quietly rests on — and Sections 5-6 take you through generation, CLIP, SAM, and the vision-language frontier. Knowing the ideas is half the job; the other half is knowing the tools.
The ecosystem has consolidated around a fairly stable stack, and you will touch most of it over the next 29 lessons:
| Layer | What it provides |
|---|---|
| Frameworks | PyTorch (the research and course default), TensorFlow / Keras |
| Vision libraries | torchvision, timm (1000+ pretrained backbones) |
| Image I/O | Pillow (PIL), OpenCV |
| Augmentation | torchvision.transforms.v2, Albumentations |
| Detection / segmentation | Ultralytics (YOLO lineage), RT-DETR, SAM / SAM 2, detectron2 |
| Generation | 🤗 diffusers (Stable Diffusion, SDXL-class models), ComfyUI |
| Multi-modal | CLIP / SigLIP, LLaVA-class VLMs, 🤗 transformers |
This course uses PyTorch + torchvision as the primary stack, introduces timm in Section 2, uses Ultralytics and the DETR family for detection in Section 3, SAM in Section 4, 🤗 diffusers in Section 5, and CLIP / LLaVA in Section 6.
It is tempting to file computer vision under "tech industry", but the radiologist from the opening of this lesson is closer to the truth: most deployed vision systems live in unglamorous, high-value corners of ordinary industries. In healthcare, the same family of models that flags chest X-rays screens for diabetic retinopathy, finds tumors in MRI and CT, and classifies skin lesions. In cars, perception stacks handle lane keeping, pedestrian detection, and traffic-light classification; on factory floors, cameras catch defects on assembly lines and read QR codes and serial numbers with a reliability human inspectors cannot sustain over an eight-hour shift. Retailers use vision for checkout-free stores in the Amazon Go mold, shelf monitoring, and product recognition, while farmers fly drones whose imagery feeds crop-health, pest, and yield models. At the scale of the internet, vision systems flag harmful images and videos faster than any moderation team could, and at the other end of the temperament spectrum, the same mathematics powers Photoshop's generative fill, Midjourney, and Stable Diffusion and its successors.
None of these applications came free. If the 2012 story has a moral, it is that deep vision works because of two kinds of scale, and you should know the bill before you sign. The first is data: ImageNet holds 1.2 M labeled images across 1000 classes, and the modern pretraining datasets behind foundation models (LAION, JFT) run to billions. The second is compute: training a state-of-the-art model from scratch costs anywhere from thousands to millions of GPU-hours.
The practical implication is good news: most real-world projects don't train from scratch, and neither will you. Transfer learning (Lesson 7) starts from a model someone else spent the millions on and fine-tunes it for your problem — accuracy that would have taken months and a research lab in 2012 now takes minutes and a single GPU. Foundation models push the same logic further: CLIP and SAM ask you for no training at all, just a well-chosen prompt. The expensive part of the field has been socialized; the skill that remains scarce is knowing what to do with it.
That skill is exactly what this course is designed to build — not by surveying papers, but by making you ship working systems for each of the five canonical tasks:
Computer vision in 2026 is moving along three frontiers, and the course ends on all of them. The first is unification: vision is folding into general multi-modal models, one system that can classify, detect, describe, and answer questions about an image, steered by language instead of retrained per task. The second is video and 3D, where promptable video segmentation (SAM 2) meets Gaussian splatting for photoreal 3D scenes reconstructed from ordinary photos, along with models that predict how scenes evolve. The third is edge inference — small, quantized models running on phones, drones, and embedded hardware in real time — because a great model that misses its latency budget is not a product.
By the end of this lesson you can place any vision problem into one of the five canonical tasks, explain why learned features displaced hand-engineered ones, sketch the arc from AlexNet to SAM — and, thanks to your 8 × 8 plus sign, say with a straight face that an image is just a grid of numbers. Lesson 2 takes that last observation seriously and starts the practical work: how an image is actually represented inside a computer, and the handful of conventions (shapes, channel orders, value ranges) that every pipeline in the rest of the course will depend on.
One last thing. The radiologist's assistant from the opening of this lesson is not a thought experiment — convolutional networks very much like the ones you will build in Section 2 triage chest X-rays in production today, and there is no better way to make this lesson concrete than watching one work. Whenever you are ready, Lesson 2 is where the numbers begin.