Repository navigation
fix(review): show a live recording's keypoints, and stop misreading its other files - #203
Merged
Merged
Conversation
…ts other files Session Review said "No poses found" for every run recorded with a live pose model, and on the Maimu RTPP Day1 data showed the wrong video and a garbled session name. Three causes: - SessionView.from_recording never read the keypoints CSV the tracking logger writes beside the tracking CSV; it used the tracked centroid as a one-keypoint pose and left pose_path unset. It now loads <base>_keypoints.csv (long: frame, object_id, keypoint, x, y, confidence), keeps only the subject's (frame, object_id) rows, reads blank x/y as a gap, keeps the logger's keypoint labels in order, and falls back to the centroid when the file is missing or unusable. - discover() and session_id_for() only knew "<stem>_annotated.mp4", but VideoRecorder writes "<name>_annotated_<ts>.mp4". The overlay copy was taken for the raw video (and, being written last, won), and the session was named "<name>_annotated_<ts>". - find_pose_csv() returned "<video stem>.csv" as a hand-placed pose file; for a live recording that is the DataRecorder's sensor CSV. Files that open with a "# GLIDER" header are now skipped. _io gains is_annotated_video, raw_video_stem and keypoints_beside; Session exposes tracking_path. A folder holding several runs still opens only the newest; that is separate work.
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.
Summary
Session Review said "No poses found" for every run recorded with a live pose model. On the Maimu RTPP Day1 recordings it also played the overlay video instead of the raw recording, and named the session
…_annotated_<ts>. Three causes, all fixed here:SessionView.from_recordingused the tracked centroid as a one-keypoint pose and ignored the<base>_keypoints.csvthe tracking logger writes beside the tracking CSV. It now loads that file:frame, object_id, keypoint, x, y, confidence), and only the subject's(frame, object_id)rows are kept, so a second animal never mixes in.discover()andsession_id_for()only recognised<stem>_annotated.mp4, butVideoRecorderwrites<name>_annotated_<ts>.mp4. The overlay copy was therefore classified as the raw video and won as the newest file.find_pose_csv()treated<video stem>.csvas a hand-placed pose file, but for a live recording that's the DataRecorder's sensor CSV. Files that start with a# GLIDERheader are now skipped.New helpers in
glider.analysis._io:is_annotated_video,raw_video_stem,keypoints_beside.Sessionexposestracking_path. The Session tab's wording now says whether the poses are the live keypoints or the centroid.Not in this PR
A folder holding several runs still opens as one session, the newest. GLIDER saves runs flat, so a folder like Day1 (9 runs) shows one. Each recorder also timestamps its own filename, so one run's files can differ by a second (
…172144.mp4vs…172145_keypoints.csv). Both are separate follow-ups.Test plan
Maimu_RTPP_1_20261020_172144.find_pose_csvon an older run's video no longer returns its data CSV.discover,raw_video_stem)keypoints_besidepytest tests(offscreen,PYTHONPATH=src): 6,820 passed, 20 skippedruff check .andblack --check .clean