Slides from Portland Machine Learning meetup, April 13th.
Abstract: You've heard all the cool tech companies are using them, but what are Convolutional Neural Networks (CNNs) good for and what is convolution anyway? For that matter, what is a Neural Network? This talk will include a look at some applications of CNNs, an explanation of how CNNs work, and what the different layers in a CNN do. There's no explicit background required so if you have no idea what a neural network is that's ok.
13. ImageNet
Challenge
ILSVRC+
ImageNet Classification error throughout years and groups
Li
Fei-‐Fei:
ImageNet
Large
Scale
Visual
Recogni,on
Challenge,
2014
14. Alexnet
Architecture
-‐
2012
Input
Conv
Relu
Pool
Conv
Relu
Pool
Conv
Relu
Conv
Relu
Conv
Relu
Pool
FC
Dropout
FC
Dropout
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
FC
1000
15. Alexnet
Architecture
-‐
2012
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
17. Tradi,onal
Approach
To
Image
Classifica,on
Input
Image
Hand
Extracted
Features
Classifier
Object
Label
18. Issues
• Who
makes
the
features?
– Need
an
expert
for
each
problem
domain
• Which
features?
– Are
they
the
same
for
every
problem
type?
• How
robust
are
these
features
to
real
images?
– Transla,on,
Rota,on,
contrast
changes,
etc.
20. Features
Are
Hierarchical
• A
squirrel
is
a
combina,on
of
fur,
arms,
legs,
&
a
tail
in
specific
propor,ons.
• A
tail
is
made
of
texture,
color,
and
spa,al
rela,onships
• A
texture
is
made
of
oriented
edges,
gradients,
and
colors
21. Image
Features
• A
feature
is
something
in
the
image
or
derived
from
it
that’s
relevant
to
the
task
• Edges
• Lines
at
different
angles,
curves,
etc.
• Colors,
or
pa@erns
of
colors
• SIFT,
SURF,
HOG,
GIST,
ORB,
etc
32. Backpropaga,on
• Error
propagates
backward
and
it
all
works
via
(normally
stochas,c)
gradient
descent.
• (wave
hands)
33.
34. Alexnet
Architecture
-‐
2012
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
37. Input:
Pixels
Are
Just
Numbers
h@ps://medium.com/@ageitgey/machine-‐learning-‐is-‐fun-‐part-‐3-‐deep-‐learning-‐and-‐convolu,onal-‐neural-‐networks-‐
f40359318721
39. Goals
• Need
to
detect
the
same
feature
anywhere
in
an
image
• Reuse
the
same
weights
over
and
over
• What
we
really
want
is
one
neuron
that
detects
a
feature
that
we
slide
over
the
image
40. Neuron
=
Filter
• Act
as
detectors
for
some
specific
image
feature
• Take
images
as
inputs
and
produce
image
like
feature
maps
as
outputs
41. Convolu,on
• Like
sliding
a
matrix
over
the
input
and
performing
dot
products
• It’s
all
just
matrix
mul,plica,on
55. Alexnet
Architecture
-‐
2012
Input
Conv
Relu
Pool
Conv
Relu
Pool
Conv
Relu
Conv
Relu
Conv
Relu
Pool
FC
Dropout
FC
Dropout
FC
1000
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
Dropout
57. Let’s
Predict
Something!
• We
have
all
these
features,
how
do
we
learn
to
label
something
based
on
them?
58. Alexnet
Architecture
-‐
2012
Input
Conv
Relu
Pool
Conv
Relu
Pool
Conv
Relu
Conv
Relu
Conv
Relu
Pool
FC
Dropout
FC
Dropout
FC
1000
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
Fully
Connected
59. Fully
Connected
Layers
• Each
neuron
is
connected
to
all
inputs
• Standard
mul,layer
neural
net
• Learns
non-‐linear
combina,ons
of
the
feature
maps
to
make
predic,ons
61. Alexnet
Architecture
-‐
2012
Input
Conv
Relu
Pool
Conv
Relu
Pool
Conv
Relu
Conv
Relu
Conv
Relu
Pool
FC
Dropout
FC
Dropout
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
FC
1000
62. Which
Class
Is
It
Again?
• FC-‐1000
gives
us
1000
numbers,
one
per
class,
how
do
we
compare
them?
63. Soqmax
• Mul,-‐class
version
of
logis,c
func,on
• Outputs
normalized
class
“probabili,es”
• Takes
m
inputs
and
produces
m
outputs
between
zero
and
one,
that
sum
to
one
• Cross-‐entropy
loss
• Differen,able
65. Alexnet
Architecture
-‐
2012
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
Layer
1
67. Alexnet
Architecture
-‐
2012
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
Layer
2
69. Alexnet
Architecture
-‐
2012
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
Layer
3
71. Alexnet
Architecture
-‐
2012
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
Layer
4
Layer
5
73. Alexnet
Architecture
-‐
2012
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
74. Alexnet
Architecture
-‐
2012
Input
Conv
Relu
Pool
Conv
Relu
Pool
Conv
Relu
Conv
Relu
Conv
Relu
Pool
FC
Dropout
FC
Dropout
ImageNet
Classifica,on
with
Deep
Convolu,onal
Neural
Networks
Alex
Krizhevsky,
Ilya
Sutskever
and
Geoffrey
E.
Hinton
Advances
in
Neural
Informa,on
Processing
Systems
25
eds.F.
Pereira,
C.J.C.
Burges,
L.
Bo@ou
and
K.Q.
Weinberger
pp.
1097-‐1105,
2012
FC
1000