Source-linked AI summary

Optical Flow Estimation using a Spatial Pyramid Network

Anurag Ranjan, Michael J. Black

arXiv:1611.00850v2cs.CV

TL;DR

Optical-flow learning must handle both long-range motion and precise local correspondences, while classical methods rely on assumptions that limit performance. SPyNet combines a coarse-to-fine spatial pyramid with learned flow-update networks at each level. It achieves comparable or better benchmark accuracy than FlowNet while being 96% smaller and revealing classical-looking spatio-temporal filters.

  • Problem

    Optical-flow methods face approximate classical assumptions, while direct convolutional learning struggles with motions larger than a few pixels and must address long-range and fine motion together.

  • Method

    SPyNet combines a classical coarse-to-fine spatial pyramid, image warping, and one learned convolutional network per pyramid level to predict flow updates.

  • Results

    SPyNet achieves comparable or lower error than FlowNet on standard benchmarks and is 96% smaller than FlowNet.

  • Takeaways & Limitations

    The results support combining engineered optical-flow structure with deep learning for accurate, efficient estimation and provide insight through classical-looking learned filters.

  • Takeaways & Limitations

    Spatial pyramids can lose small or thin objects undergoing large motion at coarse levels, so SPyNet does not solve the full optical-flow problem.

Abstract

from arXiv · show

We learn to compute optical flow by combining a classical spatial-pyramid formulation with deep learning. This estimates large motions in a coarse-to-fine approach by warping one image of a pair at each pyramid level by the current flow estimate and computing an update to the flow. Instead of the standard minimization of an objective function at each pyramid level, we train one deep network per level to compute the flow update. Unlike the recent FlowNet approach, the networks do not need to deal with large motions; these are dealt with by the pyramid. This has several advantages. First, our Spatial Pyramid Network (SPyNet) is much simpler and 96% smaller than FlowNet in terms of model parameters. This makes it more efficient and appropriate for embedded applications. Second, since the flow at each pyramid level is small (< 1 pixel), a convolutional approach applied to pairs of warped images is appropriate. Third, unlike FlowNet, the learned convolution filters appear similar to classical spatio-temporal filters, giving insight into the method and how to improve it. Our results are more accurate than FlowNet on most standard benchmarks, suggesting a new direction of combining classical flow methods with deep learning.

1. Introduction

SPyNet combines a classical coarse-to-fine spatial pyramid with learned convolutional flow updates, addressing large motions through the pyramid while learning fine motion at each level. It improves efficiency and benchmark performance while retaining known pyramid limitations.

  • Classical optical-flow methods rely on approximate assumptions such as brightness constancy and spatial smoothness, producing steady but incremental progress.
  • Recent end-to-end convolutional methods struggle when inter-frame motion exceeds a few pixels because corresponding image regions fall outside local convolutional windows.
  • Approach: SPyNet uses a coarse-to-fine spatial pyramid to handle large motions, warps images using current flow, and learns a network at each level to predict the flow increment.
  • Results: SPyNet is 96% smaller than FlowNet and replaces expensive iterative classical propagation with non-iterative neural-network computation.
  • Results: SPyNet reports similar performance to FlowNet on Flying Chairs and Sintel, but greater accuracy on Middlebury and KITTI after fine tuning.
  • Insights and limitations: The learned filters resemble classical spatio-temporal derivative, Gabor, and biological motion-processing filters, while the method inherits pyramid limitations for small or thin fast-moving objects.

2. Related Work

Related work spans classical formulations, learned flow models, spatio-temporal filtering, and fast methods. SPyNet connects these traditions by using pyramids to learn filters that resemble classical motion filters while targeting speed and compactness.

  • Classical optical flow: Classical optical-flow methods optimize brightness-constancy and spatial-smoothness terms, but their approximate image assumptions limit robustness and accuracy.
  • Spatial pyramids: Spatial pyramids have long been used to handle large motions, but small or thin objects moving quickly can disappear at coarse levels.
  • Spatio-temporal filters: SPyNet learns visually classical spatio-temporal filters while producing good flow estimates, unlike earlier deep filters that did not resemble neuroscience-inspired classical filters.
  • Learning flow: Early learned flow models used shallow or limited-data formulations, including field-of-experts, robust PCA, and learned image filters, but did not realize the full promise of learning flow.
  • Deep learning: FlowNet introduced end-to-end deep convolutional flow estimation with promising results, yet lagged behind state-of-the-art accuracy.
  • Fast and weakly supervised methods: Unsupervised and semi-supervised flow methods reported lower accuracy or lacked evaluation on standard benchmarks, while fast methods traded accuracy, speed, or flow smoothness.
  • Fast flow: SPyNet is significantly faster than FlowNet and uses 96% fewer model parameters, supporting compact optical-flow deployment.

3. Spatial Pyramid Network

SPyNet combines a coarse-to-fine spatial pyramid with learned convolutional networks that predict residual flow updates after warping one frame using the current estimate. Each pyramid level solves a small-motion correction, and networks are trained sequentially with residual-flow targets and EPE loss.

  • Inference: SPyNet uses a coarse-to-fine pyramid in which each network Gk predicts a residual flow update from pyramid-level images, a warped second image, and upsampled prior flow.The current flow is propagated to successively higher-resolution levels until full-resolution flow is obtained.
  • Inference: At the pyramid's coarsest level, the initial flow is zero; each computed residual is upsampled and passed to the next finer level.Experiments use five pyramid levels, with K = 4.
  • Training: Each network is trained sequentially to predict a residual target formed by subtracting the upsampled previous flow from the target flow, using average EPE loss.Training a level requires the previously trained models to generate its initial flow.
  • Network architecture: Every pyramid level handles only a small-motion update, allowing SPyNet to use simple five-layer convolutional networks trained at progressively doubled resolutions.The networks are trained on Flying Chairs, from 24x32 at G0 to 384x512 at G4.
  • Network architecture: Each network receives an 8-channel stack of two RGB images and the two-channel upsampled flow, and outputs two-channel horizontal and vertical flow.The second image is warped before being concatenated with the first image and prior flow.
  • Training: Training uses Adam with sequential network initialization, data augmentation, and ImageNet-based image normalization.Augmentation includes random scaling, rotation, crops, Gaussian noise, and color jitter.

4. Experiments

SPyNet is evaluated against FlowNet and Classic+NLP on standard optical-flow benchmarks using average end-point error. It is generally accurate and faster, with especially strong results after fine-tuning, while remaining weaker than Classic+NLP on Middlebury.

  • Benchmark evaluation: SPyNet is the most accurate overall among evaluated methods on standard benchmarks and is faster than all other compared methods.The comparisons include FlowNet and the traditional pyramid-based Classic+NLP method.
  • Flying Chairs: A 0.14 EPE improvement follows fine-tuning on Flying Chairs, where SPyNet outperforms FlowNetS but not FlowNetC.The qualitative estimates are visualized on the Flying Chairs dataset.
  • MPI-Sintel: SPyNet is more accurate than FlowNet across all Sintel velocity ranges except displacements over 40 pixels per frame and is also better near motion boundaries.The models are compared after fine-tuning across velocities and distances from motion boundaries.
  • KITTI: Fine-tuning improves KITTI accuracy by about 5 pixels, and SPyNet+ft is much more accurate than FlowNet+ft under the reported comparison.The authors attribute the improvement to the need for better training datasets, while noting the models were fine-tuned on different data.
  • Middlebury: On Middlebury, SPyNet is significantly more accurate than FlowNet, but both learned methods are less accurate than Classic+NL and significantly faster.The Middlebury dataset itself is too small for fine-tuning.

5. Analysis

SPyNet combines spatial pyramids, warping, and residual flow learning to reduce model complexity while maintaining strong speed–accuracy performance. Its learned filters resemble classical spatio-temporal filters and evolve across pyramid levels.

  • Model size and speed: 1,200,250 parameters make SPyNet about 96% smaller than FlowNet, supporting lower-complexity deployment.Each pyramid-level network has 240,050 learned parameters; the total covers five levels.
  • Model size and speed: Warping and residual learning reduce the range of velocities each network must model at its pyramid level.Warping is provided directly, while residual flow restricts the output range.
  • Learned filters: The first-layer filters operate on RGB image pairs and include temporal differences, revealing spatio-temporal structure.The temporal component is visualized as the difference between filters applied to the two input images.
  • Learned filters: Many learned filters resemble Gaussian derivatives, second-derivative, or Gabor filters, with varied scales and orientations.Temporal filters also show derivative-like structure in time.
  • Learned filters: Filters generally become sharper toward finer-resolution pyramid levels, although some become more defined only at higher resolutions.The networks are initialized from the preceding pyramid level but change during training.
  • Model size and speed: SPyNet offers a strong speed–accuracy balance on MPI-Sintel, with no faster method reported as equally accurate.Runtime comparisons use average EPE across the clean and final Sintel sequences.

6. Discussion and Future Work

SPyNet’s learned filters connect deep optical-flow estimation with classical spatio-temporal filtering and suggest routes toward more compact models. The discussion identifies large-motion and training-data limitations while outlining extensions to the pyramid, warping, and temporal input.

  • Discussion: SPyNet filters resemble derivative-of-Gaussian and Gabor filters across varied scales, orientations, frequencies, and shifts.The authors suggest dimensionality reduction, analytic features, or separable filters could compress the filter bank.
  • Discussion: A deep network built from analytic filters could reduce the number of learned parameters while retaining a varied filter bank.The paper contrasts this possibility with earlier analytic approaches that used fewer, shallow features.
  • Limitations and future work: Pyramids can lose small or thin objects undergoing large motions because those objects disappear at coarse pyramid levels.The paper proposes sparse or long-range matching, or channel-constancy representations, as possible remedies.
  • Limitations and future work: Future work includes learning the pyramid filters and warping function instead of using standard versions.The paper also proposes mobile implementation and extending the method to three or four frames for occlusion reasoning.
  • Limitations and future work: Flying Chairs is not representative of natural scene motions because it contains many huge displacements.The authors are exploring new training datasets for sequences with less dramatic motion.

7. Conclusions

SPyNet combines a deep spatial pyramid with per-level neural networks to estimate optical flow through simpler small-motion updates. This design uses fewer parameters and memory while achieving accuracy comparable to FlowNet and surpassing it on several benchmarks.

  • SPyNet uses a deep spatial pyramid to handle large motions and neural networks at each level to estimate flow updates.Each pyramid level assumes motion is small, on the order of a pixel.
  • The per-level decomposition gives each network less work than a fully generic method estimating arbitrarily large motions.
  • The learned spatial and temporal filters resemble classical derivatives of Gaussians and Gabors.
  • SPyNet requires many fewer parameters than FlowNet, resulting in a small memory footprint and faster operation.
  • SPyNet achieves accuracy comparable to FlowNet and surpasses it on several benchmarks.
Loading 1611.00850v2…