itasc.tracking_ultrack.db_build¶
Shared Ultrack database construction pipeline.
Functions
|
Apply correction-derived annotations to |
|
Reset annotations on an existing |
|
Build candidate |
|
Build candidate |
Classes
|
|
|
Result of atom-union candidate-building + linking (stage ②). |
Result of candidate-building (segmentation + linking). |
- class itasc.tracking_ultrack.db_build.UltrackDatabaseBuildReport[source]¶
Bases:
objectResult of candidate-building (segmentation + linking). No annotation state.
- class itasc.tracking_ultrack.db_build.AtomUnionDatabaseBuildReport(total_nodes=0, total_overlaps=0, n_frames=0)[source]¶
Bases:
objectResult of atom-union candidate-building + linking (stage ②).
- class itasc.tracking_ultrack.db_build.AnnotateAndScoreReport(fake_nodes=0, anchor_nodes=0, anchor_links=0, scored_nodes=0, seed_nodes=0, anchor_incident_links_inserted=0, anchor_tail_links_annotated=0, injected_homemade_anchors=0)[source]¶
Bases:
object- Parameters:
- itasc.tracking_ultrack.db_build.apply_annotations_and_score(working_dir, cfg, *, score_signal_path, corrections=None, validated_tracks=None, tracked_labels=None, progress_cb=None)[source]¶
Reset annotations on an existing
data.db, apply corrections, and rescore.Runs after candidate-building (segmentation + linking) and before solve. The candidate set itself is left untouched; only
node_annot,link.annotationandnode_probchange. Safe to call repeatedly when the user toggles validations or anchors.- Return type:
- Parameters:
- itasc.tracking_ultrack.db_build.annotate_database_from_corrections(working_dir, cfg, *, score_signal_path, corrections=None, validated_tracks=None, tracked_labels=None, progress_cb=None)[source]¶
Apply correction-derived annotations to
data.dband rescore nodes.- Return type:
- Parameters:
- itasc.tracking_ultrack.db_build.build_atom_union_database(atoms_path, working_dir, cfg, progress_cb=None, *, contour_maps_path=None, cancel=None)[source]¶
Build candidate
data.dbfromatoms.tifvia a merge tree + branching.Reads
atoms.tif(written by stage ①). Per frame it builds a backbone watershed-style merge tree over the atom RAG (atoms as leaves, walls weighted by ridge strength) plus branch candidates admitted most-ambiguous-first up tocfg.atom_overlap_budgetoverlap pairs — seeatoms.build_atom_merge_tree/atoms.branch_unions. Every candidate’s total area is capped atcfg.atom_union_max_area. NodeDB + OverlapDB rows are stream-inserted in chunks, then linking runs.contour_maps_pathsupplies the ridge weights: the residual contour is recomputed from it using theAtomParamsembedded inatoms.tif(the stage-① output contract is unchanged —atoms.tifremains the sole artifact). When omitted, walls are treated as equally weighted, so the backbone degrades to a deterministic area-ordered tree.
- itasc.tracking_ultrack.db_build.build_ultrack_database(contour_maps_path, foreground_masks_path, working_dir, cfg, progress_cb=None)[source]¶
Build candidate
data.dbfrom canonical Ultrack segmentation + linking.Produces NodeDB / LinkDB / OverlapDB rows with all annotations UNKNOWN and no node-prob scores. Pair with
apply_annotations_and_scorebeforerun_solveto ingest validations/anchors.- Return type:
- Parameters: