zhaoyuhsin / onsets-and-frames

A Pytorch implementation of Onsets and Frames (Hawthorne 2018)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyTorch Implementation of Onsets and Frames

This is a PyTorch implementation of Google's Onsets and Frames model, using the Maestro dataset for training and the Disklavier portion of the MAPS database for testing.

Instructions

This project is quite resource-intensive; 32 GB or larger system memory and 8 GB or larger GPU memory is recommended.

Convert WAV file into MIDI

  • Convert wav format file into flac by ffmpeg
ffmpeg -y -loglevel fatal -i a.wav -ac 1 -ar 16000 a.flac
  • Put the flac file into data/MAPS/flac(for example a.flac)
  • Rename the t.tsv and put the tsv file into data/MAPS/tsv/matched (for example a.tsv)
  • run evaluate.py
python3 evaluate.py model.pt --save-path output/ 
  • The result a.mid is placed in output/

About

A Pytorch implementation of Onsets and Frames (Hawthorne 2018)


Languages

Language:Python 100.0%