yzyouzhang / air-asvspoof Goto Github PK
View Code? Open in Web Editor NEWOfficial implementation of the SPL paper "One-class Learning Towards Synthetic Voice Spoofing Detection"
License: MIT License
Official implementation of the SPL paper "One-class Learning Towards Synthetic Voice Spoofing Detection"
License: MIT License
老哥,你好!我看asvspoof2019数据集中的真实语音和伪造语音数量是失衡的,是否考虑过model检测会倾向于spoof?提出的one-class损失函数是针对这种数据失衡的吗?还是说对于均衡数据集也可以达到不错的效果?另外,我看到ASVspoof2019.LA.cm.train.trl.txt文件中,首先是真实样本然后是伪造样本,在model训练过程中并没有shuffle数据,这也是有意为之吗?
hi,author!I noticed the feature visualization in Figure 2 in the paper, I would like to ask for the plotting details here, is it convenient to provide some plotting source code to help?
Thanks for the good work
After reading the paper and your implementation, I wonder that since this particular loss doesn't use the output of the final linear layer ( which calculate the classification score), how can this layer learn its optimal params?
Hope that you could clarify this point
hey,
Thanks for the repository!
I'm trying to test the model with ocsoftmax loss on a test set which do not contains labels but to surprise in the file test.py also labels are being used, which makes it impossible to calculate CM scores without the use of labels at least when using ocsoftmax or amsoftmax loss. Am I missing something? Please be patient and gentle. I have just started working on this topic.
Hope you reply soon.
Thanks
你好,我下载代码进行训练时发现相同参数重复跑两次所得的结果相差比较大。
对于ocsoftmax损失,最好的情况在eval上EER为2%,最差的情况是3%+,(其他损失函数也存在这种情况)
我也考虑了随机数的影响,但是训练到最后稳定下来正常情况应该是不会相差很大的。结果相差这么大是不是不正常,不知道你是否也有这样的情况。
你好,我看到continue_training的时候只加载了lfcc_model,并没有加载loss model,而是重新开始训练oc-softmax,我理解oc-softmax 也是需要加载的?
哈喽啊,请问尝试过其它帧的训练策略吗?比如300帧或者500帧,效果如何呢?
您好,您在模型训练过程中是如何是如何将语音resize呢,从仓库下载的代码执行train.py的时候报错 RuntimeError: stack expects each tensor to be equal size, but got [227, 750] at entry 0 and [301, 750] at entry 1
。您遇到过这样的问题吗?是如何解决的呢?
I tried running the LA data file but it gives error
Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in process_LA_data (line 23)
trainprotocol = textscan(trainfileID, '%s%s%s%s%s');
I am new at matlab and this seems like a stupid error. Kindly help me on this.
Hi. I am running into the following error. I am wondering if you can help me.
Traceback (most recent call last):
File "[path]/AIR-ASVspoof/dataset.py", line 53, in __getitem__
feat_mat = pickle.load(feature_handle)
_pickle.UnpicklingError: A load persistent id instruction was encountered,
but no persistent_load function was specified.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "[path]/AIR-ASVspoof/train.py", line 265, in <module>
_, _ = train(args)
File "[path]/Mikul/AIR-ASVspoof/train.py", line 126, in train
feat, _, _, _ = training_set[29]
File "[path]/AIR-ASVspoof/dataset.py", line 61, in __getitem__
feat_mat = pickle.load(feature_handle)
_pickle.UnpicklingError: A load persistent id instruction was encountered,
but no persistent_load function was specified.
Thanks
请问将代码改为多卡时,需要将ocsoftmax-loss 包装到DP里面吗?
您好,请问一下比如训练了100个epoch,如何在已经训练权重的基础上继续训练呢?
I have applied your pretrained model on some audio files but it give me error :
RuntimeError: Calculated padded input size per channel: (3 x 752). Kernel size: (9 x 3). Kernel size can't be greater than actual input size
Do you know what is the reason?
为什么有的真实样本推理出的score会大于1呢?正常来讲不应该是-1到1之间吗?
What is path_to_mat in reload_data.py?
Terminal Input:
python train.py --add_loss ocsoftmax -o ./models1028/ocsoftmax/train --gpu 1
Terminal Output:
Traceback (most recent call last):
File "train.py", line 5, in
from resnet import setup_seed, ResNet
File "D:\Programming\Python\Python\AIR-ASVspoof\resnet.py", line 1, in
import torch
File "D:\Programming\Python\Python\venv\lib\site-packages\torch_init_.py", line 79,
in <module>
from torch._C import *
ImportError: DLL load failed: The specified procedure could not be found.
Comments: The same repeats even for --gpu 0. Tried reinstalling torch version 1.1.0 with and without GPU.
For additional information; the same code run on python terminal gave the following output:
D:\Programming\Python\Python\venv\Scripts\python.exe C:/Users/Suchit/AppData/Roaming/JetBrains/IntelliJIdea2022.2/plugins/python/helpers/pydev/pydevconsole.py --mode=client --host=127.0.0.1 --port=62758
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['D:\Programming\Python\Python'])
PyDev console: starting.
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32
runfile('D:\Programming\Python\Python\AIR-ASVspoof-Suchit\train.py', wdir='D:\Programming\Python\Python\AIR-ASVspoof-Suchit')
Traceback (most recent call last):
File "C:\Users\Suchit\AppData\Local\Programs\Python\Python36\lib\code.py", line 91, in runcode
exec(code, self.locals)
File "", line 1, in
File "C:\Users\Suchit\AppData\Roaming\JetBrains\IntelliJIdea2022.2\plugins\python\helpers\pydev_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Users\Suchit\AppData\Roaming\JetBrains\IntelliJIdea2022.2\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:\Programming\Python\Python\AIR-ASVspoof-Suchit\train.py", line 5, in
from resnet import setup_seed, ResNet
File "C:\Users\Suchit\AppData\Roaming\JetBrains\IntelliJIdea2022.2\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "D:\Programming\Python\Python\AIR-ASVspoof-Suchit\resnet.py", line 1, in
import torch
File "C:\Users\Suchit\AppData\Roaming\JetBrains\IntelliJIdea2022.2\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "D:\Programming\Python\Python\venv\lib\site-packages\torch_init.py", line 79, in
from torch._C import *
File "C:\Users\Suchit\AppData\Roaming\JetBrains\IntelliJIdea2022.2\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: The specified procedure could not be found.
Please look into this @yzyouzhang.
Thank you.
Does a point mean an audio file in the plot? I met some problems in drawing the feature embedding visualization.
I have a question. How can I differentiate between real and fake samples by score from loss.py (OCSoftmax), The spoof sample has a high score nearly 1 and bonafide sample has a low score nearly -1, what is the threshold to distinguish them, is it "0"? It seems to me that the output of a binary classification model is a probability,such as [0.1,0.9], 0.1---> bonafide sample, 0.9---> spoof sample。But how can i do like this output with your trained model?
hello, when i run .m file,
Extracting features for training data...未定义函数或变量 'deltas'。
I don't have much experience with Matlab, so there may be a few mistakes. I apologize for this in advance.
Desired folder not formed
Line 14: pathToFeatures = horzcat('/home/yzh298/anti-spoofing/ASVspoof2019', access_type, 'Features/');
Add / after ASVspoof2019 and before Features to make them into different folders; the above code results in a folder named 'ASVspoof2019LAFeatures'.
Fix: After adding /'s, the code becomes;
pathToFeatures = horzcat('/home/yzh298/anti-spoofing/ASVspoof2019/', access_type, '/Features/');
and the resulting path will be ASVspoof2019/LA/Features.
Incorrect file name
Line 17: trainProtocolFile = fullfile(pathToDatabase, horzcat('ASVspoof2019_', access_type, '_cm_protocols'), horzcat('ASVspoof2019.', access_type, '.cm.train.trl.txt'));
Here, the last part of the path has '.cm.train.trl.txt'. The original dataset folder 'DS_10283_3336' has a file named ASVspoof2019.LA.com.train.trn.txt in the above path. So the code displays a ' file not found ' error.
Fix: Replace the trl in the file name with trn.
ohhh okay, thank you so much for such a fast response. Now I get it.
And if I may ask, are you participating in ASVspoof 2021? It would be great if you could provide some guidance regarding that.
A maid id or any other way to contact you to discuss it further would be great.
Thanks in Advance
Originally posted by @rohit18115 in #17 (comment)
为什么使用oc-softmax之后得分,正样本的得分是再-1左右,而负样本是在1左右。但是使用softmax,得分确是正样本在1左右,负样本在0左右?
Hi,
Hope all is well and thank you for a well-written paper!
Are you planning to open-source your pre-trained models as well?
Thanks,
Johannes
lfcc_loss += ocsoftmaxloss * args.weight_loss?
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.