Abstract
A significant challenge facing current optical flow methods is the difficulty in generalizing them well to the real world. This is mainly due to the lack of large-scale real-world datasets, and existing self-supervised methods are limited by indirect loss and occlusions, resulting in fuzzy outcomes. To address this challenge, we introduce a novel optical flow training framework: automatic data factory (ADF). ADF only requires RGB images as input to effectively train the optical flow network on the target data domain. Specifically, we use advanced NeRF technology to reconstruct scenes from photo groups collected by a monocular camera, and then calculate optical flow labels between camera pose pairs based on the rendering results. To eliminate erroneous labels caused by defects in the scene reconstructed by NeRF, we screened the generated labels from multiple aspects, such as optical flow matching accuracy, radiation field confidence, and depth consistency. The filtered labels can be directly used for network supervision. Experimentally, the generalization ability of ADF on KITTI surpasses existing self-supervised optical flow and monocular scene flow algorithms. In addition, ADF achieves impressive results in real-world zero-point generalization evaluations and surpasses most supervised methods.
Introduction
Optical flow estimation—the process of determining the motion of every pixel between consecutive frames—is fundamental to numerous computer vision applications, from autonomous driving to video editing. Despite significant progress, deep learning models for optical flow often suffer from a "generalization gap." Models trained on synthetic datasets frequently struggle with the complexities of real-world environments.
Obtaining ground-truth labels for real-world data is notoriously difficult, typically requiring expensive sensor suites (LiDAR, GPS, IMU) and intensive manual labor. While self-supervised learning offers an alternative, it relies on photometric loss, which is prone to failure in the presence of occlusions or lighting variations, often yielding "fuzzy" or inaccurate flow fields. ADFactory addresses these issues by leveraging Neural Radiance Fields (NeRF) to create a high-fidelity "automatic data factory" that generates precise geometric labels from simple monocular image sequences.
Methodology
The ADFactory framework transforms monocular video or photo sequences into a rich source of supervised training data through a two-stage process: data generation and credibility filtering.
Data Generation and Scene Reconstruction
The pipeline begins by using Zip-NeRF to reconstruct a high-resolution 3D scene from monocular input. Once the 3D geometry is established, the system can render depth maps and simulate arbitrary camera movements. By generating random camera pose pairs within the reconstructed volume, the "ground truth" optical flow can be calculated mathematically based on the known 3D structure.
To improve robustness, the authors introduce midpoint depth—the distance where accumulated opacity reaches 0.5—which proves more resilient to reconstruction noise than standard expected-value depth. Furthermore, to move beyond static scenes, the framework injects "dynamic floaters" (randomly shaped objects following Bezier curves) into the training data, enhancing the model's ability to estimate non-static motion.
Data Credibility Filtering
To prevent the network from learning from NeRF artifacts, ADFactory employs three distinct filtering masks:
- Structural Similarity (SSIM): Validates the accuracy of the flow by checking if the warped source image matches the target.
- Radiation Field Confidence (RFC): A novel metric that assesses the "sharpness" of the density distribution along a ray; dispersed weights indicate poor reconstruction.
- Deep Consistency: Ensures that depth values remain consistent when viewed from different perspectives.
Results and Discussion
The authors introduced the ADF58 dataset, containing over 58,000 image pairs across 300 real-world scenes. Models trained using this framework, referred to as "Scale-flow," were evaluated on benchmarks including KITTI 2012/2015 and DAVIS.
Performance Benchmarks
On the KITTI 2015 benchmark, ADFactory achieved an End-Point Error (EPE) of 3.89, a dramatic improvement over the 9.13 EPE of the self-supervised MDFlow. In zero-shot evaluations on the DAVIS dataset, the model even outperformed supervised models like RAFT that were fine-tuned on KITTI, demonstrating the superior generalization capabilities afforded by the diverse real-world data in ADF58.
Insights on Geometric Labeling
A key finding is that NeRF's underlying 3D structure provides geometric labels that are inherently more accurate than photometric losses. The filtering process is also critical; the RFC metric alone improved performance by approximately 20%, highlighting that high-quality, filtered data is essential for effective supervision. By focusing on "light flow" (geometric motion) rather than just "object flow" (semantic tracking), ADFactory generalizes better to novel textures and environments.
Conclusion and Future Work
ADFactory presents a scalable solution for generating high-quality optical flow training data without expensive hardware. While the framework currently excels in static and semi-dynamic environments, it faces limitations with highly reflective surfaces (like glass) and complex non-rigid deformations (like human movement). Future iterations may integrate large-scale semantic models, such as Segment Anything (SAM), to better handle complex object boundaries and generate even more realistic dynamic training scenarios.
Summary updated