Downloads · 30 days
213
33% of all-time downloads
Arko007/deepfake-image-detector
deepfake-image-detector is a image classification model from Arko007. Use it when you need a label for an image. It is set up for timm. The card lists the license as apache-2.0.
Model repository: https://huggingface.co/Arko007/deepfake-image-detector
Downloads · 30 days
213
33% of all-time downloads
All-time downloads
650
Public
Repo size
627 MB
Likes
1
Public
Click a slice to open those files.
.bin89.5 MB · 100%
From the Hugging Face model README
Model repository: https://huggingface.co/Arko007/deepfake-image-detector
This repository contains a pretrained deepfake image detector intended for research and experimentation. The model was provided as a PyTorch checkpoint and a small Colab-friendly inference script. The original training code and full training logs are not available; the best available evaluation result from the retained artifacts is included below.
This model predicts whether an input face/image is likely a manipulated/deepfake (label = FAKE) or a real image (label = REAL). Intended uses include:
Not intended for:
A minimal example of the config.json that pairs with pytorch_model.bin:
{ "model_name": "tf_efficientnetv2_s", "image_size": 380, "epoch": 6, "notes": "Only a single evaluation snapshot remains. Training artifacts incomplete." }
The repository includes a simple Colab-ready script deepfake_detector.py which implements:
High-level steps to run inference:
Install dependencies (example): pip install torch torchvision timm albumentations pillow huggingface-hub matplotlib
Download the model files from the Hub (the script calls huggingface_hub.hf_hub_download).
Run the included script in Colab or locally:
Example minimal inference snippet (matches the repository script):
import torch
import cv2
from PIL import Image
from deepfake_detector import DeepfakeDetector, TestConfig, get_inference_transform, load_model, predict_deepfake
# load model (downloads checkpoint via hf_hub_download inside)
model = load_model() # returns a model already set to eval on TestConfig.DEVICE
transform = get_inference_transform(TestConfig.IMAGE_SIZE)
is_fake, prob, confidence = predict_deepfake(model, "example.jpg", transform)
print(f"Prediction: {'FAKE' if is_fake else 'REAL'}")
print(f"Probability (fake): {prob:.4f}, Confidence: {confidence:.4f}")
Deepfake detection models have social impact. Use responsibly:
Model owner: Arko007
HF model page: https://huggingface.co/Arko007/deepfake-image-detector
If you have additional training artifacts (logs, dataset details, training script), please add them to the repository to improve reproducibility and transparency.