Giter Club home page Giter Club logo

pm2s's Introduction

Performance MIDI-to-Score Conversion

This is the official implementation for our ISMIR 2022 paper Performance MIDI-to-Score Conversion by Neural Beat Tracking.

Environments

The implementation is based on Python 3.8 and PyTorch 1.12.0. Other versions can work, but they are not tested. A list of python dependencies is available in requirements.txt, run:

pip install -r requirements.txt

Running instructions

To use the pre-trained model for prediction, please follow the instructions in demo.ipynb.

To train a model from scratch, please refer to the instructions in dev/README.md.

Cite

L. Liu, Q. Kong, V. Morfi and E. Benetos, "Performance MIDI-to-Score Conversion by Neural Beat Tracking" in Proceedings of the 23rd International Society for Music Information Retrieval Conference, Bengaluru, India, Dec 2022.

pm2s's People

Contributors

cheriell avatar maximilianwachter avatar

Stargazers

Bmois avatar Hao Hao Tan avatar Chih-Cheng (CC) Chang avatar Kia Hadipour avatar Dmitry Gavrilyev avatar Chocovanilazuki avatar Megan Elisabeth Finch avatar Yonghyun Kim avatar Rubén Castro González avatar Riccardo Giampiccolo avatar Vitaly Pavlenko avatar  avatar Jingtong Hu avatar 🥺 avatar  avatar Hatori233 avatar Jingjing Tang avatar Ilya Borovik avatar Yu Jie Lin avatar  avatar Alia Morsi avatar Ruibin Yuan avatar Sven avatar Ellie avatar  avatar Taein KIM avatar Lejun Min avatar  avatar  avatar Eunjin Choi avatar Emanuele Merlo avatar Tim Beyer avatar  avatar kevin_zhang avatar zhaotw avatar Woosung Choi avatar Gerald Golka avatar JayDubOne avatar  avatar Julian Reck avatar  avatar 程品奕 avatar melodyless avatar Loisaida Sam avatar Emmanouil Karystinaios avatar Yuan-Man avatar Sebastian Murgul avatar Yi-Hsuan Yang avatar Huan Zhang avatar

Watchers

Gerald Golka avatar Sebastian Murgul avatar Pierre Cournut avatar  avatar  avatar Kia Hadipour avatar Tim Beyer avatar JayDubOne avatar

pm2s's Issues

Evaluate with MV2H

Hi,
thanks for the cool work!
Are there any plans to add the code necessary to evaluate with MV2H as in the paper?
Thanks!

Encoding in Quantisation Model

In the forward()-method of the quantisation model, the data is already encoded when the forward()-method of the beat model is called. The data then gets encoded a second time in the beat models forward()-method, leading to a different beat detection in the quantisation model.

numpy pandas version conflit

$ pip install -r requirements.txt
Collecting torch==1.12.1 (from -r requirements.txt (line 1))
Using cached torch-1.12.1-cp38-cp38-manylinux1_x86_64.whl.metadata (22 kB)
Collecting pretty-midi==0.2.9 (from -r requirements.txt (line 2))
Using cached pretty_midi-0.2.9-py3-none-any.whl
Collecting numpy==1.19.1 (from -r requirements.txt (line 3))
Using cached numpy-1.19.1-cp38-cp38-manylinux2010_x86_64.whl.metadata (2.0 kB)
Collecting mir_eval==0.6 (from -r requirements.txt (line 4))
Using cached mir_eval-0.6-py3-none-any.whl
Collecting mido==1.2.9 (from -r requirements.txt (line 5))
Using cached mido-1.2.9-py2.py3-none-any.whl.metadata (4.1 kB)
Requirement already satisfied: typing-extensions in /root/miniconda3/envs/py38/lib/python3.8/site-packages (from torch==1.12.1->-r requirements.txt (line 1)) (4.10.0)
Requirement already satisfied: six in /root/miniconda3/envs/py38/lib/python3.8/site-packages (from pretty-midi==0.2.9->-r requirements.txt (line 2)) (1.16.0)
Requirement already satisfied: scipy>=1.0.0 in /root/miniconda3/envs/py38/lib/python3.8/site-packages (from mir_eval==0.6->-r requirements.txt (line 4)) (1.9.3)
Requirement already satisfied: future in /root/miniconda3/envs/py38/lib/python3.8/site-packages (from mir_eval==0.6->-r requirements.txt (line 4)) (1.0.0)
Using cached torch-1.12.1-cp38-cp38-manylinux1_x86_64.whl (776.3 MB)
Using cached numpy-1.19.1-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
Using cached mido-1.2.9-py2.py3-none-any.whl (52 kB)
Installing collected packages: mido, torch, numpy, pretty-midi, mir_eval

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pandas 2.0.0 requires numpy>=1.20.3; python_version < "3.10", but you have numpy 1.19.1 which is incompatible.

Successfully installed mido-1.2.9 mir_eval-0.6 numpy-1.19.1 pretty-midi-0.2.9 torch-1.12.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Time Signature

The time signature processor does not seem to work properly. It seems to detect 3/8 or 3/4 almost exclusively, regardless of the processed piece.
Example Code to reproduce the Issue:
from pm2s.features.time_signature import RNNTimeSignatureProcessor
ts_processor = RNNTimeSignatureProcessor()
midi_file = 'Datasets/A-MAPS_1.1/MAPS_MUS-scn15_12_StbgTGd2.mid'
time_sig = ts_processor.process(midi_file)
print(f'Time Signature:{time_sig}')
Example Output:
Time Signature:[(0.500004, '3/8')]

Checkpoints in Quantization Processor

When the checkpoint of the Quantization Model is loaded in the Quantization Processor, it overwrites the beat model checkpoint that has been previously loaded in the Quantization Model. This leads to the beat detection not working properly, because even though the weights and biases stay the same, the parameter num_batches_tracked, which is used for the initialisation of the running mean and running variance of the batch normalisation changes (at least for the supplied model checkpoints), leading the beat detection to behave differently than expected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.