Professional Documents
Culture Documents
Convolutional Neural Networks in Computer Vision: Jochen Lang
Convolutional Neural Networks in Computer Vision: Jochen Lang
Convolutional Neural Networks in Computer Vision: Jochen Lang
Vision
Jochen Lang
jlang@uottawa.ca
Source:
Alexei
Efros
1 1 1
1 1 1
1 1 1
Box Filter 1 1 1
1 1 1
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0
0 0
0 0
0 90
90 0
0 90
90 90
90 90
90 0
0 0
0
0
0 0
0 0
0 90
90 90
90 90
90 90
90 90
90 0
0 0
0
0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0
0
0 0
0 90
90 0
0 0
0 0
0 0
0 0
0 0
0 0
0
0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0
Box Filter 1 1 1
1 1 1
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 10
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
Box Filter 1 1 1
1 1 1
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 10 20
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
Box Filter 1 1 1
1 1 1
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 10 20 30
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
Box Filter 1 1 1
1 1 1
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 10 20 30 30
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
Box Filter 1 1 1
1 1 1
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 10 20 30 30
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
?
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
Box Filter 1 1 1
1 1 1
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 10 20 30 30
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 90 90 90 90 0 0
0 0 0 90 0 90 90 90 0 0
?
0 0 0 90 90 90 90 90 0 0 50
0 0 0 0 0 0 0 0 0 0
0 0 90 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
Box Filter 1 1 1
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 10 20 30 30 30 20 10
0 0 0 90 90 90 90 90 0 0 0 20 40 60 60 60 40 20
0 0 0 90 90 90 90 90 0 0 0 30 60 90 90 90 60 30
0 0 0 90 90 90 90 90 0 0 0 30 50 80 80 90 60 30
0 0 0 90 0 90 90 90 0 0 0 30 50 80 80 90 60 30
0 0 0 90 90 90 90 90 0 0 0 20 30 50 50 60 40 20
0 0 0 0 0 0 0 0 0 0 10 20 30 30 30 30 20 10
0 0 90 0 0 0 0 0 0 0 10 10 10 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
1 1 1
1 1 1
1 1 1
1 1 1
=
Original Blur (with a mean
filter)
Source: David Lowe
0 0 0
0 1 0
0 0 0
Original Filtered
(no change)
Source: David Lowe
0 0 0
0 0 1
0 0 0
1 0 -1
2 0 -2
1 0 -1
Sobel
Vertical Edge
(absolute value) Source: David Lowe
Jochen Lang, EECS
jlang@uOttawa.ca
Sobel Edge Filter
1 2 1
0 0 0
-1 -2 -1
Sobel
Horizontal Edge
(absolute value) Source: David Lowe
-
0 0 0 1 1 1
0
0
2
0
0
0
1
1
1
1
1
1 =
Sharpening filter
Original (accentuates edges)
5 x 5, = 1
• Cross-correlation is
• It is written:
• Convolution is commutative and associative
Source: Steve Seitz
=
– Convolving twice with Gaussian kernel of width
convolving once with kernel of width
Aliasing!
Not enough samples
1/8
1/4
G 1/8
G 1/4
Size of image
, ,
filter mask
• Improve Search
– Search over translations
• Classic coarse-to-fine strategy
– Search over scale
• Template matching
• E.g. find a face at different scales, e.g., MTCNN
Zhang et al. (2016).
• Roberts 0 1 1 0
-1 0 0 -1
-1 1
-1 1 1
or
-1
Source: Alexei Efros
Jochen Lang, EECS
jlang@eecs.uOttawa.ca
Image Gradient
• Two-dimensional vector
, ,
, ,
,
To find edges,
look for peaks
⋆
in
x-direction y-direction
• Size of output
– Maximal sizeof(f) + 2*sizeof(g) – 2
– Typically padding but sizeof(output) = sizeof(f)
– No padding sizeof(f) - 2*sizeof(g) + 2
g g
g g
g g
f f f
g g
g g
g g Image source S. Lazebnik
• Behaviour at edge
– Filter window beyond
the edge of the image
– Need to extrapolate
– Methods:
• clip filter (black)
• wrap around
• copy edge
• reflect across edge
f = image
h = filter
True
detections
False
detections
True
detections
• SSD as a filter
True
detections
True detections
Gaussian
Filter
Smoothing with
larger standard
deviations
suppresses
noise, but also
blurs the image
Source: S. Lazebnik
Gaussian
Median