Downloads ยท 30 days
0
Xicor9/efficientnet-b0-ffpp-c23
efficientnet-b0-ffpp-c23 is a image classification model from Xicor9. Use it when you need a label for an image. The card lists the license as mit.
Himanshu Kashyap (Xicor9) MSc Advanced Computer Science University of Strathclyde, Glasgow
Downloads ยท 30 days
0
Access
Public
Updated Nov 13, 2025
Repo size
16.3 MB
Likes
1
Public
Click a slice to open those files.
.pth16.3 MB ยท 100%
From the Hugging Face model README
Himanshu Kashyap (Xicor9)
MSc Advanced Computer Science
University of Strathclyde, Glasgow
This repository contains a fine-tuned EfficientNet-B0 model for deepfake detection trained on the FaceForensics++ (FF++) C23 dataset. The model classifies face images or frames into:
The training data includes multiple manipulation types such as DeepFake, FaceSwap, Face2Face, and NeuralTextures. The model is designed for academic and research use.
| Metric | Score |
|---|---|
| AUC | 0.933 |
| AP | 0.898 |
| Accuracy | 0.852 |
| F1-Score | 0.843 |
(Mean probability across frames)
| Metric | Score |
|---|---|
| AUC | 0.94+ |
| Accuracy | 0.88+ |
Linear(in_features, 2)import torch
import torch.nn as nn
from torchvision import models
device = "cuda" if torch.cuda.is_available() else "cpu"
# Load state dict from Hugging Face
state_dict = torch.hub.load_state_dict_from_url(
"https://huggingface.co/Xicor9/efficientnet-b0-ffpp-c23/resolve/main/efficientnet_b0_ffpp_c23.pth",
map_location=device
)
# Rebuild architecture
model = models.efficientnet_b0(weights=None)
model.classifier[1] = nn.Linear(model.classifier[1].in_features, 2)
model.load_state_dict(state_dict)
model.to(device)
model.eval()
from PIL import Image
from torchvision import transforms
transform = transforms.Compose([
transforms.Resize((224, 224)),
transforms.ToTensor()
])
img = Image.open("frame.jpg").convert("RGB")
x = transform(img).unsqueeze(0).to(device)
with torch.no_grad():
logits = model(x)
prob_fake = torch.softmax(logits, dim=1)[0][1].item()
print("Fake Probability:", prob_fake)
This model was trained on the FaceForensics++ (FF++) C23 dataset.
All videos were converted into frames and resized to 224 ร 224 before training.
This model is designed for:
โ Not intended for real-world forensic, biometric, surveillance, or law-enforcement applications.
This model is released strictly for research and educational purposes only.
Users must ensure compliance with dataset and model licenses before use.