All Projects → naotokui → Specgan

naotokui / Specgan

SpecGAN - generate audio with adversarial training

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Specgan

Awesome Gan For Medical Imaging
Awesome GAN for Medical Imaging
Stars: ✭ 1,814 (+1871.74%)
Mutual labels:  gan, deeplearning, generative-adversarial-network
Spectralnormalizationkeras
Spectral Normalization for Keras Dense and Convolution Layers
Stars: ✭ 100 (+8.7%)
Mutual labels:  gan, deeplearning, generative-adversarial-network
Relativistic Average Gan Keras
The implementation of Relativistic average GAN with Keras
Stars: ✭ 36 (-60.87%)
Mutual labels:  gan, deeplearning, generative-adversarial-network
Deep Learning Resources
由淺入深的深度學習資源 Collection of deep learning materials for everyone
Stars: ✭ 422 (+358.7%)
Mutual labels:  gan, deeplearning, generative-adversarial-network
Artificialintelligenceengines
Computer code collated for use with Artificial Intelligence Engines book by JV Stone
Stars: ✭ 35 (-61.96%)
Mutual labels:  gan, deeplearning
Tensorflow Srgan
Tensorflow implementation of "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network" (Ledig et al. 2017)
Stars: ✭ 33 (-64.13%)
Mutual labels:  gan, generative-adversarial-network
Gandlf
Generative Adversarial Networks in Keras
Stars: ✭ 46 (-50%)
Mutual labels:  gan, generative-adversarial-network
Hypergan
Composable GAN framework with api and user interface
Stars: ✭ 1,104 (+1100%)
Mutual labels:  gan, generative-adversarial-network
Contrastive Unpaired Translation
Contrastive unpaired image-to-image translation, faster and lighter training than cyclegan (ECCV 2020, in PyTorch)
Stars: ✭ 822 (+793.48%)
Mutual labels:  deeplearning, generative-adversarial-network
Acgan Pytorch
Pytorch implementation of Conditional Image Synthesis with Auxiliary Classifier GANs
Stars: ✭ 57 (-38.04%)
Mutual labels:  gan, generative-adversarial-network
Cyclegan Qp
Official PyTorch implementation of "Artist Style Transfer Via Quadratic Potential"
Stars: ✭ 59 (-35.87%)
Mutual labels:  gan, generative-adversarial-network
Dcgan Pytorch
PyTorch Implementation of DCGAN trained on the CelebA dataset.
Stars: ✭ 32 (-65.22%)
Mutual labels:  gan, deeplearning
Image To Image Papers
🦓<->🦒 🌃<->🌆 A collection of image to image papers with code (constantly updating)
Stars: ✭ 949 (+931.52%)
Mutual labels:  gan, generative-adversarial-network
Pacgan
[NeurIPS 2018] [JSAIT] PacGAN: The power of two samples in generative adversarial networks
Stars: ✭ 67 (-27.17%)
Mutual labels:  gan, generative-adversarial-network
St Cgan
Dataset and Code for our CVPR'18 paper ST-CGAN: "Stacked Conditional Generative Adversarial Networks for Jointly Learning Shadow Detection and Shadow Removal"
Stars: ✭ 13 (-85.87%)
Mutual labels:  gan, generative-adversarial-network
Cyclegan Tensorflow
An implementation of CycleGan using TensorFlow
Stars: ✭ 1,096 (+1091.3%)
Mutual labels:  gan, generative-adversarial-network
Pix2pix
Image-to-image translation with conditional adversarial nets
Stars: ✭ 8,765 (+9427.17%)
Mutual labels:  gan, generative-adversarial-network
Dcgan Tensorflow
A Tensorflow implementation of Deep Convolutional Generative Adversarial Networks trained on Fashion-MNIST, CIFAR-10, etc.
Stars: ✭ 70 (-23.91%)
Mutual labels:  gan, generative-adversarial-network
Ganspace
Discovering Interpretable GAN Controls [NeurIPS 2020]
Stars: ✭ 1,224 (+1230.43%)
Mutual labels:  gan, generative-adversarial-network
Pytorch Pretrained Biggan
🦋A PyTorch implementation of BigGAN with pretrained weights and conversion scripts.
Stars: ✭ 779 (+746.74%)
Mutual labels:  gan, generative-adversarial-network

SpecGAN - generate audio with adversarial training

an unofficial implementation of SpecGAN, a Generative Adversarial Network model for generating spectrogram images, proposed in: Donahue, C., McAuley, J., & Puckette, M. (2018). Synthesizing Audio with Generative Adversarial Networks. http://arxiv.org/abs/1802.04208

training process

Requirements

  • keras >= 2.1
  • tensorflow >= 1.4
  • librosa
  • soundfile
  • Python 2

Dataset

Audio files for the training should be placed in the following manner: each directory (clap, conga...) in the root directory (drums-selected) contains sounds belonging to the category respectively.

Sound dataset

For your convenience, here is a small dataset of drum machine sounds.

Preprocess

At first, you need to create a .npz archive containing normalized spectrogram images of training audio files and category info. It may take a few minutes to an hour depending on the number of files in your dataset.

$ python preprocess_audio.py -i ./drums-selected/ -o ./training_data.npz

Training

Then, start training using the created training data!

$ python specgan_categorical.py -i ./training_data.npz -o ./checkpoints -e 200
-i filepath to the training data created with proprocess_audio.py
-e number of Epochs
-o path to a directory, where the script saves generated spectrogram images, audio and models  

Generate Sounds

Once trained, you can use the trained models to generate random sounds and classify them. see this jupyter notebook.

Result

In the training process, the script generates spectrogram images and audio from random seeds in the directory specified with -o argument, so that you can check how the training goes.

If you are interested in how it actually sounds, please take look at this short video clip. In this video, I tried to keep generating random drum sounds from random seeds, classifying them with a trained discriminator and replacing the sound in the drum kit. It ended up an ever-changing drum sequence.

GAN-808 Drum Machine (YouTube)
go to youtube

Credits 🙏

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