overlay_labels — ANNOTATE overlay op

• Data kinds: image2d × labels → image2d

• Call: import fullseye as fs; fs.ledger.overlay_labels(img, labels, alpha=0.5, colors=None, scheme='okabe_ito', background=0) (to call the implementation directly, import annotate; annotate.overlay_labels(img, labels, alpha=0.5, colors=None, scheme='okabe_ito', background=0); from the registry, opsannotate.get("overlay_labels"))

Usage

Overlay a colour label map with alpha. The same label number always gets the same colour.

Parameters

labels : (H,W) int

Map of label numbers. background (default 0) is transparent.

colors : (k,3) or None

Number → colour. If None, cycles through the 8 Okabe–Ito colours in number order

(no random numbers are used, so the same label map always gives the same picture).

Raises

ValueError

shape mismatch / negative label / alpha outside [0,1] / shape of colors.

Detailed usage guide

• figure_annotation family guide

Background guides (the physics and conventions behind this op)

• dataset_conventions — Training-dataset conventions — COCO / YOLO / VOC and pitfalls in visual inspection

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• annotate_gallery — py -3.11 examples/annotate_gallery.py

• poc_mri_bias_field — py -3.11 examples/poc_mri_bias_field.py

• poc_recycling_sorting — py -3.11 examples/poc_recycling_sorting.py

Ops the type connects to (they accept image2d as input)

text_box · arrow · leader_line · label_points · crosshair · legend_box · color_bar · scale_bar

Same category (overlay)

overlay_mask · annotate_invert_visibility · annotate_invert · annotate_invert_path


*Provenance: annotate.py — ANNOTATE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.