flownet - learning optical flow with...

30
FlowNet - Learning Optical Flow with CNNs Prahal Arora Local maxima

Upload: lekiet

Post on 20-Nov-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

FlowNet -Learning OpticalFlow with CNNs

Prahal Arora

Local maxima

Page 2: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

What is Motion ...There are two possible answers.

1. First, physical movement of pixels, therefore motion has to be measured in a physical way.

1. Second, motion is human percept--motion is what we perceive in our brain, something we can sense and communicate

Page 3: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

What do you observe?

Page 4: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Same video in slow motion

Page 5: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

What is Optical Flow ...

Apparent motion of objects as perceived by an observer (eye or camera)

Measure objects/pixels displacement across 2 consecutive video frames/images

Page 6: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Optical flowCEO

Page 7: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Why is to so important to study optical flow

Video compression Tracking of objects Driving assistance sys

Page 8: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Visualizing optical flow fieldCEO

● Flow can be visualized using vectors○ visualization quickly becomes

unreadable

● Use HSV (Hue Saturation Value) components ○ codify the direction using color (Hue)○ codify the magnitude of the movement

by color intensity

Page 9: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Visualizing optical flow fieldCEO

● Stationary object (white)

● Moving object (color = direction)

Page 10: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

FlowNet● Input: 2 images

● Output: Optical Flow Field

● Trained end to end

Page 11: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Background● Goal: Estimate Optical Flow (Motion) from images

● Related work: ○ DeepMatching - Interpolate dense flow fields, preserve image

boundary [Revaud 2015] ○ DeepFlow - Aggregate features from fine to coarse [Weinzaepfel

2013] ○ EpicFlow - Focus on sparse matching (subset of pixels) [Revaud

2015] ○ FlowNet - Real-time, fast, and correlated features learning

[Fischer 2015]

Page 12: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

The contracting part of the network extracts a rich feature representationTwo architectures are proposed for the contracting part

Page 13: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

In simpler one, input image are stacked jointly

Page 14: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Alternatively, two images are processed separately, then the features are correlated and processed further

Page 15: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Correlation layer- Measuring patch

similarity in neighborhood

- Convolution of 2 data, no weights

Page 16: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Optimization trick- Compute correlation

only in neighborhood of size D = 2d + 1

- Reduce total computation fromc * w2 * h2

toc * w * h * D2

Where,

D: Neighborhood size d: Maximum displacement w: Width h: Height c: Number of channels

Page 17: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

The expanding part of the network, produces high resolution flow from the coarser features

Page 18: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

It makes use of upconvolution layers (deconvolution and transposed convolution) with concatenation of downsampled data

Page 19: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Post processing : Variational refinementCEO

● small motions (first row) the predicted flow is changed dramatically.

● larger motions (second row), big errors not corrected, but the flow field is smoothed, resulting in lower EPE

Page 20: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Loss and performance metric usedCEO

● L: Loss/EPE

● U, V: Ground Truth (horizontal, vertical displacement)

● U’, V’: Flow Estimate (horizontal, vertical displacement)

● N: Total Pixels in Image

Page 21: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

DatasetCEO

● Middlebury (Moving, rigid scenes)

● KITTI (Street view scenes)

● Sintel (Animation movie)

● Flying Chairs (Background (from Flickr) + chair + transformation)

Page 22: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Flying chair datasetCEO

● Random background images from Flickr

● Overlay segmented images of chairs

● Randomly sample affine transformation parameters for the background and the chairs

● Data have little in common with the real world

● Generate arbitrary amounts of samples

● Also, data is augmented

Page 23: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Results

+v variational refinement +ft fine tuning

FlowNet worse

FlowNet better

Page 24: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Results..(cont)CEO

Outperforms EpicFlow for small objects with large displacement

Page 25: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Results..(cont)CEO

Page 26: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Pros

Thorough comparison with EpicFlow, DeepFlow

Pros

Processes image 5 to 10 frames per second, also very fast

Pros

Smoother flow (variational refinement)

Pros

No handcrafted methods for aggregation, matching, and interpolation

11.01.XX

Captures fine details and small objects and also small and big displacements

Pros

Page 27: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Pro 6.0CEO

● FlowNet 2.0 is even better! ○ FlowNet 2.0 newer version was just released last year (2017).

○ Crispier, more stacking.

○ “FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks” (http://openaccess.thecvf.com/content_cvpr_2017/papers/Ilg_FlowNet_2.0_Evol ution_CVPR_2017_paper.pdf)

○ Marginal improvement over FlowNet 2015

Page 28: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Cons

The correlation layer is not simple, with k and D as additional hyper parameters

Cons

Unrealistic images, synthetic data set

Cons

The performance only competitive, could not beat some state of the art methods

11.01.XX

Page 29: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Demo

Page 30: FlowNet - Learning Optical Flow with CNNscseweb.ucsd.edu/~mkchandraker/classes/CSE291/Winter2018/Lectures/... · What is Motion ... There are two possible answers. 1. First, physical

Thank you