Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lift the requirement of human fingering with RP1M #24

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

zhaoyi11
Copy link
Contributor

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 from scipy, 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:

RP1M RoboPianist w/ fingering RoboPianist w/o fingering
F1 @3m 0.976 0.994 0.29
Recall @3m 0.963 0.990 0.247
Precision @3m 1 1 1
FPS 216 223 244

Screenshot from 2024-10-25 21-24-55

TODO

[ ] Add documentation on how to incorporate new songs.

@kevinzakka kevinzakka self-requested a review November 1, 2024 18:02
@kevinzakka
Copy link
Collaborator

Thanks so much @zhaoyi11, this looks good to me!

@kevinzakka kevinzakka marked this pull request as ready for review November 2, 2024 22:35
@kevinzakka kevinzakka merged commit 0d9736c into google-research:main Nov 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants