Real-Time Deepfake Detection in the Real-World
See the codeOfficial Pytorch implementation of Real-Time Deepfake Detection in the Real-World paper.

Real-Time Deepfake Detection in the Real-World
Bar Cavia, Eliahu Horwitz, Tal Reiss, Yedid Hoshen
https://arxiv.org/abs/2406.09398Abstract: Recent improvements in generative AI made synthesizing fake images easy; as they can be used to cause harm, it is crucial to develop accurate techniques to identify them. This paper introduces "Locally Aware Deepfake Detection Algorithm" (LaDeDa), that accepts a single 9x9 image patch and outputs its deepfake score. The image deepfake score is the pooled score of its patches. With merely patch-level information, LaDeDa significantly improves over the state-of-the-art, achieving around 99% mAP on current benchmarks. Owing to the patch-level structure of LaDeDa, we hypothesize that the generation artifacts can be detected by a simple model. We therefore distill LaDeDa into Tiny-LaDeDa, a highly efficient model consisting of only 4 convolutional layers. Remarkably, Tiny-LaDeDa has 375x fewer FLOPs and is 10,000x more parameter-efficient than LaDeDa, allowing it to run efficiently on edge devices with a minor decrease in accuracy. These almost-perfect scores raise the question: is the task of deepfake detection close to being solved? Perhaps surprisingly, our investigation reveals that current training protocols prevent methods from generalizing to real-world deepfakes extracted from social media. To address this issue, we introduce WildRF, a new deepfake detection dataset curated from several popular social networks. Our method achieves the top performance of 93.7% mAP on WildRF, however the large gap from perfect accuracy shows that reliable real-world deepfake detection is still unsolved.
git clone https://github.com/barcavia/RealTime-DeepfakeDetection-in-the-RealWorld
cd RealTime-DeepfakeDetection-in-the-RealWorld
virtualenv -p /usr/bin/python3 venv
source venv/bin/activate
pip install -r requirements.txt
We propose to improve deepfake evaluation and align it with real-world settings by introducing WildRF, a realistic benchmark consisting of images sourced from popular social platforms. Specifically, we manually collected real images and fake images using keywords and hashtags associated with the suitable content. Our protocol is to train on one platform (e.g., Reddit) and test the detector on real and fake images from other unseen platforms (e.g., Twitter and Facebook).
WildRF
βββ train
. βββ 0_real
. βββ 1_fake
βββ val
. βββ 0_real
. βββ 1_fake
βββ test
βββ reddit
. βββ 0_real
. βββ 1_fake
βββ twitter
. βββ 0_real
. βββ 1_fake
βββ facebook
. βββ 0_real
. βββ 1_fake
python3 test.py --dataroot {PATH_TO_TEST_SET} --model_path {PATH_TO_CHECKPOINT.pth} --model {LaDeDa/Tiny}
python3 train.py --name LaDeDa --dataroot {PATH_TO_DATASET} --checkpoints_dir {./NAME_OF_CHECKPOINT} --batch_size 32 --lr 0.0002 --delr_freq 10
if training LaDeDa on ForenSynth, you should also add the following arguments:
--classes airplane,bird,bicycle,boat,bottle,bus,car,cat,cow,chair,diningtable,dog,person,pottedplant,motorbike,tvmonitor,train,sheep,sofa,horse
--train_split train/progan --val_split test/progan
python3 extract_patches.py
python3 train_Tiny_LaDeDa.py
Our training pipeline is similar to NPR, UniversalFakeDetect and CNNDetection.
If you find this useful, please cite our paper:
8 commits
Python
100.0%
Real-Time Deepfake Detection in the Real-World
See the codeOfficial Pytorch implementation of Real-Time Deepfake Detection in the Real-World paper.

Real-Time Deepfake Detection in the Real-World
Bar Cavia, Eliahu Horwitz, Tal Reiss, Yedid Hoshen
https://arxiv.org/abs/2406.09398Abstract: Recent improvements in generative AI made synthesizing fake images easy; as they can be used to cause harm, it is crucial to develop accurate techniques to identify them. This paper introduces "Locally Aware Deepfake Detection Algorithm" (LaDeDa), that accepts a single 9x9 image patch and outputs its deepfake score. The image deepfake score is the pooled score of its patches. With merely patch-level information, LaDeDa significantly improves over the state-of-the-art, achieving around 99% mAP on current benchmarks. Owing to the patch-level structure of LaDeDa, we hypothesize that the generation artifacts can be detected by a simple model. We therefore distill LaDeDa into Tiny-LaDeDa, a highly efficient model consisting of only 4 convolutional layers. Remarkably, Tiny-LaDeDa has 375x fewer FLOPs and is 10,000x more parameter-efficient than LaDeDa, allowing it to run efficiently on edge devices with a minor decrease in accuracy. These almost-perfect scores raise the question: is the task of deepfake detection close to being solved? Perhaps surprisingly, our investigation reveals that current training protocols prevent methods from generalizing to real-world deepfakes extracted from social media. To address this issue, we introduce WildRF, a new deepfake detection dataset curated from several popular social networks. Our method achieves the top performance of 93.7% mAP on WildRF, however the large gap from perfect accuracy shows that reliable real-world deepfake detection is still unsolved.
git clone https://github.com/barcavia/RealTime-DeepfakeDetection-in-the-RealWorld
cd RealTime-DeepfakeDetection-in-the-RealWorld
virtualenv -p /usr/bin/python3 venv
source venv/bin/activate
pip install -r requirements.txt
We propose to improve deepfake evaluation and align it with real-world settings by introducing WildRF, a realistic benchmark consisting of images sourced from popular social platforms. Specifically, we manually collected real images and fake images using keywords and hashtags associated with the suitable content. Our protocol is to train on one platform (e.g., Reddit) and test the detector on real and fake images from other unseen platforms (e.g., Twitter and Facebook).
WildRF
βββ train
. βββ 0_real
. βββ 1_fake
βββ val
. βββ 0_real
. βββ 1_fake
βββ test
βββ reddit
. βββ 0_real
. βββ 1_fake
βββ twitter
. βββ 0_real
. βββ 1_fake
βββ facebook
. βββ 0_real
. βββ 1_fake
python3 test.py --dataroot {PATH_TO_TEST_SET} --model_path {PATH_TO_CHECKPOINT.pth} --model {LaDeDa/Tiny}
python3 train.py --name LaDeDa --dataroot {PATH_TO_DATASET} --checkpoints_dir {./NAME_OF_CHECKPOINT} --batch_size 32 --lr 0.0002 --delr_freq 10
if training LaDeDa on ForenSynth, you should also add the following arguments:
--classes airplane,bird,bicycle,boat,bottle,bus,car,cat,cow,chair,diningtable,dog,person,pottedplant,motorbike,tvmonitor,train,sheep,sofa,horse
--train_split train/progan --val_split test/progan
python3 extract_patches.py
python3 train_Tiny_LaDeDa.py
Our training pipeline is similar to NPR, UniversalFakeDetect and CNNDetection.
If you find this useful, please cite our paper:
8 commits
Python
100.0%