Abstract: Image prediction methods often struggle on tasks that require changing the positions of objects, such as video prediction, producing blurry images that average over the many positions that objects might occupy. In this paper, we propose a simple change to existing image similarity metrics that makes them more robust to positional errors: we match the images using optical flow, then measure the visual similarity of corresponding pixels. This change leads to crisper and more perceptually accurate predictions, and does not require modifications to the image prediction network. We apply our method to a variety of video prediction tasks, where it obtains strong performance with simple network architectures, and to the closely related task of video interpolation.
Introduction
In video prediction, models often struggle with uncertainty regarding object trajectories. If a model is uncertain about the exact future position of a car, standard pixel-wise losses (like $L_1$ or $L_2$) mathematically encourage the model to produce a blurry "average" of all possible positions. This occurs because a sharp prediction that is slightly misaligned with the ground truth results in a massive penalty, as the loss function compares object pixels to background pixels. A blurry blob covering all potential positions achieves a lower loss despite being perceptually inferior. This paper introduces a "correspondence-wise" loss to eliminate this "hedging" behavior by making the loss function robust to small positional errors.
The Correspondence-wise Loss
The core innovation is a simple modification to standard similarity metrics: geometrically align the predicted image with the ground truth before measuring their similarity. The process involves:
- Finding Correspondences: An off-the-shelf optical flow network (e.g., RAFT) identifies a mapping between predicted pixels and ground truth pixels.
- Warping: The predicted image is warped using this flow field to align its features with the ground truth.
- Similarity Measurement: A standard loss (such as $L_1$, $L_2$, or LPIPS) is calculated between the aligned images.
- Regularization via Flow Scaling: To prevent the model from using extreme warping to match unrelated content, the authors introduce flow scaling. Multiplying the estimated flow by a factor (e.g., 0.9) during training creates a "pull" that encourages the model to place objects as close to their true positions as possible.
Crucially, this method is architecture-agnostic. It requires no changes to the generator network, only to the error calculation during training.
Experimental Setup
The method was evaluated on several standard benchmarks:
- KITTI & Cityscapes: Large-scale datasets of egocentric driving footage.
- Caltech Pedestrian: Street scenes focused on moving pedestrians.
- Vimeo-90K: Used for video frame interpolation tasks.
- Toy Datasets: Simple scenarios used to analytically study loss function behavior.
Key Insights and Results
- Blur Penalization: Blurry images are naturally penalized because no simple flow field can map a blurry blob back to a sharp object. This forces the model to commit to sharp, "crisp" predictions.
- Smooth Loss Landscapes: Unlike the sharp "V" shape of traditional losses, correspondence-wise losses provide smoother gradients, helping the model gradually "slide" objects into correct positions during training.
- Quantitative Superiority: On KITTI, the correspondence-wise $L_1$ loss improved SSIM from 0.563 to 0.586 and reduced LPIPS from 0.438 to 0.359 compared to standard $L_1$. A simple ResNet trained with this loss outperformed complex state-of-the-art models like OMP and Vid2Vid.
- Human Preference: In a 2AFC "real-or-fake" study, users significantly preferred videos generated with the correspondence-wise loss.
Limitations
The primary drawback is a 30% to 50% increase in training time due to the requirement of running an optical flow network during every step. However, inference speed remains unaffected as the flow network is only used during training. Additionally, the method's success depends on the quality of the underlying optical flow model, which may struggle with extreme occlusions or entirely new content.
Summary updated