Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... ·...

87

Transcript of Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... ·...

Page 1: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 2: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Martian lava field, NASA, Wikipedia

Page 3: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Old Man of the Mountain, Franconia, New Hampshire

Page 4: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Pareidolia

http://smrt.ccel.ca/2013/12/16/pareidolia/

Page 5: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Reddit for more : )https://www.reddit.com/r/Pareidolia/top/

Page 6: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Pareidolia

Seeing things which aren’t really there…

DeepDream as reinforcement pareidolia

Page 7: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Powerpoint Alt-text Generator

Vision-based caption generator

Page 8: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

8

“tabby cat”

1000-dim vector

< 1 millisecond

ConvNets perform classification

end-to-end learning

[Slides from Long, Shelhamer, and Darrell]

Page 9: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 10: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 11: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 12: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 13: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 14: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 15: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

15

R-CNN: Region-based CNN

Figure: Girshick et al.

Page 16: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Stage 2: Efficient region proposals?

• Brute force on 1000x1000 = 250 billion rectangles• Testing the CNN over each one is too expensive

• Let’s use B.C. vision! Before CNNs• Hierarchical clustering for segmentation

Uijlings et al., 2012, Selection Search Thanks to Song Cao

Page 17: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Remember clustering for segmentation?

Oversegmentation Undersegmentation

Hierarchical Segmentations

Page 18: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Cluster low-level features

• Define similarity on color, texture, size, ‘fill’

• Greedily group regions together by selecting the pair with highest similarity

– Until the whole image become a single region

• Draw a bounding box around each one

– Into a hierarchy

Page 19: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Thanks to Song Cao

Vs Ground Truth

Page 20: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Thanks to Song Cao

Page 21: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

22

R-CNN: Region-based CNN

Figure: Girshick et al.

10,000 proposals with recall 0.991 is better….but still takes 17 seconds per image to generate them.Then I have to test each one!

Page 22: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Fast R-CNN

RoI = Region of Interest

Figure: Girshick et al.

Multi-task loss

Page 23: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Fast R-CNN

Figure: Girshick et al.

- Convolve whole image into feature map (many layers; abstracted)- For each candidate RoI:

- Squash feature map weights into fixed-size ‘RoI pool’ – adaptive subsampling!- Divide RoI into H x W subwindows, e.g., 7 x 7, and max pool

- Learn classification on RoI pool with own fully connected layers (FCs)- Output classification (softmax) + bounds (regressor)

Page 24: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

What if we want pixels out?

semanticsegmentation

25

monocular depth estimation Eigen & Fergus 2015

boundary prediction Xie & Tu 2015optical flow Fischer et al. 2015

[Long et al.]

Page 25: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 26: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

R-CNN

many seconds

“cat”

“dog”

R-CNN does detection

[Long et al.]

Page 27: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

28

~1/10 second

end-to-end learning

???

[Long et al.]

Page 28: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

UC Berkeley

Fully Convolutional Networksfor Semantic Segmentation

Jonathan Long* Evan Shelhamer* Trevor Darrell29

[CVPR 2015] Slides from Long, Shelhamer, and Darrell

Page 29: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

“tabby cat”

30

A classification network…

[Long et al.]

Number of filters, e.g., 64Number of perceptrons in MLP layer, e.g., 1024

Page 30: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

“tabby cat”

31

A classification network…

[Long et al.]

Page 31: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

“tabby cat”

32

A classification network…

[Long et al.]

The response of every kernel across all positions are attached densely to the array of perceptrons in the fully-connected layer.

Page 32: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

“tabby cat”

33

A classification network…

[Long et al.]

The response of every kernel across all positions are attached densely to the array of perceptrons in the fully-connected layer.

AlexNet: 256 filters over 6x6 response mapEach 2,359,296 response is attached to one of 4096 perceptrons, leading to 37 mil params.

Page 33: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Problem

We want a label at every pixel

Current network gives us a label for the whole image.

Approach:• Make CNN for every sub-image size ?

• ‘Convolutionalize’ all layers of network, so that we can treat it as one (complex) filter and slide around our full image.

Page 34: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Long, Shelhamer, and Darrell 2014

Page 35: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

“tabby cat”

38

A classification network…

[Long et al.]

The response of every kernel across all positions are attached densely to the array of perceptrons in the fully-connected layer.

AlexNet: 256 filters over 6x6 response mapEach 2,359,296 response is attached to one of 4096 perceptrons, leading to 37 mil params.

Page 36: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 37: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

41

Convolutionalization

[Long et al.]

1x1 convolution operates across all filters in the previous layer, and is slid across all positions.

Number of filtersNumber of filters

Page 38: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Back to the fully-connected perceptron…

Perceptron is connected to everyvalue in the previous layer (across all channels; 1 visible).

[Long et al.]

Page 39: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 40: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

1x1100

Page 41: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

45

Convolutionalization

[Long et al.]

1x1 convolution operates across all filters in the previous layer, and is slid across all positions.

e.g., 64x1x1 kernel, with shared weights over 13x13 output, x1024 filters = 11mil params.

# filters, e.g. 1024# filters, e.g., 64

Page 42: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

46

Becoming fully convolutional

[Long et al.]

Arbitrary-sized image

When we turn these operations into a convolution, the 13x13 just becomes another parameter and our output size adjust dynamically.

Now we have a vector/matrix output, and our network acts itself like a complex filter.

Multiple outputs

Page 43: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Long, Shelhamer, and Darrell 2014

Page 44: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

48

Upsampling the output

[Long et al.]

Some upsamplingalgorithm to return us to H x W

Page 45: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

49

End-to-end, pixels-to-pixels network

[Long et al.]

Page 46: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

conv, pool,nonlinearity

upsampling

pixelwiseoutput + loss

End-to-end, pixels-to-pixels network

50

[Long et al.]

Page 47: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

51

What is the upsampling layer?

This one.

[Long et al.]

Hint: it’s actually an upsampling network

Page 48: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

‘Deconvolution’ networks learn to upsample

Zeiler et al., Deconvolutional Networks, CVPR 2010Noh et al., Learning Deconvolution Network for Semantic Segmentation, ICCV 2015

Often called “deconvolution”, but misnomer.Not the deconvolution that we saw in deblurring -> that is division in the Fourier domain.

‘Transposed convolution’ is better.

Page 49: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Upsampling with transposed convolution

Convolution

Page 50: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Upsampling with transposed convolution

ConvolutionTransposed convolution = padding/striding smaller

image then weighted sum of input x filter: ‘stamping’ kernel

2x2, stride 1, 3x3 kernel,upsample to 4x4

2x2, stride 2, 3x3 kernel,upsample to 5x5.

Page 51: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

111

111

111

1 2

3 4

Kernel

Feature map

1 2

3 4

Padded feature map

Inspired by andriys

Page 52: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

111

111

111

1 2

3 4

Inspired by andriys

Kernel

Input feature map

1 2

3 4

Padded input feature map

1 1 1

1 1 1

1 1 1

Output feature map

Page 53: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

111

111

111

1 2

3 4

Kernel

Input feature map

1 2

3 4

Padded input feature map

1 4 4 3

1 4 4 3

1 4 4 3

Output feature map

Inspired by andriys

Page 54: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

111

111

111

1 2

3 4

Kernel

Input feature map

1 2

3 4

Padded input feature map

1 4 7 6 3

1 4 7 6 3

1 4 7 6 3

Output feature map

Inspired by andriys

Page 55: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

111

111

111

1 2

3 4

Kernel

Input feature map

1 2

3 4

Padded input feature map

1 4 7 8 5 2

1 4 7 8 5 2

1 4 7 8 5 2

Output feature map

Inspired by andriys

Page 56: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

111

111

111

1 2

3 4

Kernel

Input feature map

1 2

3 4

Padded input feature map

1 4 7 8 5 2

5 8 11 8 5 2

5 8 11 8 5 2

4 4 4

Output feature map

Inspired by andriys

Page 57: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

111

111

111

1 2

3 4

Kernel

Input feature map

1 2

3 4

Padded input feature map

1 4 7 8 5 2

5 18 21 18 5 2

5 18 21 18 5 2

4 14 14 10

Output feature map

Inspired by andriys

Page 58: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

111

111

111

1 2

3 4

Kernel

Input feature map

1 2

3 4

Padded input feature map

1 4 7 8 5 2

5 18 31 34 21 8

9 32 55 60 37 14

11 38 66 64 43 16

7 24 41 44 27 10

3 10 17 18 11 4

Output feature map

Inspired by andriys

Page 59: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

111

111

111

1 2

3 4

Kernel

Input feature map

1 2

3 4

Padded input feature map

18 31 34 21

32 55 60 37

38 66 64 43

24 41 44 27

Cropped output feature map

Inspired by andriys

Page 60: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Is uneven overlap a problem?

Yes = causes grid artifacts

Could fix it by picking stride/kernel numbers which have no overlap…

Uneven overlap across output

Page 61: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Is uneven overlap a problem?

Yes = causes grid artifacts

Could fix it by picking stride/kernel numbers which have no overlap…

Or…think in frequency!Introduce explicit bilinear upsampling before transpose convolution; let kernels of transpose convolution learn to fill in only high-frequency detail.

https://distill.pub/2016/deconv-checkerboard/

Uneven overlap across output

Page 62: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Zeiler et al., Deconvolutional Networks, CVPR 2010Noh et al., Learning Deconvolution Network for Semantic Segmentation, ICCV 2015

‘Deconvolution’ networks learn to upsample

Often called “deconvolution”, but misnomer.Not the deconvolution that we saw in deblurring -> that is division in the Fourier domain.

‘Transposed convolution’ is better.

Page 63: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

But we have downsampled so far…

How do we ‘learn to create’ or ‘learn to restore’ new high frequency detail?

Page 64: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Spectrum of deep features

Combine where (local, shallow) with what (global, deep)

Fuse features into deep jet

(cf. Hariharan et al. CVPR15 “hypercolumn”) 68

[Long et al.]

Page 65: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Learning upsampling kernels with skip layer refinement

interp + sum

interp + sum

dense output

End-to-end, joint learningof semantics and location

[Long et al.]

Page 66: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Learning upsampling kernels with skip layer refinement

interp + sum

interp + sum

dense output

[Long et al.]

Page 67: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Learning upsampling kernels with skip layer refinement

interp + sum

interp + sum

dense output

End-to-end, joint learningof semantics and location

[Long et al.]

Page 68: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

stride 32

no skips

stride 16

1 skip

stride 8

2 skips

ground truthinput image

Skip layer refinement

72

[Long et al.]

Page 69: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

ResultsFCN SDS* Truth Input

74

Relative to prior state-of-the-art SDS:

- 30% relative improvementfor mean IoU

- 286× faster

*Simultaneous Detection and Segmentation Hariharan et al. ECCV14

[Long et al.]

Page 70: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Long, Shelhamer, and Darrell 2014

What can we do with an FCN?

Page 71: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

im2gps (Hays & Efros, CVPR 2008)

6 million geo-tagged Flickr images

http://graphics.cs.cmu.edu/projects/im2gps/

How much can an image tell about its geographic location?

Page 72: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Nearest Neighbors according to gist + bag of SIFT + color histogram + a few others

Page 73: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 74: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

PlaNet - Photo Geolocation with Convolutional Neural Networks

Tobias Weyand, Ilya Kostrikov, James Philbin

ECCV 2016

Page 75: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Discretization of Globe

Page 76: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Network and Training

• Network Architecture: Inception with 97M parameters

• 26,263 “categories” – places in the world

• 126 Million Web photos

• 2.5 months of training on 200 CPU cores

Page 77: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 78: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 79: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

PlaNet vs im2gps (2008, 2009)

Page 80: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Spatial support for decision

Page 81: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

PlaNet vs Humans

Page 82: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

PlaNet vs. Humans

Page 83: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

PlaNet summary

• Very fast geolocalization method by categorization.

• Uses far more training data than previous work (im2gps)

• Better than humans!

Page 84: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Even more:Faster R-CNN

Ren et al. 2016https://arxiv.org/abs/1506.01497

‘Region Proposal Network’ uses CNN feature maps.

Then, FCN on top to classify.

End to end object detection.

(FCN)

Page 85: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption

Even more! Mask R-CNN

Extending Faster R-CNN for Pixel Level Segmentation

He et al. - https://arxiv.org/abs/1703.06870

Second output which is segmentation mask

Add new training data: segmentation masks

Page 86: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption
Page 87: Martian lava field, NASA, Wikipediacs.brown.edu/courses/cs143/2017_Fall/lectures_Fall... · DeepDream as reinforcement pareidolia. Powerpoint Alt-text Generator Vision-based caption