Problem
When exporting to GEFF via export_to_geff, funtracks does not set track_node_props in the GEFF metadata. When importing from GEFF via import_from_geff, funtracks does not read track_node_props to determine which node property stores tracklet/lineage IDs.
This means:
- Export: The GEFF file has no metadata indicating which property is the tracklet/lineage ID, even though the data is present as a node property.
- Import: If a GEFF file has a non-standard tracklet key (e.g., older files with
"track_id" instead of "tracklet_id"), the fuzzy name inference can mismatch it (e.g., "track_id" gets mapped to "seg_id"), causing tracklet IDs to be silently recomputed.
Proposed Changes
Export (geff/_export.py)
- Set
track_node_props on the GeffMetadata using tracks.features.tracklet_key and tracks.features.lineage_key.
Import (geff/_import.py)
- In
GeffTracksBuilder.read_header() or infer_node_name_map(), read metadata.track_node_props and use it to seed the name map for tracklet/lineage keys (e.g., {"tracklet_id": "track_id"}) before fuzzy matching runs.
- Since
track_node_props is optional in the GEFF spec, this should be a best-effort enhancement — fall back to existing fuzzy matching when absent.
Context
Discovered during review of the fix-tracklet-attr-forwarding branch. Currently accepted that old GEFFs with "track_id" will recompute tracklet IDs unless the user provides an explicit node_name_map. This issue would improve that experience by leveraging GEFF metadata when available.
Problem
When exporting to GEFF via
export_to_geff, funtracks does not settrack_node_propsin the GEFF metadata. When importing from GEFF viaimport_from_geff, funtracks does not readtrack_node_propsto determine which node property stores tracklet/lineage IDs.This means:
"track_id"instead of"tracklet_id"), the fuzzy name inference can mismatch it (e.g.,"track_id"gets mapped to"seg_id"), causing tracklet IDs to be silently recomputed.Proposed Changes
Export (
geff/_export.py)track_node_propson theGeffMetadatausingtracks.features.tracklet_keyandtracks.features.lineage_key.Import (
geff/_import.py)GeffTracksBuilder.read_header()orinfer_node_name_map(), readmetadata.track_node_propsand use it to seed the name map for tracklet/lineage keys (e.g.,{"tracklet_id": "track_id"}) before fuzzy matching runs.track_node_propsis optional in the GEFF spec, this should be a best-effort enhancement — fall back to existing fuzzy matching when absent.Context
Discovered during review of the
fix-tracklet-attr-forwardingbranch. Currently accepted that old GEFFs with"track_id"will recompute tracklet IDs unless the user provides an explicitnode_name_map. This issue would improve that experience by leveraging GEFF metadata when available.