Minor bugs - #233
Open
CKChang-tw wants to merge 3 commits into
Open
Conversation
…orner points) - extract_frames(): fix frame-extracted check calling .stem on a bool (always raised, silently caught, so video frames were never extracted) - extract_frames(): write extracted frames next to the source video, not the current working directory - calibrate_intrinsics(): don't let a cache miss in Image_points.json overwrite the real objp checkerboard grid with [], which broke findCorners()'s return value and crashed the caller's unpacking
cam_names was derived with `Path(j_dir).name.split('_')[0]`, which
assumes camera names never contain underscores. Video files named
like "cam_1.mp4" or "cam_2.mp4" produce pose directories
"cam_1_json", "cam_2_json", etc., all truncated to the
same "cam" name. This collapsed the per-camera video lookup dict
to a single entry, so every camera reused one video during person/
frame selection, and offset logs printed "Camera cam and cam".
Strip only the trailing "_json" suffix instead, preserving the
full camera name regardless of underscores.
…mass against trc file count The augmentation loop iterated `range(len(subject_mass))` instead of `range(len(trc_files))`, so a longer participant_mass/participant_height list in Config.toml (e.g. a multi-person value left over when multi_person is false) caused `trc_files[p]` to raise IndexError once p exceeded the actual number of trc files. - When multi_person is false, participant_height/participant_mass must now resolve to exactly one value matching the one expected trc file; a mismatch raises a clear ValueError instead of silently padding/trimming into a later crash. - When multi_person is true, mismatched list lengths still only warn and pad/trim, since a valid person can be dropped from pose-3d during triangulation. - If multiple trc files are found while multi_person is false (e.g. after rerunning filtering() with a different filter type), fall back to the most recently modified one with a warning, since pose-3d is never cleaned between runs and this is a normal workflow.
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.
I found some bugs when trying to run my own projects. All minor and further explained in each commits:
_in the camera name