scikit-image

A collection of algorithms for image processing in Python, built on NumPy arrays and interoperable with the scientific Python ecosystem.

Library
PyPI
v0.26.0
6,579stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
84/100Excellent
Development Activity84
Maintenance60
Community92
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
82/100Excellent
Architecture78
Code Quality88
Innovation74
Learning Curve88

scikit-image is an open-source Python library providing a broad collection of algorithms for image processing and computer vision, built directly on NumPy arrays and released under a BSD-3-Clause license. It brings together tools for filtering, segmentation, feature detection, geometric transforms, and morphological operations under a single, consistently designed function-based API, and interoperates natively with the rest of the scientific Python stack — NumPy, SciPy, Matplotlib, and scikit-learn — instead of introducing its own image object model.

Unlike OpenCV, which centers on real-time video processing with a C++-first API, scikit-image targets scientific and research workflows: n-dimensional array support lets many of the same functions operate on 2D photographs, 3D microscopy volumes, or higher-dimensional data. The project is actively maintained by a large contributor base (600+ contributors, roughly 7 commits per month), ships wheels for Linux, macOS, Windows, and even Pyodide/WebAssembly, and is developing a next-generation skimage2 API alongside the stable release.

What You Get

  • Segmentation & morphology - Watershed, region-growing, thresholding (Otsu, multi-Otsu), flood fill, skeletonization, and binary/grayscale morphological operations.
  • Feature & edge detection - Canny edge detection, corner detectors, SIFT/ORB/BRIEF descriptors, HOG features, and blob detection.
  • Geometric & color transforms - Affine/projective warps, resizing, rotation, and conversions between RGB, HSV, Lab, and other color spaces.
  • Restoration & filtering - Denoising, deconvolution, inpainting, unsharp masking, and rank/Gaussian/median filters.
  • N-dimensional support - Many algorithms work on 2D images as well as 3D+ volumetric data (e.g. microscopy stacks), not just flat photographs.

Common Use Cases

  • Scientific image analysis - Researchers process microscopy, astronomy, or medical imaging data with segmentation and measurement tools.
  • Computer vision pipelines - Developers extract features (SIFT, HOG, ORB) as inputs to classical ML or deep learning models.
  • Preprocessing for machine learning - Data scientists normalize, denoise, and augment image datasets before feeding them into scikit-learn or deep learning frameworks.
  • Geometric correction - Engineers correct lens distortion, register images, or warp/align photos using the transform module.

Under The Hood

Architecture scikit-image organizes roughly twenty top-level subpackages under src/skimage (color, draw, exposure, feature, filters, future, graph, io, measure, metrics, morphology, registration, restoration, segmentation, transform, util), each built around plain NumPy ndarray-in/ndarray-out functions rather than a class hierarchy or pipeline object — for example filters/thresholding.py exposes threshold_otsu(image) -> array and morphology/binary.py exposes binary_erosion(image, footprint) -> array. Performance-critical inner loops (feature/_canny_cy.py, morphology/_skeletonize_various_cy.py, feature/orb_cy.py) are written in Cython and compiled via a Meson build rather than setuptools, with Pythran-accelerated code paths for some numerical kernels. A parallel src/_skimage2 tree mirroring the same subpackage names indicates an in-progress v2 API rewrite developed alongside the stable API. Because functions are pure and array-in/array-out, composing a processing pipeline is just chained function calls, with no abstraction layer sitting between skimage functions and raw arrays.

Tech Stack The project targets Python 3.12+ with core dependencies on NumPy, SciPy, NetworkX, Pillow, imageio, tifffile, packaging, and lazy-loader. Its build system is Meson-Python with Ninja, Cython, and Pythran, replacing the historical setuptools/numpy.distutils toolchain, and day-to-day development is driven through the spin developer CLI used across the Scientific Python ecosystem. Optional extras (SimpleITK, scikit-learn, pyamg, astropy, Dask) extend functionality; documentation is built with Sphinx, sphinx-gallery, and the PyData Sphinx theme; and the package is distributed via PyPI and conda-forge with compiled wheels for Linux, macOS, Windows, and Pyodide/WebAssembly.

Code Quality The test suite mirrors the two source trees with an extensive collection of test_*.py files run via pytest, with pytest-doctestplus executing doctest examples and numpydoc-style docstrings checked by a dedicated docstub tool. ruff and prettier enforce style through pre-commit hooks alongside AST and large-file checks. CI runs across Linux, macOS, and Windows plus nightly and Pyodide builds, with a dedicated typing workflow validating the .pyi stub files shipped alongside modules. Error handling favors explicit, descriptive exceptions over silent fallbacks, consistent with NumPy/SciPy ecosystem conventions.

API Design scikit-image’s differentiator versus OpenCV or Pillow is that every function operates on plain NumPy ndarrays with no separate image object or type system, is BSD-3 licensed rather than GPL, and commonly supports n-dimensional data rather than being limited to 2D images or video frames. It plugs directly into the broader scientific Python stack — NetworkX for region-adjacency graphs, SciPy’s ndimage underneath many operations, and Dask for out-of-core array processing — instead of requiring data marshaling between separate C-extension image types. The in-progress skimage2 rewrite points toward continued investment in a cleaner, more consistent public API.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search