cs.CVNov 21, 2026

Learning Optical Flow with Task-Oriented Feature Adaptation

Authors: Mengtan Zhang, Dazhong Wang, Haoran Zhang, Hongbo Zhao, Yuhang Ming, Weihao Yuan, Wei Ye, Hanli Wang, 

Organizations: Shanghai Research Institute for Intelligent Autonomous Systems, Tongji University, Shanghai 201210, P. R. China · College of Electronic & Information Engineering, Tongji University, Shanghai 201804, P. R. China · School of Computer Science, Hangzhou Dianzi University, Hangzhou 310018, China · School of Intelligence Science and Technology, Nanjing University, Suzhou 215163, China · 

Abstract

Learning-based optical flow estimation approaches generally rely on both inter-frame correspondence evidence and intra-frame contextual guidance, yet features from general-purpose image encoders may not fully support these roles. Strongly activated but weakly discriminative channels can outweigh more informative ones when computing inter-frame feature similarity, while context feature affinities can be low within motion-coherent regions yet high across motion boundaries. To address these mismatches, this study proposes TO-Flow, a task-oriented feature adaptation framework that aligns matching and context features with their respective requirements through dedicated channel modulation and spatial reorganization approaches. An affinity-based soft partition distinguishes motion-region interiors from boundary-adjacent regions to guide both processes. Channel modulation uses simulated flow refinement to assess whether each channel assigns higher similarity to estimated correspondences than to nearby competing candidates. The resulting similarity differences are aggregated within each region type and averaged across iterations to derive channel weights that emphasize informative channels and suppress ambiguous ones. Spatial reorganization combines affinity-guided feature attraction and repulsion from coarse to fine to simultaneously improve consistency within motion-coherent regions and distinctiveness across motion boundaries, with feature resampling mitigating boundary blurring during cross-scale fusion. Extensive experiments on the MPI Sintel, KITTI 2015, Spring, and LayeredFlow datasets demonstrate the effectiveness and general applicability of TO-Flow across diverse iterative refinement architectures as well as supervised and unsupervised training paradigms. The source code will be publicly available at https://mias.group/TO-Flow upon publication.

Figures & tables

Explore similar work

Mar 30, 2026

FlowIt: Global Matching via Hierarchical Transformers and Optimal Transport for Optical Flow

We present FlowIt, a novel architecture for optical flow estimation that combines global matching with confidence and occlusion-guided refinement. At its core, FlowIt leverages a hierarchical transformer architecture that captures extensive global context, enabling the model to effectively model long-range correspondences. To overcome the limitations of localized matching, we formulate the flow initialization as an optimal transport problem. This formulation yields a highly robust initial flow field, alongside explicitly derived occlusion and confidence maps. These cues are then seamlessly integrated into a guided refinement stage, where the network actively propagates reliable motion estimates from high-confidence regions into ambiguous, low-confidence areas. Extensive experiments across the Sintel, KITTI, Spring, and LayeredFlow datasets validate the effectiveness of our approach. FlowIt achieves state-of-the-art results on the competitive Sintel benchmark and establishes new state-of-the-art cross-dataset zero-shot generalization performance on Sintel, Spring, and LayeredFlow, while also delivering competitive performance on both the KITTI benchmark and KITTI zero-shot generalization settings.
Jul 11, 2026

FlowPainter: Inpainting Optical Flow via Confidence-Guided Completion

Existing optical flow methods broadly follow two paradigms: iterative optimization and diffusion-based estimation. Iterative methods, exemplified by RAFT, achieve high accuracy through recurrent refinement, but remain challenged by large displacements and complex motion. Diffusion-based methods introduce generative modeling and show promise in such ambiguous regions. However, existing diffusion models usually denoise the entire dense flow field from Gaussian noise, including simple regions where reliable motion can already be estimated by a lightweight network. This increases the denoising burden and may cause slow convergence and unstable training. To address this issue, we introduce FlowPainter, a diffusion-based optical flow framework that reformulates dense-flow generation as confidence-guided soft inpainting. FlowPainter employs a lightweight confidence-aware network to predict a rough flow and a pixel-wise confidence mask, distinguishing reliable simple regions from uncertain hard regions. The resulting simple-flow prior is used for confidence-based initialization and further injected into iterative denoising through confidence-gated residual guidance. With dynamically decaying guidance strength, FlowPainter stabilizes early denoising while preserving the flexibility of the diffusion model for late-stage detail refinement. Extensive experiments on public benchmarks, including Sintel, KITTI, and Spring, show that FlowPainter achieves strong accuracy under comparable training settings and converges more efficiently than existing diffusion-based optical flow methods, with notable gains on challenging benchmark splits. Our approach offers a practical way to integrate reliable discriminative priors with diffusion-based refinement for optical flow estimation. Our code is publicly available at https://github.com/mya012/FlowPainter.
Nov 9, 2026

Dense Flow from Adaptive Correspondence

Optical flow requires reliable matching from sufficient visual context and precise motion at every pixel. Existing methods such as WAFT match and estimate flow on the same coarse grids, then recover dense flow through learned upsampling, without explicitly linking visual support for matching to dense flow reconstruction. Our key insight is that dense pixel-level flow does not require equally dense matching. We decouple correspondence scale from flow resolution by adapting the size and shape of spatial supports to image structure for reliable matching, while reusing these supports for precise dense flow reconstruction. We realize this in Flow from Adaptive Token Estimation (FATE), whose token supports expand within coherent regions and contract near motion boundaries. Shared pixel-to-token associations pool features for matching and reconstruct pixel flow from token motions. Flow supervision jointly trains pixel grouping, token matching, and flow estimation without grouping labels, allowing FATE to anticipate which pixels are likely to move together from appearance alone. Trained on FlyingChairs/FlyingThings3D, FATE achieves the highest zero-shot accuracy on Sintel Final and KITTI, a critical setting given scarce real-world flow labels. For visible pixels, FATE improves accuracy within coherent regions, and more near motion boundaries. Its largest gains occur where direct matches are unavailable: Occluded or out-of-frame pixels account for roughly 10% of valid pixels but 50% of WAFT's total error. Experiments show that adaptive correspondence through pixel-to-token grouping enables reliable matching and precise pixel-level flow, improving generalization to unseen real scenes.