Introduction
Optical flow estimation—the task of determining per-pixel motion between consecutive video frames—is a fundamental component of computer vision, essential for applications ranging from autonomous driving to video editing. Despite its importance, training robust models remains a challenge due to the difficulty of obtaining large-scale, high-quality ground truth data for real-world scenes. Traditionally, models are trained on synthetic datasets, which often leads to a significant performance drop when applied to real-world footage—a challenge known as the "domain gap."
The Flow-Anything Framework
Flow-Anything addresses this gap by introducing a novel framework that generates large-scale, realistic optical flow training data from single-view real-world images. By transforming static images into dynamic 3D scenes, the framework creates a bridge between synthetic precision and real-world complexity.
Methodology
The core of Flow-Anything is a multi-stage pipeline designed to synthesize realistic motion pairs from a single input image $I_s$.
- 3D Scene Representation: The process begins by using a monocular depth estimation network (specifically Depth-Anything) to predict a depth map $D_s$ for the input image. This information is used to construct a Multiplane Image (MPI), representing the scene as a series of depth-layered planes.
- Motion Synthesis: To simulate camera and object motion, the framework employs Object-Independent Volume Rendering. It segments individual objects using instance segmentation, allowing them to move independently of the background. By moving a virtual camera and the segmented objects, a novel view $I_t$ is rendered.
- Depth-Aware Inpainting: A critical challenge in view synthesis is handling occlusions and newly revealed regions ("holes"). Flow-Anything utilizes a Stable Diffusion-based inpainting model, guided by rendered depth maps, to fill these gaps realistically. This ensures that the generated second frame $I_t$ maintains high visual fidelity and geometric consistency.
- Ground Truth Generation: Because the motion is mathematically defined during the rendering process, the system automatically produces perfect per-pixel optical flow labels $F_{s \to t}$ for the synthesized pair $(I_s, I_t)$.
Large-Scale Data Generation: The FA-Flow Dataset
Leveraging this pipeline, the authors curated the FA-Flow dataset, a massive collection synthesized from over 6 million real-world images sourced from diverse datasets like BDD100k, COCO, and NuScenes. This scale allows the model to encounter a vast array of geometric structures and lighting conditions, far exceeding the diversity of traditional synthetic datasets.
Experimental Results
Flow-Anything demonstrates superior generalization across both synthetic and real-world benchmarks.
Real-World Performance
On the KITTI 2015 benchmark, which features challenging real-world driving conditions, Flow-Anything achieved a state-of-the-art End-Point Error (EPE) of 1.64. This is a significant improvement over previous leading models like RAFT (EPE 5.04) when trained under similar conditions. In unsupervised settings, the model achieved a 4.91 Fl-all score, outperforming the previous best of 6.76.
Downstream Applications
The robustness of the Flow-Anything model translates to improved performance in downstream tasks. When used as a motion estimator for video inpainting and unsupervised video segmentation, it consistently yielded higher quality results (measured by PSNR/SSIM and mIOU, respectively) compared to models trained solely on synthetic data.
Conclusion and Future Directions
Flow-Anything represents a significant step toward a "foundation model" for optical flow. By proving that high-quality motion training can be derived from static, single-view images, it opens the door to virtually unlimited data scaling.
While the current framework is highly effective, the authors note that the computational cost of diffusion-based inpainting (approx. 1.5s per pair) remains a bottleneck for real-time data generation. Future work may focus on optimizing this process and expanding the dataset to include more diverse perspectives, such as aerial or drone-based views, to further enhance the model's universal applicability.
Summary updated