Learning by Distillation: A Self-Supervised Learning Framework for Optical Flow Estimation

Pengpeng Liu, Michael R. Lyu, Irwin King, Jia Xu

TL;DR

This paper introduces DistillFlow, a novel self-supervised learning framework for optical flow estimation that leverages knowledge distillation. By training teacher models to provide confident flow predictions and then using these to guide a student model under challenging transformations, DistillFlow effectively learns optical flow for both occluded and non-occluded pixels without requiring labeled data. This approach achieves state-of-the-art unsupervised performance and provides excellent initializations for supervised fine-tuning.

What Problem Does This Paper Address?

Estimating optical flow, which describes the dense pixel correspondence between consecutive images, is crucial for many computer vision tasks. Traditional methods are often computationally expensive, while deep learning approaches typically require large amounts of labeled training data. Obtaining ground truth optical flow for real-world scenarios, especially with occlusions, is extremely difficult. Existing unsupervised methods struggle with occluded regions due to the limitations of photometric loss, leading to a significant performance gap compared to supervised methods. Furthermore, supervised methods often rely heavily on pre-training on synthetic datasets, which can introduce domain gaps and complex training schedules. This paper aims to bridge this gap by developing an effective unsupervised learning framework that can handle occlusions and reduce the reliance on synthetic data for training.

Methods

DistillFlow employs a two-stage self-supervised learning framework based on knowledge distillation.

Stage 1: Unsupervised Flow Learning (Teacher Models) Multiple teacher models are trained using a standard unsupervised optical flow learning protocol. This involves using photometric loss (measuring the difference between warped and reference images) and edge-aware smoothness loss. Crucially, they incorporate occlusion handling by estimating occlusion maps based on forward-backward consistency. Model distillation is used to ensemble predictions from multiple teacher models, reducing variance and providing more reliable "confident" flow predictions.

Stage 2: Self-Supervised Learning with Knowledge Distillation (Student Model) The core innovation lies here. Challenging transformations are applied to the input image pairs for the student model. These transformations are designed to:

  1. Generate Hallucinated Occlusions: Techniques like random cropping and superpixel noise injection create artificial occlusions, forcing the student model to learn flow in these challenging regions.
  2. Generate Less Confident Predictions: Transformations like scaling, geometric distortions, and color changes (overexposure, underexposure) make it harder for the student model to predict flow accurately, even for non-occluded pixels.

The confident predictions from the teacher models (from Stage 1) are then used as "soft labels" to guide the student model's learning. Two variants of knowledge distillation are proposed:

  • Occlusion View: Distills knowledge specifically for the hallucinated occluded regions.
  • Confidence View: Distills knowledge for pixels where teacher predictions are confident, guiding the student to improve its own less confident predictions. The confidence view is found to be more efficient.

Datasets

  • Training: KITTI 2012, KITTI 2015 (raw datasets), Sintel (raw and official training datasets).
  • Evaluation: KITTI 2012, KITTI 2015, Sintel (Clean and Final).

Key Insights and Ideas

  • Hallucinated Occlusions as a Training Signal: The paper demonstrates that artificially creating occlusions and using teacher models' confident predictions to guide the student model is a powerful way to learn flow in occluded regions, a long-standing challenge in unsupervised methods.
  • Challenging Transformations for Generalization: Applying various transformations (geometric, color, occlusion hallucination) to the input not only helps the student model learn occluded pixels but also improves its ability to handle challenging non-occluded scenarios, leading to better generalization.
  • Self-Supervised Pre-training as a Replacement for Synthetic Data: DistillFlow's self-supervised pre-trained models provide excellent initializations for supervised fine-tuning, effectively removing the need for extensive pre-training on synthetic datasets and simplifying the training pipeline.
  • Correspondence Generalization to Stereo: The optical flow model, when trained on monocular videos, can be directly applied to estimate stereo disparity, achieving competitive results with specialized unsupervised stereo matching methods.

Key Results

  • State-of-the-Art Unsupervised Performance: DistillFlow achieves state-of-the-art results on both KITTI 2012 and KITTI 2015 benchmarks, significantly outperforming previous unsupervised methods. For instance, on KITTI 2012, it achieved EPE-all = 1.38 pixels, outperforming EpipolarFlow by 45%.
  • Competitive with Supervised Methods: After supervised fine-tuning, DistillFlow achieved top rankings on KITTI 2015 (4th among all methods, 1st among monocular) and outperformed all published methods on Sintel Final.
  • Improved Occlusion Handling: The method significantly improves optical flow estimation for occluded pixels, a key weakness of prior unsupervised approaches.
  • Generalization Capabilities: DistillFlow demonstrates strong generalization across different network architectures (FlowNetS, FlowNetC), correspondence tasks (stereo disparity), and datasets (cross-dataset transfer).

Limitations and Future Work

  • Teacher Model Dependency: The performance of the student model is inherently limited by the quality of the teacher model's predictions.
  • Computational Cost: Training multiple teacher models can be computationally intensive.
  • Photometric Loss Robustness: The paper notes that while census transform is used for photometric loss, it might not be the optimal transformation, suggesting future work in exploring more robust transformations.
  • Future Work: The authors suggest that their knowledge distillation approach can be extended to other vision tasks like depth estimation and semantic segmentation. They also propose exploring more advanced network architectures and further refining the challenging transformations.

Summary updated

BibTeX
@article{liu2022learning,
  author = {Pengpeng Liu and Michael R. Lyu and Irwin King and Jia Xu},
  title = {{Learning by Distillation: A Self-Supervised Learning Framework for Optical Flow Estimation}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2022},
  doi = {10.1109/tpami.2021.3085525},
}
Figure