Skip to content
/ CoDE Public

[ECCV'24] Contrasting Deepfakes Diffusion via Contrastive Learning and Global-Local Similarities

Notifications You must be signed in to change notification settings

aimagelab/CoDE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CoDE (Contrastive Deepfake Embeddings)

Contrasting Deepfakes Diffusion via Contrastive Learning and Global-Local Similarities

(ECCV 2024)



CoDE

Table of Contents

  1. Training Dataset
  2. Citation

Training Dataset

🎯 Project web page | Paper | Dataset web page | D3 Test Set | 🤗 HuggingFace Dataset | 🤗 HuggingFace Model |

The Diffusion-generated Deepfake Detection (D3) Dataset is a comprehensive collection designed for large-scale deepfake detection. It includes 9.2 million generated images, created using four state-of-the-art diffusion model generators. Each image is generated based on realistic textual descriptions from the LAION-400M dataset.

  • Images: 11.5 million images
  • Records: 2.3 million records
  • Generators: Stable Diffusion 1.4, Stable Diffusion 2.1, Stable Diffusion XL, and DeepFloyd IF
  • Aspect Ratios: 256x256, 512x512, 640x480, 640x360
  • Encodings: BMP, GIF, JPEG, TIFF, PNG

The D3 dataset is part of the European Lighthouse on Secure and Safe AI (ELSA) project, which aims to develop effective solutions for detecting and mitigating the spread of deepfake images in multimedia content.

To try D3 you can access it using

from datasets import load_dataset
elsa_data = load_dataset("elsaEU/ELSA_D3", split="train", streaming=True)

The test set of D3 is available at this link D3 Test Set

Inference

Install the requirements by

pip install requirements.txt

After downloading the test set of D3, you can use the following code to load the dataset and run the inference on the CoDE model.

Substitute the path of the directories in dataset_path_d3.py

cd CoDE_model
python validate_d3.py --classificator_type "linear"
# options for classificator_type are ["linear", "knn", "svm"]

Citation

Please cite with the following BibTeX:

@inproceedings{baraldi2024contrastive,
  title={{Contrasting Deepfakes Diffusion via Contrastive Learning and Global-Local Similarities}},
  author={Baraldi, Lorenzo and Cocchi, Federico and Cornia, Marcella and Baraldi, Lorenzo and Nicolosi, Alessandro and Cucchiara, Rita},
  booktitle={Proceedings of the European Conference on Computer Vision},
  year={2024}
}

About

[ECCV'24] Contrasting Deepfakes Diffusion via Contrastive Learning and Global-Local Similarities

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages