High-Resolution Optical Flow from 1D Attention and Correlation
- Haofei Xu ,
- Jiaolong Yang ,
- Jianfei Cai ,
- Juyong Zhang ,
- Xin Tong
Optical flow is inherently a 2D search problem, and thus the computational complexity grows quadratically with respect to the search window, making large displacements matching infeasible for high-resolution images. In this paper, we take inspiration from Transformers and propose a new method for high-resolution optical flow estimation with significantly less computation. Specifically, a 1D attention operation is first applied in the vertical direction of the target image, and then a simple 1D correlation in the horizontal direction of the attended image is able to achieve 2D correspondence modeling effect. The directions of attention and correlation can also be exchanged, resulting in two 3D cost volumes that are concatenated for optical flow estimation. The novel 1D formulation empowers our method to scale to very high-resolution input images while maintaining competitive performance. Extensive experiments on Sintel, KITTI and real-world 4K (2160×3840) resolution images demonstrated the effectiveness and superiority of our proposed method. Code and models are available on GitHub (opens in new tab).