uoft-cs/cifar10
Viewer • Updated • 60k • 126k • 105
State-of-the-art ensemble model combining Deep SVDD + Autoencoder for deepfake detection with 77.5% accuracy and 88.75% recall.
This ensemble combines two complementary anomaly detection approaches:
Each model has 50% voting weight, and scores are averaged with an optimized threshold.
Evaluated on 800 test images (CIFAR-10 vs MNIST, CIFAR-10 vs Fashion-MNIST):
| Metric | Value |
|---|---|
| Accuracy | 77.50% |
| Precision | 72.22% |
| Recall | 88.75% 🎯 |
| F1 Score | 79.46% |
| Model Agreement | 53.00% |
Key Strength: 88.75% recall means it catches nearly 9 out of 10 fakes!
from ensemble_model import EnsembleDeepfakeDetector
# Load ensemble (downloads both models automatically)
detector = EnsembleDeepfakeDetector.from_pretrained()
# Predict on image
score, is_fake = detector.predict('image.jpg')
print(f"Deepfake Score: {score:.4f}")
print(f"Is Fake: {is_fake}")
pip install torch torchvision huggingface-hub pillow
The ensemble uses an optimized threshold of 0.1163 by default:
# Use different thresholds
detector.set_threshold(0.1163) # Optimal (default) - 88.75% recall
detector.set_threshold(0.5) # Conservative - fewer false positives
detector.set_threshold(0.05) # Sensitive - catch even more fakes
Threshold Comparison:
| Threshold | Accuracy | Precision | Recall | Use Case |
|---|---|---|---|---|
| 0.1163 (optimal) | 77.5% | 72.2% | 88.8% | Recommended - Best balance |
| 0.5 (conservative) | 66.9% | 73.1% | 47.5% | Minimize false alarms |
| 0.05 (sensitive) | ~70% | ~65% | ~95% | Maximum detection |
This ensemble uses:
Low Model Agreement (53%) indicates the models detect different anomaly types - this is a strength!
@misc{ensemble-deepfake-detector,
title={Ensemble Deepfake Detector},
author={ash12321},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/ash12321/deepfake-ensemble-detector}
}
Apache 2.0