Milenilines converts an image into a smooth vector field, traces dense streamlines, and automatically fits the result to a canonical ODE flow model.
The pipeline is Python-driven, with performance-critical components implemented in Rust.

- Image → scalar potential field
- Gradient-based velocity field
- Dense streamline seeding and tracing
- Automatic ODE model selection via scoring
- Streamline morphing animation:
- image only
- image + streamlines
- image streamlines → ODE streamlines
- Fast backend using Rust
.
├── app.py
├── requirements.txt
├── examples/ # licensed example images
├── milenilines/ # Python implementation
│ ├── io.py
│ ├── potential.py
│ ├── velocity.py
│ ├── streamlines.py
│ ├── render.py
│ └── ode_library.py
└── milenilines_rs/ # Rust (PyO3) acceleration module
├── Cargo.toml
├── Cargo.lock
├── pyproject.toml
└── src/lib.rs
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cd milenilines_rs
export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
maturin develop
cd ..
python app.py examples/name.jpg
Example images in examples/ are free to use and redistribute under.
- Unsplash (Unsplash License)
MIT License
See LICENSE for details.