All Projects → facebookresearch → Music Translation

facebookresearch / Music Translation

Licence: other
A UNIVERSAL MUSIC TRANSLATION NETWORK - a method for translating music across musical instruments and styles.

Labels

Projects that are alternatives of or similar to Music Translation

Cudpp
CUDA Data Parallel Primitives Library
Stars: ✭ 333 (-13.51%)
Mutual labels:  cuda
Arrayfire Python
Python bindings for ArrayFire: A general purpose GPU library.
Stars: ✭ 358 (-7.01%)
Mutual labels:  cuda
Vuda
VUDA is a header-only library based on Vulkan that provides a CUDA Runtime API interface for writing GPU-accelerated applications.
Stars: ✭ 373 (-3.12%)
Mutual labels:  cuda
Cudahandbook
Source code that accompanies The CUDA Handbook.
Stars: ✭ 345 (-10.39%)
Mutual labels:  cuda
Tutorials
Some basic programming tutorials
Stars: ✭ 353 (-8.31%)
Mutual labels:  cuda
Loopy
A code generator for array-based code on CPUs and GPUs
Stars: ✭ 367 (-4.68%)
Mutual labels:  cuda
3
GPU-accelerated micromagnetic simulator
Stars: ✭ 324 (-15.84%)
Mutual labels:  cuda
Ilgpu
ILGPU JIT Compiler for high-performance .Net GPU programs
Stars: ✭ 374 (-2.86%)
Mutual labels:  cuda
K2
FSA/FST algorithms, differentiable, with PyTorch compatibility.
Stars: ✭ 354 (-8.05%)
Mutual labels:  cuda
Mini Caffe
Minimal runtime core of Caffe, Forward only, GPU support and Memory efficiency.
Stars: ✭ 373 (-3.12%)
Mutual labels:  cuda
Nimtorch
PyTorch - Python + Nim
Stars: ✭ 346 (-10.13%)
Mutual labels:  cuda
Sleef
SIMD Library for Evaluating Elementary Functions, vectorized libm and DFT
Stars: ✭ 353 (-8.31%)
Mutual labels:  cuda
Darkpose
Distribution-Aware Coordinate Representation for Human Pose Estimation
Stars: ✭ 369 (-4.16%)
Mutual labels:  cuda
Bayadera
High-performance Bayesian Data Analysis on the GPU in Clojure
Stars: ✭ 342 (-11.17%)
Mutual labels:  cuda
Nvpipe
NVIDIA-accelerated zero latency video compression library for interactive remoting applications
Stars: ✭ 376 (-2.34%)
Mutual labels:  cuda
Arrayfire
ArrayFire: a general purpose GPU library.
Stars: ✭ 3,693 (+859.22%)
Mutual labels:  cuda
Cuda Api Wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
Stars: ✭ 362 (-5.97%)
Mutual labels:  cuda
Hipsycl
Implementation of SYCL for CPUs, AMD GPUs, NVIDIA GPUs
Stars: ✭ 377 (-2.08%)
Mutual labels:  cuda
Cuda.jl
CUDA programming in Julia.
Stars: ✭ 370 (-3.9%)
Mutual labels:  cuda
Libsgm
Stereo Semi Global Matching by cuda
Stars: ✭ 368 (-4.42%)
Mutual labels:  cuda

Music Translation

PyTorch implementation of the method described in the A Universal Music Translation Network.

We present a method for translating music across musical instruments and styles. This method is based on unsupervised training of a multi-domain wavenet autoencoder, with a shared encoder and a domain-independent latent space that is trained end-to-end on waveforms.

This repository includes fast-inference kernels written by nvidia. The kernels were modified to match our architecture as detailed in the paper.

Quick Links

Setup

Software

Requirements:

  • Linux
  • Python 3.7
  • PyTorch v1.0.1
  • Install python packages
    git clone https://github.com/facebookresearch/music-translation.git
    cd music-translation
    pip install -r requirements.txt
    
  • Install fast inference wavenet kernels (requires Tesla V100 GPU):
    cd src/nv-wavenet
    python setup.py install
    

Data

  1. Download MusicNet dataset from here into musicnet folder.
  2. Extract specific domains from MusicNet dataset:
    python src/parse_musicnet.py -i musicnet -o musicnet/parsed
    
  3. Split into train/test/val
    for d in musicnet/parsed/*/ ; do python src/split_dir.py -i $d -o musicnet/split/$(basename "$d"); done
    
  4. Preprocess audio for training
    python src/preprocess.py -i musicnet/split -o musicnet/preprocessed
    

Pretrained Models

Pretrained models are available here. Downloaded models should be saved under checkpoints/pretrained_musicnet

Training

We provide training instructions for both single node and multi-node training. Our results were achieved following 3 days of training on 6 nodes, each with 8 gpus.

Single Node Training

Execute the train script:

./train.sh

Trained models will be saved in the checkpoints/musicnet directory.

Multi-Node Training

To train in Multi-Node training, use the follow the instructions below. NOTE: Multi-Node training requires a single node per dataset.

Execute the train script (on each node):

train_dist.sh <nnodes> <node_rank> <master_address>

The parameters are as follows:

<nnodes>            - Number of nodes participating in the training.
<node_rank>         - The rank of the current node.
<master_address>    - Address of the master node.

Inference

We provide both interactive/offline generation scripts based on nv-wavenet CUDA kernels:

  1. notebooks/Generate.ipynb - interactive generation.
  2. sample.sh <checkpiont name> "<decoders ids>" - samples short segments of audio from each dataset and converts to the domains the method was trained on. Running the script will create a result\DATE directory, with subfolder for each decoder. See src/run_on_files.py for more details.

For example, to use the pretrained models:

sample.sh pretrained_musicnet "0 1 2 3 4 5"

In addition, we provide python-based generation:

  1. sample_py.sh <checkpiont name> "<decoders ids>" - same as 2. above.

License

You may find out more about the license here.

Citation

@inproceedings{musictranslation,
    title     = {A Universal Music Translation Network},
    author    = {Noam Mor, Lior Wold, Adam Polyak and Yaniv Taigman},
    booktitle = {International Conference on Learning Representations (ICLR)},
    year      = {2019},
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].