Skip to content

Learning Optical Flow with Adaptive Graph Reasoning (AGFlow, AAAI-2022)

Notifications You must be signed in to change notification settings

megvii-research/AGFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[AAAI2022]Learning Optical Flow with Adaptive Graph Reasoning

Ao Luo1, Fan Fang2, Kunming Luo1, Xin Li2, Haoqiang Fan1, Shuaicheng Liu3

1. Megvii Research, 2. Group 42

3. University of Electronic Science and Technology of China

This is the official implementation of 'Learning Optical Flow with Adaptive Graph Reasoning', named as 'AGFlow' for short, AAAI 2022, [paper]

Presentation Video

[Youtube], [Bilibili]

Abstract

Estimating per-pixel motion between video frames, known as optical flow, is a long-standing problem in video understanding and analysis. Most contemporary optical flow techniques largely focus on addressing the cross-image matching with feature similarity, with few methods considering how to explicitly reason over the given scene for achieving a holistic motion understanding. In this work, taking a fresh perspective, we introduce a novel graph-based approach, called adaptive graph reasoning for optical flow (AGFlow), to emphasize the value of scene/context information in optical flow. Our key idea is to decouple the context reasoning from the matching procedure, and exploit scene information to effectively assist motion estimation by learning to reason over the adaptive graph. The proposed AGFlow can effectively exploit the context information and incorporate it within the matching procedure, producing more robust and accurate results. On both Sintel clean and final passes, our AGFlow achieves the best accuracy with EPE of 1.43 and 2.47 pixels, outperforming state-of-the-art approaches by 11.2% and 13.6%, respectively.

Overview

We propose a novel graph-based approach, called adaptive graph reasoning for optical flow (AGFlow), to emphasize the value of scene context in optical flow. Our key idea is to decouple the context reasoning from the matching procedure, and exploit scene information to effectively assist motion estimation by learning to reason over the adaptive graph.

overview

Requirements

Python 3.6 with following packages

pytorch==1.6.0
torchvision==0.7.0
matplotlib
scipy
opencv-python
tensorboard

(The code has been tested on Cuda 10.0.)

Usage

  1. The trained weights are available on GoogleDrive. Put *.pth files into folder ./weights.

  2. Download Sintel and KITTI dataset, and set the root path of each class in ./core/datasets.py.

  3. Evaluation on Sintel

./eval_sintel.sh
  1. Evaluation on KITTI
./eval_kitti.sh

results

Citation

If you think this work is helpful, please cite

@InProceedings{luo2022learning,
  title={Learning Optical Flow with Adaptive Graph Reasoning},
  author={Luo, Ao and Yang, Fan and Luo, Kunming and Li, Xin and Fan, Haoqiang and Liu, Shuaicheng},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence (AAAI)},
  year={2022},
}

If you have any questions, please contact me at ([email protected]).

Acknowledgement

The main framework is adapted from RAFT. We thank the authors for the contribution.

About

Learning Optical Flow with Adaptive Graph Reasoning (AGFlow, AAAI-2022)

Topics

Resources

Stars

Watchers

Forks