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, Rui Fan
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 · College of Electronic and Information Engineering, the School of Computer Science and Technology, and the Key Laboratory of Embedded System and Service Computing (Ministry of Education), Tongji University, Shanghai 201804, P. R. China · College of Electronic and Information Engineering, Shanghai Institute of Intelligent Science and Technology, Shanghai Research Institute for Intelligent Autonomous Systems, Shanghai Key Laboratory of Intelligent Autonomous Systems, Urban Mobility Institute, State Key Laboratory of Autonomous Intelligent Unmanned Systems, and Frontiers Science Center for Intelligent Autonomous Systems (Ministry of Education), The Key Laboratory of Road and Traffic Engineering (Ministry of Education), Tongji University, Shanghai 201804, China · National Key Laboratory of Human-Machine Hybrid Augmented Intelligence, Xi’an Jiaotong University, Xi’An, Shaanxi 710049, China
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
Fig. 1: Compared with the recurrent refinement baseline FlowSeek-T, TO-Flow provides (a) more discriminative matching features, with higher query similarity to the ground-truth correspondence than to nearby distractors, and (b) more consistent context features, with higher local affinity within motion-coherent regions and lower affinity near motion boundaries. These improvements support (c) more accurate optical flow estimation.
Fig. 2: Overview of the TO-Flow framework. An affinity-based soft region partition guides two processes before iterative flow refinement: (a) channel modulation of matching features using simulated matching feedback and (b) spatial reorganization of context features through cross-boundary contrast enhancement and intra-region propagation across resolutions.
Training Data
Method
Sintel (train)
KITTI 2015 (train)
Params (M)
Clean ↓
Final ↓
EPE ↓
Fl-all ↓
Tartan+C+T
GMFlow CVPR’22 [ 19 ]
–
–
8.70
24.40
4.7
SEA-RAFT-M ECCV’24 [ 22 ]
1.27
3.85
4.30
14.30
19.7
FlowSeek-T ICCV’25 [ 23 ]
1.13
2.48
4.06
12.20
42.7
C+T+MD
MatchFlow-G CVPR’23 [ 49 ]
1.03
2.45
4.08
15.60
15.4
C+T+YV
FlowFormer++ CVPR’23 [ 50 ]
0.90
2.30
3.93
14.13
16.1
TABLE I: Zero-shot generalization results on the MPI Sintel and KITTI 2015 training sets. Methods are grouped by training data. C, T, MD, YV, AF, and Tartan denote the FlyingChairs, FlyingThings3D, MegaDepth, YouTube-VOS, AutoFlow, and TartanAir datasets, respectively. TO-Flow ( ⋅ ) denotes the corresponding baseline integrated with the TO-Flow framework. Better results between each baseline and its corresponding TO-Flow variant are marked in bold.
Method
Sintel (train)
KITTI 2015 (train)
Sintel (test)
KITTI 2015 (test)
Clean ↓
Final ↓
EPE ↓
Fl-all ↓
Clean ↓
Final ↓
Fl-all ↓
PWC-Net CVPR’18 [ 15 ]
1.70
2.21
2.16
9.80
3.86
5.13
9.60
RAFT ECCV’20 [ 16 ]
0.76
1.22
0.63
1.50
1.61
2.86
5.10
GMA ICCV’21 [ 17 ]
0.62
1.06
0.57
1.20
1.39
2.47
5.15
SKFlow NeurIPS’22 [ 51 ]
0.52
0.78
0.51
0.94
1.28
2.23
4.84
DIP CVPR’22 [ 52 ]
–
–
–
–
1.44
2.83
4.21
TABLE II: Fine-tuned results on the MPI Sintel and KITTI 2015 training and test sets. Better results between each baseline and its corresponding TO-Flow variant are marked in bold. Ties at the reported precision are also marked in bold.
Fig. 3: Qualitative comparison on the KITTI 2015 dataset. Rows show (a) the first frame, (b) FlowSeek-T, (c) TO-Flow (FlowSeek-T), (d) WAFT-DAv2-a2, and (e) TO-Flow (WAFT-DAv2-a2). Dashed boxes indicate corresponding regions of interest. Fl-all values are reported for each example; lower values indicate better performance.
Fig. 4: Qualitative comparison on the MPI Sintel dataset. Rows show (a) the first frame, (b) ground-truth flow, (c) FlowSeek-T, (d) TO-Flow (FlowSeek-T), (e) WAFT-DAv2-a2, and (f) TO-Flow (WAFT-DAv2-a2). Dashed boxes indicate corresponding regions of interest. EPE values are reported for each example; lower values indicate better performance.
Fig. 5: Qualitative comparison on the Spring dataset. Columns show (a) the first frame, (b) FlowSeek-T, (c) TO-Flow (FlowSeek-T), (d) WAFT-DAv2-a2, and (e) TO-Flow (WAFT-DAv2-a2). For each example, predicted flow maps and corresponding error maps are shown in the upper and lower rows, respectively. Dashed boxes highlight fine structures. EPE values are reported for each example; lower values indicate better performance.
Fig. 6: Qualitative comparison on the LayeredFlow dataset. Columns show (a) the first frame, (b) FlowSeek-T, (c) TO-Flow (FlowSeek-T), (d) WAFT-DAv2-a2, and (e) TO-Flow (WAFT-DAv2-a2). Dashed boxes highlight corresponding regions containing transparent objects.
Training Data
Method
LayeredFlow (val)
Spring (train)
EPE ↓
1px ↓
3px ↓
5px ↓
1px ↓
EPE ↓
C+T+S
PWC-Net CVPR’18 [ 15 ]
9.49
74.93
50.47
39.05
–
–
MD+C+T+TSKH
MatchFlow-G CVPR’23 [ 49 ]
–
–
–
–
4.504
0.407
YV+C+T+TSKH
FlowFormer++ CVPR’23 [ 50 ]
–
–
–
–
4.482
0.447
C+T+TSKH+VIPER
MS-RAFT+ IJCV’24 [ 35 ]
–
–
–
–
3.577
0.397
C+T+S+K+H+FA-Flow
Flow-Anything TPAMI’25 [ 61 ]
–
–
–
–
3.790
0.398
TABLE III: Zero-shot generalization results on the LayeredFlow validation set and Spring training set. Methods are grouped by training data. VIPER denotes the VIsual PERception benchmark, and FA-Flow denotes the dataset introduced in Flow-Anything. Better results between each baseline and its corresponding TO-Flow variant are marked in bold.
Fig. 7: Qualitative comparison between the reproduced U 2 Flow baseline and TO-Flow (U 2 Flow) on the KITTI 2015 (top two rows) and MPI Sintel (bottom two rows) datasets. Columns show (a) the first frame, (b) the baseline, and (c) TO-Flow. Dashed boxes highlight corresponding regions. Fl-all and EPE are reported for the KITTI 2015 and MPI Sintel examples, respectively; lower values indicate better performance.
Training Data
Method
Clean ↓
Final ↓
C+S
UFlow ECCV’20 [ 73 ]
2.50
3.39
S
UPFlow CVPR’21 [ 74 ]
2.33
2.67
S-Raw+S
SelFlow (MF) CVPR’19 [ 75 ]
2.88
3.87
ARFlow CVPR’20 [ 72 ]
2.79
3.73
UnSAMFlow CVPR’24 [ 76 ]
2.21
3.07
U 2 Flow CVPR’26 [ 26 ]
1.42
2.32
TABLE IV: Quantitative results on the MPI Sintel training set for unsupervised optical flow estimation. S-Raw denotes raw Sintel movie frames, and MF denotes multi-frame optical flow estimation. Better results between the reproduced baseline and its corresponding TO-Flow variant are marked in bold.
Training Data
Method
EPE ↓
Fl-all ↓
K-MV
SelFlow (MF) CVPR’19 [ 75 ]
4.84
–
C+K15-MV
UFlow ECCV’20 [ 73 ]
2.71
9.05
K-Raw+K-MV
UPFlow CVPR’21 [ 74 ]
2.45
–
ARFlow CVPR’20 [ 72 ]
2.85
–
UnSAMFlow CVPR’24 [ 76 ]
2.01
–
U 2 Flow CVPR’26 [ 26 ]
1.83
6.59
TABLE V: Quantitative results on the KITTI 2015 training set for unsupervised optical flow estimation. K-Raw denotes the KITTI Raw dataset. K-MV denotes the multi-view extensions of the KITTI 2012 and KITTI 2015 datasets, while K15-MV denotes only the KITTI 2015 multi-view extension. Better results between the reproduced baseline and its corresponding TO-Flow variant are marked in bold.
Configurations
Sintel (train)
KITTI 2015 (train)
Clean ↓
Final ↓
EPE ↓
Fl-all ↓
TO-Flow
1.58
2.49
4.42
16.91
w/o channel modulation
1.59
2.76
5.03
19.03
w/o spatial reorganization
1.69
2.60
4.88
19.45
w/o region partition
1.95
3.15
5.67
22.85
Baseline (WAFT-DAv2-a2)
1.69
2.77
5.11
19.99
TABLE VI: Component ablations of TO-Flow on the MPI Sintel and KITTI 2015 training sets. The baseline excludes all proposed components. The best results are marked in bold.
Analysis
Configurations
Sintel (train)
KITTI 2015 (train)
Clean ↓
Final ↓
EPE ↓
Fl-all ↓
(a) Channel Modulation
(a1) SENet CVPR’18 [ 38 ]
1.82
2.86
4.91
19.90
(a2) CBAM ECCV’18 [ 39 ]
1.82
3.02
5.71
21.22
(a3) Ours
1.69
2.60
4.88
19.45
(a4) Ours w/ GT
1.66
2.53
4.47
17.58
(b) Spatial Reorganization
(b1) PAC CVPR’19 [ 44 ]
1.81
3.15
5.26
20.17
TABLE VII: Comparison of alternative designs and feedback sources on the MPI Sintel and KITTI 2015 training sets. Ours denotes the proposed design in each group. Configuration (a4) uses ground-truth (GT) flow for feedback during both training and evaluation. The best results within each group are marked in bold, excluding (a4).
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.
Sadra Safadoust, Fabio Tosi, Matteo Poggi +1
Department of Computer Engineering and KUIS AI Center, Koç University, Istanbul, Turkey · Department of Computer Science and Engineering (DISI), University of Bologna, Italy
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.
Yuang Meng, Chenyang Wu, Xianshun Liu +7
VCIP, CS, Nankai University · OPPO Research Institute · The Hong Kong Polytechnic University
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.