$npx skillfedfor your agent

PyMatting

Python package for alpha matting.

Worth itPyPI Scientific/EngineeringReleased Jan 20263.2M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pymatting-1.1.15-py3-none-any.whl
v1.1.15 · released 2026-01-26 · Python >=3 · 4 runtime deps: numpy, pillow, numba, scipy

Yes. PyMatting is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively. Install it if you need to solve alpha matting problems or extract foreground objects from images with trimap guidance. Skip it if you require deep learning–based matting or have no use for trimap-driven segmentation.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • First import takes a minute due to compilation.
  • GPU support requires separate driver installation and optional dependencies.
  • Low friction: pure Python wheel with four well-established numeric dependencies (numpy, pillow, numba, scipy).

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute PyMatting with minimal restrictions, provided you include the license notice.

last release 2026-01-26 (200 days) · last repo commit 2026-04-07 · 1,914 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,205,995 downloads/mo, #2,702 on PyPI

Verify before relying

pip install pymatting

from pymatting import cutout

cutout(
    "input_image.png",
    "input_trimap.png",
    "output_cutout.png"
)
  • Performance characteristics and typical runtime for different image sizes and matting methods
  • Memory requirements for large-scale batch processing
  • Accuracy comparison with other alpha matting approaches
Same gist for agents: .md · .json

What it is and what it does

PyMatting is a Python library implementing six different alpha matting algorithms to estimate the alpha channel (transparency) of foreground objects in images. Given an input image and a trimap (a rough manual segmentation into foreground, background, and unknown regions), it computes pixel-level alpha values that allow clean foreground extraction and compositing onto new backgrounds. The library also provides foreground estimation with optional GPU acceleration via CuPy or PyOpenCL.

The package is built on numpy, scipy, and numba for numerical computation and includes specialized tools like fast multithreaded KNN search and preconditioners (incomplete Cholesky decomposition, V-Cycle multigrid) to accelerate convergence. It is designed for readable, maintainable code and includes test coverage of 89%. GPU support is optional and requires separate driver setup.

Use it for

  • Removing or replacing image backgrounds in photo editing workflows by extracting precise alpha channels
  • Preparing foreground objects for compositing onto different backgrounds in graphics or video production
  • Batch processing images to generate clean cutouts for e-commerce or product photography
  • Integrating alpha matting into image segmentation pipelines alongside other computer vision tasks
  • Accelerating foreground estimation on GPU-equipped systems for high-throughput applications

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

PyMatting is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively. Install it if you need to solve alpha matting problems or extract foreground objects from images with trimap guidance. Skip it if you require deep learning–based matting or have no use for trimap-driven segmentation.

Install

pymatting on PyPI

Before you install

Low friction: pure Python wheel with four well-established numeric dependencies (numpy, pillow, numba, scipy). Repository is active with recent commits and 1914 stars. Last release was 200 days ago.

First import takes a minute due to compilation. GPU support requires separate driver installation and optional dependencies.

License in practice

MIT license is permissive; you can use, modify, and distribute PyMatting with minimal restrictions, provided you include the license notice.

Quickstart

pip install pymatting

from pymatting import cutout

cutout(
    "input_image.png",
    "input_trimap.png",
    "output_cutout.png"
)

Verify before relying

  • Performance characteristics and typical runtime for different image sizes and matting methods
  • Memory requirements for large-scale batch processing
  • Accuracy comparison with other alpha matting approaches

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3
Install frictionLow. Pure-Python wheel
Runtime dependencies
4 packages
numpypillownumbascipy
MaintenanceActively maintained 200 days since the last release
Last repo commit
First released
Downloads3,205,995 / month, #2,702 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Evidence: pymatting-1.1.15-py3-none-any.whl

Tags

Capabilities
alpha matting image segmentationforeground extraction from imagestrimap-based image compositingalpha channel estimationimage matting algorithmsbackground removal mattingforeground estimation GPU
Topics
image-processingcomputer-visiongpu-optional
PyPI keywords
alphamatting

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “alpha matting image segmentation”

  • PyMattingPyMatting solves the alpha matting problem—extracting foreground…
  • facexlibFacexlib provides a collection of PyTorch-based face analysis…
  • modelscopeModelScope provides unified Python interfaces for inference,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Scientific/Engineering packages

numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
pandas Worth it
PyPI · Scientific/Engineering · released Jul 2026

pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.

BSD-3-Clausecompiled wheel · 3.11+
769.1Mdownloads / mo
scipy Worth it
PyPI · Libraries · released Jun 2026

scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.

BSD-3-Clausecompiled wheel · 3.12+
449.0Mdownloads / mo
scikit-learn Worth it
PyPI · Software Development · released Jun 2026

scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.

Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.

BSD-3-Clausecompiled wheel · 3.11+
235.5Mdownloads / mo
dill Worth it
PyPI · Software Development · released Jan 2026

dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.

BSD-3-Clausepure Python · 3.9+
208.1Mdownloads / mo
multiprocess Worth it
PyPI · Software Development · released Jan 2026

Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.

Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.

BSD-3-Clausepure Python · 3.9+
202.7Mdownloads / mo

See also transparent-background · facexlib · rembg · mmdet · pycuda · fill-voids · blendmodes · albumentations · cupy-cuda13x · blend-modes