Giter Site home page Giter Site logo

multiple-attention's People

Contributors

yoctta avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

multiple-attention's Issues

is the computation of aux_loss in code inconsistent with the paper?

In the code (MAT.py,274 line):
'''
if not jump_aux:
aux_loss,feature_matrix_d=self.auxiliary_loss(feature_maps_d,attention_maps_,y)
'''
it first compute the AttentionPooling between the feature_maps_d and attentions,then get feature_matrix and loss; but I think it should use the parameter feature_maps (not feature_maps_d in code)?
change it to be:
'''
if not jump_aux:
aux_loss,feature_matrix_d=self.auxiliary_loss(feature_maps,attention_maps_,y)
'''
I want to known wether I make a wrong understanding about the code?

dataset directory and requirement.txt

dear Author , whats the requirements of this project? and when we download that dataset and where should we put? should we make some folder? if yes, please guide me whats steps on my questions?

Training stuck for MAT

Hi @yoctta thanks for your contributions.
when I training MAT, The training is stuck, and it's not over. I checked a lot, but I didn't find the relevant information.
image
image
image
image
CPU shows running, Do you know what the problem is?

Minor issue at efficientnet/utils.py

@yoctta
we get
RuntimeError: expected scalar type Byte but found Float
in the Conv2dStaticSamePadding class' forward method w.r.t self.weights which are of type Parameter

please change the return statement in data/dataset.py getitem method's to

(self.trans(image=image)['image']).float()

to make it work.

I did this in an attempt to make it work, it worked as well, however if you have a better solution please fix it accordingly

meet a problem when running the code

Hi,
Thank you for sharing the code.
I run your code and meet a mistake as follows:

            File "/home/wj/60deepfake/github/multiple-attention-master/models/MAT.py", line 378, in forward
            x=self.pooling(feature_maps)
            ......
            File "/home/wj/anaconda3/envs/video/lib/python3.8/site-packages/torch/nn/functional.py", line 1129, in adaptive_avg_pool2d
            _output_size = _list_with_default(output_size, input.size())
            AttributeError: 'tuple' object has no attribute 'size'

I find that feature_maps is obtained from class 'Texture_Enhance_v2'.

        self.pooling=nn.AdaptiveAvgPool2d(1)
        self.texture_enhance=Texture_Enhance_v2(num_features,1)
        ......
        feature_maps=self.texture_enhance(feature_maps,(0.2,0.2))
        x=self.pooling(feature_maps)

The output of the class 'Texture_Enhance_v2' is a tuple ( "return feature_maps,feature_maps_d" ).
The pooling operation can not deal with tuple data.

Can the author help me and solve this problem?
Thank you!

about evaluation.

Hi,

When I try to run the code of evaluation, I need to load the "config.pkl" as here shown:

with open('runs/%s/config.pkl'%name,'rb') as f:

I didn't find any evaluation config parameters in "config.py" except training parameters.
Could you give me some help?

Example DFDC.json file

Can you share examples of the json files written in data.py?
Or maybe only DFDC.json would be fine.
Thanks in advance.

模块代码

你好,论文中提到的重要模块的代码有给吗?

Inconsistent parameters between paper and code

Hi, thank you for your sharing code. I really appriciate your excellent work. I have read both the paper and your released code, but I found that some parameters described in the paper and that in the config setting of your code are inconsistent. For example, the batch size is set to 48 in the paper but 16 in the config code, the learning rate is start from 0.001 in the paper but 0.0001 in the config code, and so on. Since I want to correctly re-implement your method, I wonder which parameter I shoud use? By the way, I started the training from the pretrain() method of main.py, am I right?

dataset

您好,请问训练用的数据集能够提供吗?用官方的脚本下载不是很方便

Help

Ask for help using the environment

Running evaluation on FF++,DFDC,Celeb-DF

@yoctta please help us out,

  1. I want to run the code in evaluation mode, however there is no celeb.json , i'm guessing this is for Celeb-DF-v1. Can you please outline steps how to evaluate the code?
  2. Also could you please the exact file structure of your dataset directory and how to populate it?
  3. There is no folder called runs with any config.pkl file.

P.S. : I just wan't to reload the shared weights and run inference on the test sets

Thanks

About the 4 time augment of real video in ffpp

In the training process, we augment the original frames 4 times for real/fake label balance.

Thanks for sharing your work. I noticed that you have augmented the real videos four times. Does it means that you have catch more frames in real videos even there are repeated frames in the final datasets?

About the tricks during the training

After the pretraining of backbone, I froze it and then train the multi-attentional without AGDA loss. But the accuracy is still no more than 97%. Is there any other trick used during the training of attention layer.

关于AGDA的问题

您好,大家都是**人,我就用中文表达了(/尴尬,怕英文表达不准确)
在AGDA.py中有一个 mod_func的函数,最后两行代码不知道代表啥数学意义,有看明白的大佬吗?
bottom=torch.sigmoid((torch.tensor(0.)-thres)*zoom)
return (torch.sigmoid((x-thres)*zoom)-bottom)/(1-bottom)

How to load the pretrained weights?

Thanks for your sharing. But I wanna to ask how to load the pretrained weights, e.g., "ff_c23.pth", as the "FF-checked.pkl" can't be loaded. BTW, could you please provide a simple demo for the evaluation? Thanks again!

Dataset used for training

Hi, thank you for open sourcing your code. I've read your paper and I really appreciate the attention based data augmentation implemented for the deep fake detection.
I do have one question though, in the paper you've mentioned that the FF++ HQ was used for training. And from the FF++ download, I see we have the folders c23 as being the HQ compression mode. While investigating the json file to replace with the folders in my own storage, I've noticed all your references are to the c0 folder, which correspond to the raw files. For the training, have you used the c0 or the c23 folders?

关于multi-attention

不好意思打扰一下,我目前正打算按照readme里面那样运行multi-attention,但是报错显示没有这些模块
image
请问这要怎么解决啊?

requirements

Hey,can you add the reqiurements of this project?I want to run it,Thank you!

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.