Abstract
This paper introduces Flow1D, a novel method for optical flow estimation designed to overcome the "memory wall" of high-resolution image processing. By factorizing the traditional 2D search problem into two orthogonal 1D operations—1D attention followed by 1D correlation—the authors reduce computational complexity from quadratic to linear relative to image dimensions. This architectural shift enables 4K and 8K flow estimation on consumer-grade hardware, providing a scalable alternative to memory-intensive 4D cost volume approaches.
Introduction
Optical flow—the task of tracking the motion of every pixel between two video frames—is a fundamental challenge in computer vision. To find where a pixel from a source frame has moved in a target frame, modern deep learning models typically build a "cost volume." State-of-the-art models like RAFT construct a 4D cost volume ($H \times W \times H \times W$), storing the similarity between every pixel pair across frames. While highly accurate, this approach suffers from quadratic complexity. As image resolution increases from 1080p to 4K or 8K, memory and compute requirements explode, often leading to "Out of Memory" (OOM) errors on standard GPUs. Traditional "coarse-to-fine" strategies attempt to mitigate this via downsampling but frequently lose track of small, fast-moving objects.
Methodology
The core innovation of this work is Optical Flow Factorization. Instead of searching the entire 2D space simultaneously, Flow1D decomposes the search into two sequential 1D steps.
- 1D Attention (Vertical): The model applies a 1D cross-attention mechanism along the vertical columns of the target image. This "propagates" information about potential matches to all other pixels in the same column.
- 1D Correlation (Horizontal): After vertical information is aggregated, the model performs a 1D correlation along the horizontal rows. Because the vertical attention has already informed the row about column-wise correspondences, this horizontal search effectively captures 2D motion.
The architecture constructs two such 3D cost volumes (Vertical-Attention/Horizontal-Correlation and Horizontal-Attention/Vertical-Correlation) and concatenates them. This pipeline is integrated into an iterative refinement framework using a ConvGRU to update the flow field progressively.
Experiments and Results
Flow1D was evaluated on standard benchmarks including FlyingChairs, FlyingThings3D, Sintel, and KITTI 2015, as well as high-resolution datasets like DAVIS and real-world 4K footage.
Performance and Efficiency
- Scalability: Flow1D successfully processed 8K resolution images ($4320 \times 7680$) on a 32GB GPU, a feat impossible for RAFT due to memory constraints.
- Memory Footprint: At 1080p resolution, Flow1D required only 1.42GB of VRAM, compared to 8.33GB for RAFT—a 6x reduction in memory usage.
- Accuracy: While slightly trailing RAFT on low-resolution benchmarks (e.g., Sintel Clean EPE of 1.98 vs RAFT's 1.43), Flow1D outperformed established models like PWC-Net and FlowNet2 while remaining significantly leaner.
- Generalization: The model demonstrated strong performance on real-world 4K video, accurately capturing the motion of distant, small objects that coarse-to-fine models typically miss.
Discussion and Conclusion
The primary insight of Flow1D is that factorization is the key to scalability. Moving from a 4D cost volume to two 3D volumes reduces complexity from $O(H^2W^2)$ to $O(HW(H+W))$. The use of attention as a "propagator" allows the model to "smear" 2D correspondence information into 1D axes, enabling efficient matching.
However, a trade-off exists between efficiency and absolute accuracy. Factorizing the search space can result in less exhaustive matching compared to a full 4D volume. Future work will focus on refining the attention mechanism to produce cleaner weights and exploring more sophisticated methods for combining 1D components to further narrow the accuracy gap.
Summary updated