Local Attention Transformers for High-Detail Optical Flow Upsampling
Alexander Gielisse, Nergis Tömen, Jan van Gemert
TL;DR
This work targets the bottleneck of convex upsampling in $1/8$-scale optical flow by reframing it as local attention and introducing a Transformer-based convex upsampler (TCU). It decouples the final upsampler, adds multi-scale context, and enables hierarchical 2x upsampling with larger local masks, improving edge alignment and high-detail detail preservation. A data-augmentation strategy (-AUG) is proposed to reduce bilinear interpolation artifacts during training. On FlyingChairs+FlyingThings3D, the method yields notable gains across state-of-the-art models (e.g., Sintel Clean EPE from $1.42$ to $1.26$ for RAFT, $1.31$ to $1.18$ for GMA, and $0.94$ to $0.90$ for FlowFormer), demonstrating that the upsampling design itself can substantially improve high-detail optical-flow performance.
Abstract
Most recent works on optical flow use convex upsampling as the last step to obtain high-resolution flow. In this work, we show and discuss several issues and limitations of this currently widely adopted convex upsampling approach. We propose a series of changes, in an attempt to resolve current issues. First, we propose to decouple the weights for the final convex upsampler, making it easier to find the correct convex combination. For the same reason, we also provide extra contextual features to the convex upsampler. Then, we increase the convex mask size by using an attention-based alternative convex upsampler; Transformers for Convex Upsampling. This upsampler is based on the observation that convex upsampling can be reformulated as attention, and we propose to use local attention masks as a drop-in replacement for convex masks to increase the mask size. We provide empirical evidence that a larger mask size increases the likelihood of the existence of the convex combination. Lastly, we propose an alternative training scheme to remove bilinear interpolation artifacts from the model output. Our proposed ideas could theoretically be applied to almost every current state-of-the-art optical flow architecture. On the FlyingChairs + FlyingThings3D training setting we reduce the Sintel Clean training end-point-error of RAFT from 1.42 to 1.26, GMA from 1.31 to 1.18, and that of FlowFormer from 0.94 to 0.90, by solely adapting the convex upsampler.
