Deepfake-Detection-Exp-02-22 is a minimalist, high-quality dataset trained on a ViT-based model for image classification, distinguishing between deepfake and real images. The model is based on Google's
google/vit-base-patch32-224-in21k
.
Mapping of IDs to Labels: {0: 'Deepfake', 1: 'Real'}
Mapping of Labels to IDs: {'Deepfake': 0, 'Real': 1}
Classification report:
precision recall f1-score support
Deepfake 0.98330.91870.94991600
Real 0.92380.98440.95311600
accuracy 0.95163200
macro avg 0.95350.95160.95153200
weighted avg 0.95350.95160.95153200
Inference with Hugging Face Pipeline
from transformers import pipeline
# Load the model
pipe = pipeline('image-classification', model="prithivMLmods/Deepfake-Detection-Exp-02-22", device=0)
# Predict on an image
result = pipe("path_to_image.jpg")
print(result)
Inference with PyTorch
from transformers import ViTForImageClassification, ViTImageProcessor
from PIL import Image
import torch
# Load the model and processor
model = ViTForImageClassification.from_pretrained("prithivMLmods/Deepfake-Detection-Exp-02-22")
processor = ViTImageProcessor.from_pretrained("prithivMLmods/Deepfake-Detection-Exp-02-22")
# Load and preprocess the image
image = Image.open("path_to_image.jpg").convert("RGB")
inputs = processor(images=image, return_tensors="pt")
# Perform inferencewith torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
predicted_class = torch.argmax(logits, dim=1).item()
# Map class index to label
label = model.config.id2label[predicted_class]
print(f"Predicted Label: {label}")
Limitations
Generalization Issues
– The model may not perform well on deepfake images generated by unseen or novel deepfake techniques.
Dataset Bias
– The training data might not cover all variations of real and fake images, leading to biased predictions.
Resolution Constraints
– Since the model is based on
vit-base-patch32-224-in21k
, it is optimized for 224x224 image resolution, which may limit its effectiveness on high-resolution images.
Adversarial Vulnerabilities
– The model may be susceptible to adversarial attacks designed to fool vision transformers.
False Positives & False Negatives
– The model may occasionally misclassify real images as deepfake and vice versa, requiring human validation in critical applications.
Intended Use
Deepfake Detection
– Designed for identifying deepfake images in media, social platforms, and forensic analysis.
Research & Development
– Useful for researchers studying deepfake detection and improving ViT-based classification models.
Content Moderation
– Can be integrated into platforms to detect and flag manipulated images.
Security & Forensics
– Assists in cybersecurity applications where verifying the authenticity of images is crucial.
Educational Purposes
– Can be used in training AI practitioners and students in the field of computer vision and deepfake detection.
Runs of prithivMLmods Deepfake-Detection-Exp-02-22 on huggingface.co
2.3K
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About Deepfake-Detection-Exp-02-22 huggingface.co Model
More Deepfake-Detection-Exp-02-22 license Visit here:
Deepfake-Detection-Exp-02-22 huggingface.co is an AI model on huggingface.co that provides Deepfake-Detection-Exp-02-22's model effect (), which can be used instantly with this prithivMLmods Deepfake-Detection-Exp-02-22 model. huggingface.co supports a free trial of the Deepfake-Detection-Exp-02-22 model, and also provides paid use of the Deepfake-Detection-Exp-02-22. Support call Deepfake-Detection-Exp-02-22 model through api, including Node.js, Python, http.
Deepfake-Detection-Exp-02-22 huggingface.co is an online trial and call api platform, which integrates Deepfake-Detection-Exp-02-22's modeling effects, including api services, and provides a free online trial of Deepfake-Detection-Exp-02-22, you can try Deepfake-Detection-Exp-02-22 online for free by clicking the link below.
prithivMLmods Deepfake-Detection-Exp-02-22 online free url in huggingface.co:
Deepfake-Detection-Exp-02-22 is an open source model from GitHub that offers a free installation service, and any user can find Deepfake-Detection-Exp-02-22 on GitHub to install. At the same time, huggingface.co provides the effect of Deepfake-Detection-Exp-02-22 install, users can directly use Deepfake-Detection-Exp-02-22 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Deepfake-Detection-Exp-02-22 install url in huggingface.co: