Recurrent Partial Kernel Network for Efficient Optical Flow Estimation

Henrique Morimitsu, Xiaobin Zhu, Xiangyang Ji, Xu-Cheng Yin

Abstract

Optical flow estimation is a fundamental task in computer vision, recently dominated by large-scale Transformer models. However, these models often suffer from high computational costs and poor generalization to unseen environments. We present the Recurrent Partial Kernel Network (RPKNet), a fully recurrent encoder-decoder architecture designed for efficiency and robustness. RPKNet introduces Partial Kernel Convolutions (PKConv) and Separable Large Kernels (SLK) to achieve state-of-the-art generalization on the Spring benchmark. Despite its performance, RPKNet uses significantly fewer parameters and up to 15x fewer FLOPs than massive Transformer-based counterparts.

Introduction

Predicting per-pixel motion between video frames, known as optical flow, is critical for various applications. The current trend in the field favors increasingly large models, often adapting Transformers with hundreds of millions of parameters. This "bigger is better" approach faces two significant hurdles:

  1. Computational Overhead: High memory and FLOP requirements make these models impractical for real-time applications or edge devices.
  2. Generalization Gap: Large models tend to overfit synthetic training data, struggling when deployed in diverse, high-resolution real-world scenarios like the Spring benchmark.

RPKNet addresses these challenges by prioritizing efficiency as a form of regularization, leading to superior performance on unseen data.

Methodology

RPKNet's architecture is built on three primary innovations:

Spatial Recurrent Encoder

Unlike traditional architectures that use distinct convolutional layers for each feature scale, RPKNet employs a single shared block applied recurrently. This enforces weight sharing across the feature pyramid, reducing parameter count while maintaining feature quality.

Partial Kernel Convolution (PKConv)

To handle variable channel counts across the feature pyramid with a single shared network, the authors developed PKConv. It treats the convolution kernel as a "weight buffer," sampling only a subset of the buffer for different scales. This allows the model to balance computational cost at high resolutions with high information capacity at low resolutions.

Separable Large Kernel (SLK)

To replicate the global context captured by Transformers without the associated cost, RPKNet uses large-scale 1D convolutions (up to 31x31). By decomposing a 2D large kernel into 1D components, the model achieves a massive receptive field with minimal overhead. This design is also integrated into the decoder's GRU (SLK GRU), allowing for long-range iterative refinement.

Experiments and Results

RPKNet was trained on synthetic datasets (FlyingChairs, FlyingThings3D) and evaluated on challenging benchmarks including MPI-Sintel, KITTI 2015, and the high-definition Spring benchmark.

Comparison of RPKNet (Ours) against state-of-the-art models showing FLOPs vs Error and qualitative flow results.

Performance Highlights

  • Superior Generalization: On the Spring benchmark, RPKNet improved results by over 10% compared to previous state-of-the-art methods without any fine-tuning.
  • Efficiency: RPKNet contains only 2.8 million parameters, significantly less than RAFT (5.1M) or FlowFormer (16M+).
  • Computational Speed: It requires only 1.0 TFLOPs for a 1080p image, which is 10x to 17x less than competing high-performance models like MatchFlow or FlowFormer.
  • Memory Footprint: It utilizes over 4x less memory than the next best method on the Spring benchmark.

Discussion and Limitations

The success of RPKNet suggests that scale-agnostic features are sufficient for motion understanding and that efficiency can act as a powerful regularizer against overfitting. While RPKNet excels in generalization, massive Transformer models still maintain a slight edge on specific datasets like Sintel when heavily fine-tuned.

Furthermore, while PKConv and SLK offer theoretical FLOP savings, current deep learning libraries (e.g., cuDNN) are optimized for standard 3x3 convolutions. Consequently, the wall-clock speedups on current GPUs may not yet fully reflect the theoretical computational reductions. Future work will focus on hardware-level optimizations and scaling the RPKNet concept to close the fine-tuning gap.

Summary updated

BibTeX
@inproceedings{morimitsu2024recurrent,
  author = {Henrique Morimitsu and Xiaobin Zhu and Xiangyang Ji and Xu-Cheng Yin},
  title = {{Recurrent Partial Kernel Network for Efficient Optical Flow Estimation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i5.28224},
}
Figure