Skip to content

Latest commit

 

History

History
81 lines (61 loc) · 3.31 KB

README.md

File metadata and controls

81 lines (61 loc) · 3.31 KB

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 at the previous link, 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 CoDE_model/dataset_paths_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}
}

Acknowledgements

We acknowledge the CINECA award under the ISCRA initiative, for the availability of high-performance computing resources and support. This work has been supported by the Horizon Europe project “European Lighthouse on Safe and Secure AI (ELSA)” (HORIZON-CL4-2021-HUMAN-01-03), co-funded by the European Union.

elsa    europe