Dense Optical Flow Prediction from a Static Image

Jacob Walker, Abhinav Gupta, Martial Hebert

Abstract

Given a scene, what is going to move, and in what direction will it move? Such a question could be considered a non-semantic form of action prediction. In this work, we present a convolutional neural network (CNN) based approach for motion prediction. Given a static image, this CNN predicts the future motion of each and every pixel in the image in terms of optical flow. Our CNN model leverages the data in tens of thousands of realistic videos to train our model. Our method relies on absolutely no human labeling and is able to predict motion based on the context of the scene. Because our CNN model makes no assumptions about the underlying scene, it can predict future optical flow on a diverse set of scenarios. We outperform all previous approaches by large margins.

Introduction

Action prediction in computer vision has traditionally focused on two distinct areas: semantic classification (e.g., identifying an action as "running") or sparse trajectory planning for specific objects. However, a significant gap exists in predicting dense, non-semantic motion. Humans possess an innate ability to look at a static photograph—such as a child leaning toward a birthday cake—and instinctively predict the likely downward movement of their head. This ability relies on understanding pose and context rather than just object identification.

Existing computational models have struggled with this task due to the inherent ambiguity of motion across diverse environments. This research introduces a generalized framework using a convolutional neural network (CNN) to predict future optical flow for every pixel in any generic scene, bridging the gap between static imagery and dynamic anticipation.

Methodology

The researchers adopted a self-supervised learning approach to eliminate the need for manual human labeling.

Automated Labeling and Quantization

Instead of human annotators, the team utilized an off-the-shelf optical flow algorithm, DeepFlow, to calculate actual motion between frames in tens of thousands of existing videos. These calculated flow vectors served as the ground truth for the static starting frames. To avoid the "blurry" predictions often associated with continuous regression, the authors quantized optical flow into 40 distinct "motion clusters" using k-means. The CNN then treats motion prediction as a classification problem, estimating the probability that a pixel belongs to a specific motion category.

Optical flow color wheel: hues represent direction, while saturation represents magnitude.

Architecture

The model utilizes a modified 7-layer CNN architecture, similar to AlexNet. A key feature is the final spatial softmax layer, which enables the network to output a 20x20 grid. Each cell in this grid contains a probability distribution over the 40 motion clusters. The authors also explored a "temporally deep" extension to predict a sequence of six future flow frames, effectively hallucinating short motion trajectories from a single image.

Experimental Setup

The model was trained and evaluated on several prominent video benchmarks to ensure broad generalizability:

  • UCF-101 & HMDB-51: Large-scale datasets featuring a combined 500,000 frames of diverse actions ranging from sports to playing instruments.
  • KTH: A dataset of fundamental human actions (walking, waving) used for comparison against legacy baseline methods.

Results and Discussion

The CNN significantly outperformed previous state-of-the-art methods, such as Structured Random Forests (SRF), across all primary metrics, including End-Point-Error (EPE) and direction similarity. On the UCF-101 dataset, the model achieved a 90.9% Top-10 accuracy for predicting the motion of moving pixels, a massive improvement over the 17.2% achieved by SRF.

Predicted optical flow for three different actions. The left column shows the input static image, and the right column shows the predicted flow vectors overlaid on a color-coded heatmap.

Qualitatively, the model demonstrates a deep understanding of contextual anticipation. It can distinguish between the start and end of a movement—such as a person at the top versus the bottom of a squat—and successfully predicts non-human motion, such as the curl of an ocean wave or the gallop of a horse. By outputting a probability distribution, the model effectively handles the inherent ambiguity of static images, correctly identifying likely directions of movement while dismissing impossible ones.

Conclusion and Future Work

While the model sets a new benchmark for dense motion prediction, limitations remain. The current output is a relatively coarse 20x20 grid, and predicting high-resolution, pixel-perfect flow is a continuing challenge. Additionally, long-range prediction over multiple frames remains difficult due to the expanding state space of possible movements. Future research aims to use these predicted flow fields to synthesize actual future video frames from a single static image, moving from predicting motion to hallucinating reality.

Summary updated

BibTeX
@inproceedings{walker2015dense,
  author = {Jacob Walker and Abhinav Gupta and Martial Hebert},
  title = {{Dense Optical Flow Prediction from a Static Image}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2015},
  url = {https://openreview.net/forum?id=SkW-VWzdbS},
}
Figure