Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 940 Bytes

README.md

File metadata and controls

41 lines (32 loc) · 940 Bytes

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