Practical overview
When it fits
Use Tfoptflow when a TensorFlow-based PWC-Net implementation is useful for training or inference, especially when predictions are needed for image pairs or an optical-flow dataset.
Who it is for
- Computer-vision developers building motion-estimation workflows.
- Researchers or practitioners who need to train, evaluate, or run PWC-Net optical-flow models.
Documented uses
- Estimate pixel-level motion between two image frames.
- Train or fine-tune a PWC-Net model using image-pair datasets.
- Use optical-flow predictions as an input to tasks such as tracking, action recognition, or video object segmentation.
Requirements & limits
The repository is public and licensed under MIT. It provides Anaconda environment files for Ubuntu and Windows.
- The implementation supports multi-GPU training and mixed-precision training.
- The README says the code avoids dynamically loaded CUDA-based TensorFlow user operations and can run on supported TensorFlow hardware, including CPU-only configurations.
- Pre-trained checkpoints are available in small and large variants with different parameter counts and model structures.
- The README warns that its published GPU inference timings use unoptimized graphs and should not be treated as production performance estimates.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run PWC-Net inference on image pairs
Generate optical-flow predictions for pairs of images using a pre-trained PWC-Net model.
Before you start
- A TensorFlow-capable environment; the README points to Anaconda3 v.5.2.0 environment files for Ubuntu and Windows.
- A downloaded pre-trained model checkpoint.
- Image pairs readable by
skimage.io.imread.
Steps
Prepare a list of image pairs, with each pair containing two consecutive frames.
Set the inference device and controller, using a GPU device or
/device:CPU:0for CPU inference.Configure
ModelPWCNetwith the test options, checkpoint path, batch size, device settings, and model options matching the checkpoint.Pass the image-pair list to
predict_from_img_pairs()to generate flow predictions.
Expected outcome
PWC-Net produces dense optical-flow predictions for the supplied image pairs.
Guide limitations
- The README describes an example implementation rather than a verified run in this guide.
- The pre-trained model must be downloaded separately; the README links to the model files.
- Reported inference timing is for unoptimized graphs and is not presented as production performance.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- philferriere/tfoptflow · Official homepage title · retained in its source language

