Skip to content

Fix mask labels and lineage GEFF exports - #65

Draft
georgeoshardo wants to merge 3 commits into
mainfrom
fix/label-lineage-geff
Draft

Fix mask labels and lineage GEFF exports#65
georgeoshardo wants to merge 3 commits into
mainfrom
fix/label-lineage-geff

Conversation

@georgeoshardo

Copy link
Copy Markdown
Owner

What changed

  • Preserve sparse mask labels during renderer resizing and keep base and super-resolution masks aligned.
  • Infer a lossless time-series mask dtype, reject explicitly insufficient dtypes, and reject PNG output when labels need more than uint16.
  • Add lineage division edges only on the recorded division frame and reject duplicate (mask_label, time) detections.
  • Write GEFF track/lineage metadata through GeffMetadata, use consistent spatial units for positions and cell dimensions, and keep sliced exports valid under GEFF track and lineage validation.
  • Add focused regression tests for sparse labels, dtype overflow, division timing, duplicate detections, units, metadata, and sliced frame windows.

Why

Sparse instance IDs could be normalized as binary masks, and time-series casts could silently wrap an object label to background. Persistent mother metadata also created repeated division edges. Finally, track_node_props was passed as a free keyword that current GEFF silently ignored, while length and width were left in pixels even when positions were converted to micrometres.

The legacy .mother fallback was not restored because the current repository explicitly removed that API and rejects legacy simulation artifacts.

Validation

  • pixi run pytest -q tests/test_renderer_mask_export.py tests/test_lineage_compat.py tests/test_geff_export.py — 18 passed
  • pixi run pytest -q — 74 passed
  • GEFF round-trip tests enable graph, tracklet, and lineage data validation, including a frame window that starts after division.

The only test warning is the existing CPU fallback warning when neither CuPy nor PyTorch is available.

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