Manuscript Offprint

arXiv:2611.04476

KeyWise: Efficient Video-Only Piano Transcription with a Lightweight Per-Key Architecture

Anastasios Chatzigiannis, Natalia Panagou, Maria Koziri

Abstract

Audio-based piano transcription is hampered by the sustain pedal and by noisy or missing soundtracks, problems that video-only transcription avoids, since a top-view video shows directly when each key is pressed and released. Most visual transcription networks, however, describe the whole keyboard with one global feature vector and must learn where each key is. In this paper, we propose KeyWise, a lightweight per-key architecture that exploits the known geometry of the keyboard instead of learning it. The rectified keyboard is divided into 88 equal tiles that serve as regions of interest (ROIs), and one small recurrent network, shared by all keys, follows each key over time. On PianoVAM, KeyWise reaches the onset accuracy of the state-of-the-art V2N (95.0% vs. 94.7% onset F1 at 50 ms and 97.8% vs. 97.0% at 100 ms) with 1.3 M instead of 28.2 M parameters, and it runs 4.7 times faster on the same GPU. At 100 ms, it is also significantly more accurate when the key releases (97.0% vs. 95.5% F1) or the velocities (89.4% vs. 84.5% F1) must be correct as well. On PianoYT, KeyWise pre-trained on PianoVAM reaches 69.4% onset F1 at 100 ms, comparable to the best published result, although it needs fine-tuning for new recording conditions.

Keywords: Visual piano transcription, Automatic music transcription, Key detection, Regions of interest, Per-key network, Video analysis

1 Introduction

Automatic music transcription (AMT) is the process of (automatically) converting a music performance into a symbolic representation such as MIDI or a score [1]. Among all instruments, the piano is the most studied in AMT, both because of its central role in Western music and because large, precisely aligned datasets can be recorded on computer-controlled instruments such as the Yamaha Disklavier [2]. It is nevertheless a demanding case. Piano spans 88 pitches over more than seven octaves and is highly polyphonic,

with dense chords and both hands often playing at once. Its notes are rich in harmonics that overlap between simultaneous pitches, which causes octave and harmonic confusions. Each note begins with a sharp percussive attack and then decays, so the start of a note is well defined but its end is acoustically ambiguous. This is mainly why deep audio models built on the onsets-and-frames formulation have brought onset detection close to saturation on clean studio recordings [2, 3], while aspects such as offsets, velocities and robustness to unseen recording conditions remain open, and models trained on a single corpus generalize poorly to other pianos and rooms [4]. A further difficulty is specific to the piano, namely that the sustain pedal decouples sound from action. When the pedal is held, a string keeps sounding long after its key has been released. As a result, audio cannot reliably recover how long each key was held, which is the information a performer's score and fingering depend on. Audio transcription also degrades in noisy or reverberant rooms, in multi-instrument mixes, and when the soundtrack is missing or corrupted [5, 6].

Video, on the other hand, observes the keys directly and is unaffected by all three aforementioned problems, namely the sustain pedal, the acoustic conditions and a missing soundtrack. For example, the moment a key is released shows whether a note that keeps sounding is sustained by the pedal. Which hand plays each note can guide towards a more accurate assignment of notes to staves. Moreover, video is useful when the audio is missing or has low quality, for example in silent videos, in noisy rooms, or in videos where other instruments play at the same time. However, video-only music transcription brings its own challenges, since hands occlude the keys, low frame rates limit temporal precision, and camera viewpoints and lighting vary. Despite the benefits visual information can bring to music transcription, and the widespread use of video in every aspect of life, including music performance, visual AMT remains underexplored, although it has recently begun to attract growing research interest.

Most of the recent visual transcription networks [5-8] describe the whole keyboard image with a single global feature vector and predict all 88 keys from it. Some of them add a position prior to their features [5, 6], but every key is still decided from one vector that describes the whole keyboard. Such a network has to learn two things at the same time, namely what a pressed key looks like and where each key is located. The second, however, is already given by the geometry of the keyboard itself. After a perspective warp, the keyboard becomes a straight strip, and the position of each key within the strip is known and fixed. In other words, pitch becomes, to a good approximation, position.

In this work, we propose KeyWise, a new model that is built around this observation. The rectified strip is divided into 88 equal tiles, one

for each key, and each tile is used as the region of interest (ROI) of its key. The whole strip is processed by a convolutional encoder whose output has exactly one feature column per key ROI, so that the features of each key remain at the position of that key. A single small recurrent network, shared by all keys, then follows each key over time and decides, for every video frame, whether a note starts and whether the key is held. Since all 88 keys share the same weights, what the model learns from one key also benefits the others, including keys that are rarely played.

Our main contributions are summarized as follows:

  • A new per-key model for video-only piano transcription, in which every key is a fixed ROI of the rectified keyboard and one shared network predicts the onset, the key state and the velocity of every key at every frame. The model has 1.3 M parameters, about 22 times fewer than the current state of the art, and runs 4.7 times faster on the same GPU.
  • Evidence that the per-key design matters. On the PianoVAM test set, the model reaches the onset accuracy of V2N [6] and is significantly more accurate at 100 ms when the key releases or the velocities are also considered. When the key ROIs are replaced by one global feature vector, the same network loses accuracy, mainly at the two ends of the keyboard, even when that vector keeps one position per key.

The rest of the paper is organized as follows. The related literature on automatic music transcription from video is reviewed in Section 2. In Section 3 the proposed architecture is described. The experimental setup and the results are presented in Sections 4 and 5, respectively. Finally, Section 6 concludes the paper.

References (27)