cyhuang-tw / attack-vc Goto Github PK
View Code? Open in Web Editor NEWThe official implementation of the paper "Defending Your Voice: Adversarial Attack on Voice Conversion".
The official implementation of the paper "Defending Your Voice: Adversarial Attack on Voice Conversion".
Dear authors,
Thanks for providing the high quality codes and the nice paper. I am trying to generate the adversarial samples in the demo. Since it is not a targeted attack(no y in the demo), I could not use the targeted attack code you provide to generate the adversarial samples directly. Could you please provide the untargeted end-to-end attack code (for equation (1) in the paper )for generating the demo samples?
My attempted modification of the e2e_attack function for untargeted attack is:
def e2e_attack(
model: nn.Module,
vc_src: Tensor,
vc_tgt: Tensor,
adv_tgt: Tensor,
eps: float,
n_iters,
) -> Tensor:
ptb = torch.zeros_like(vc_tgt).normal_(0, 1).requires_grad_(True)
opt = torch.optim.Adam([ptb])
criterion = nn.MSELoss()
pbar = trange(n_iters)
with torch.no_grad():
org_out = model.inference(vc_src, vc_tgt)
losses = []
ptbs=[]
for _ in pbar:
adv_inp = vc_tgt + ptb
adv_out = model.inference(vc_src, adv_inp)
loss = - criterion(adv_out, org_out)
opt.zero_grad()
loss.backward()
opt.step()
ptb.data.clamp_(-eps, eps)
return vc_tgt + ptb
However, the adversarial samples I generate(.e.g epsilon = 0.1 ) is different from yours in the demo.
Any advise or reply will be highly appreciated!
Zihao
Hello,Thanks for your code and the pretrained-model. However, the GoogleDrive link become invalid these days. Would you please update this link? Thanks you very much!
Hi, dear author
I learn a lot from this work, it's a great work.
Currently, Iโm working on a project, I want to do normalization on my data (mel-spectrogram ) for a better training performance.
I noticed that the std and mean of the data is precomputed, would you mind to tell me how to compute the std and mean of the data.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.