Skip to content

Improve efficiency of Tracklet Generation #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bergsalex
Copy link
Contributor

Rewriting VideoObservations.stitch_greedy_tracklets method and adding unit and benchmark tests.

Note that I did not apply ruff formatting or linting to the entire src/mouse_tracking/utils/matching.py file as I wanted the changes to stitch_greedy_tracklets to be as obvious as possible.

@bergsalex bergsalex self-assigned this Jul 10, 2025
@bergsalex bergsalex added the enhancement New feature or request label Jul 10, 2025
)

# Apply priority adjustment if enabled
if match_cost is not None and prioritize_long:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm finding the formatting of this block a bit hard to follow

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The crazy Github tab size really isn't helping. Does anyone mind if I ruff format the whole file to replace the tabs with spaces?

Copy link
Contributor

Choose a reason for hiding this comment

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

https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/managing-your-tab-size-rendering-preference
Default is 8. I'd prefer having the formatting stuff not mask the changes just yet (but should definitely happen in the near future!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will wait.

Copy link
Contributor

@SkepticRaven SkepticRaven left a comment

Choose a reason for hiding this comment

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

Ran updated version on some test data and doesn't appear to change output.
Unfortunately doesn't appear to address #14 yet.

@bergsalex bergsalex merged commit ca1a33d into repository-reorganization Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants