skillfed

skan

Skeleton analysis in Python

skan v0.13.1 130.7K downloads/30d#11,629 on PyPI147
Permissive license BSD 3-Clause Active released

What it is and what it does

skan is a Python library for analyzing skeleton images—binary images where objects have been reduced to their thin, one-pixel-wide centerlines. It extracts topological and morphological information from these skeletons, such as branch points, endpoints, and path lengths, representing them as graph structures. The package is built on established scientific libraries (NumPy, SciPy, scikit-image, NetworkX) and integrates with napari for visualization.

Typical use is in biomedical imaging (analyzing blood vessel networks, neuron morphology), materials science (fiber networks, crack patterns), and any domain where understanding the connectivity and geometry of thin structures matters. You load a binary skeleton image, convert it to a graph representation, and query its structural properties.

Use it for:

  • Quantify branching patterns and connectivity in microscopy images of blood vessels or neural networks.
  • Extract path lengths and tortuosity metrics from fiber or crack networks in materials.
  • Identify and classify junction types and endpoints in road or river network maps.
  • Measure skeleton robustness by analyzing how removal of nodes affects network connectivity.
  • Generate summary statistics on skeleton morphology for automated image classification tasks.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Analyzes skeleton (thin object) images to extract and characterize their structure, connectivity, and morphological properties using Python.

Yes. The package is actively maintained, has no security vulnerabilities, installs cleanly, and fills a specific niche in skeleton image analysis with a mature dependency stack. It is appropriate for research and production use in image analysis pipelines. The Alpha status reflects ongoing development but not instability.

Install

skan on PyPI

pip

pip install skan

uv

uv add skan

poetry

poetry add skan

Installing skan

Before you install

Low friction: pure Python wheel with no compiled dependencies. Active maintenance with recent commits and a stable dependency stack of well-established scientific libraries.

License in practice

BSD 3-Clause is permissive; you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.

Quickstart

import skan
import imageio

# Load a binary skeleton image
image = imageio.imread('skeleton.png')

# Analyze the skeleton
results = skan.csr.summarise(skan.csr.skeleton_to_csgraph(image))

Requires Python 3.9 or later; input images should be binary (foreground/background) skeletons.

Verify before relying

  • Whether the package handles 3D skeleton images or is limited to 2D
  • Performance characteristics on very large images or complex skeleton networks
  • Specific output metrics and how they relate to standard morphological descriptors

Package facts

License BSD 3-Clause (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 11 — imageio, matplotlib, networkx, numba, numpy, pandas, openpyxl, scikit-image, scipy, toolz, tqdm
Maintenance actively maintained — 189 days since the last release
Last repo commit
First released
Downloads 130,711/month — #11,629 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: skan-0.13.1-py3-none-any.whl

Keywords: image processing, skeletons

Development Status :: 3 - AlphaEnvironment :: ConsoleFramework :: napariIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering

Tags

skeleton image analysisthin object morphologyimage skeletonizationskeleton extraction pythonbone structure analysisnetwork topology from imagesskeleton connectivity
image-analysisgraph-topologybiomedical-imaging

More Scientific/Engineering packages