A rewrite in Rust of pink26 (below), with the same API and identical results point by point, plus functions that pink26 does not have (labelled watersheds, branches of a skeleton, clDice). Install it with pip install digitopo (Python 3.11 and later, on Linux, macOS and Windows).
GitHub Documentation PyPI DOI (Zenodo)
from digitopo import skeleton, topology
ult = skeleton.ultimate_skeleton(blobs, 8)
before = topology.topology(blobs, 8)
after = topology.topology(ult, 8)
# before: objects=38, holes=1, euler=37
# after: objects=38, holes=1, euler=37
from digitopo import watershed
from skimage.filters import sobel
markers = np.zeros(coins.shape, np.int32)
markers[coins < 30] = 1 # background
markers[coins > 150] = 2 # coins
labels = watershed.watershed_labels(
sobel(coins), markers, 8)
Inputs from skimage.data; each image is the result of the code beside it.
| Function | Lab PC (2017)Intel Core i5-7500, 4 cores, Ubuntu 22.04.5 LTS | Lab PC (2025)Intel Core Ultra 7 265, 20 cores, Ubuntu 26.04.1 LTS | MacBook Pro (2023)Apple M3 Pro, 11 cores, macOS 27.2.1 | |||
|---|---|---|---|---|---|---|
| pink26 | digitopo | pink26 | digitopo | pink26 | digitopo | |
| 2D 1024×1024 | ||||||
simple_points | 15.4 ms | 2.88 ms | 6.59 ms | 0.77 ms | 8.53 ms | 1.18 ms |
ultimate_skeleton | 220 ms | 149 ms | 76.8 ms | 80.7 ms | 186 ms | 173 ms |
curvilinear_skeleton | 329 ms | 194 ms | 100 ms | 94.2 ms | 220 ms | 201 ms |
distance_map (squared Euclidean) | 23.9 ms | 7.58 ms | 10.1 ms | 2.27 ms | 16.2 ms | 3.16 ms |
watershed_lines | 932 ms | 372 ms | 294 ms | 128 ms | 444 ms | 189 ms |
homotopic_thinning | 2.44 s | 1.17 s | 593 ms | 590 ms | 663 ms | 734 ms |
| 3D 128×128×128 | ||||||
simple_points | 1.59 s | 18.0 ms | 641 ms | 2.66 ms | 1.10 s | 5.67 ms |
ultimate_skeleton | 2.22 s | 613 ms | 833 ms | 312 ms | 1.57 s | 643 ms |
curvilinear_skeleton | 14.4 s | 1.79 s | 6.31 s | 1.01 s | 12.3 s | 1.90 s |
distance_map (squared Euclidean) | 68.9 ms | 22.4 ms | 34.2 ms | 7.56 ms | 46.7 ms | 9.16 ms |
watershed_lines | 11.6 s | 4.33 s | 3.24 s | 1.77 s | 5.03 s | 2.93 s |
| 3D 64×64×64 | ||||||
homotopic_thinning | 25.3 s | 2.68 s | 9.88 s | 1.55 s | 16.1 s | 2.08 s |
| Function | Lab PC (2017)Intel Core i5-7500, 4 cores, Ubuntu 22.04.5 LTS | Lab PC (2025)Intel Core Ultra 7 265, 20 cores, Ubuntu 26.04.1 LTS | MacBook Pro (2023)Apple M3 Pro, 11 cores, macOS 27.2.1 |
|---|---|---|---|
| 2D 1024×1024 | |||
simple_points | ×5.4 | ×8.6 | ×7.2 |
ultimate_skeleton | ×1.5 | ×0.95 | ×1.1 |
curvilinear_skeleton | ×1.7 | ×1.1 | ×1.1 |
distance_map (squared Euclidean) | ×3.2 | ×4.5 | ×5.1 |
watershed_lines | ×2.5 | ×2.3 | ×2.4 |
homotopic_thinning | ×2.1 | ×1 | ×0.9 |
| 3D 128×128×128 | |||
simple_points | ×88 | ×241 | ×194 |
ultimate_skeleton | ×3.6 | ×2.7 | ×2.4 |
curvilinear_skeleton | ×8.1 | ×6.2 | ×6.5 |
distance_map (squared Euclidean) | ×3.1 | ×4.5 | ×5.1 |
watershed_lines | ×2.7 | ×1.8 | ×1.7 |
| 3D 64×64×64 | |||
homotopic_thinning | ×9.5 | ×6.4 | ×7.8 |
Best of 5 runs (3 above one second), pink26 0.1.1 and digitopo 0.1.0 from their releases, Python 3.13 or 3.14. Images of random blobs; the two libraries give the same result in every case, on every machine. digitopo runs on all the cores, but the cores matter only for simple_points and distance_map: the other speed-ups come from the algorithms, and are nearly the same on one thread. Script: benches/timings.py.
A modern version of the Pink library (ESIEE) for teaching image processing and digital topology: simple points, skeletons, thinnings, distance maps and topological watersheds, in 2D and 3D. A C11 core with a NumPy interface.
GitHub C API reference Releases
from pink26 import skeleton, topology
skel = skeleton.curvilinear_skeleton(horse, 8)
ends = topology.end_points(skel, 8)
junctions = topology.junction_points(skel, 8)
from pink26 import distance
d = np.sqrt(distance.distance_map(shapes))
Inputs from skimage.data; each image is the result of the code beside it.
A toolkit of Claude Code skills and workflows for computer science instructors. A single /teaching command drives 28 specialist agents across 16 workflows, which produce exams, labs, courses and grading reports; every artifact is checked for coherence, language and completeness. Status: beta.
GitHub Getting started Version française
{
"level": "M1",
"duration": "2h",
"evaluation_mode": "machine exam",
"prerequisites": [
"fork, exec, waitpid",
"pipe, dup2, close",
"signal handling (SIGTERM, SIGPIPE)"
],
"constraints": [
"No internet access",
...
],
"language": "fr",
"secondary_language": "en"
}
c-posix-exam/
├── mission.json # the brief (left)
├── statement.md # statement (French)
├── statement.en.md # English version
├── rubric.md # rubric
├── rubric.en.md
├── reference/
│ ├── supervisor.c # solution
│ ├── Makefile
│ └── BUILD.md
├── tests/
│ ├── run_tests.sh # tests
│ └── test-matrix.md
├── language-report.json # checks
└── quality-report.json
A Python tool that analyses the Git repositories of student projects: commits, lines added and removed, and activity of each member of a group. It writes CSV files and PDF reports (summary table, histograms, balance, daily charts).
A pedagogical multi-agent planet colonization framework, used in my course "Artificial Intelligence 205-2": a Java server that simulates the planet, a colony of robots, and a Python interface that shows the simulation in real time.