Repository navigation
Live multi-animal identity for closed-loop flows - #254
Merged
Merged
Conversation
The identity assigner now takes the frame timestamp and allows max_travel_px per elapsed camera frame (at fps), so a CV pipeline that drops frames no longer loses a fast-moving animal's name. The relabel window spans camera frames by time too. Without timestamps each update still counts as one frame.
…on clear An appearance-mode slot never observed was reported at (0,0) and could occupy a zone; ZoneTracker now skips hidden objects with age 0. clear_identity also resets attached per-animal behaviour classifiers.
The export indexed rows by the logger's frame counter, which drifts from the video when the logger starts first or frames go unlogged. Each row now lands on video frame round((timestamp - t0) * fps), with t0 the recorder's first written frame and fps its measured rate (new public first_frame_timestamp / fps properties). With identity on, frames the CV queue supersedes still get an empty log row. The export runs in a worker thread at Stop.
The camera settings dialog now warns and saves nothing when two animals share a name or Name at start has no animals. CVSettings.from_dict drops animals with no name.
… time A mid-run Pause leaves a gap in the raw video that t0 + i/fps cannot see, so every row after it was shifted (or dropped past the end). The recorder now keeps each written frame's capture timestamp; rows go to the nearest frame within half a frame interval, and rows logged while paused are dropped.
gbradham
marked this pull request as ready for review
November 28, 2026 05:05
gbradham
added a commit
that referenced
this pull request
Nov 28, 2026
Live multi-animal identity for closed-loop flows
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live multi-animal identity, so a flow can trigger a stimulus for one named animal when several animals share an arena.
Draft until it has been tested on real multi-animal recordings. The matching weights are untuned.
What it adds
vision/identity_live.py): fixed-count minimum-cost assignment.close,stitched,gaporrelabeled._identity.csvsidecar. Each row goes to the video frame captured nearest its timestamp, so paused runs line up too.Known gaps
CVProcessorassumes 30 fps.Tests
Full suite: 7501 passed, 4 skipped.