gan-police / frequency-forensics Goto Github PK
View Code? Open in Web Editor NEWDeepfake detection using wavelet-packets in PyTorch, European Conference on Machine Learning (ECML PKDD) 2022.
License: Other
Deepfake detection using wavelet-packets in PyTorch, European Conference on Machine Learning (ECML PKDD) 2022.
License: Other
It appears to me that we are always training on the raw normalized images and calculate the wavelet representation only in the validation loop. Am I missing something?
frequency-forensics/src/freqdect/train_classifier.py
Lines 104 to 108 in 149db53
frequency-forensics/src/freqdect/train_classifier.py
Lines 31 to 43 in 149db53
Make,
Is it possible to build the application to detect the fake images using the provided code
Can you share the screenshot of final output where the images are labeled as fake or real
Your work is enlightening. Could you share the pre-trained model of the classifier, please? Thank you.
Hi there, thanks for sharing the code for such a great work!
I am trying to train the network using my own dataset and I want to use a similar setup as CNN-ln-db4
in your paper.
I prepared the dataset using the following commends (all paths are omitted):
python -m freqdect.prepare_dataset --log-packets --wavelet db4 --level 3
My dataset contains images all in size 128 x 128.
And I run the training script as following:
python -m freqdect.train_classifier \
--data-prefix log_packets_db4_reflect_3 \
--features packets \
--nclasses 8 \
--model cnn
However, I got the following errors at line 147 of models.py.
RuntimeError: mat1 and mat2 shapes cannot be multiplied (512x1176 and 24x8)
By checking the code, I think this is because the input packet size is bigger than what is expected, so after the convolutions the output does not go down to 1 x 1.
I am wondering did I make any mistakes in preparing the dataset? What should I do to have packets with the correct size?
Thank you.
When training models, the resulting model file is stored in ./log/,
which may not exist:
frequency-forensics/src/freqdect/train_classifier.py
Lines 264 to 272 in dad3cc1
Is this a complete code of deepfake image detection using wavelet packets
For some reason when I preprocess with features=packets the outputs have shape=(128,128,3), the same as the raw images, but with features=log-packets they have a shape=(64,16,16,3)... as a result I get a shape mismatch when trying to train a CNN on packets... shouldn't packets and log-packets result in input features of the same shape?
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.