All Projects → santi-pdp → Segan

santi-pdp / Segan

Licence: mit
Speech Enhancement Generative Adversarial Network in TensorFlow

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Segan

Pytorch Pix2pix
Pytorch implementation of pix2pix for various datasets.
Stars: ✭ 74 (-88.8%)
Mutual labels:  gan, generative-model, generative-adversarial-networks
Psgan
Periodic Spatial Generative Adversarial Networks
Stars: ✭ 108 (-83.66%)
Mutual labels:  gan, generative-model, generative-adversarial-networks
Tensorflow Generative Model Collections
Collection of generative models in Tensorflow
Stars: ✭ 3,785 (+472.62%)
Mutual labels:  gan, generative-model, generative-adversarial-networks
Multi-Agent-Diverse-Generative-Adversarial-Networks
Easy-to-follow Pytorch tutorial Notebook for Multi-Agent-Diverse-Generative-Adversarial-Networks
Stars: ✭ 23 (-96.52%)
Mutual labels:  generative-model, generative-adversarial-networks
mSRGAN-A-GAN-for-single-image-super-resolution-on-high-content-screening-microscopy-images.
Generative Adversarial Network for single image super-resolution in high content screening microscopy images
Stars: ✭ 52 (-92.13%)
Mutual labels:  gan, generative-adversarial-networks
MNIST-invert-color
Invert the color of MNIST images with PyTorch
Stars: ✭ 13 (-98.03%)
Mutual labels:  gan, generative-adversarial-networks
gcWGAN
Guided Conditional Wasserstein GAN for De Novo Protein Design
Stars: ✭ 38 (-94.25%)
Mutual labels:  generative-model, generative-adversarial-networks
Sednn
deep learning based speech enhancement using keras or pytorch, make it easy to use
Stars: ✭ 288 (-56.43%)
Mutual labels:  deep-neural-networks, speech
hifigan-denoiser
HiFi-GAN: High Fidelity Denoising and Dereverberation Based on Speech Deep Features in Adversarial Networks
Stars: ✭ 88 (-86.69%)
Mutual labels:  speech, gan
Adversarial Examples Pytorch
Implementation of Papers on Adversarial Examples
Stars: ✭ 293 (-55.67%)
Mutual labels:  deep-neural-networks, generative-adversarial-networks
Mimicry
[CVPR 2020 Workshop] A PyTorch GAN library that reproduces research results for popular GANs.
Stars: ✭ 458 (-30.71%)
Mutual labels:  gan, generative-adversarial-networks
GAN-Project-2018
GAN in Tensorflow to be run via Linux command line
Stars: ✭ 21 (-96.82%)
Mutual labels:  gan, generative-adversarial-networks
generative deep learning
Generative Deep Learning Sessions led by Anugraha Sinha (Machine Learning Tokyo)
Stars: ✭ 24 (-96.37%)
Mutual labels:  generative-model, generative-adversarial-networks
cgan-face-generator
Face generator from sketches using cGAN (pix2pix) model
Stars: ✭ 52 (-92.13%)
Mutual labels:  gan, generative-model
shoe-design-using-generative-adversarial-networks
No description or website provided.
Stars: ✭ 18 (-97.28%)
Mutual labels:  generative-model, generative-adversarial-networks
Alae
[CVPR2020] Adversarial Latent Autoencoders
Stars: ✭ 3,178 (+380.79%)
Mutual labels:  gan, generative-model
Enlightengan
[IEEE TIP'2021] "EnlightenGAN: Deep Light Enhancement without Paired Supervision" by Yifan Jiang, Xinyu Gong, Ding Liu, Yu Cheng, Chen Fang, Xiaohui Shen, Jianchao Yang, Pan Zhou, Zhangyang Wang
Stars: ✭ 434 (-34.34%)
Mutual labels:  gan, generative-adversarial-networks
Deblur Gan
Keras implementation of "DeblurGAN: Blind Motion Deblurring Using Conditional Adversarial Networks"
Stars: ✭ 483 (-26.93%)
Mutual labels:  gan, generative-adversarial-networks
Emotion Classification From Audio Files
Understanding emotions from audio files using neural networks and multiple datasets.
Stars: ✭ 189 (-71.41%)
Mutual labels:  deep-neural-networks, speech
GDPP
Generator loss to reduce mode-collapse and to improve the generated samples quality.
Stars: ✭ 32 (-95.16%)
Mutual labels:  generative-model, generative-adversarial-networks

SEGAN: Speech Enhancement Generative Adversarial Network

Introduction

This is the repository of the SEGAN project. Our original paper can be found here, and test samples are available here.

In this work a Generative Adversarial approach has been taken to do speech enhancement (i.e. removing noise from corrupted speech signals) with a fully convolutional architecture schematized as follows:

SEGAN_G

This model deals with raw speech waveforms on many noise conditions at different SNRs (40 at training time and 20 during test). It also models the speech characteristics from many speakers mixed within the same structure (without any supervision of identities), which makes the generative structure generalizable in the noise and speaker dimensions.

All the project is developed with TensorFlow. There are two repositories that were good references on how GANs are defined and deployed:

Dependencies

  • Python 2.7
  • TensorFlow 0.12

You can install the requirements either to your virtualenv or the system via pip with:

pip install -r requirements.txt

Data

The speech enhancement dataset used in this work (Valentini et al. 2016) can be found in Edinburgh DataShare. However, the following script downloads and prepares the data for TensorFlow format:

./prepare_data.sh

Or alternatively download the dataset, convert the wav files to 16kHz sampling and set the noisy and clean training files paths in the config file e2e_maker.cfg in cfg/. Then run the script:

python make_tfrecords.py --force-gen --cfg cfg/e2e_maker.cfg

Training

Once you have the TFRecords file created in data/segan.tfrecords you can simply run the training process with:

./train_segan.sh

By default this will take all the available GPUs in your system, if any. Otherwise it will just take the CPU.

NOTE: If you want to specify a subset of GPUs to work on, you can do so with the CUDA_VISIBLE_DEVICES="0, 1, <etc>" flag in the python execution within the training script. In the case of having two GPUs they'll be identified as 0 and 1, so we could just take the first GPU with: CUDA_VISIBLE_DEVICES="0".

A sample of G losses is interesting to see as stated in the paper, where L1 follows a minimization with a 100 factor and the adversarial loss gets to be equilibrated with low variance:

L1 loss (smoothing 0.5)

G_L1

Adversarial loss (smoothing 0.5)

G_ADV

Loading model and prediction

First, the trained weights will have to be downloaded from here and uncompressed.

Then the main.py script has the option to process a wav file through the G network (inference mode), where the user MUST specify the trained weights file and the configuration of the trained network. In the case of the v1 SEGAN presented in the paper, the options would be:

CUDA_VISIBLE_DEVICES="" python main.py --init_noise_std 0. --save_path segan_v1.1 \
                                       --batch_size 100 --g_nl prelu --weights SEGAN_full \
                                       --test_wav <wav_filename> --clean_save_path <clean_save_dirpath>

To make things easy, there is a bash script called clean_wav.sh that accepts as input argument the test filename and the save path.

Authors

  • Santiago Pascual (TALP-UPC, BarcelonaTech)
  • Antonio Bonafonte (TALP-UPC, BarcelonaTech)
  • Joan Serrà (Telefónica Research, Barcelona)

Reference

@article{pascual2017segan,
  title={SEGAN: Speech Enhancement Generative Adversarial Network},
  author={Pascual, Santiago and Bonafonte, Antonio and Serr{\`a}, Joan},
  journal={arXiv preprint arXiv:1703.09452},
  year={2017}
}

Contact

e-mail: [email protected]

Notes

  • If using this code, parts of it, or developments from it, please cite the above reference.
  • We do not provide any support or assistance for the supplied code nor we offer any other compilation/variant of it.
  • We assume no responsibility regarding the provided code.
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].