Processing Megapixel Images with Deep Attention-Sampling Models - - PowerPoint PPT Presentation

processing megapixel images with deep attention sampling
SMART_READER_LITE
LIVE PREVIEW

Processing Megapixel Images with Deep Attention-Sampling Models - - PowerPoint PPT Presentation

Processing Megapixel Images with Deep Attention-Sampling Models Angelos Katharopoulos & Fran cois Fleuret ICML, June 11, 2019 Funded by How do DNNs process large images? Cropping and downsampling to a manageable resolution (e.g. 224


slide-1
SLIDE 1

Processing Megapixel Images with Deep Attention-Sampling Models

Angelos Katharopoulos & Fran¸ cois Fleuret ICML, June 11, 2019

Funded by

slide-2
SLIDE 2

How do DNNs process large images?

Cropping and downsampling to a manageable resolution (e.g. 224 × 224) Dividing the image into patches and processing them separately

∗image taken from the Imagenet dataset

  • A. Katharopoulos

Deep Attention-Sampling Models 2/9

slide-3
SLIDE 3

Our contributions

◮ Disentangle the computational and memory requirements from the input

resolution.

◮ Sample from a soft attention to only process a fraction of the image in high

resolution.

◮ We derive gradients through the sampling for all parameters and train our models

end-to-end.

  • A. Katharopoulos

Deep Attention-Sampling Models 3/9

slide-4
SLIDE 4

Soft Attention

Given an input x we define a neural network Ψ(x) that uses attention Ψ(x) = g K

  • i=1

a(x)if (x)i

  • = g
  • EI∼a(x)[f (x)I]
  • ,

where f (x) ∈ RK×D are the features and a(x) ∈ RK

+ is the attention distribution.

  • A. Katharopoulos

Deep Attention-Sampling Models 4/9

slide-5
SLIDE 5

Attention Sampling

We approximate Ψ(x) by Monte Carlo Ψ(x) ≈ g   1 N

  • q∈Q

f (x)q   where Q = {qi ∼ a(x) | i ∈ {1, 2, . . . , N}}. We show that

◮ Sampling from the attention is optimal to approximate Ψ(x) if

f (x)i = f (x)j ∀ i, j

◮ We can compute the gradients both for the parameters a(·) and f (·)

  • A. Katharopoulos

Deep Attention-Sampling Models 5/9

slide-6
SLIDE 6

Processing Megapixel Images with Deep Attention-Sampling Models

  • A. Katharopoulos

Deep Attention-Sampling Models 6/9

slide-7
SLIDE 7

Processing Megapixel Images with Deep Attention-Sampling Models

  • A. Katharopoulos

Deep Attention-Sampling Models 6/9

slide-8
SLIDE 8

Processing Megapixel Images with Deep Attention-Sampling Models

  • A. Katharopoulos

Deep Attention-Sampling Models 6/9

slide-9
SLIDE 9

Processing Megapixel Images with Deep Attention-Sampling Models

  • A. Katharopoulos

Deep Attention-Sampling Models 6/9

slide-10
SLIDE 10

Processing Megapixel Images with Deep Attention-Sampling Models

  • A. Katharopoulos

Deep Attention-Sampling Models 6/9

slide-11
SLIDE 11

Processing Megapixel Images with Deep Attention-Sampling Models

  • A. Katharopoulos

Deep Attention-Sampling Models 6/9

slide-12
SLIDE 12

Qualitative evaluation of the attention distribution (1)

Full Image Epithelial Cells Ilse et al. (2018) Attention Sampling

  • A. Katharopoulos

Deep Attention-Sampling Models 7/9

slide-13
SLIDE 13

Qualitative evaluation of the attention distribution (2)

Ground Truth Ilse et al. (2018) Attention Sampling

Extracted patch

  • A. Katharopoulos

Deep Attention-Sampling Models 8/9

slide-14
SLIDE 14

Thank you for your time!

Speed limit sign detection

500 1000 1500 Memory/sample (MB) 0.10 0.15 0.20 0.25 0.30 Test Error 20 40 60 80 100 Time/sample (s) 0.10 0.15 0.20 0.25 0.30 Test Error

Come talk to us at poster #3 at Pacific Ballroom.

  • A. Katharopoulos

Deep Attention-Sampling Models 9/9