CSE 163
ML and Images
��Suh Young Choi
Machine Learning
Terms from machine learning
2
ML + Images
How do we do machine learning on images?
3
10 | 20 | 30 |
40 | 50 | 60 |
70 | 80 | 90 |
10 |
20 |
30 |
40 |
50 |
60 |
70 |
80 |
90 |
Raw Image
Unrolled Image
ML + Images
Pros: Simple transformation (just a call to reshape!)
Cons: It loses the idea of “neighboring” pixels (up/down)
4
Despite these drawbacks, it can work in practice on some problems!
Neural Network
Based on how our brains �work
5
Example
What is the output for this neuron if the inputs are 0 for the first input and 1 for the second. The activation function is the step function (0 if negative, 1 otherwise). The bias should be subtracted from the weighted sum before applying the activation function.
6
3
-2
4
Example
What is the output for this neuron if the inputs are 0 for the first input and 1 for the second. The activation function is the step function (0 if negative, 1 otherwise). The bias should be subtracted from the weighted sum before applying the activation function.
7
3
-2
4
0
1
Example
What is the output for this neuron if the inputs are 0 for the first input and 1 for the second. The activation function is the step function (0 if negative, 1 otherwise). The bias should be subtracted from the weighted sum before applying the activation function.
8
3
-2
4
0
1
0 * 3 + 1 *(-2) - 4 = -6
Example
What is the output for this neuron if the inputs are 0 for the first input and 1 for the second. The activation function is the step function (0 if negative, 1 otherwise). The bias should be subtracted from the weighted sum before applying the activation function.
9
3
-2
4
0
1
0 * 3 + 1 *(-2) - 4 = -6
squish(-6) = 0
Image Classification
10
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
11
Image Classification
12
Unsupervised
Learning
So far, we have seen supervised machine learning, where we have to explicitly shown the algorithm the labels
Unsupervised machine learning lets the algorithm try to learn trends on its own without providing explicit labels
Examples
13