vista.algorithms.trackers.network_flow_tracker.run_network_flow_tracker¶
- vista.algorithms.trackers.network_flow_tracker.run_network_flow_tracker(detectors, config)[source]¶
Run network flow optimization tracker on detections.
This tracker formulates multi-object tracking as a minimum-cost flow problem on a graph where nodes are detections and edges represent possible associations. The algorithm finds the globally optimal set of tracks by solving for the minimum-cost flow from source to sink using Bellman-Ford successive shortest paths.
Key features:
Negative link costs incentivize longer tracks over many short tracks
Smoothness penalty encourages constant-velocity, straight-line paths
Global optimization finds better solutions than greedy local association
- Parameters:
detectors (list of Detector) – List of Detector objects to use as input
config (dict) –
Dictionary containing tracker configuration:
tracker_name: Name for the resulting tracker
max_gap: Maximum frame gap to search for associations (default: 5)
max_distance: Maximum spatial distance for associations (default: 50.0)
entrance_cost: Cost for starting a new track (default: 50.0)
exit_cost: Cost for ending a track (default: 50.0)
min_track_length: Minimum detections required for valid track (default: 3)
- Returns:
List of track data dictionaries, each containing:
’frames’: numpy array of frame numbers
’rows’: numpy array of row coordinates
’columns’: numpy array of column coordinates
- Return type: