1208320416 / DeepFakeDefenders

MIT License
4 stars 0 forks source link

训练完成的权重可以分享一下吗? #1

Open BerryRB opened 2 months ago

BerryRB commented 2 months ago

感谢作者的分享,模型权重方便分享一下吗

1208320416 commented 1 month ago

@BerryRB README更新了,已上传权重

BerryRB commented 1 month ago

@BerryRB README更新了,已上传权重

谢谢作者分享的权重,我测试了一下,下载了几个ted视频,测试报下面的错误: root@localhost:/home# CUDA_VISIBLE_DEVICES=0 python3 inference.py --model_path ./models/epoch_0.model --test_path TED_data/TED_data/ /home/TED_data/TED_data/changhua01-1.mp4 Traceback (most recent call last): File "inference.py", line 115, in output = infer.eval_embedding(args.test_path) File "inference.py", line 95, in eval_embedding output = self.model.forward(images[8 i : min(8 i + 8, images.shape[0])].cuda(), audio[8 i : min(8 i + 8, audio.shape[0])].cuda()) File "/home/models/DetectModel.py", line 197, in forward y = self.audio_to_patch_embedding(audio) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1520, in _call_impl return forward_call(*args, *kwargs) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/container.py", line 217, in forward input = module(input) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1520, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/linear.py", line 116, in forward return F.linear(input, self.weight, self.bias) RuntimeError: mat1 and mat2 shapes cannot be multiplied (1620x285 and 570x768) 请问这个应该如何解决

1208320416 commented 1 month ago

@BerryRB 应该是你changhua01-1.mp4的音频是单声道导致的,比赛给的MP4文件的音频是双声道,我的模型也是以双声道音频作为输入,你可以试试把音频复制成两个声道再试试。