NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Foley Music: Learning to Generate Music from Videos

Chuang Gan, Deng Huang, Peihao Chen, Joshua B. Tenenbaum, Antonio Torralba

Abstract: Generating realistic, synchronized music from silent videos is a complex task requiring precise temporal alignment and adherence to musical structure. We present Foley Music, a system that translates human gestures into melodies by employing structured intermediate representations. By mapping visual keypoints to MIDI events before synthesizing audio, Foley Music significantly outperforms end-to-end generation methods in both realism and diversity.

Introduction

The synthesis of audio from video—often referred to as "Foley synthesis"—is a cornerstone of film and media production. However, automating this process for musical performances is notoriously difficult. Music is not merely sound; it is a structured sequence governed by rhythm, harmony, and dynamics, all of which must synchronize perfectly with the physical actions of the performer.

Previous research has largely focused on "end-to-end" models that attempt to map raw pixels or optical flow directly to audio waveforms. These methods frequently result in noisy, unstructured audio that lacks the timing and "soul" of real music. Foley Music addresses this by introducing a "semantic bottleneck": using human body keypoints and MIDI (Musical Instrument Digital Interface) as intermediate steps to capture the physical-to-symbolic relationship of music making.

Methodology

The Foley Music pipeline moves away from raw data processing toward structured translation. The system operates in three primary stages:

  1. Visual Encoding (Graph CNN): Rather than analyzing every pixel, the system utilizes OpenPose to extract 2D keypoints of the performer's body and fingers. These are fed into a Spatial-Temporal Graph Convolutional Network (ST-GCN), which learns the "grammar" of movement—how specific gestures, like a wrist flick or a finger press, correlate to specific sounds.
  2. Music Decoding (Transformer): The encoded motion features are translated into MIDI events using a Transformer decoder. MIDI is a symbolic representation that records the pitch, timing, and velocity of notes. This representation is inherently interpretable and editable, unlike raw audio.
  3. Audio Synthesis: Finally, the predicted MIDI sequence is converted into a high-quality waveform using a standard software synthesizer.
Foley Music pipeline across various instruments, showing video frames with keypoints, predicted MIDI events, and synthesized waveforms.

Key Insights

  • The Power of the Bottleneck: By forcing the model to pass through keypoints and MIDI, the researchers filter out irrelevant visual and audio noise, focusing the model entirely on the relationship between gesture and note.
  • Hands Matter: Ablation studies revealed that including finger keypoints is critical. For instruments like the piano or guitar, body pose alone is insufficient; the "fine-grained" motion of the fingers is where the melody resides.
  • Relative Attention: The model employs a Transformer with relative position embeddings, which is vital for music as the temporal distance between notes is often more significant than their absolute position in a clip.

Experiments and Results

The researchers evaluated Foley Music on three diverse datasets: the MUSIC Dataset (1,000 videos across 11 categories), AtinPiano (top-down piano performances), and URMP (studio recordings with ground-truth MIDI).

Human Evaluation

Extensive tests via Amazon Mechanical Turk compared Foley Music against state-of-the-art baselines like SampleRNN and WaveNet:

  • Human Preference: In forced-choice tests, humans preferred Foley Music's results by a massive margin. For example, in the accordion category, 64% preferred Foley Music compared to only 16% for SampleRNN.
  • Realism (Turing Test): In "real vs. fake" studies, generated clips were mistaken for real recordings 38% of the time. While not yet a perfect score (50%), this is nearly triple the performance of previous GAN-based or WaveNet-based systems (~8-12%).
  • Diversity: Using the Number of Statistically-Different Bins (NDB) metric, the authors demonstrated that their model produces a much wider variety of sounds than baselines, which often collapse into repetitive patterns.

Conclusion and Future Work

Foley Music demonstrates that structured intermediate representations are key to bridging the gap between visual motion and musical sound. While the results are impressive, limitations remain. The final audio quality is currently constrained by the software synthesizer, and the system primarily focuses on solo performances. Future work may involve integrating neural synthesizers for more realistic timbres and expanding the model to handle complex multi-instrument environments like orchestras.

Summary updated

BibTeX
@inproceedings{gan2020foley,
  author = {Chuang Gan and Deng Huang and Peihao Chen and Joshua B. Tenenbaum and Antonio Torralba},
  title = {{Foley Music: Learning to Generate Music from Videos}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58621-8\_44},
}
Figure