Memory-Efficient Optical Flow via Radius-Distribution Orthogonal Cost Volume

Gangwei Xu, Shujun Chen, Hao Jia, Miaojie Feng, Xin Yang · DOI

Abstract

Optical flow estimation for high-resolution video (4K/8K) is fundamentally constrained by the quadratic memory growth of traditional 4D cost volumes. We present MeFlow, a memory-efficient architecture that addresses this bottleneck through a Local Orthogonal Cost Volume (LOV) and a Radius-Distribution Multi-scale (RDMS) lookup strategy. By decomposing the 2D search space into 1D orthogonal slices, MeFlow reduces search complexity from $O(R^2)$ to $O(R)$. Combined with a non-uniform multi-scale lookup, MeFlow achieves up to a 6x reduction in memory usage compared to state-of-the-art models like RAFT, enabling 4K optical flow processing on consumer-grade hardware with as little as 5.4GB of VRAM while maintaining competitive accuracy.

Introduction

Optical flow—calculating pixel-level motion between frames—is a cornerstone of computer vision. However, as resolutions move toward 4K and 8K, standard algorithms hit a memory wall. Most modern methods rely on a 4D cost volume that compares every pixel in a source frame to every potential match in a target frame. This leads to an astronomical memory requirement ($O(N^2)$) that causes "Out of Memory" (OOM) errors on even professional-grade GPUs when processing high-resolution content.

Previous attempts to mitigate this issue often sacrificed accuracy through sparse volumes or struggled with large displacements. MeFlow introduces a novel decomposition of the search space that maintains high accuracy while drastically lowering the hardware requirements.

Methods

MeFlow's efficiency is driven by three primary architectural innovations designed to break the quadratic memory curse.

Local Orthogonal Cost Volume (LOV)

Instead of searching a full 2D window around a pixel, MeFlow decomposes the search into two 1D orthogonal directions: horizontal and vertical. By searching only along these axes, the complexity drops to linear growth ($O(R)$) relative to the search radius. Unlike previous static 1D methods, MeFlow builds this volume recurrently inside a Gated Recurrent Unit (GRU) loop, allowing the search window to dynamically "follow" the estimated motion of the pixel as it is refined.

Comparison between Flow1D's global static cost volume and MeFlow's local orthogonal cost volume.

Radius-Distribution Multi-scale (RDMS) Lookup

To handle both fine-grained motion and large displacements, MeFlow employs a non-uniform lookup strategy. It uses high-resolution features for small radii (near the current estimate) and coarser, downsampled features for larger radii. This allows the model to maintain a large receptive field for fast-moving objects without a corresponding increase in the number of computed correlation points.

Architecture Overview

The complete pipeline integrates these components with an Orthogonal Attention (OA) module, which propagates feature information across axes before cost volume construction to preserve spatial context.

The MeFlow architecture, highlighting multi-scale feature generation and orthogonal cost volume construction.

Results

MeFlow was evaluated on standard benchmarks including Sintel and KITTI, as well as high-resolution testing on the DAVIS dataset.

  • Memory Efficiency: MeFlow consumes 6x less memory than RAFT on 1080p images (1.4GB vs 8.3GB).
  • 4K Capability: MeFlow can process 4K (2160×3840) images using only 5.4GB of VRAM. In contrast, RAFT typically crashes on 24GB GPUs when attempting 4K processing.
  • Accuracy: On the KITTI benchmark, MeFlow outperformed other memory-efficient models like Flow1D by 21.1% and SCV by 19.8%, proving that efficiency does not necessitate a significant drop in performance.
  • Speed: At 1080p, MeFlow is approximately 25% faster than RAFT (260ms vs 350ms per frame) due to the reduced number of correlation pairs processed.

Conclusion

MeFlow demonstrates that architectural efficiency can enable high-resolution video processing previously impossible on standard hardware. By utilizing orthogonal decomposition and multi-scale lookups, it provides a scalable solution for the next generation of video resolutions. While the local search strategy may face limitations with extremely discontinuous motions, its overall performance makes it a highly practical choice for real-world high-resolution applications.

Summary updated

BibTeX
@misc{xu2023memory,
  author = {Gangwei Xu and Shujun Chen and Hao Jia and Miaojie Feng and Xin Yang},
  title = {{Memory-Efficient Optical Flow via Radius-Distribution Orthogonal Cost Volume}},
  year = {2023},
  eprint = {2312.03790},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.03790},
}
Figure