Code Monkey home page Code Monkey logo

waveguard_defense's People

Contributors

paarthneekhara avatar shehzeen avatar waveguard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

waveguard_defense's Issues

voiced_unvoiced always returns 0

When running the code, the lpc defense does not work for me: running the code always emits .wav files that are completely silent.

The command I am running is python Defender/defender_multiple.py --in_dir /tmp/a/ --out_base /tmp/ --defender_type lpc --defender_hp 10. When I run this I see the input is non-zero (INput wav -0.8821411 0.92477417) but the output is completely zero (LPC min max 0.0 0.0).

I've traced it down to the fact that the voiced_unvoiced function looks like it always returning an array consisting entirely of 0s. This function depends on only two libraries (numpy and scipy.signal) so I don't believe it's a dependency issue.

The input I'm using is the test input here.

If you'd like to unit test this, then I've provided a numpy file here so that if you run

from lpc import voiced_unvoiced
print(voiced_unvoiced(np.load("lpc.npy")))

then you should get the output [0 0 0 0 0 . . . 0 0 0].

I think that this is an error, but I'm not certain. Am I doing something wrong here? Maybe the inputs should be pre-processed in some way ahead of time? Or the hyperparameters are wrong (I don't think this is the case as I've tried all values in [2..100]).

Evaluating AUC

To evaluate the defense AUC, the README instructs me to run this command:

python evaluate_detector.py --in_orig <DIR CONTAINING ORIGINAL UNDEFENDED AUDIO> \
                            --in_orig_def <DIR CONTAINING ORIGINAL DEFENDED AUDIO> \
                            --in_adv <DIR CONTAINING ADVERSARIAL UNDEFENDED AUDIO> \
                            --in_adv_def <DIR CONTAINING ADVERSARIAL DEFENDED AUDIO>

How do I generate the folder contents of what I pass to --in_adv and --in_adv_def? I'm particularly interested in an implementation of the adaptive attack algorithm from the paper.

An error problem about the code

Hello, I'm studying your article. I encountered an error when reading the code. In the file spectral.py, I variable error. In addition, what version of deepspeech do you use?
if axis is None:
ndims = t.get_shape().ndims
if ndims is None:
raise ValueError('Cannot run on tensor with dynamic ndims')
dims = []
for i in range(ndims):
try:
dim = int(t.get_shape()[i])
except:
dim = tf.shape(t)[i]
dims.append(dim)
return dims
else:
try:
dim = int(t.get_shape()[axis])
except:
dim = tf.shape(t)[i] // The variable I here is not clear
return dim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.