-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace munkres with lapjv for track assignment (#5564)
Fixes #5207. This PR replaces the `munkres` library with `lap` (Linear Assignment Problem solver) for computing optimal track assignments during the auto-tagging process. The main changes are: - Remove `munkres` dependency and add `lap` and `numpy` dependencies - Refactor the track assignment code to use `lap.lapjv()` instead of `Munkres().compute()` - Simplify cost matrix construction using list comprehension - Move config value reading outside of `track_distance` function to improve performance The motivation for this change comes from benchmark comparisons showing that LAPJV (implemented in the `lap` library) significantly outperforms the Munkres/Hungarian algorithm for the linear assignment problem. See detailed benchmarks at: https://github.com/berhane/LAP-solvers The change should provide better performance for track matching, especially with larger albums, while maintaining the same assignment results. ## Testing Notes - All existing tests pass without modification - Track assignments produce identical results - No behavioral changes in auto-tagging
- Loading branch information
Showing
4 changed files
with
100 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters