FlowNet

Dosovitskiy 2015 · Paper

One-line summary — First end-to-end CNN for optical flow estimation, introducing the correlation layer and the synthetic Flying Chairs training dataset that became standard across the field.

Problem

By 2015 CNNs had transformed recognition tasks, but optical flow was not among their successes: variational methods in the Horn-Schunck lineage (DeepFlow, EpicFlow) still ruled, at seconds-to-minutes per frame. Flow differs fundamentally from prior CNN applications — it requires not just per-pixel localization but matching features between two images. Two obstacles blocked learning it: no one knew what architecture could express dense two-frame correspondence, and no dataset had dense ground-truth flow at CNN scale (true correspondences for real scenes are nearly impossible to obtain; Sintel, the largest, had only 1,041 training pairs). FlowNet attacked both.

Method & architecture

Two encoder-decoder architectures, each with nine convolutional layers (stride 2 in six of them, ReLU after each, no fully-connected layers so input size is arbitrary; filters shrink from 7×77\times7 to 5×55\times5 to 3×33\times3 while channels roughly double at each stride-2 layer):

c(x1,x2)=o[k,k]×[k,k]f1(x1+o),f2(x2+o)c(\mathbf{x}_1,\mathbf{x}_2)=\sum_{\mathbf{o}\in[-k,k]\times[-k,k]}\langle \mathbf{f}_1(\mathbf{x}_1+\mathbf{o}),\,\mathbf{f}_2(\mathbf{x}_2+\mathbf{o})\rangle

for patch size K:=2k+1K:=2k+1 — structurally one step of a convolution, but convolving data with data, so it has no trainable weights. Comparing all w2h2w^2 h^2 patch pairs is intractable, so displacements are capped at dd (neighborhood D:=2d+1D:=2d+1) with strides s1,s2s_1,s_2, and relative displacements are organized as channels, giving a w×h×D2w\times h\times D^2 output. Chosen parameters: k=0k{=}0, d=20d{=}20, s1=1s_1{=}1, s2=2s_2{=}2.

Refinement: ‘upconvolutional’ layers (unpooling + convolution) expand the coarse features; at each step the upconvolved features are concatenated with the corresponding contractive-part feature maps and an upsampled coarser flow prediction, doubling resolution 4 times to quarter resolution, then bilinear upsampling to full size. An optional variational refinement (‘+v’) runs 20 coarse-to-fine iterations of a matching-free variational solver plus 5 full-resolution iterations, with boundary-respecting smoothness α=exp(λb(x,y)κ)\alpha=\exp(-\lambda b(x,y)^{\kappa}).

Training: loss is the endpoint error (EPE — Euclidean distance between predicted and ground-truth flow, averaged over pixels); Adam (β1=0.9\beta_1{=}0.9, β2=0.999\beta_2{=}0.999), batch 8, lr 10410^{-4} halved every 100k iterations after 300k (FlowNetCorr needs a warm-up from 10610^{-6} to avoid exploding gradients). Data is the purpose-built Flying Chairs set: 809 rendered chair types (62 views each) affinely moved over 964 Flickr backgrounds, with displacement statistics matched to Sintel — 22,872 image pairs with exact dense flow. Aggressive online augmentation (translation ±20%, rotation ±17°, scaling 0.9–2.0, noise, brightness/contrast/gamma/color) is still crucial.

Results

Why it matters for SLAM

FlowNet launched the entire deep optical flow field, whose descendants (RAFT and its variants) now serve as the dense correspondence engines inside learned visual odometry and SLAM systems such as DROID-SLAM. Its two core artifacts remain load-bearing a decade later: the correlation layer (reused by PWC-Net, RAFT, and essentially every later flow network) and the synthetic-data recipe — train on rendered data with exact ground truth, evaluate on Sintel/KITTI — that FlyingThings3D, AutoFlow, and Kubric all follow.