You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Audit/Correctness] same_objects counts many-to-one IoU overlaps as one-to-one matches #67
pair_counts, lines 317–320 sets children_matched_one_to_one and parents_matched_one_to_one by taking separate unique IDs from all edges exceeding IoU. It never constructs a one-to-one matching or checks degrees.
Deterministic counterexample (code-path proof; not executed)
A parent mask has one four-pixel object labelled 1. A child mask partitions the same four pixels into two disjoint two-pixel objects labelled 10 and 11. Each child's intersection with the parent is 2, union 4, IoU = 0.5. The implementation counts 2/2 children and 1/1 parents as matched and returns same_objects, despite a 2:1 relationship. Lowering the configurable IoU threshold makes this error more prevalent.
Impact
Misleading segmentation-equivalence suggestions and incorrect same_objects evidence in mask_relationships.json, potentially interpreted by downstream bricks as equivalent object identities.
Fix / acceptance
Build a bipartite matching of child and parent instances (per plane) from IoU-eligible edges, maximising cardinality with deterministic tie-breaking; count only matched endpoints. Consider sparse matching to avoid dense K×K matrices. Add regression for the 2-child/1-parent example at IoU=0.5 and a configurable lower threshold; preserve existing genuine 1:1 tests. Benchmark sparse/dense masks separately; no benchmark has yet been run.
Classification: confirmed source-level semantic defect, with analytic counterexample. No repository tests executed.
Activity
Merge pull request #131 from CellMigrationLab/claude/fix-sameobjects-…