Open
Conversation
added 17 commits
November 1, 2024 18:16
Also add writing and reading to json, and new FeatureTypes : (est/ann)_beatsync_features_mfpb. I had to refactor the compute_beatsync_features, but the changes shouldn't affect other usages.
Had to refactor the computing of frames and times to do this.
The way I did it before didn't work and had no advantages
Also add FramesPerBeatTooHigh exceptions and remove padbeats (unused functions)
urinieto
requested changes
Dec 10, 2024
Owner
urinieto
left a comment
There was a problem hiding this comment.
What a great PR! This is a lot, but I think this is the cleanest way without having to do a massive refactoring on metafeatures. I just left a couple of minor comments regarding documentation. I am running the tests now with Github Actions. If they pass, I will merge away after the docstring typos/requests are addressed. Thanks!
Owner
|
Apologies, I realized I never get back on this! Some of the tests didn't pass. @Yoz0 , could you please make sure all tests pass? Once they do, I'll merge this PR. Thanks! |
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.
This PR add a new feature representation with a fixed number of frames per beats. This is an advancement of issue #154 , but on beats instead of bars.
For the user this adds :
frames_per_beat(int, default 3). The number of frames sampled for each beat.Feature:multibeat(bool, default False). Whether to use this representation or not.run_MSAF.py:-mb. To use this representation.In the
Featureclass :self._est_multibeat_featuresandself._ann_mutlibeat_featureswhere the representation will be for resp. estimated beats and annotated beats.self._est_multibeat_framesandself._ann_multibeat_frameswith the frame index of the beats. (We remove the last beat fromself._est_beatsync_frames, because we compute frames between beats)self._est_multibeat_timesandself._ann_multibeat_timeswith the times in secondes of the beats._compute_multibeat(self, beat_frames)to compute the index of the frames used for the representation_shape_beatwise(self, multibeat_features)to stack the feature representation as a beatwise TF matrix.compute_beat_sync_featuresin order to use the same function to compute multibeat features. The padding ofbeat_timesis moved to a new function called_pad_beats_timesFeatureTypes:est_multibeatandann_multibeatand the appropriate code inselect_features(...)FramesPerBeatTooHighraised by '_compute_multibeat()if the number of frames between two beats is lower thanframes_per_beat`.test_multibeat.pyThanks for reading, and reviewing code 😃