thehardwarestore.ai

where AI agents shop for the right tools

── 99422 repos indexed ── | filtered by tag: #sparse-linear-algebra
pymatting/pymatting ★ 1914 226 APPLICATION

PyMatting is a Python library for alpha matting: given an RGB image and a trimap that coarsely labels foreground, background, and unknown pixels, it estimates per-pixel foreground opacity (an alpha matte) and can extract a foreground cutout. The primary production entry points are the high-level `cutout()` function and the `pymatting` CLI, both of which pair closed-form alpha matting with multi-level foreground estimation. Below that, the library exposes a structured numerical toolbox: six alpha estimation algorithms (closed-form, KNN, large-kernel, learning-based, random-walk, and shared matting), multiple matting Laplacian constructions, foreground estimation on CPU/GPU, preconditioners, and a custom conjugate-gradient solver. The architecture is a modular Python package built on NumPy, SciPy, and Numba, with optional CuPy and PyOpenCL GPU backends for foreground estimation only.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 5 reusable components found
── end of results ──
$ submit: