motionflow
CLI and Python API for optical flow video processing.
motionflow input.mp4
Install
pip install motionflow # classical methods only
pip install motionflow[torch] # + RAFT and deep methods
conda install -c conda-forge motionflow # includes PyTorch
pixi global install motionflow # auto-selects GPU/CPU torch
Usage
CLI
# HSV colour-wheel flow (default: Farneback)
motionflow recording.mp4
# RAFT on GPU, heatmap style, every other frame
motionflow recording.mp4 --method raft --device cuda --viz heatmap --stride 2
# Blend flow 40% over original, with temporal smoothing
motionflow recording.mp4 --viz blend --blend 0.4 --smooth 3
# Quiver arrow overlay
motionflow recording.mp4 --viz quiver --quiver-step 24
Python API
from motionflow import process_video
out = process_video(
"recording.mp4",
method="raft",
viz="hsv",
stride=2,
device="auto",
)
Using estimators directly
import cv2
from motionflow.methods import FarnebackFlow
from motionflow.viz import flow_to_hsv
flow = FarnebackFlow()(prev_frame, curr_frame) # (H, W, 2)
vis = flow_to_hsv(flow) # BGR image
Methods
| Method | Type | GPU | Notes |
|---|---|---|---|
farneback |
Dense | No | Default, fast |
tvl1 |
Dense | No | Sharp edges, slow; requires opencv-contrib |
lucas-kanade |
Sparse | No | Good with --viz quiver |
raft |
Dense | Yes | High quality; weights auto-downloaded |
sea-raft |
Dense | Yes | ECCV 2024; coming soon |
neuflow |
Dense | Yes | Edge-optimised; coming soon |
Documentation
roaldarbol.github.io/motionflow
License
MIT
Metadata
Release files for motionflow 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| motionflow-0.1.0.tar.gz | 102.5 kB | With provenance | Details for motionflow-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| motionflow-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for motionflow-0.1.0-py3-none-any.whl |
Total release size: 126.1 kB
Release files / motionflow-0.1.0.tar.gz
| Download URL | motionflow-0.1.0.tar.gz |
|---|---|
| Size | 102.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c54356651c4c332add684355d96c89bb33c269fc91b0af20c3ee016587e295c6
|
|
BLAKE2b-256 checksum How to use checksums |
eb148bf3532a6b398c077b42b7b7373056d3442c967590d6fb9c59b952eeff4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.
Transparency logRelease files / motionflow-0.1.0-py3-none-any.whl
| Download URL | motionflow-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ef5476a36f597a06e6f48cb889bb2a7ef1bde6948be93b704bd9a2badd5f98d
|
|
BLAKE2b-256 checksum How to use checksums |
6180ddb2c7519e47bfd9d2b135c1ab581b3c0648f910b8b054fbfa7e2d5e44fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.
Transparency logSecurity for motionflow 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for motionflow-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.