← all repositories
pathak22/pyflow

Optical flow from 2004, wrapped for the impatient

A Python shim around Ce Liu's venerable C++ Coarse2Fine optical flow, minus the OpenCV dependency headache.

pyflow
Velocity · 7d
+0.2
★ / day
Trend
steady
star history

What it does

Wraps a well-known C++ implementation of dense optical flow—Coarse2Fine warping, originally from Thomas Brox’s 2004 work—into a Python module with minimal dependencies. The build step compiles the C++ extension in-place; no system OpenCV required. A demo.py script runs the thing, with a -viz flag if you want to see arrows on top of your pixels.

The interesting bit

The value here is subtraction: they stripped out the C++ OpenCV dependency that often makes compiling old computer-vision code a weekend-killing dependency chase. The wrapper was built for a CVPR 2017 paper on unsupervised learning from unlabeled video, so it’s battle-tested on at least one research pipeline.

Key highlights

  • Wraps Ce Liu’s original C++ implementation, not a reimplementation
  • Builds with python setup.py build_ext -i; no external OpenCV needed
  • Includes demo.py with optional visualization flag
  • Resize images smaller for “real time performance” (their quotes, not a guarantee)
  • 661 stars, last significant activity appears to be the CVPR 2017 era

Caveats

  • The README’s “super fast and accurate” is qualitative; no benchmarks or timing numbers provided
  • No CI, no PyPI package, no modern packaging (setup.py direct invocation)
  • Candidate images: none available

Verdict

Worth a look if you need classic, well-cited dense optical flow in a Python script and don’t want to fight CMake for three hours. Skip if you need GPU acceleration, learned flow methods, or a maintained package with pip install.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.