Alain Lebret

Portfolio

digitopo

  • Since 2026
  • Rust
  • Python
  • CeCILL 2.1

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).

The ultimate skeleton keeps the topology
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
Blobs and their ultimate skeleton: one orange point per object, and a closed curve around the only hole
Watershed from labelled markers
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)
Coins with, in orange, the watershed lines between the coins and the background

Inputs from skimage.data; each image is the result of the code beside it.

Computation times

Times of pink26 (C) and digitopo (Rust, all cores), by machine
FunctionLab PC (2017)Intel Core i5-7500, 4 cores, Ubuntu 22.04.5 LTSLab PC (2025)Intel Core Ultra 7 265, 20 cores, Ubuntu 26.04.1 LTSMacBook Pro (2023)Apple M3 Pro, 11 cores, macOS 27.2.1
pink26digitopopink26digitopopink26digitopo
2D 1024×1024
simple_points15.4 ms2.88 ms6.59 ms0.77 ms8.53 ms1.18 ms
ultimate_skeleton220 ms149 ms76.8 ms80.7 ms186 ms173 ms
curvilinear_skeleton329 ms194 ms100 ms94.2 ms220 ms201 ms
distance_map (squared Euclidean)23.9 ms7.58 ms10.1 ms2.27 ms16.2 ms3.16 ms
watershed_lines932 ms372 ms294 ms128 ms444 ms189 ms
homotopic_thinning2.44 s1.17 s593 ms590 ms663 ms734 ms
3D 128×128×128
simple_points1.59 s18.0 ms641 ms2.66 ms1.10 s5.67 ms
ultimate_skeleton2.22 s613 ms833 ms312 ms1.57 s643 ms
curvilinear_skeleton14.4 s1.79 s6.31 s1.01 s12.3 s1.90 s
distance_map (squared Euclidean)68.9 ms22.4 ms34.2 ms7.56 ms46.7 ms9.16 ms
watershed_lines11.6 s4.33 s3.24 s1.77 s5.03 s2.93 s
3D 64×64×64
homotopic_thinning25.3 s2.68 s9.88 s1.55 s16.1 s2.08 s
Speed-up of digitopo over pink26 (time of pink26 / time of digitopo)
FunctionLab PC (2017)Intel Core i5-7500, 4 cores, Ubuntu 22.04.5 LTSLab PC (2025)Intel Core Ultra 7 265, 20 cores, Ubuntu 26.04.1 LTSMacBook 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.

pink26

  • Since 2026
  • C11
  • Python
  • CeCILL 2.0

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.

Curvilinear skeleton, end points and junctions
from pink26 import skeleton, topology

skel = skeleton.curvilinear_skeleton(horse, 8)
ends = topology.end_points(skel, 8)
junctions = topology.junction_points(skel, 8)
The curvilinear skeleton of a horse, in orange, with its end points in white and its junctions in red
Euclidean distance map
from pink26 import distance

d = np.sqrt(distance.distance_map(shapes))
The Euclidean distance map of a few shapes, from dark at the border to light at the centre

Inputs from skimage.data; each image is the result of the code beside it.

claude-agents

  • Since 2026
  • Python
  • Claude Code
  • MIT

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.

An example in the repository: a C/POSIX machine exam (M1), from the brief to the checked files
{
  "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

git-statistics

  • Since 2025
  • Python
  • MIT

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).

Daily charts of the commits of a group of students

lv223

  • Since 2020
  • Java
  • Python
  • MIT

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.

A move scenario of the robots on the planet