All Projects → dessa-oss → Fake Voice Detection

dessa-oss / Fake Voice Detection

Licence: apache-2.0
Using temporal convolution to detect Audio Deepfakes

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Fake Voice Detection

Relativistic Average Gan Keras
The implementation of Relativistic average GAN with Keras
Stars: ✭ 36 (-76.92%)
Mutual labels:  deep-learning-tutorial
Androidtensorflowmachinelearningexample
Android TensorFlow MachineLearning Example (Building TensorFlow for Android)
Stars: ✭ 1,369 (+777.56%)
Mutual labels:  deep-learning-tutorial
Machine learning lectures
Collection of lectures and lab lectures on machine learning and deep learning. Lab practices in Python and TensorFlow.
Stars: ✭ 118 (-24.36%)
Mutual labels:  deep-learning-tutorial
The Incredible Pytorch
The Incredible PyTorch: a curated list of tutorials, papers, projects, communities and more relating to PyTorch.
Stars: ✭ 8,584 (+5402.56%)
Mutual labels:  deep-learning-tutorial
Machine Learning Algorithms
A curated list of almost all machine learning algorithms and deep learning algorithms grouped by category.
Stars: ✭ 92 (-41.03%)
Mutual labels:  deep-learning-tutorial
Pytorch Neural Style Transfer
Reconstruction of the original paper on neural style transfer (Gatys et al.). I've additionally included reconstruction scripts which allow you to reconstruct only the content or the style of the image - for better understanding of how NST works.
Stars: ✭ 106 (-32.05%)
Mutual labels:  deep-learning-tutorial
Letslearnai.github.io
Lets Learn AI
Stars: ✭ 33 (-78.85%)
Mutual labels:  deep-learning-tutorial
Alexnet with tensorflow
an implement of AlexNet with tensorflow, which has a detailed explanation.
Stars: ✭ 139 (-10.9%)
Mutual labels:  deep-learning-tutorial
Easy Yolo
Yolo (Real time object detection) model training tutorial with deep learning neural networks
Stars: ✭ 98 (-37.18%)
Mutual labels:  deep-learning-tutorial
Hyperdl Tutorial
深度学习教程整理 | 干货
Stars: ✭ 1,574 (+908.97%)
Mutual labels:  deep-learning-tutorial
Sru Deeplearning Workshop
دوره 12 ساعته یادگیری عمیق با چارچوب Keras
Stars: ✭ 66 (-57.69%)
Mutual labels:  deep-learning-tutorial
My Journey In The Data Science World
📢 Ready to learn or review your knowledge!
Stars: ✭ 1,175 (+653.21%)
Mutual labels:  deep-learning-tutorial
Deeplearning tutorials
The deeplearning algorithms implemented by tensorflow
Stars: ✭ 1,580 (+912.82%)
Mutual labels:  deep-learning-tutorial
Deeplearning
This repository will contain the example detailed codes of Tensorflow and Keras, This repository will be useful for Deep Learning staters who find difficult to understand the example codes
Stars: ✭ 49 (-68.59%)
Mutual labels:  deep-learning-tutorial
Python autocomplete
Use Transformers and LSTMs to learn Python source code
Stars: ✭ 123 (-21.15%)
Mutual labels:  deep-learning-tutorial
Deep Tutorials For Pytorch
In-depth tutorials for implementing deep learning models on your own with PyTorch.
Stars: ✭ 971 (+522.44%)
Mutual labels:  deep-learning-tutorial
Openvino Custom Layers
Tutorial for Using Custom Layers with OpenVINO (Intel Deep Learning Toolkit)
Stars: ✭ 101 (-35.26%)
Mutual labels:  deep-learning-tutorial
Machine Learning Tutorials
machine learning and deep learning tutorials, articles and other resources
Stars: ✭ 11,692 (+7394.87%)
Mutual labels:  deep-learning-tutorial
Adventures In Deep Learning
A curated list of Deep Learning resources sorted by reputation
Stars: ✭ 131 (-16.03%)
Mutual labels:  deep-learning-tutorial
Deep learning notes
a collection of my notes on deep learning
Stars: ✭ 112 (-28.21%)
Mutual labels:  deep-learning-tutorial

DeepFake Audio Detection

With the popularity and capabilities of audio deep fakes on the rise, creating defenses against deep fakes used for malicious intent is becoming more important than ever.

We built a fake audio detection model with Foundations Atlas, for anyone to use. If you'd like to read more about why we decided to build this, click here.

Here are two examples of short audio clips in ./data/example_clips/ folder. One of them is real and the other is fake.

This repository provides the code for a fake audio detection model built using Foundations Atlas. It also includes a pre-trained model and inference code, which you can test on any of your own audio files.

Setup

  1. Git Clone this repository.
  2. If you haven't already, install Foundations Atlas Community Edition.
  3. Once you've installed Foundations Atlas, activate your environment if you haven't already, and navigate to your project folder, and then into the code directory.
  4. Run the following line in the terminal to install the required packages:
pip install -r requirements.txt

That's it, You're ready to go!

Note: To run the code, your system should meet the following requirements: RAM >= 32GB , GPUs >=1

Overview

The dataset used in this project is from the ASVSpoof 2019 competition. We have used the "logical_access" part of this dataset in this project. The "logical_access" data consist of several short audio clips in .flac format. You can download the raw data here. To make it easy for anyone to get started, we provide the already preprocessed audio files (converted to spectrograms) on an Amazon S3 bucket.

The preprocessed ASV dataset contains train, validation and test set on which the model performance is measured. The model performance is also measured on a state-of-the-art fake voice synthesis model called "Realtalk", created by Dessa. Refer here to learn more about RealTalk.

All of the code required for this project is in the code/ directory. So, make sure you navigate into the code/ directory to run any scripts.

To get started, you can download this data by running the following command in the terminal (make sure you are running the script from code/ directory):

bash download_data.sh

Note: Once the download completes, open the job.config.yml. On line 18, you'll find a the following filepath: /media/biggie2/sachinrana/fake-audio-detection/data. Replace this filepath with the absolute path to the data/ folder in this project, wherever you've saved it.

You'll be able to train a model by running main.py in your Python Editor, or the following line in terminal:

python main.py

This will train a model using our baseline hyperparameters, save it, and evaluate it's performance on a validation and test set. You can view the Atlas GUI (https://localhost:5555) to see the model training, view saved artifacts, or see the model on TensorBoard.

If you'd like to see our model architecture, or make changes to the model architecture, you can find the model code in utils.py in the Discriminator_Model class. Make changes as you please to see if you can improve the model!

Using the Pre-trained Model

We are providing our pre-trained model which is saved on the Amazon S3 bucket. If you ran bash downlaod_data.sh then you should see a folder named fitted_objects/ created inside the code/ directory inside which you will find the pre-trained model. This is simple baseline model that we created to get you started. It achieves 85% accuracy and 0.58 f1 score on the test set.

To run our pre-trained model on your own audio:

  1. Copy your audio files to data/inference_data/unlabeled/
  2. Run the inference script by running inference.py in your Python Editor or by running the follow command in the terminal.
python inference.py

Once the run completes, you should see a print out with information on predictions of the model, the accuracy of the model on your provided data, as well as which examples it got right, and which it got wrong.

Running a Hyperparameter Search

Foundations Atlas makes it super easy to run a hyperparameter search. In the constants.py file, you can find generate_config() function with the baseline hyperparameters that we searched over. You can replace these with any hyperparemters you want, to use for your model; once you're ready, simply run the following command in the terminal to send jobs to Foundations Atlas.

python submit_jobs.py

Now you should be able to see your running and queued jobs on the Atlas GUI.

Foundations Atlas GUI

You can view the Atlas GUI (https://localhost:5555) to see the model training, view saved artifacts, or see the model on TensorBoard. Here are a few images of the gui:

Experiment Tracker

Artifact Viewer

Tensorboard Integration

License

Copyright 2015-2020 Square, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

© 2020 Square, Inc. ATLAS, DESSA, the Dessa Logo, and others are trademarks of Square, Inc. All third party names and trademarks are properties of their respective owners and are used for identification purposes only.

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