Skip to content

Python bindings for fastms, an efficient Mumford Shah minimizer

License

Notifications You must be signed in to change notification settings

maxakuru/pyfastms

Repository files navigation

pyfastms

WIP

Python bindings for the c++ implementation of fastms; an efficient algorithm for finding piecewise smooth and constant approximations to images by minimizing the Mumford-Shah functional. (Paper)

Use

import numpy as np
import fastms

arr = np.zeros((100, 100, 3), dtype=np.float64) # ...
solver = fastms.FMSSolver()
res: np.ndarray = solver.run(arr) # run_float(), run_double(), ...

Limitations & differences

  • No CUDA support
  • No OpenMP support
  • Depends on Numpy, but not on Matlab mex/OpenCV

Dependencies

  • Cython 0.29.26
  • Python 3.9.8
  • Numpy 1.20.0
  • Other stuff may work, that's what I'm using

Build

poetry build

Install

poetry install

Test

poetry run test

About

Python bindings for fastms, an efficient Mumford Shah minimizer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published