Exploiting Semantic Information and Deep Matching for Optical Flow

Min Bai, Wenjie Luo, Kaustav Kundu, Raquel Urtasun

This paper, published by researchers at the University of Toronto (including Raquel Urtasun), presents a significant leap in optical flow estimation by moving away from purely pixel-based methods and toward a "semantic-aware" approach tailored for autonomous driving.

TL;DR

The authors improve optical flow by using instance-level semantic segmentation to decompose a scene into a static background and individual rigidly moving objects. By applying 3D epipolar constraints to each component and using a novel uncertainty-aware deep matching network, they achieved state-of-the-art results on the KITTI 2015 benchmark.

What Problem Does This Paper Address?

Estimating optical flow—the pattern of apparent motion of objects between two consecutive frames—is a fundamental challenge in computer vision. Traditional methods struggle with "large displacements" (objects moving very fast), texture-less regions (like a flat white wall), and shadows.

Most existing methods treat the entire image as a single optimization problem or try to segment moving objects based solely on their motion. This creates a "chicken and egg" problem: you need accurate motion to segment the object, but you need an accurate segmentation to model the object's specific motion. This paper breaks that cycle by using semantic information (knowing what a "car" is) to guide the motion estimation.

Methods

The authors propose a pipeline that treats the world as a collection of rigidly moving parts.

  1. Semantic Instance Segmentation: Instead of just identifying "cars" as a category, the system identifies individual cars. This is crucial because two cars moving in different directions shouldn't be treated as one blob. They use a combination of CNNs and 3D object detections to create these masks.
  2. The Epipolar Constraint: For the static background, motion is caused by the "ego-car" (the camera's own movement). For foreground cars, motion is a combination of the ego-car and the object's own 3D movement. In both cases, if the motion is rigid, a pixel's match in the next frame must lie on a specific line called the epipolar line. This reduces the search space from a 2D area to a 1D line, making it faster and more robust.
  3. Deep Matching Network: The authors designed a Siamese convolutional neural network (CNN) to compare image patches.
  4. Architecture: 9 convolutional layers with no pooling (to maintain resolution).
  5. Uncertainty: Unlike many networks that just give a "best guess," this network estimates the uncertainty of its matches. This allows the system to ignore "confident but wrong" matches caused by reflections or specularities.
  6. Integration: The final flow field is a "collage" where the background and each individual vehicle's flow are estimated independently using their respective epipolar constraints and then combined.

Datasets

The primary dataset used for both training the matching network and evaluating the final system is the KITTI 2015 Optical Flow benchmark.

  • It consists of 200 training and 200 test image pairs taken from a car driving through real-world traffic.
  • The authors generated 22 million training patches from the 200 training pairs to train their deep matching network.

Key Insights and Ideas

  • Semantics as a Prior: The "aha moment" is realizing that in driving scenarios, we already know the "rules" of the scene. Most things are either static or rigid vehicles. Exploiting this structure is far more effective than trying to learn motion from scratch for every pixel.
  • 1D Search is King: By using the fundamental matrix to define epipolar lines for each object, the search space for a matching pixel is reduced by orders of magnitude. This naturally filters out many potential outliers.
  • Informative Loss Functions: During training, the authors didn't just penalize the network for being wrong; they used a "soft" target distribution that gave partial credit for being very close (within 1-2 pixels) to the ground truth. This helps the network learn the underlying similarity of patches more effectively.

Key Results

At the time of its release, this method outperformed all published monocular approaches on the KITTI 2015 benchmark by a "large margin."

  • Accuracy: On the KITTI test set, the "Fl-all" error (percentage of pixels with incorrect flow) was 11.62%. For comparison, the popular EpicFlow method had an error of 27.10%, and DiscreteFlow had 22.38%.
  • Background Dominance: The method was particularly strong at estimating background flow (8.61% error), thanks to the robust ego-motion constraints.
  • Robustness: The use of uncertainty allowed the system to handle specularities on windshields and shadows on the road that typically confuse standard flow algorithms.

Limitations and Future Work

  • Segmentation Failures: The system's performance is heavily dependent on the quality of the initial segmentation. If a vehicle (like a truck or van) isn't recognized by the semantic segmenter, the system defaults to treating it as part of the background, leading to high error for that object.
  • Rigidity Assumption: The model assumes everything is a rigid 3D object. It would likely struggle with non-rigid motion, such as pedestrians walking or trees swaying in the wind.
  • Temporal Consistency: The current version only looks at two frames at a time. The authors suggest that incorporating temporal information (tracking objects over many frames) could further improve the segmentation and motion smoothness.

Summary updated

BibTeX
@inproceedings{bai2016exploiting,
  author = {Min Bai and Wenjie Luo and Kaustav Kundu and Raquel Urtasun},
  title = {{Exploiting Semantic Information and Deep Matching for Optical Flow}},
  booktitle = {European Conference on Computer Vision},
  year = {2016},
  url = {https://openreview.net/forum?id=S1bGRKZOWB},
}
Figure