+ All Categories
Home > Documents > High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June...

High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June...

Date post: 20-May-2020
Category:
Upload: others
View: 38 times
Download: 0 times
Share this document with a friend
114
High Level Computer Vision Deep Learning for Computer Vision Part 4 Bernt Schiele - [email protected] Mario Fritz - [email protected] https://www.mpi-inf.mpg.de/hlcv
Transcript
Page 1: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

High Level Computer Vision

Deep Learning for Computer Vision Part 4

Bernt Schiele - [email protected] Mario Fritz - [email protected]

https://www.mpi-inf.mpg.de/hlcv

Page 2: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

High Level Computer Vision - June 26, 2o18

Overview

• Recurrent Neural Networks ‣ motivation for recurrent neural networks

‣ a particularly successful RNN: Long Short Term Memory (LSTM)

‣ slide credit to Andrej Karpathy, Jeff Donahue and Marcus Rohrbach

• Yann LeCun… ‣ What’s Wrong With Deep Learning (keynote June 2015)

‣ slide credit to Yann LeCun (and Xiaogang Wang)

!2

Page 3: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Recurrent Networks offer a lot of flexibility:

slide credit: Andrej Karpathy

Page 4: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Sequences in VisionSequences in the input… (many-to-one)

JumpingDancingFightingEating

Running

slide credit: Jeff Donahue

Page 5: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Sequences in VisionSequences in the output… (one-to-many)

A happy brown dog.

slide credit: Jeff Donahue

Page 6: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Sequences in VisionSequences everywhere! (many-to-many)

A dog jumps over a hurdle.

slide credit: Jeff Donahue

Page 7: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

ConvNets

Krizhevsky et al., NIPS 2012

slide credit: Jeff Donahue

Page 8: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Problem #1

fixed-size, static input

224

224

slide credit: Jeff Donahue

Page 9: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Problem #1

fixed-size, static input

224

224

???

slide credit: Jeff Donahue

Page 10: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Problem #2

Krizhevsky et al., NIPS 2012

slide credit: Jeff Donahue

Page 11: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

output is a single choice from a fixed list of options

doghorsefishsnake

cat

Problem #2slide credit: Jeff Donahue

Page 12: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

output is a single choice from a fixed list of options

a happy brown doga big brown doga happy red doga big red dog

Problem #2

slide credit: Jeff Donahue

Page 13: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Recurrent Networks offer a lot of flexibility:

slide credit: Andrej Karpathy

Page 14: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Language Models

Recurrent Neural Network Based Language Model [Tomas Mikolov, 2010]

Word-level language model. Similar to:

slide credit: Andrej Karpathy

Page 15: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Suppose we had the training sentence “cat sat on mat”

We want to train a language model: P(next word | previous words)

i.e. want these to be high: P(cat | [<S>]) P(sat | [<S>, cat]) P(on | [<S>, cat, sat]) P(mat | [<S>, cat, sat, on]) P(<E>| [<S>, cat, sat, on, mat])

slide credit: Andrej Karpathy

Page 16: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Suppose we had the training sentence “cat sat on mat”

We want to train a language model: P(next word | previous words)

First, suppose we had only a finite, 1-word history: i.e. want these to be high: P(cat | <S>) P(sat | cat) P(on | sat) P(mat | on) P(<E>| mat)

slide credit: Andrej Karpathy

Page 17: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

h0

x0 <START>

y0

x1 “cat”

h1

y1

“cat sat on mat”

x2 “sat”

h2

y2

x3 “on”

h3

y3

x4 “mat”

h4

y4

300 (learnable) numbers associated with each word in vocabulary

slide credit: Andrej Karpathy

Page 18: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

h0

x0 <START>

y0

x1 “cat”

h1

y1

“cat sat on mat”

x2 “sat”

h2

y2

x3 “on”

h3

y3

x4 “mat”

h4

y4

300 (learnable) numbers associated with each word in vocabulary

hidden layer (e.g. 500-D vectors) h4 = tanh(0, Wxh * x4)

slide credit: Andrej Karpathy

Page 19: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

h0

x0 <START>

y0

x1 “cat”

h1

y1

“cat sat on mat”

x2 “sat”

h2

y2

x3 “on”

h3

y3

x4 “mat”

h4

y4

300 (learnable) numbers associated with each word in vocabulary

10,001-D class scores: Softmax over 10,000 words and a special <END> token. y4 = Why * h4

hidden layer (e.g. 500-D vectors) h4 = tanh(0, Wxh * x4)

slide credit: Andrej Karpathy

Page 20: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

h0

x0 <START>

y0

x1 “cat”

h1

y1

“cat sat on mat”

x2 “sat”

h2

y2

x3 “on”

h3

y3

x4 “mat”

h4

y4

300 (learnable) numbers associated with each word in vocabulary

10,001-D class scores: Softmax over 10,000 words and a special <END> token. y4 = Why * h4

hidden layer (e.g. 500-D vectors) h4 = tanh(0, Wxh * x4 + Whh * h3)

Recurrent Neural Network:

slide credit: Andrej Karpathy

Page 21: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Training this on a lot of sentences would give us a language model. A way to predict

P(next word | previous words)

x0 <START>

slide credit: Andrej Karpathy

Page 22: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Training this on a lot of sentences would give us a language model. A way to predict

P(next word | previous words) h0

x0 <START>

y0

slide credit: Andrej Karpathy

Page 23: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Training this on a lot of sentences would give us a language model. A way to predict

P(next word | previous words) h0

x0 <START>

y0

x1 “cat”

sample!

slide credit: Andrej Karpathy

Page 24: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Training this on a lot of sentences would give us a language model. A way to predict

P(next word | previous words) h0

x0 <START>

y0

x1 “cat”

h1

y1

slide credit: Andrej Karpathy

Page 25: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Training this on a lot of sentences would give us a language model. A way to predict

P(next word | previous words) h0

x0 <START>

y0

x1 “cat”

h1

y1

x2 “sat”

sample!

slide credit: Andrej Karpathy

Page 26: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Training this on a lot of sentences would give us a language model. A way to predict

P(next word | previous words) h0

x0 <START>

y0

x1 “cat”

h1

y1

x2 “sat”

h2

y2

slide credit: Andrej Karpathy

Page 27: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Training this on a lot of sentences would give us a language model. A way to predict

P(next word | previous words) h0

x0 <START>

y0

x1 “cat”

h1

y1

x2 “sat”

h2

y2

x3 “on”

sample!

slide credit: Andrej Karpathy

Page 28: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Training this on a lot of sentences would give us a language model. A way to predict

P(next word | previous words) h0

x0 <START>

y0

x1 “cat”

h1

y1

x2 “sat”

h2

y2

x3 “on”

h3

y3

slide credit: Andrej Karpathy

Page 29: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Training this on a lot of sentences would give us a language model. A way to predict

P(next word | previous words) h0

x0 <START>

y0

x1 “cat”

h1

y1

x2 “sat”

h2

y2

x3 “on”

h3

y3

x4 “mat”

sample!

slide credit: Andrej Karpathy

Page 30: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Training this on a lot of sentences would give us a language model. A way to predict

P(next word | previous words) h0

x0 <START>

y0

x1 “cat”

h1

y1

x2 “sat”

h2

y2

x3 “on”

h3

y3

x4 “mat”

h4

y4

slide credit: Andrej Karpathy

Page 31: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Training this on a lot of sentences would give us a language model. A way to predict

P(next word | previous words) h0

x0 <START>

y0

x1 “cat”

h1

y1

x2 “sat”

h2

y2

x3 “on”

h3

y3

x4 “mat”

h4

y4

samples <END>? done.

slide credit: Andrej Karpathy

Page 32: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

“straw hat”

training example

slide credit: Andrej Karpathy

Page 33: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

“straw hat”

training example

slide credit: Andrej Karpathy

Page 34: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

“straw hat”

training example

X

slide credit: Andrej Karpathy

Page 35: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

“straw hat”

training example

X

h0

x0 <START>

y0

x1 “straw”

h1

y1

x2 “hat”

h2

y2

<START> straw hat

slide credit: Andrej Karpathy

Page 36: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

“straw hat”

training example

X

h0

x0 <START>

y0

x1 “straw”

h1

y1

x2 “hat”

h2

y2

<START> straw hat

before: h0 = tanh(0, Wxh * x0)

now: h0 = tanh(0, Wxh * x0 + Wih * v)

slide credit: Andrej Karpathy

Page 37: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

test image

slide credit: Andrej Karpathy

Page 38: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

test image

x0 <START>

<START>

slide credit: Andrej Karpathy

Page 39: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

h0

x0 <START>

y0

<START>

test image

slide credit: Andrej Karpathy

Page 40: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

h0

x0 <START>

y0

<START>

test image

straw

sample!

slide credit: Andrej Karpathy

Page 41: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

h0

x0 <START>

y0

<START>

test image

straw

h1

y1

slide credit: Andrej Karpathy

Page 42: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

h0

x0 <START>

y0

<START>

test image

straw

h1

y1

hat

sample!

slide credit: Andrej Karpathy

Page 43: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

h0

x0 <START>

y0

<START>

test image

straw

h1

y1

hat

h2

y2

slide credit: Andrej Karpathy

Page 44: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

h0

x0 <START>

y0

<START>

test image

straw

h1

y1

hat

h2

y2

sample! <END> token => finish.

slide credit: Andrej Karpathy

Page 45: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Sequence Learning• Instances of the form x = <x1, x2, x3, …, xT>

• Variable sequence length T

• Learn a transition function f with parameters W:

• f should update hidden state ht and output yt

h0 := 0

for t = 1, 2, 3, …, T:

<yt, ht> = fW(xt, ht-1)

ht-1

xt

ht

yt

f

slide credit: Jeff Donahue

Page 46: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Sequence LearningEquivalent to a T-layer deep network, unrolled in time

0

x1

h1

z1

f

x2

h2

z2

f

xT

hT

zT

fhT-1…

slide credit: Jeff Donahue

Page 47: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Sequence Learning• What should the transition function f be?

• At a minimum, we want something non-linear and differentiable

ht-1

xt

ht

zt

f

slide credit: Jeff Donahue

Page 48: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Sequence Learning• First attempt — a “vanilla” RNN:

ht = σ(Whxxt + Whhht-1 + bh)

zt = σ(Whzht + bz)

• Problems

• Difficult to train — vanishing/exploding gradients

• Unable to “select” inputs, hidden state, outputs

slide credit: Jeff Donahue

Page 49: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Sequence Learning• LSTM - Long Short Term Memory

[Hochreiter & Schmidhuber, 1997] • Selectively propagate or forget hidden state • Allows long-term dependencies to be learned

• Effective for • speech recognition • handwriting recognition • translation • parsing

slide credit: Marcus Rohrbach

Page 50: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Marcus Rohrbach | LRCN – an Architecture for Visual Recognition, Description, and Question Answering |

LSTM for sequence modeling

!50

slide credit: Marcus Rohrbach

Page 51: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Marcus Rohrbach | LRCN – an Architecture for Visual Recognition, Description, and Question Answering |

LSTM for sequence modeling

!51

slide credit: Marcus Rohrbach

Page 52: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Sequence Learning

LSTM (Hochreiter &

Schmidhuber, 1997)

ct-1

Exactly remember previous

cell state — discard input

0

ct-11

ct-1

slide credit: Jeff Donahue

Page 53: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Sequence Learning

LSTM (Hochreiter &

Schmidhuber, 1997)

Forget previous

cell state — only use

modulated input Wxt-1

Wxt-1

00

1Wxt-1

slide credit: Jeff Donahue

Page 54: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

LRCN• Long-term Recurrent Convolutional Networks

• End-to-end trainable framework for sequence problems in vision

CNN LSTM

slide credit: Jeff Donahue

Page 55: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Image Description

CNN

LSTM LSTM LSTM LSTM LSTMsequential output

a<BOS> dog is jumping <EOS>

slide credit: Jeff Donahue

Page 56: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Image Description

CNN

LSTM LSTM LSTM LSTM LSTMsequential output

a<BOS> dog is jumping <EOS>

= embed a one-hot vector

slide credit: Jeff Donahue

Page 57: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Image Description

CNN

LSTM LSTM LSTM LSTM LSTMsingle LSTM layer

a<BOS> dog is jumping <EOS>

= embed a one-hot vector

slide credit: Jeff Donahue

Page 58: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Image Description

two LSTM layers

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

<BOS> <EOS>

CNN

a dog is jumping

slide credit: Jeff Donahue

Page 59: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Image Description

two LSTM layers, factored

CNN

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

LSTM

dog is jumping <EOS>a <BOS>

slide credit: Jeff Donahue

Page 60: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Image Description

ArchitectureFlickr30k [1]

Caption-to-Image Recall@1

Single Layer 14.1%

Two Layer 3.8%

Two Layer, Factored 17.5%

Four Layer, Factored 15.8%

[1] P. Hodosh, A. Young, M. Lai, and J. Hockenmaier. From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions.

slide credit: Jeff Donahue

Page 61: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Image Description

COCO [1] CIDEr-D c5

ScoresCaffeNet VGGNet

[2]

Raw 68.8% 77.3%

Finetuned 75.8% 83.9%

[1] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollar, and C. L. Zitnick. Microsoft coco: Com- mon objects in context. arXiv preprint arXiv:1405.0312, 2014. [2] K. Simonyan & A. Zisserman. “Very Deep Convolutional Networks for Large-Scale Image Recognition”. ICLR 2015.

slide credit: Jeff Donahue

Page 62: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Image Descriptionslide credit: Jeff Donahue

Page 63: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Image Descriptionslide credit: Jeff Donahue

Page 64: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Activity Recognition

LSTM

CNN

LSTM

CNN

LSTM

CNN

LSTM

CNN

studying running jumping jumping

Average

jumping

sequential input

slide credit: Jeff Donahue

Page 65: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Activity Recognition

UCF101Class.Acc.

RGB Optical Flow

RGB+Flow

Single-Frame CNN

67.7% 72.2% 78.8%

LRCN 68.2% 77.5% 82.7%

Khurram Soomro, Amir Roshan Zamir and Mubarak Shah, UCF101: A Dataset of 101 Human Action Classes From Videos in The Wild., CRCV-TR-12-01, November, 2012.

slide credit: Jeff Donahue

Page 66: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Video Description

LSTM

CNN

LSTM

LSTM

LSTM

LSTM LSTM LSTM LSTMLSTM

CNN

LSTM

LSTM

CNN

LSTM

LSTM

CNN

LSTM

sequential input & output

<BOS>

LSTM LSTMLSTMLSTM

<EOS>jumpingisdoga

slide credit: Jeff Donahue

Page 67: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Video Description

Coherent Multi-Sentence Video Description with Variable Level of Detail. A. Rohrbach, M. Rohrbach, W. Qiu, A. Friedrich and M. Pinkal and B. Schiele. GCPR, 2014.

MPII TACoS Multi-Level Dataset

slide credit: Jeff Donahue

Page 68: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Video Description

LSTM

LSTM

LSTM LSTM LSTM LSTM

LSTM LSTMLSTMLSTM

Pre-trained Detector Predictions

<BOS> <EOS>vegetablescutsmana

slide credit: Jeff Donahue

Page 69: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Video Description

ApproachGeneration Accuracy

(BLEU)

SMT 26.9%

LRCN 28.8%

slide credit: Jeff Donahue

Page 70: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Video Description

CNNCNNCNNCNN

Average

LSTM LSTM LSTM LSTM LSTM

a dog is jumping <EOS><BOS>

Subhashini Venugopalan, Huijuan Xu, Jeff Donahue, Marcus Rohrbach, Raymond Mooney, Kate Saenko. “Translating Videos to Natural Language Using Deep Recurrent Neural Networks,” NAACL 2015 (oral). http://arxiv.org/abs/1412.4729

slide credit: Jeff Donahue

Page 71: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Wow I can’t believe that worked

Page 72: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Wow I can’t believe that worked

Page 73: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Well, I can kind of see it

Page 74: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Well, I can kind of see it

Page 75: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Not sure what happened there...

Page 76: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

“The Unreasonable Effectiveness of Recurrent Neural Networks”

karpathy.github.io

slide credit: Andrej Karpathy

Page 77: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Character-level language model example

Vocabulary: [h,e,l,o]

Example training sequence: “hello”

slide credit: Andrej Karpathy

Page 78: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

slide credit: Andrej Karpathy

Page 79: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

slide credit: Andrej Karpathy

Page 80: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

slide credit: Andrej Karpathy

Page 81: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

slide credit: Andrej Karpathy

Page 82: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Try it yourself: char-rnn on Github (uses Torch7)

slide credit: Andrej Karpathy

Page 83: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Cooking Recipes

slide credit: Andrej Karpathy

Page 84: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Obama Speeches

slide credit: Andrej Karpathy

Page 85: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

slide credit: Andrej Karpathy

Page 86: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

slide credit: Andrej Karpathy

Page 87: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Learning from Linux Source Code

slide credit: Andrej Karpathy

Page 88: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

slide credit: Andrej Karpathy

Page 89: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

slide credit: Andrej Karpathy

Page 90: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

slide credit: Andrej Karpathy

Page 91: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Yoav Goldberg n-gram experiments

Order 10 ngram model on Shakespeare:

slide credit: Andrej Karpathy

Page 92: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

But on Linux:

slide credit: Andrej Karpathy

Page 93: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Visualizing and Understanding Recurrent Networks Andrej Karpathy*, Justin Johnson*, Li Fei-Fei (on arXiv.org as of June 2015)

slide credit: Andrej Karpathy

Page 94: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Hunting interpretable cells

Page 95: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Hunting interpretable cells

slide credit: Andrej Karpathy

Page 96: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Hunting interpretable cells

quote detection cell

slide credit: Andrej Karpathy

Page 97: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Hunting interpretable cells

line length tracking cell

slide credit: Andrej Karpathy

Page 98: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Hunting interpretable cells

slide credit: Andrej Karpathy

Page 99: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Hunting interpretable cells

if statement cell

slide credit: Andrej Karpathy

Page 100: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Hunting interpretable cells

quote/comment cell

slide credit: Andrej Karpathy

Page 101: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Hunting interpretable cells

code depth cell

slide credit: Andrej Karpathy

Page 102: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

Hunting interpretable cells

something interesting cell (not quite sure what)

slide credit: Andrej Karpathy

Page 103: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

!103

Page 104: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

!104

slide credit: Yan LeCun

Page 105: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

!105

Page 106: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

!106

slide credit: Yann LeCun

Page 107: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

High Level Computer Vision - June 14, 2o17 !107

Page 108: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

!108

Page 109: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

!109

slide credit: Yann LeCun

Page 110: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

!110

slide credit: Xiaogang Wang

Page 111: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

!111

slide credit: Xiaogang Wang

Page 112: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

!112

slide credit: Xiaogang Wang

Page 113: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

!113

slide credit: Xiaogang Wang

Page 114: High Level Computer Vision Deep Learning for Computer ...€¦ · High Level Computer Vision - June 26, 2o18 Overview • Recurrent Neural Networks ‣ motivation for recurrent neural

b

!114

slide credit: Xiaogang Wang


Recommended