Deepfake Detection that Generalizes Across Benchmarks (WACV 2026)

arXiv Badge GitHub Badge

This is the GenD (CLIP) model from Tab. 2 in the paper.

Set up environment

conda create --name GenD python=3.12 uv
conda activate GenD
uv pip install -r requirements.txt

Usage

import requests
import torch
from PIL import Image

from src.hf.modeling_gend import GenD

model = GenD.from_pretrained("yermandy/GenD_CLIP_L_14")

urls = [
    "https://github.com/yermandy/deepfake-detection/blob/main/datasets/FF/DF/000_003/000.png?raw=true",
    "https://github.com/yermandy/deepfake-detection/blob/main/datasets/FF/real/000/000.png?raw=true",
]
images = [Image.open(requests.get(url, stream=True).raw) for url in urls]
tensors = torch.stack([model.feature_extractor.preprocess(img) for img in images])
logits = model(tensors)
probs = logits.softmax(dim=-1)

print(probs)
Downloads last month
11,969
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including yermandy/GenD_CLIP_L_14