binocular stereo - university of california, san...

45
Binocular Stereo Yangyue Wan

Upload: others

Post on 27-Jul-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Binocular StereoYangyue Wan

Page 2: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Binocular Stereo● Stereo Matching by Training a Convolutional Neural Network to Compare

Image Patches

● Efficient Deep Learning for Stereo Matching

Page 3: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Stereo Matching by Training a Convolutional Neural Network to Compare Image Patches

Page 4: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

What is Stereo Matching?● Different horizontal view

● Correspondence

● Disparity

Page 5: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Four Steps of Stereo Algorithm1. Matching cost computation

2. Cost aggregation

3. Optimization

4. Disparity

Q: What is matching cost?

Page 6: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

What is Matching Cost?● Matching cost measures the similarity/difference of pixels● Corresponding pixel is chosen in a way such that the similarity between the

pixels is high, which means matching cost is low● “Winner-takes-all”: For every pixel select the disparity with lowest cost

Page 7: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Matching Cost by Learning Similarity● Inspiration

● Construct dataset

○ Same amount of positive/negative training examples (pairs of patches) from KITTI/Middlebury

● Network architectures

○ Fast

○ Accurate

Page 8: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Network ArchitecturesFast: Cosine similarity

Loss:

Q: Why this loss?

Page 9: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Network ArchitecturesAccurate: FC layers

Loss:

Q: Why this loss?

Page 10: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Matching Cost● Inspiration

● Construct dataset

● Network architectures

● Computing the matching cost

○ Perform the forward pass for each image location and each disparity under consideration

Page 11: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Matching Cost● Computing the matching cost

○ Perform the forward pass for each image location and each disparity under consideration

○ Running time?

Page 12: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Stereo MethodThe raw outputs of previous steps are not enough to produce accurate disparity map, post-processing steps are needed

● Cross-based cost aggregation

● Semiglobal matching

● Computing the disparity image

○ Interpolation

○ Subpixel enhancement

○ Refinement

Page 13: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Stereo Method● Cross-based cost aggregation: Collected only from pixels of the same

physical object

○ Support region for position p

○ Combined support region

Page 14: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Stereo Method● Cross-based cost aggregation: Collected only from pixels of the same

physical object

○ Averaged matching cost

Page 15: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Stereo Method● Semiglobal matching

○ Understand basic semiglobal matching

Page 16: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Stereo Method● Semiglobal matching

○ Energy function

Page 17: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Stereo Method● Semiglobal matching

○ Cost function in order to minimize E(D)

○ Choose P1 and P2

Page 18: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Stereo Method● Semiglobal matching

○ Final cost

○ Repeat cross-based cost aggregation

Page 19: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Stereo Method● Compute the disparity image

○ Interpolation

○ Subpixel enhancement

Page 20: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Stereo Method● Compute the Disparity Image

○ Refinement

■ 5x5 median filter

■ Bilateral filter

Page 21: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Experiments● Datasets: KITTI 2012, KITTI 2015, Middlebury

Page 22: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat
Page 23: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Experiments● Datasets: KITTI 2012, KITTI 2015, Middlebury

Page 24: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat
Page 25: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Experiments● Datasets: KITTI 2012, KITTI 2015, Middlebury

Page 26: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat
Page 27: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Experiments● Details of learning (skip)

● Dataset augmentation

Page 28: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Experiments● Runtime

Page 29: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Experiments● Comparison of approaches for

○ Computing matching cost

○ Stereo method

Page 30: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat
Page 31: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Experiments● Effects of dataset size

● Transfer learning Q: What is transfer learning?● Hyperparameters (skip)

Page 32: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Stereo Matching by Training a Convolutional Neural Network to Compare Image Patches

● Learn similarity on pairs of patches to compute matching cost

● Two network used, for speed and accuracy separately

● Supervised way to train

● Output of the CNN is used to initialize the stereo matching cost

● A series of post-processing steps following……

Page 33: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Efficient Deep Learning for Stereo Matching

Page 34: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Introduction● Old methods use hand-crafted cost/energy functions

● Current CNN-based methods are very time-consuming

● The authors propose a new and faster network (similar to the Fast

Architecture in previous paper )

Page 35: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Network Architecture● Siamese network, remove ReLU from last layer● Use a product layer instead of another network

Page 36: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Training● Size of inputs

○ Left = receptive field size○ Right > receptive field size Q: Why?

● Size of outputs○ Left = 64○ Right = Q: Why?

● Softmax● Cross-entropy loss

Page 37: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Smoothing Deep Net Outputs● Cost aggregation

○ Simply performs average pooling over a window of size 5 x 5

● Semiglobal block matching○ Energy function

● Slanted plane (not very clear in the paper)● Sophisticated post-processing

○ In contrast to the “Compute the Disparity Image” part in previous paper, only use interpolation here, since the other two are found not indeedly improve performance

Page 38: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Experiments● Hyperparameters (skip)

● Datasets: KITTI 2012, KITTI 2015

Page 39: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Experiments● KITTI 2012

Page 40: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Q: How to explain?

Page 41: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Experiments● KITTI 2015

Page 42: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat
Page 43: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat
Page 44: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

DiscussionThat two papers were almost concurrent work, how are they related?

And the strengthens and weakness for each of them when compared?

Page 45: Binocular Stereo - University of California, San Diegocseweb.ucsd.edu/.../03_Binocular_Stereo_Yangyue.pdf · Choose P1 and P2. Stereo Method Semiglobal matching Final cost Repeat

Thank you!