Computer Vision for Remote SensingPart 2 of 3Advanced · Updated July 31, 2026

Learned Optical Flow

Dense optical flow assigns a displacement vector to every pixel rather than a single transform to a whole point set, which the previous tutorial identified as the quantity needed for deforming scenes. Networks trained end-to-end for this task lead the public flow benchmarks. This tutorial uses contrails in satellite imagery as a running example of a problem where that benchmark performance may not carry over.

Flow needs both a wide receptive field and full resolution

Detecting a displacement of, say, 50 pixels requires a receptive field larger than 50 pixels, which is obtained by repeated downsampling. Assigning that displacement to the correct pixel requires full resolution, which downsampling removes. The U-Net shape meets both needs: an encoder downsamples, a decoder upsamples, and skip connections carry high-resolution features from each encoder stage to the matching decoder stage, so the decoder combines coarse context with fine detail.

EncoderDecodercontextflowfieldskip connectionsdownsampling widens the receptive field — this is what makesa large displacement visible at allskips restore the resolution needed to place each vectoron the right pixel
Figure 1.The encoder-decoder shape used by flow networks. Downsampling widens the receptive field so that a large displacement becomes visible; skip connections restore the spatial precision needed to place each flow vector on the correct pixel. Without them the decoder reconstructs fine detail from a coarse bottleneck and the flow field is blurred.

From FlowNet to RAFT, cascades give way to iterative refinement

  • FlowNet showed that an encoder-decoder network trained end-to-end on synthetic data could estimate flow, using a correlation layer to compare feature patches between the two frames.
  • PWC-Net reintroduced classical structure: a feature pyramid, warping of the second frame by the current estimate at each level, and a small cost volume around the warped position. It is coarse-to-fine, with learned features.
  • RAFT computes an all-pairs correlation volume once, the similarity of every pixel to every other, and refines a single flow field at a fixed resolution with a recurrent unit that repeatedly looks up values in that volume. Because it does not pass through a coarse-to-fine cascade, small fast-moving objects are not lost at a coarse level, where coarse-to-fine methods make errors they cannot later correct.

Failure mode 1: inputs unlike the training data

Flow networks are trained and evaluated on datasets such as FlyingChairs, Sintel and KITTI: rendered or photographed scenes with texture, shading and natural image statistics.

A binary contrail mask has none of these. It consists of thin curves on an empty background, with no texture or shading and large regions containing no signal. Brightness constancy, the assumption underlying all flow methods, is degenerate there: in an empty region every displacement fits the data equally well, and the network’s learned prior about natural scenes says little about how contrails move.

The usual remedy, fine-tuning, requires labelled flow for contrail imagery. Producing those labels would require the true per-pixel motion, which is much of what the method is meant to estimate.

Failure mode 2: an objective that rewards a different motion

Applied to the satellite image itself instead of the mask, the network receives a textured image like its training data and produces a clean, confident flow field. That field describes the wrong motion. Most of a satellite scene is cloud, including background cirrus and convective systems, which is textured and covers far more of the frame than the contrails. A network trained to minimise average endpoint error over the whole image recovers this dominant motion, as its loss rewards. Contrails are a sparse minority, often moving differently from the cloud around them, and the network has no reason to favour them.

This is not a domain gap: the network correctly answers the question it was trained on, which differs from the one posed here. A learned model’s prior is set by its training data and objective.

Some problems require only a small, smooth correction

Suppose, for example, that contrails have already been advected by numerical weather prediction winds before a flow step runs. The advection places each contrail approximately; what remains is a small, spatially smooth residual, from integration error and wind error. There are no large displacements, small fast objects or occlusions, and the input is a mask containing only contrail pixels. In a problem like this, most of RAFT’s strengths do not apply, and the property that matters, predictable behaviour on a sparse binary input far from its training data, is one it lacks.

Assumptions and failure modes

Learned flow networks assume inputs statistically similar to their training data, estimate the motion their loss rewards (usually the dominant motion in the frame), and need ground-truth flow to be adapted, which is unavailable for many scientific images.

Summary

  • Flow networks use an encoder-decoder with skip connections to combine a wide receptive field with full-resolution output; RAFT replaces the coarse-to-fine cascade with iterative refinement over an all-pairs correlation volume.
  • On binary contrail masks the inputs differ from any training data, and labels for fine-tuning do not exist.
  • On full satellite images the network tracks the dominant cloud motion, as its objective rewards, rather than the contrails.

A classical method computes the small residual directly, deterministically and without training data, with a handful of interpretable parameters; the next tutorial describes it.

References

  • Ronneberger, O., Fischer, P., & Brox, T. (2015). U-Net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015, 234–241. doi:10.1007/978-3-319-24574-4_28
  • Dosovitskiy, A., Fischer, P., Ilg, E., Häusser, P., Hazırbaş, C., Golkov, V., van der Smagt, P., Cremers, D., & Brox, T. (2015). FlowNet: Learning optical flow with convolutional networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2758–2766. doi:10.1109/ICCV.2015.316
  • Sun, D., Yang, X., Liu, M.-Y., & Kautz, J. (2018). PWC-Net: CNNs for optical flow using pyramid, warping, and cost volume. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 8934–8943. doi:10.1109/CVPR.2018.00931
  • Teed, Z., & Deng, J. (2020). RAFT: Recurrent all-pairs field transforms for optical flow. In Computer Vision – ECCV 2020, 402–419. doi:10.1007/978-3-030-58536-5_24
  • Butler, D. J., Wulff, J., Stanley, G. B., & Black, M. J. (2012). A naturalistic open source movie for optical flow evaluation. In Computer Vision – ECCV 2012, 611–625. doi:10.1007/978-3-642-33783-3_44
  • Geiger, A., Lenz, P., & Urtasun, R. (2012). Are we ready for autonomous driving? The KITTI vision benchmark suite. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 3354–3361. doi:10.1109/CVPR.2012.6248074