Addressing the problem that audio-based piano transcription cannot distinguish physical key releases from audio ends under the sustain pedal, this paper proposes V2N, an end-to-end multi-task, multi-frame visual piano transcription system that simultaneously predicts four physical properties: key press, key release, key hold state, and strike velocity.
Audio-based piano transcription performs well on note onset, pitch, and velocity prediction tasks, but because of the sustain pedal, sound can persist long after a key is released; audio systems therefore predict the extended note offsets produced by the pedal rather than the physical moment the key is actually released.
Existing visual piano transcription (VPT) systems mostly focus on detecting note onsets from short video windows; the prediction accuracy of note offsets is far below that of onsets, and no related work has reported note-level velocity prediction results.
Throughout this paper, "frame" refers exclusively to video frames, corresponding to 40 milliseconds of duration, and all models run at a frame rate of 25fps. This definition must be clearly distinguished from the "frame" concept in audio piano transcription, which refers to a single step-wise unit on a time-frequency representation (e.g., a spectrogram or constant-Q transform result).
Audio piano transcription is a mature research field. The Onsets and Frames work established a multi-task prediction paradigm that simultaneously predicts note onsets, sustained audio activity, and playing velocity, significantly improving transcription quality by exploiting the complementarity of the outputs of different tasks. Subsequent research further refined this paradigm on the MAESTRO dataset by introducing Transformer architectures and high-resolution onset/offset regression. The current state-of-the-art approach in the field adopts event-decoding logic based on a neural semi-CRF; a common design of these schemes is to extend note end positions over the sustain pedal activation interval, so their publicly reported note-end accuracy measures the moment the sound terminates, not the moment the piano key is actually released.
The underlying assumption of this multi-task paradigm, long validated in the audio modality, is that note onsets correspond to spectral transient features of the audio signal, whereas in the visual modality the cue for note onsets comes from the motion of fingers pressing the keys.
Centered on the physical mechanism of piano keys, the paper defines four independent visual prediction targets. All targets are continuous outputs of the corresponding task heads, indexed by video frame number t and piano key number k among the 88 piano keys, with output values uniformly in the range [0,1].
The four prediction targets correspond to four physical states of a key. The first is Onset , characterizing the starting moment a key is pressed; this definition is consistent with the common setting in audio piano transcription. The second is Offset , characterizing the physical release moment of the key, aligned with the MIDI NoteOff signal and clearly different from the sound-end moment conventionally predicted in audio transcription — on the audio side, the note-end moment coincides with the key release moment only when the pedal is not engaged; once the sustain pedal is engaged, the sound persists until the pedal is released.
The remaining two prediction targets are Key Hold and Velocity . The former characterizes the key being physically held during the interval [onset, offset); its audio-side equivalent is the note activation state, which extends while the sustain pedal is in effect. The latter corresponds to the velocity-related prediction of the key press.
At inference time, the system determines a note's onset moment by detecting peaks in the note-onset predictions, binding the key velocity at that moment as the note's playing velocity; it determines a note's end moment by detecting peaks in the note-offset predictions, and if the key-hold prediction first determines that the key state has ended, that moment is used directly as the note's end moment.
A per-frame prediction head using only spatial features cannot distinguish the instant a key is pressed from the state of the key being held. Introducing a Conformer ConvModule backbone covering a temporal window for sequence modeling is the single design that yields the largest performance gain in this system, effectively resolving the ambiguity in key-state recognition. To accommodate the long-temporal-context requirements of datasets containing highly difficult repertoire and more heterogeneous recording conditions, the system ultimately chooses 1 second as the default input window length. This setting supports full note-offset prediction capability across different datasets, which short-window baselines capable of outputting only onset moments cannot achieve.
On the PianoVAM dataset, V2N's note-onset detection performance is essentially on par with the method proposed by Li et al., with metric gaps under both time tolerances not exceeding 0.5 percentage points; meanwhile, V2N outperforms all compared baseline methods on all metrics that depend on note offsets. The improvement is most pronounced on physical key-release metrics: the dedicated offset supervision combined with the 1-second context window gives V2N nearly a doubling of the corresponding metric compared with the baseline PPAN, and it is the only system that simultaneously achieves high accuracy on all four MIDI attributes — pitch, onset, offset, and velocity. You can refer to the visualization of transcription results that follows to directly compare how the MIDI sequences output by different methods differ in distribution from the ground truth.
Ablation experiments on the multi-task head design show that the added prediction heads can serve both as auxiliary supervision signals during training and as additional decoding guidance at inference; only their combined effect allows the system to achieve high accuracy across all MIDI attribute dimensions. Adding velocity supervision and the corresponding decoding strategy raises the F1 with velocity detection from a fixed-velocity proxy baseline to 80.6 (at 50ms tolerance). Adding onsets as an auxiliary prediction target improves most note-related metrics without directly using the onset head for decoding, and enabling the onset head at decoding further raises onset-detection F1. On this basis, adding offset supervision further optimizes all offset-dependent metrics, and the offset-guided decoding pipeline ultimately yields the best offset and offset-with-velocity detection results. This multi-task head design as a whole provides complementary training supervision signals and inference-time guidance cues for complete MIDI prediction.
Under cross-dataset swap testing, all existing visual piano transcription systems see their note-onset F1 drop to nearly zero. The root cause of this performance collapse is geometric: the currently common 800×144 perspective transformation only standardizes the input pixel grid without aligning the piano keyboard region within the grid. Median keyboard pixel widths differ markedly across datasets — the R3 dataset has a median keyboard width of about 784 pixels, while the PianoVAM dataset's is about 606 pixels — so the same column index corresponds to entirely different keys in different datasets, directly destroying the foundational consistency needed for cross-dataset generalization. This result indicates that cross-dataset visual piano transcription requires geometrically invariant feature representations, a conclusion also corroborated by related research in audio-based automatic music transcription; robustness optimization against unknown camera geometry remains an unresolved direction for future work.
The V2N visual piano transcription system proposed in this paper jointly predicts note onsets, offsets, key-hold states, and strike velocity through multi-task, multi-frame modeling, greatly improving physical key-release recognition accuracy over prior video baseline schemes — existing baselines either predict note offsets with durations near zero or can only infer them post hoc from key-activation results. V2N is also the first visual piano transcription system capable of outputting note-level strike velocity. The corresponding ablation experiments identify three core designs supporting complete note-level transcription from video: a dedicated offset prediction head, a multi-task training strategy, and offset-guided decoding.