My deepfake detection model accuracy is only 50%

Hello guy , so currenly im struggling in my research about deepfake detection. My dataset is DFCup Taken form IEEE signal processing cup last year with imbalance real and fake class (approximately 1:5) . At first im following a paper and implement them method.I did handle imbalance like the paper author did. 100 batch of 256 images. The notebook i used was 200 batch of 128 images but i have tested 100 batch but the bad result is the same.

I am working on a deepfake detection model that fuses EfficientNet (Spatial) and a custom FFT branch (Frequency).

The Problem: Initially, I fed standard normalized inputs to both branches, but performance was poor. Suspecting that normalization (mean/std subtraction) distorts the frequency spectrum, I modified the forward pass to feed unnormalized (raw) images to the FFT branch while keeping normalized images for EfficientNet.

However, even with raw inputs for the FFT branch, the model performance is still not improving. The result just around 50% which it all predict Fake or all Real :”<

I am looking forward on any advice, thanks you guy very much.

Last but not least let me apologize because im not really good at english :”<,I have struggle this problem all the day and decided to post here.
Here is my NoteBook and bellow are the combine model architecture

There’s too much code to easily spot any potential issues :).

However, do you try overfit your model using a very small dataset (e.g., 5 real and 5 fake images)? Your model should be able to reach a training loss of close to 100%. If not, there is probably something fundamentally off with your implementation.

Even i also did same kind of project and did everything from scratch but still getting accuracy 60%,i also don’t know what to do.

i did find a way. I tried to print out gradient value in some layer become 0.0000 all the time so maybe it because of gradient vanishing. Then i figure that after i transform images to fourier i should do something to reduce then phase and amplitude value. Tried normalize it or using log . I dont know but it fixed the gradient vanish and the model continue to learning.

1 Like

Thanks , i will try it