Lecture 1 · Introduction
Computer Vision
Teaching machines to see: what it is, how it works, why we need it — and where it’s going
[Lecturer name] · [Course code] · [Date]
Today’s map
Eight parts, from pixels to agents
01
What is Vision
02
Where we stand
03
How a computer sees
04
Edges & filters
05
Convolutions
06
Architectures
07
Generative vision
08
Agents & future
Mosaic: Summer Palace © danielbuechele, CC BY 2.0 · motorcycle: Middlebury
01
Part 01 of 08
What is computer vision?
Why we would teach a machine to see — and four ways to define the field.
Part 01 · What is vision
Vision is our most powerful sense
We understand the world without touching it.
Contactless
Rich
Fast
Eye diagram: Biology Study (Facebook page)
Part 01 · What is vision
We already see perfectly. Why teach machines?
1 Automate
Count every part, all day.
2 Measure
Exact sizes, every time.
3 Surpass
See what eyes can’t.
Part 01 · What is vision
Four ways to define computer vision
Automating human vision
Processing information
Inverting image formation
Inverse graphics
Part 01 · What is vision
Vision is graphics run backwards
3D scene
2D image
Computer graphics
scene → image · well-posed
Computer vision
image → scene · ill-posed
Ill-posed: many 3D scenes → the same 2D image.
02
Part 02 of 08
Where do we stand today?
Six decades of research, what they taught us, and where computer vision works in the real world.
Part 02 · Where we stand
What 60 years of research taught us
1
Vision is hard to automate
2
It needs many disciplines
3
Real progress — fastest since 2012
4
Many applications work today
Optics
Signals
Computing
Neuroscience
Psychology
Biology
Part 02 · Where we stand
From reading digits to generating video
1966
Summer Vision Project
1982
Marr’s theory of vision
1998
LeNet reads digits
2001
Real-time face detection
2009
ImageNet dataset
2012
AlexNet: deep learning wins
2015
ResNet beats humans
2016
YOLO: real-time detection
2020
Vision Transformer
2021
CLIP: images + words
2022
Text-to-image (diffusion)
2024–26
Text-to-video with sound
Mosaic: Summer Palace © danielbuechele, CC BY 2.0 · motorcycle: Middlebury
Part 02 · Where we stand
13 places computer vision works today
01
Factory automation
02
Optical character recognition
03
Biometrics
04
Intelligent marketing
05
Security
06
Human–computer interaction
07
Entertainment & gaming
08
Visual effects
09
Augmented reality
10
Visual search
11
Autonomous navigation
12
Remote sensing
13
Medical image analysis
Next →
each one, with a case from Kazakhstan
Pagoda © danielbuechele, CC BY 2.0 · motorcycle: Middlebury 2014
Applications 01–02
Factories and reading text
01 Visual inspection
Find the defect, every part, every time.
02 Reading text (OCR)
Plates, documents, whole books.
Applications 03 · Biometrics
Your body as a password
Face
box + 5 landmarks
Fingerprint
ridge endings = minutiae
Iris
texture → binary code
Palm veins
case study next →
Case study · Kazakhstan
Kaspi Alaqan: paying with your palm
Enroll
IR scan
Match
Pay
1M
customers
20M
palm payments
~15K
merchant points
1 in 10
payments there
Launched 31 Oct 2025. Figures as of 1 Jul 2026 (Kaspi.kz CEO M. Lomtadze, via Finratings.kz). Hand image: illustration.
Applications 04–06
Shops, streets and the humble mouse
04 Marketing
A customer is looking.
05 Security
Detect, then track.
06 Optical mouse
A tiny camera under your hand.
Motorcycle photo: Middlebury 2014 stereo dataset (Scharstein et al.)
Applications 07–09
Games, films and face filters
07 Gaming
Your body is the controller.
08 Visual effects
Motion drives a character.
09 Augmented reality
Glasses follow the landmarks.
Applications 10–11
Search the world, navigate the world
10 Visual search
Point your camera, get the answer.
11 Navigation
Two cameras → depth (bright = near).
Pagoda © danielbuechele, CC BY 2.0 · stereo pair: Middlebury 2014
Applications 12–13
Seeing the planet and the human body
12 Remote sensing
water · land · cloud
13 Medical imaging
Retina → blood-vessel map
03
Part 03 of 08
How does a computer see?
An image is just an array of numbers — and that is exactly what makes vision hard.
Part 03 · How a computer sees
An image is an array of pixels
Pixel = picture element
Grayscale
0 = black … 255 = white
shape: H × W
Color (RGB)
Full HD ≈ 6.2 million numbers
shape: H × W × 3
Depth (RGB-D)
+ distance to each point
shape: H × W × 4
Part 03 · How a computer sees
What you see vs. what the computer sees
You see: the digit 7
The computer sees: 100 numbers between 0 and 255
0
0
0
0
0
0
0
0
0
0
0
0
180
255
255
255
255
230
0
0
0
0
60
90
90
120
255
200
0
0
0
0
0
0
0
140
255
60
0
0
0
0
0
0
30
250
170
0
0
0
0
0
0
0
150
255
40
0
0
0
0
0
0
20
245
160
0
0
0
0
0
0
0
120
255
60
0
0
0
0
0
0
0
200
210
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Part 03 · How a computer sees
Same object, completely different numbers
Viewpoint
Illumination
Occlusion
Scale & deformation
Clutter
Variation within a class
Plus the ambiguity from Part 1: a 2D image never fully determines the 3D world behind it.
Pagoda photo: danielbuechele, CC BY 2.0 · other photos CC0 / public domain
04
Part 04 of 08
From pixels to features
How a computer finds edges — the first step from raw numbers to meaning.
Part 04 · Edges & filters
An edge is a sharp change in brightness
f(x, y)
∂f/∂x
|∇f| edge strength
|∇f| = √( (∂f/∂x)² + (∂f/∂y)² )
∂f/∂x ≈ ½ [ f(x+1, y) − f(x−1, y) ]
Part 04 · Edges & filters
Filters: small kernels slid over the image
1
1
1
1
1
1
1
1
1
× 1/9
Box blur
1
2
1
2
4
2
1
2
1
× 1/16
Gaussian blur
−1
0
1
−2
0
2
−1
0
1
Sobel x
−1
−2
−1
0
0
0
1
2
1
Sobel y
Part 04 · Edges & filters
Worked example: Sobel finds a vertical edge
Input image (6 × 6)
10
10
10
80
80
80
10
10
10
80
80
80
10
10
10
80
80
80
10
10
10
80
80
80
10
10
10
80
80
80
10
10
10
80
80
80
∗
Sobel x kernel
−1
0
1
−2
0
2
−1
0
1
=
Output (4 × 4)
0
280
280
0
0
280
280
0
0
280
280
0
0
280
280
0
(−1·10 + 0·10 + 1·80) + (−2·10 + 0·10 + 2·80) + (−1·10 + 0·10 + 1·80)
= 70 + 140 + 70 = 280
05
Part 05 of 08
Neural networks & convolutions
Let the computer learn its own filters: the math behind convolutional neural networks.
Part 05 · Convolutions
A neuron: weighted sum, then a nonlinearity
x₁
x₂
x₃
w₁
w₂
w₃
Σ + b
σ
y
y = σ( w₁x₁ + w₂x₂ + w₃x₃ + b ) = σ( wᵀx + b )
ReLU(z) = max(0, z)
Deep = many layers
Learn
w ← w − η · ∂L/∂w
Part 05 · Convolutions
Part 05 · Convolutions
Why not an ordinary network on images?
Example input · one colour photo
224 × 224 × 3 = 150,528 numbers
height 224 px · width 224 px · 3 colour channels (R, G, B)
Fully connected
150.5M
150,528 inputs × 1,000 neurons
Convolutional
1,792
64 filters × (3×3×3 + 1 bias)
Local patches
Shared weights
≈ 84,000× fewer
Part 05 · Convolutions
The convolution operation
(I ∗ K)(i, j) = Σₘ Σₙ I(i + m, j + n) · K(m, n)
Kernel K
3 × 3
Stride S
S = 2 → ½ size
Padding P
P = 1 → same size
Output size
O = ⌊(W−K+2P)/S⌋ + 1
224, K3 P1 S1 → 224
224, K7 P3 S2 → 112
Part 05 · Convolutions
Sliding the window, step by step
Input: a vertical line
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
∗
Line detector
−1
2
−1
−1
2
−1
−1
2
−1
=
Feature map
−3
6
−3
−3
6
−3
−3
6
−3
ReLU →
After ReLU
0
6
0
0
6
0
0
6
0
1
Place
2
Multiply & add
3
Slide
4
ReLU
Part 05 · Convolutions
How CNNs learn their own edge detectors
0°
45°
90°
135°
Weights learned by backprop
Y[k,i,j] = σ( Σ X[c,i+m,j+n] · W[k,c,m,n] + b[k] )
Part 05 · Convolutions
Max pooling: keep the strongest signal
Feature map (4 × 4)
1
3
4
6
2
1
5
0
3
1
0
2
1
2
7
4
2 × 2 max
stride 2
Pooled (2 × 2)
6
5
3
7
Downsample
H/2 × W/2 → 4× fewer values
Robustness
shift 1 px → same max
Wider view
next 3 × 3 sees 6 × 6
Part 05 · Convolutions
Stack small filters to see more
receptive field = 2L + 1
1 layer → 3 × 3
2 layers → 5 × 5
3 layers → 7 × 7
one 7 × 7
three 3 × 3
Receptive field
7 × 7
7 × 7
Weights (per C²)
49
27
Nonlinearities
1
3
Same view, fewer weights → VGG, 2014
06
Part 06 of 08
Model architectures
Assembling layers into networks that classify, detect and segment — and the move to transformers.
Part 06 · Architectures
Anatomy of a CNN classifier
Input
224×224×3
Conv + ReLU
224×224×64
Max pool
112×112×64
Conv + ReLU
112×112×128
Max pool
56×56×128
Conv + ReLU
56×56×256
Global pool
vector of 256
cat 0.92
dog 0.06
fox 0.02
Dense + softmax
probabilities
Feature extractor · size shrinks, channels grow
Classifier head
softmax pₖ = exp(zₖ) / Σⱼ exp(zⱼ)
loss L = −log p(true class)
Part 06 · Architectures
Milestone architectures
ImageNet top-5 error · lower is better
human ≈ 5.1%
15.3%
AlexNet
2012 · 8 layers
7.3%
VGG-16
2014 · 16 layers
6.7%
GoogLeNet
2014 · 22 layers
3.57%
ResNet-152
2015 · 152 layers
Skip connection
y = F(x) + x
Part 06 · Architectures
Four core tasks, from coarse to fine
Classification
one label: “car”
Detection
box + label per object
Semantic segmentation
a class for every pixel
Instance segmentation
each object separately
Highway photo: Udacity CarND test images, © 2017 Udacity, MIT licence
Part 06 · Architectures
Encoder–decoder: compress, then rebuild
skip connections: copy fine detail across
Input image
Encoder: downsample
Bottleneck
Decoder: upsample
Output mask
Encoder → what
Decoder → where
Skips → fine detail
U-Net, 2015
Part 06 · Architectures
Vision Transformer: an image as a sequence
16 patch tokens + position embeddings
Transformer encoder
every patch attends to every patch
cat
Attention(Q, K, V) = softmax(QKᵀ / √d) · V
224² image, 16² patches → 196 tokens
07
Part 07 of 08
Generative & multimodal vision
Machines that describe what they see — and create images and video from words.
Part 07 · Image to text
From pixels to sentences in three steps
“A close-up of a tabby cat with green eyes.”
2015
CNN + LSTM
writes word by word
2021
CLIP
images and text in one space
2023 →
Vision-language models
see, read, answer, reason
Part 07 · Image to text
CLIP: learning to match images and words
image × text similarity (illustrative)
“a cat”
“coffee”
“a rocket”
“astronaut”
match
low
low
low
low
match
low
low
low
low
match
low
low
low
low
match
Two encoders
image + text → one space
Contrastive
pull N true pairs, push N² − N
Zero-shot
“a photo of a {class}”
Part 07 · Image to text
Inside a vision-language model
Image
+ question
1
Vision encoder
patches → vectors
2
Projector
→ visual tokens
3
Language model
image + question
4
Answer
token by token
P(answer) = Πₜ P( wₜ | w₁ … wₜ₋₁, visual tokens, question )
Q: What is in this picture?
A: A tabby cat with green eyes, looking to the side.
Part 07 · Generating images and video
Diffusion: learn to remove noise, then create
Forward (fixed): add noise
x₀ (data)
x₁
xₜ
…
x_T ~ N(0, I)
Reverse (learned): remove noise
xₜ = √ᾱₜ · x₀ + √(1 − ᾱₜ) · ε, ε ~ N(0, I)
Loss = ‖ ε − ε_θ(xₜ, t, prompt) ‖² ← predict the noise
Generate: pure noise → denoise, step by step
Part 07 · Generating images and video
How a text-to-video model works
Prompt
“a fox running through snow at sunset”
Text encoder
→ vectors
Diffusion transformer
noise → latent, N steps
Video decoder
→ frames
Clip
video + sound
Compress first
~8× space, ~4× time
Spacetime patches
3D tokens, attention across frames
Steered by text
cross-attention to the prompt
08
Part 08 of 08
Vision agents & the future
From seeing to acting — and what comes next for the field.
Part 08 · Vision agents
What is a vision agent?
Perceives · reasons · acts — in a loop.
Sees
Classic CV model
image → boxes
Sees + understands
“A tabby cat.”
Vision-language model
image + question → answer
Sees + understands + acts
Vision agent
goal → loop until done
Part 08 · Vision agents
Inside the perceive–reason–act loop
1 · Perceive
2 · Reason
goal: “feed the cat”
→ next step?
3 · Act
tool · click
robot arm · alert
4 · Observe
new frame →
done? update memory
goal + memory
Where they work today
Video analytics
Robotics
Industry
Computer use
Watch out for
hallucinations · tiny text · latency · prompt injection hidden in images
Motorcycle photo and depth: Middlebury 2014 stereo dataset (Scharstein et al.)
Part 08 · The future
Where computer vision is heading
World models
Genie 3 · Marble
Embodied AI
vision-language-action
3D & spatial intelligence
splats · SAM 3D · smart glasses
Open-vocabulary vision
find anything you can name
Beyond human eyes
infrared · thermal · lidar
Trust
deepfakes · C2PA · privacy
Part 08 · The future
Open problems
Robustness
new lighting, weather, places
Physical understanding
physics, counting, 3D
Efficiency
real time on tiny power
Data
fewer labels, more simulation
Responsibility
consent, bias, misinformation