Skip to content
ModelListedExternal
Browse files

Deepfake Detection Cifake

Trained checkpoints for a deepfake image detection project using a hybrid Vision Transformer + DCT frequency-domain architecture.

KindOtherVersionRevision f71d36fCgrade

Model source

Kind
Other
File size
507 KB–330 MB
Version
vRevision f71d36f
Updated
Sep 17, 2026
Downloads
0
Source
Hugging Face

Source description

Deepfake Detection — Hybrid ViT + DCT (CIFAKE)

Trained checkpoints for a deepfake image detection project using a hybrid Vision Transformer + DCT frequency-domain architecture.

Models

CheckpointArchitectureTest AccTest AUC-ROC
baseline_resnet50_best.ptResNet-50 (fine-tuned)——
baseline_efficientnet_b4_best.ptEfficientNet-B4 (fine-tuned)——
dct_only_main_best.ptDCT-only CNN——
hybrid_main_best.ptHybrid ViT-B/16 + DCT——

Dataset

CIFAKE: Real and AI-Generated Synthetic Images — 60K real (CIFAR-10) + 60K Stable Diffusion generated images.

Usage

import torch
from models.baseline_cnn import ResNet50Classifier

model = ResNet50Classifier(pretrained=False)
model.load_state_dict(torch.load("baseline_resnet50_best.pt", map_location="cpu"))
model.eval()

Architecture

  • ViT branch: vit_base_patch16_224 (timm), CLS token → 768-dim
  • DCT branch: Block-wise 2D DCT on 8×8 tiles → small CNN → 256-dim
  • Fusion: concat(1024) → LayerNorm → Linear(512) → GELU → Dropout(0.3) → Linear(1)

Sources

1 source
Hugging FacePrimaryVersion f71d36f23506a9313211e322b0c7349c2de47556
huggingface.co/semir-b/deepfake-detection-cifake/tree/f71d36f23506a9313211e322b0c7349c2de47556

Verified Sep 2

Download files

Model artifacts

4 artifacts

baseline_efficientnet_b4_best.pt

pt · 67.7 MB · SHA-256 36c69c07aa5c…c29a · Hugging Face

Download file

baseline_resnet50_best.pt

pt · 90.0 MB · SHA-256 c307794464cc…fa0b · Hugging Face

Download file

dct_only_main_best.pt

pt · 507 KB · SHA-256 e475d3847810…48a1 · Hugging Face

Download file

hybrid_main_best.pt

pt · 330 MB · SHA-256 bac56bc5dde6…4572 · Hugging Face

Download file

Source excerpts

2 excerpts

--- license: mit tags: - deepfake-detection - image-classification - vision-transformer - dct - pytorch datasets: - birdy654/cifake-real-and-ai-generated-synthetic-images --- # Deepfake Detection — Hybrid ViT + DCT (CIFAKE) Trained checkpoints for a deepfake image detection project using a hybrid Vision Transformer + DCT frequency-domain architecture. ## Models | Checkpoint | Architecture | Test Acc | Test AUC-ROC | |---|---|---|---| | `baseline_resnet50_best.pt` | ResNet-50 (fine-tuned) | — | — | | `baseline_efficientnet_b4_best.pt` | EfficientNet-B4 (fine-tuned) | — | — | | `dct_only_main_best.pt` | DCT-only CNN | — | — | | `hybrid_main_best.pt` | Hybrid ViT-B/16 + DCT | — | — | ## Dataset [CIFAKE: Real and AI-Generated Synthetic Images](https://www.kaggle.com/datasets/birdy654/cifake-real-and-ai-generated-synthetic-images) — 60K real (CIFAR-10) + 60K Stable Diffusion generated images. ## Usage ```python import torch from models.baseline_cnn import ResNet50Classifier model = ResNet50Classifier(pretrained=False) model.load_state_dict(torch.load("baseline_resnet50_best.pt", map_location="cpu")) model.eval() ``` ## Architecture - **ViT branch**: `vit_base_patch16_224` (timm), CLS token → 768-dim - **DCT branch**: Block-wise 2D DCT on 8×8 tiles → small CNN → 256-dim - **Fusion**: concat(1024) → LayerNorm → Linear(512) → GELU → Dropout(0.3) → Linear(1)

Source context: 0 downloads · 0 likes · Pipeline image-classification · Repo semir-b/deepfake-detection-cifake