Image Analysis Fundamentals (iaf)

License Version Supported platforms Documentation Status

The iaf library is a helper library that adds user-friendly functionality to scikit-image, scipy, matplotlib and other libraries for the purpose of teaching the fundamentals of image analysis.

Installation

The iaf package installs all necessary dependencies. It is recommended to create a dedicated (conda or venv) environment for installation.

$ conda create -n iaf-env python=3.11         # Optional
$ conda activate iaf-env                     # Optional
$ pip install iaf

Currently, iaf is compatible with python 3.10, 3.11, 2.12, and 3.13.

Development

The project uses uv for dependency management and hatchling as the build backend. After installing uv:

uv sync --group dev
uv run pytest

uv sync creates .venv/ and resolves dependencies from pyproject.toml. Prefix commands with uv run to execute them inside that environment. The generated uv.lock is intentionally not committed.

To add or change a dependency, edit pyproject.toml and run uv sync.

Documentation

The official documentation is hosted on https://iaf.readthedocs.org.

To generate the documentation locally run:

uv run --group docs python -m sphinx -b html docs docs/_build/html

Build and publish

From your project root, run:

uv build

This creates artifacts in dist/ such as a wheel and a source tarball.

Upload to PyPi

Release artifacts are built automatically by GitLab CI. Bump __version__ in iaf/init.py (it is the single source of truth for the package version), commit, then push a matching tag:

git tag v1.5.2
git push origin v1.5.2

The tag pipeline builds the package and verifies that the tag matches __version__. Uploads are always started manually from the tag pipeline in GitLab: run publish:testpypi for an optional TestPyPI dry run, then run publish:pypi when the artifacts are ready for the production release. See .gitlab-ci.yml for the required CI/CD variables.

To publish manually instead:

uv publish --token <your-pypi-token>

License

Apache License 2.0. See LICENSE.

Copyright © 2026 ETH Zurich

Creators: Aaron Ponti (original creator), Marvin Albert, Andreas P. Cuny

The morph module contains reimplementations, in pure Python/numpy/scipy, of equivalent functions in the centrosome library (https://github.com/CellProfiler/centrosome) licensed under BSD 3-Clause License, and we hereby wish to credit the algorithmic source per the terms of centrosome’s own license.

We further would like to acknowledge the anonymous contributors of the test images used in the test suite of this package.