Skip to content

Commit d83be3d

Browse files
Donglai Weiclaude
andcommitted
Add branch_merge logging, rename C++ output to dust_merge
- Print branch_merge start/end with segment counts (visible stdout) - Rename C++ merge_segments output label to "dust_merge:" for clarity Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c50f0a7 commit d83be3d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

connectomics/decoding/decoders/waterz.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ def decode_waterz(
348348
if branch_merge:
349349
from .branch_merge import branch_merge as _branch_merge
350350

351+
n_before = len(np.unique(seg)) - (1 if 0 in seg else 0)
352+
print(f"branch_merge: starting on {n_before} segments")
351353
seg = _branch_merge(
352354
seg,
353355
affinities=affs,
@@ -358,6 +360,8 @@ def decode_waterz(
358360
affinity_threshold=branch_affinity_threshold,
359361
channel_order="zyx", # already converted above
360362
)
363+
n_after = len(np.unique(seg)) - (1 if 0 in seg else 0)
364+
print(f"branch_merge: {n_before} -> {n_after} segments")
361365

362366
if min_instance_size > 0:
363367
from ..utils import remove_small_instances

0 commit comments

Comments
 (0)