跳转至

Visualizing and Understanding

Visualizing what models have learned:

Visualizing filters

Visualizing final layer features

1

  • Somehow , the 4096-vectors computed by the net can really learn the features !

Dimensionality Reduction

2

  • PCA

3

  • t-SNE

Visualizing activations

4

5

Understanding input pixels

Identifying important pixels

Saliency via Occlusion

  • Mask part of the image before feeding to CNN, check how much predicted probabilities change
  • Computational Expensive

6

Saliency via Backprop

  • How much changing the val of a point can affect the result (Gradient!)

7

  • Such methods also find biases!

8

Intermediate features via (guided) backprop

9

  • For intermediate result, normal methods tend to produce bad pics.
  • Images come out nicer if you only backprop positive gradients through each ReLU (guided backprop)

10

11

Gradient ascent to visualize features

  • Generate a synthetic image that maximally activates a neuron.

Like Train A Best Image

\(I^* = argmax_I f(I)+R(I)\)

12

\(argmax_IS_c(I)-\lambda||I||_2^2\)

Simple regularizer: Penalize L2 norm of generated image

Better regularizer: Penalize L2 norm of image , also during optimization periodically

(1) Gaussian blur image

(2) Clip pixels with small values to 0

(3) Clip pixels with small gradients to 0

13

Adversarial perturbations

Style transfer

Features inversion

Given a CNN feature vector for an image, find a new image that:

  • Matches the given feature vector
  • “looks natural” (image prior regularization)

14

15

Deep dream

https://github.com/google/deepdream

Texture synthesis

See Slides

Neural style transfe

20

  • Average over all pairs of vectors, giving Gram matrix of shape C x C

  • Efficient to compute; reshape features from CxHxW to =CxHW then compute G = FFT

21

22

23

24

Details see Slides.

  • Problem: Style transfer requires many forward / backward passes through VGG; very slow!

  • Solution: Train another neural network to perform style transfer for us!

https://github.com/jcjohnson/fast-neural-style

25

  • Instance Normalization was developed for style transfer!

  • Network only for a single style.

27


最后更新: 2024年4月21日 10:20:14
创建日期: 2023年12月27日 18:58:21