seg_inject_merge — EMPROOF inject op

• Data kinds: labels2d → labels2d

• Call: import fullseye as fs; fs.ledger.seg_inject_merge(labels, n: 'int' = 1, seed: 'int' = 0, min_area: 'int' = 3000, ignore_zero: 'bool' = True) -> 'np.ndarray' (to call the implementation directly, import emproof; emproof.seg_inject_merge(labels, n: 'int' = 1, seed: 'int' = 0, min_area: 'int' = 3000, ignore_zero: 'bool' = True) -> 'np.ndarray'; from the registry, opsemproof.get("seg_inject_merge"))

Usage

Plants merges for evaluation: picks n pairs of adjacent large labels and rewrites the id of one to the other.

Only labels of at least min_area px are candidates (merges of small fragments have short chords and cannot be detected, which would drag the evaluation towards "errors that could not be planted"), and pairs are chosen by random numbers (seed). The same label is used only 1 time. If n pairs cannot be obtained, ValueError (silently returning fewer would change the AUC denominator). The planted pairs can be retrieved with seg_label_changes(labels, out)["merge_before"].

>>> merged = seg_inject_merge(labels, n=1, seed=3)

>>> seg_label_changes(labels, merged)["merge_before"] # ids that were absorbed

Detailed usage guide

• emproof family guide

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)

• poc_em_second_opinion — py -3.11 examples/poc_em_second_opinion.py

• poc_em_split_merge_score — py -3.11 examples/poc_em_split_merge_score.py

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

seg_membrane_chord_score · seg_boundary_membrane_gap · seg_inject_split · seg_label_changes · seg_contingency · seg_variation_of_information · seg_rand · seg_synapse_partners

Same category (inject)

seg_inject_split · seg_label_changes


*Provenance: emproof.py — EMPROOF 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.