CSE 163
Convolutions�
Suh Young Choi�
🎶 Listening to: Inception soundtrack
💬 Before Class: What’s been your favorite before-class music so far?
Announcements
Project Proposal open now on Gradescope
HW5 and LR5 due on Thursday (last one of the quarter!)
2
This Time
Last Time
3
Images as
Matrices
4
Grey-scale images can be represented as matrices.
Grey-scale: 255
Grey-scale: 0
data = imageio.imread(‘...’)�
data[rows, columns] = #
Color Images
When you overlap each color channel, it creates a picture we are used to seeing.
5
data[rows, columns, channels] = #
Convolution
When wanting to use “local” information, we commonly use a sliding window approach (i.e. a convolution)
Move the sliding window across the image, and compute the sum of the element wise product of the window (kernel) and image
6
3 | 3 | 2 | 1 | 0 |
0 | 0 | 1 | 3 | 1 |
3 | 1 | 2 | 2 | 3 |
2 | 0 | 0 | 2 | 2 |
2 | 0 | 0 | 0 | 1 |
Image
0 | 1 | 2 |
2 | 2 | 0 |
0 | 1 | 2 |
Kernel
Convolution Example
7
Common Kernels
What do the numbers in the kernel do?
8
Identity
Edge Detection
Sharpen
Box Blur
Image Classification
For a really long time, image classification was done by painstakingly crafting these features (like edge detectors), by hand.
This kind of worked, but we quickly hit our peak using this method.
Then came the buzz-word… deep learning
9
Image Classification
10
LR topics may include:
11
Before Next Time
Next Time
12