neu_eval

neu-eval: comparing a segmentation against a reference labeling.

Standard metrics (variation of information, adapted Rand, IoU matching, fragmentation) plus a ranked, located list of where the two labelings disagree, since a disagreement is not always the segmentation’s fault.

Everything starts from neu_eval.contingency(), which reduces two label arrays to a Contingency, a sparse (a_id, b_id) -> voxels table. Every voxel metric is a function of that table, which is:

  • additive over disjoint regions, so a whole-volume sweep is a block map plus a sum;

  • computed once, after which all the metrics are cheap to recompute in a notebook;

  • symmetric: c.T swaps the sides, and which one is “gt” is only a label.

Only the voxel pass and neu_eval.disagree.locate() touch a GPU (via neu_proc.ops.backend; NEU_PROC_GPU=0 turns it off); the table itself is small and lives in CPU memory. Top-level names resolve lazily, so import neu_eval loads neither scipy nor neu-vol.

Submodules