A single Lightning rig for the optical flow zoo
It corrals dozens of optical flow architectures into one PyTorch Lightning framework so you can train and benchmark them without maintaining forty separate codebases.

What it does
The project wraps more than 40 deep optical flow models—from foundational architectures like FlowNet and RAFT to recent entries like Flow-Anything and FlowSeek—into a single PyTorch Lightning framework. It provides pretrained weights, standardized training and validation loops, and support for datasets including Spring, Middlebury, VIPER, TartanAir, and Kubric. The goal is to turn model comparison and further fine-tuning from a plumbing exercise into a config-driven workflow.
The interesting bit
The real value is the unglamorous standardization layer: YAML config support, built-in benchmarking and plotting scripts, and a public results table that tracks how its re-implemented scores stack up against original paper claims. It also integrates third-party loggers like SwanLab, signaling intent to be a living benchmark platform rather than a static model dump.
Key highlights
- Bundles 40+ models with pretrained weights, spanning years of optical flow research.
- Supports a wide range of datasets: Spring, Middlebury, VIPER, TartanAir, Kubric, Monkaa, and others.
- Includes benchmarking and plotting utilities to compare model speed and accuracy side-by-side.
- Maintains a comparison table of framework results versus original paper claims.
- Recent releases added YAML config support and compatibility fixes for Lightning 2.x.
Caveats
- The author explicitly warns that the project is still under development and some features may not work as intended.
- Upgrading from v0.3 to v0.4 introduced breaking changes that require migrating existing code.
- FP16 is unsupported in a few models, including
lcv_raft,matchflow, andseparableflow.
Verdict
Researchers who need to compare optical flow architectures or fine-tune them on new datasets will save days of integration work. If you only need a single model’s original, untouched implementation, the upstream repositories remain the safer source of truth.
Frequently asked
- What is hmorimitsu/ptlflow?
- It corrals dozens of optical flow architectures into one PyTorch Lightning framework so you can train and benchmark them without maintaining forty separate codebases.
- Is ptlflow open source?
- Yes — hmorimitsu/ptlflow is open source, released under the Apache-2.0 license.
- What language is ptlflow written in?
- hmorimitsu/ptlflow is primarily written in Python.
- How popular is ptlflow?
- hmorimitsu/ptlflow has 539 stars on GitHub.
- Where can I find ptlflow?
- hmorimitsu/ptlflow is on GitHub at https://github.com/hmorimitsu/ptlflow.