File size: 1,432 Bytes
3b500ef | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | ---
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)
|