Skip to content

segmentation_shape consistency - #463

Merged
TeunHuijben merged 17 commits into
mainfrom
fix-segmentation-shape
Aug 20, 2026
Merged

segmentation_shape consistency#463
TeunHuijben merged 17 commits into
mainfrom
fix-segmentation-shape

Conversation

@TeunHuijben

@TeunHuijben TeunHuijben commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Problem:

  • tracksdata saves segmentation shape in geffmetadata as .extra.tracksdata.shape
  • funtracks/motile_tracker save segmentation shape in zarr-metadata as segmentation_shape at the top level (outside the geff metadata)
  • in retrospect, the latter is not the smartest design decision, because 1) top-level non-geff metadata doesn't survive round-trips, and 2) it is inconsistent with tracksdata

Solution:
This PR removes the segmentation_shape logic, and fully uses the existing tracksdata format of saving the shape in metadata.extra.tracksdata.shape. When reading the shape from the metadata we do a double check for backwards compatibility.

For geffs that are exported from motile_tracker and then imported, it doesn't matter where we save the shape, because that is an internal discussion. But for geffs exported by other tracksdata-based tracking tools (ultrack, hoct, etc.), we are now natively compatible.

@TeunHuijben
TeunHuijben requested a review from cmalinmayor as a code owner July 24, 2026 23:28
@TeunHuijben TeunHuijben added blocked PR blocked by something else ready for initial review PR ready for first review labels Jul 24, 2026
@TeunHuijben TeunHuijben linked an issue Jul 24, 2026 that may be closed by this pull request
@codecov-commenter

codecov-commenter commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.86%. Comparing base (572524f) to head (759d1eb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #463      +/-   ##
==========================================
- Coverage   88.87%   88.86%   -0.02%     
==========================================
  Files          59       59              
  Lines        5844     5845       +1     
==========================================
  Hits         5194     5194              
- Misses        650      651       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TeunHuijben TeunHuijben removed the blocked PR blocked by something else label Aug 20, 2026
@TeunHuijben

Copy link
Copy Markdown
Collaborator Author

🔴 Blocked by Funtracks PR: funkelab/funtracks#260 (which is merged, but not yet released)

df = pd.DataFrame(
{
"Benchmark": new_df["Benchmark"],
f"Median (s) HEAD {new_commit}": new_df["median"].map("{:.5f}".format),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the benchmarking diffs still needed? Or covered by main by now?

@cmalinmayor cmalinmayor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude assures me the benchmark changes are nice improvements 🙃 You might want to look at my changes before you merge, so I'll leave clicking the button to you @TeunHuijben
🍅 👍 🎉 🌮

@cmalinmayor cmalinmayor removed the ready for initial review PR ready for first review label Aug 20, 2026
@TeunHuijben
TeunHuijben merged commit 7bd2130 into main Aug 20, 2026
22 checks passed
@TeunHuijben
TeunHuijben deleted the fix-segmentation-shape branch August 20, 2026 19:39
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.

segmentation_shape in geff metadata

3 participants