All Projects → GuitarML → Guitarlstm

GuitarML / Guitarlstm

Licence: gpl-3.0
Deep learning models for guitar amp/pedal emulation using LSTM with Keras.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Guitarlstm

Talos
Hyperparameter Optimization for TensorFlow, Keras and PyTorch
Stars: ✭ 1,382 (+514.22%)
Mutual labels:  keras-tensorflow
Keras Fewshotlearning
Some State-of-the-Art few shot learning algorithms in tensorflow 2
Stars: ✭ 135 (-40%)
Mutual labels:  keras-tensorflow
Deeplearning.ai
该存储库包含由deeplearning.ai提供的相关课程的个人的笔记和实现代码。
Stars: ✭ 181 (-19.56%)
Mutual labels:  keras-tensorflow
Unet Segmentation In Keras Tensorflow
UNet is a fully convolutional network(FCN) that does image segmentation. Its goal is to predict each pixel's class. It is built upon the FCN and modified in a way that it yields better segmentation in medical imaging.
Stars: ✭ 105 (-53.33%)
Mutual labels:  keras-tensorflow
Repo 2019
BERT, AWS RDS, AWS Forecast, EMR Spark Cluster, Hive, Serverless, Google Assistant + Raspberry Pi, Infrared, Google Cloud Platform Natural Language, Anomaly detection, Tensorflow, Mathematics
Stars: ✭ 133 (-40.89%)
Mutual labels:  keras-tensorflow
Invoicenet
Deep neural network to extract intelligent information from invoice documents.
Stars: ✭ 1,886 (+738.22%)
Mutual labels:  keras-tensorflow
Deepeeg
Deep Learning with Tensor Flow for EEG MNE Epoch Objects
Stars: ✭ 100 (-55.56%)
Mutual labels:  keras-tensorflow
Keras Unet
Helper package with multiple U-Net implementations in Keras as well as useful utility tools helpful when working with image semantic segmentation tasks. This library and underlying tools come from multiple projects I performed working on semantic segmentation tasks
Stars: ✭ 196 (-12.89%)
Mutual labels:  keras-tensorflow
Intelegent lock
lock mechanism with face recognition and liveness detection
Stars: ✭ 134 (-40.44%)
Mutual labels:  keras-tensorflow
C3d Keras
C3D for Keras + TensorFlow
Stars: ✭ 171 (-24%)
Mutual labels:  keras-tensorflow
Self Driving Car
A End to End CNN Model which predicts the steering wheel angle based on the video/image
Stars: ✭ 106 (-52.89%)
Mutual labels:  keras-tensorflow
Inferpy
InferPy: Deep Probabilistic Modeling with Tensorflow Made Easy
Stars: ✭ 130 (-42.22%)
Mutual labels:  keras-tensorflow
Stock Price Predictor
This project seeks to utilize Deep Learning models, Long-Short Term Memory (LSTM) Neural Network algorithm, to predict stock prices.
Stars: ✭ 146 (-35.11%)
Mutual labels:  keras-tensorflow
Cloudml Samples
Cloud ML Engine repo. Please visit the new Vertex AI samples repo at https://github.com/GoogleCloudPlatform/vertex-ai-samples
Stars: ✭ 1,452 (+545.33%)
Mutual labels:  keras-tensorflow
Dkeras
Distributed Keras Engine, Make Keras faster with only one line of code.
Stars: ✭ 181 (-19.56%)
Mutual labels:  keras-tensorflow
Unet
Generic U-Net Tensorflow 2 implementation for semantic segmentation
Stars: ✭ 100 (-55.56%)
Mutual labels:  keras-tensorflow
Dl Keras Tf
rstudio::conf(2020) deep learning workshop
Stars: ✭ 137 (-39.11%)
Mutual labels:  keras-tensorflow
Keras Srgan
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network implemented in Keras
Stars: ✭ 213 (-5.33%)
Mutual labels:  keras-tensorflow
Analytics Zoo
Distributed Tensorflow, Keras and PyTorch on Apache Spark/Flink & Ray
Stars: ✭ 2,448 (+988%)
Mutual labels:  keras-tensorflow
Vdcnn
Implementation of Very Deep Convolutional Neural Network for Text Classification
Stars: ✭ 158 (-29.78%)
Mutual labels:  keras-tensorflow

GuitarLSTM

GuitarLSTM trains guitar effect/amp neural network models for processing on wav files. Record input/output samples from the target guitar amplifier or pedal, then use this code to create a deep learning model of the sound. The model can then be applied to other wav files to make it sound like the amp or effect. This code uses Tensorflow/Keras.

The LSTM (Long short-term memory) model is effective for copying the sound of tube amplifiers, distortion, overdrive, and compression. It also captures the impluse response of the mic/cab used for recording the samples. In comparison to the WaveNet model, this implementation is much faster and can more accurately copy the sound of complex guitar signals while still training on a CPU.

Info

A variation on the LSTM model from the research paper Real-Time Guitar Amplifier Emulation with Deep Learning

For a great explanation of how LSTMs work, check out this blog post.

Data

data/ts9_test1_in_FP32.wav - Playing from a Fender Telecaster, bridge pickup, max tone and volume
data/ts9_test1_out_FP32.wav - Split with JHS Buffer Splitter to Ibanez TS9 Tube Screamer (max drive, mid tone and volume).
models/ts9_model.h5 - Pretrained model weights

Usage

Train model and run effect on .wav file: Must be single channel, 44.1 kHz, FP32 wav data (not int16)

# Preprocess the input data, perform training, and generate test wavs and analysis plots. 
# Specify input wav file, output wav file, and desired model name.
# Output will be saved to "models/out_model_name/" folder.

python train.py data/ts9_test1_in_FP32.wav data/ts9_test1_out_FP32.wav out_model_name


# Run prediction on target wav file
# Specify input file, desired output file, and model path
python predict.py data/ts9_test1_in_FP32.wav output models/ts9_model.h5

Training parameters:

# Use these arguments with train.py to further customize the model:

--training_mode=0  # enter 0, 1, or 2 for speed tranining, accuracy training, or extended training, respectively
--input_size=150   # sets the number of previous samples to consider for each output sample of audio
--split_data=3     # splits the input data by X amount to reduce RAM usage; trains the model on each split separately
--max_epochs=1     # sets the number of epochs to train for; intended to be increased dramatically for extended training
--batch_size=4096  # sets the batch size of data for training

# Edit the "TRAINING MODE" or "Create Sequential Model" section of train.py to further customize each layer of the neural network.

Colab Notebook: Use Google Colab notebook (guitar_lstm_colab.ipynb) for training GuitarLSTM models in the cloud. See notebook comments for instructions.

Training Info

Helpful tips on training models:

  1. Wav files should be 3 - 4 minutes long, and contain a variety of chords, individual notes, and playing techniques to get a full spectrum of data for the model to "learn" from.
  2. A buffer splitter was used with pedals to obtain a pure guitar signal and post amp/effect signal. You can also use a feedback loop from your audio interface to record input/output simultaneously.
  3. Obtaining sample data from an amp can be done by splitting off the original signal, with the post amp signal coming from a microphone (I used a SM57). Keep in mind that this captures the dynamic response of the mic and cabinet. In the original research the sound was captured directly from within the amp circuit to have a "pure" amp signal.
  4. Generally speaking, the more distorted the effect/amp, the more difficult it is to train.
  5. Requires float32 .wav files for training (as opposed to int16).

Limitations and future work

This implementation of the LSTM model uses a high amount of RAM to preprocess wav data. If you experience crashes due to limited memory, reduce the "input_size" parameter by using the "--input_size=" flag with train.py. The default setting is 100, which requires about 8GB of RAM. Increasing this setting will improve training accuracy, but the size of the preprocessed wav data in RAM will increase as well.

You can also use the "--split_data" parameter with train.py to train the same model on separate sections of the data. This will reduce RAM usage while still allowing a high input_size setting. For example, "--split_data=5" would split the data into 5 sections, and train each section separately. The default is 1, or no splitting.

A custom dataloader has been added to the Colab notebook using MSE for the loss calculation. This reduces RAM usage and eliminates the need for the --split_data parameter.

A real-time implementation for use in a guitar plugin: SmartAmpPro

Note: The model training has been integrated into the SmartAmpPro plugin, the models trained with GuitarLSTM are not currently compatible with the plugin.

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].