Skip to content

Add configurable edge scoring for region graph merging#11

Open
donglaiw wants to merge 2 commits intoseung-lab:mainfrom
PytorchConnectomics:feature/configurable-edge-score
Open

Add configurable edge scoring for region graph merging#11
donglaiw wants to merge 2 commits intoseung-lab:mainfrom
PytorchConnectomics:feature/configurable-edge-score

Conversation

@donglaiw
Copy link

Summary

  • New edge_score.hpp: Defines EdgeScoreConfig with three modes — max (default, backward-compatible), mean, and pNN percentile (e.g. p75, p90).
  • region_graph.hpp: Collects all per-edge affinities into a vector instead of keeping only the max, then calls compute_edge_score() to reduce to a single score.
  • atomic_chunk.cpp: Accepts an optional merge function argument (max, mean, pNN) before the merge thresholds on the CLI. Watershed + region graph are still computed once; the merge step is repeated per threshold.

CLI: ws param aff high low size dust tag [merge_func] [thresholds...]

🤖 Generated with Claude Code

Donglai Wei and others added 2 commits March 11, 2026 21:55
Allows passing multiple merge thresholds from the CLI so the watershed
and region graph are computed once and the merge step is repeated for
each threshold, writing indexed output files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of always using max affinity for edge scores, collect all
per-edge affinities and compute a configurable score (max, mean, or
percentile). This enables experimenting with different merge functions
across multiple merge thresholds in a single run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant