Lift the requirement of human fingering with RP1M #24
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.
Lift the requirement of human fingering with RP1M
Motivation
To play piano with dexterous robot hands, Robopianist requires human-annotated fingering. However, the fingering information is only available for a limited set of songs. This poses challenges for playing new pieces. This PR implements the Optimal Transport (OT)-based fingering method from RP1M (https://arxiv.org/abs/2408.11048), allowing the agent to play MIDI files without relying on human provided fingering.
Dependencies
The OT-based fingering implementation requires
linear_sum_assignment
fromscipy
, which is already included in the project. No additional packages are needed.Modifications
Changes were made to
robopianist/suite/tasks/piano_with_shadow_hands.py
. The OT-based fingering is used when human fingering is unavailable.Performance
The implementation was tested on Twinkle Twinkle Litter Star with DroQ from https://github.com/kevinzakka/robopianist-rl/tree/main with default hyperparameters. Results are summarized in the table below:
TODO
[ ] Add documentation on how to incorporate new songs.