PWC-Net Pyramid Flow Network
Solve big motion coarse, then fix details fine. PWC-Net builds flow as a pyramid of warps so small nets handle huge shifts.
Why Does This Exist?
FlowNet stacks full-resolution frames, which is heavy and weak on fine detail. PWC-Net exists to follow the classical pyramid instead: estimate coarse flow, warp features by it, then solve only the small residual at each finer level. The design cuts parameters drastically while sharpening boundaries.
Iteration without pyramids is RAFT; attention matching is GMFlow.
Think of It Like This
Folding a map before tracing streets
Find a city on a folded road map first, then unfold to trace its streets. Searching streets on the full unfolded map wastes time; the fold gives the neighborhood for free.
Coarse levels are the fold and fine levels trace streets. The analogy stops at warping: paper never stretches while feature maps warp by the current flow estimate.
How It Actually Works
A shared encoder builds feature pyramids for both frames. At level , the second-frame features warp by upsampled flow , then a small cost volume correlates warped against first-frame features over a px window. A tiny decoder predicts the residual , and context networks refine the full-resolution output. Loss weights each level toward the finest, so coarse mistakes get corrected rather than frozen.
Worked numbers
A px shift is px at quarter resolution inside the window, then refines to px residual at full scale. Sintel final error lands near px with about million weights versus million for FlowNet2 stacks, roughly a seventeenfold saving.
Code
def coarse_to_pixels(coarse: float, levels: int) -> float: return coarse * (2 ** levels) # upsample coarse shift to full resolution
print(coarse_to_pixels(2.0, 5)) # -> 64.0Watch Out For
Freezing coarse errors into fine levels
A wrong coarse vector warps features onto wrong content, and fine decoders polish the mistake. The symptom is large clean regions shifted as blocks. Keep the search window honest at coarse levels and supervise every scale during training.
The Quick Version
- PWC-Net estimates flow coarse-to-fine with warping at each scale.
- Cost volumes over px windows score matches locally.
- Each level predicts only the residual above the upsampled coarse flow.
- Error near px on Sintel final with far fewer weights than FlowNet.
- A px shift becomes px at coarse scale.
- Coarse mistakes propagate, so supervise all levels.