Learning Optical Flow From a Few Matches

Shihao Jiang, Yao Lu, Hongdong Li, Richard Hartley

Optical flow—the task of estimating per-pixel motion between two video frames—is a cornerstone of computer vision. While recent deep learning models like RAFT have set new records, they often rely on "dense correlation volumes." These volumes store the similarity between every pixel in the first image and every pixel in the second, leading to a massive $O(N^2)$ memory and computational bottleneck.

In this research from CVPR 2021, researchers from the Australian National University and CSIRO challenge the necessity of this "dense" approach. They demonstrate that most of that data is redundant and that state-of-the-art results can be achieved by focusing on just a few high-quality matches.

The Problem: Quadratic Complexity

To find where a pixel moved, traditional deep learning models compare a feature vector at pixel $(x, y)$ in Frame A to all possible locations in Frame B. If an image is $H \times W$, the resulting correlation volume contains $H \times W \times H \times W$ elements. This quadratic growth is a significant hurdle for hardware. To fit this into GPU memory, researchers typically resort to:

  1. Downsampling: Using low-resolution feature maps (typically 1/8th of the original image size).
  2. Limited Search: Restricting the search to a small neighborhood around the pixel (coarse-to-fine warping).

However, downsampling loses fine details—such as thin branches or small moving objects—and coarse-to-fine strategies often fail when objects move faster than their own scale.

Methodology: Sparse Correlation Volumes (SCV)

The authors propose a system that maintains the global search capability of models like RAFT but replaces the dense volume with a Sparse Correlation Volume (SCV). This representation stores only the top-$k$ (e.g., $k=8$) matches for each pixel instead of a full dense grid.

The proposed sparse correlation volume (d) significantly reduces noise compared to the dense volume (c), leading to more accurate flow estimation (f) compared to RAFT (e).

Key Components

  • k-Nearest Neighbors (kNN) Selection: For every pixel in the first image, the model identifies only the $k$ most similar pixels in the second image.
  • Bilinear Splatting: Standard neural networks prefer dense data. To bridge this gap, the authors use "bilinear splatting" to map sparse coordinates onto a small, local integer grid. This "densifies" the information locally without the overhead of a global dense volume.
  • Iterative Refinement: Similar to RAFT, the model uses a Recurrent Neural Network (GRU) to iteratively refine the flow estimate, pulling motion information from a multi-scale sparse pyramid.

Key Results and Insights

The shift to sparsity allows the model to process higher-resolution images, leading to significant performance gains:

  • Accuracy: On the Sintel Clean benchmark, the method achieved an Average Endpoint Error (EPE) of 1.72, an 11.3% improvement over the previous state-of-the-art (RAFT).
  • Memory Efficiency: By using a sparse volume, the authors could afford to use 1/4 resolution feature maps instead of the standard 1/8. Despite the higher resolution, the sparse method uses roughly 50% less memory than RAFT. At 1/8 resolution, the memory for the correlation volume itself drops from 191 MB to just 0.2 MB.
  • Fine Structure Recovery: Qualitative results demonstrate that the model successfully captures the motion of thin objects that dense, lower-resolution models often miss.

Conclusion

The "aha moment" of this work is the realization that in a dense correlation volume, the vast majority of entries represent "non-matches" that contribute nothing but noise. By focusing on a few good matches, the SCV approach enables higher-resolution processing and superior accuracy with a smaller memory footprint. While regions with heavy motion blur or featureless surfaces remain a challenge for top-$k$ selection, the efficiency gains of SCV represent a major step forward for high-resolution optical flow estimation.

Summary updated

BibTeX
@inproceedings{jiang2021learning,
  author = {Shihao Jiang and Yao Lu and Hongdong Li and Richard Hartley},
  title = {{Learning Optical Flow From a Few Matches}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01632},
}
Figure