An implementation of "Representation Learning of Music using Artist labels, ISMIR, 2018"
Code is written in Python 2.7
- tensorflow-gpu==1.4.0
- keras==2.0.8
These requirements can be easily installed by:
pip install -r requirements.txt
- data_generator.py: The base script that contains batch data generator and valid set loader.
- mp3s_to_mel.py: Convert audio to mel-spectrogram.
- model.py: Basic and siamese models.
- train.py: Module for training the models.
- encoding_cnn.py: Contains script for extracting feature vector given trained model weight and audio list.
Here are examples of how to run the code. (To run 1. and 2., you need MSD audio files and its related metadata from msd-artist-split, MSD_split)
python mp3s_to_mel.py
python train.py siamese --num-sing 1000 --margin 0.4 --N-negs 4
python encoding_cnn.py siamese ./models/model_siamese_1000_4_0.40/weights.59-12.32.h5 --num-sing 1000
[1] Representation Learning of Music Using Artist Labels, Jiyoung Park*, Jongpil Lee*, Jangyeon Park, Jung-Woo Ha and Juhan Nam, Proceedings of the 19th International Society for Music Information Retrieval Conference (ISMIR), 2018