alt.freeweights.vision / Deep-Fake-Detector-v2-Model
From: prithivMLmods <huggingface.co/prithivMLmods>Newsgroups: alt.freeweights.visionSubject:

Deep-Fake-Detector-v2-Model

Date: 2026-11-15Commit: 3a99ae2Signed: 2DC28CC7B26A283B ✓

Image classification model with 86M parameters. Safetensors weights, 1.37 GB in all. Published by prithivMLmods under Apache-2.0.

86M params1.37GBDeep-Fake-Detector-v2-Modelsafetensorspermissive
FactsParams86MSize1.37 GBFormatssafetensorsTaskimage classificationLicenseApache-2.0From sourcepermissive
$ fw get prithivMLmods/Deep-Fake-Detector-v2-Model
# manifest sha256 9161c2c6ffd7… · 1.37 GB · 15 files
$ fw verify ./Deep-Fake-Detector-v2-Model prithivMLmods/Deep-Fake-Detector-v2-Model
From sourceHosted (signed)prithivMLmods/Deep-Fake-Detector-v2-ModelLast check: 2026-11-15 02:51 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Fine-tune of vit-base-patch16-224-in21k.

Overview

Size
1.37 GB
Weights
686 MB (safetensors)
Parameters
86M
Formats
safetensors
Task
image classification
License
Apache-2.0 (permissive)
Files
15, each with a sha256
Publisher
prithivMLmods
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Base model: google/vit-base-patch16-224-in21k

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 02:51 UTCpassed

Model card

From the publisher at commit 3a99ae2. Shown as plain text with links; images open at the publisher.

Image: fake q.gif

Deep-Fake-Detector-v2-Model#

Overview#

The Deep-Fake-Detector-v2-Model is a state-of-the-art deep learning model designed to detect deepfake images. It leverages the Vision Transformer (ViT) architecture, specifically the google/vit-base-patch16-224-in21k model, fine-tuned on a dataset of real and deepfake images. The model is trained to classify images as either "Realism" or "Deepfake" with high accuracy, making it a powerful tool for detecting manipulated media.

Classification report:

              precision    recall  f1-score   support

     Realism     0.9683    0.8708    0.9170     28001
    Deepfake     0.8826    0.9715    0.9249     28000

    accuracy                         0.9212     56001
   macro avg     0.9255    0.9212    0.9210     56001
weighted avg     0.9255    0.9212    0.9210     56001

Confusion Matrix:

  [[True Positives, False Negatives],
   [False Positives, True Negatives]]

Image: download.png

Update : The previous model checkpoint was obtained using a smaller classification dataset. Although it performed well in evaluation scores, its real-time performance was average due to limited variations in the training set. The new update includes a larger dataset to improve the detection of fake images.

RepositoryLink
Deep Fake Detector v2 ModelGitHub Repository

Key Features#

  • Architecture: Vision Transformer (ViT) - google/vit-base-patch16-224-in21k.
  • Input: RGB images resized to 224x224 pixels.
  • Output: Binary classification ("Realism" or "Deepfake").
  • Training Dataset: A curated dataset of real and deepfake images.
  • Fine-Tuning: The model is fine-tuned using Hugging Face's Trainer API with advanced data augmentation techniques.
  • Performance: Achieves high accuracy and F1 score on validation and test datasets.

Model Architecture#

The model is based on the Vision Transformer (ViT), which treats images as sequences of patches and applies a transformer encoder to learn spatial relationships. Key components include:

  • Patch Embedding: Divides the input image into fixed-size patches (16x16 pixels).
  • Transformer Encoder: Processes patch embeddings using multi-head self-attention mechanisms.
  • Classification Head: A fully connected layer for binary classification.

Training Details#

  • Optimizer: AdamW with a learning rate of 1e-6.
  • Batch Size: 32 for training, 8 for evaluation.
  • Epochs: 2.
  • Data Augmentation:
    • Random rotation (±90 degrees).
    • Random sharpness adjustment.
    • Random resizing and cropping.
  • Loss Function: Cross-Entropy Loss.
  • Evaluation Metrics: Accuracy, F1 Score, and Confusion Matrix.

Inference with Hugging Face Pipeline#

from transformers import pipeline

# Load the model
pipe = pipeline('image-classification', model="prithivMLmods/Deep-Fake-Detector-v2-Model", 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/Deep-Fake-Detector-v2-Model")
processor = ViTImageProcessor.from_pretrained("prithivMLmods/Deep-Fake-Detector-v2-Model")

# Load and preprocess the image
image = Image.open("path_to_image.jpg").convert("RGB")
inputs = processor(images=image, return_tensors="pt")

# Perform inference
with 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}")

Dataset#

The model is fine-tuned on the dataset, which contains:

  • Real Images: Authentic images of human faces.
  • Fake Images: Deepfake images generated using advanced AI techniques.

Limitations#

The model is trained on a specific dataset and may not generalize well to other deepfake datasets or domains.

  • Performance may degrade on low-resolution or heavily compressed images.
  • The model is designed for image classification and does not detect deepfake videos directly.

Ethical Considerations#

Misuse: This model should not be used for malicious purposes, such as creating or spreading deepfakes. Bias: The model may inherit biases from the training dataset. Care should be taken to ensure fairness and inclusivity. Transparency: Users should be informed when deepfake detection tools are used to analyze their content.

Future Work#

  • Extend the model to detect deepfake videos.
  • Improve generalization by training on larger and more diverse datasets.
  • Incorporate explainability techniques to provide insights into model predictions.

Citation#

@misc{Deep-Fake-Detector-v2-Model,
  author = {prithivMLmods},
  title = {Deep-Fake-Detector-v2-Model},
  initial = {21 Mar 2024},
  second_updated = {31 Jan 2025},
  latest_updated = {02 Feb 2025}
}

Files

15 files · 1.37 GBWeights 686 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 15 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md5.68 KB2ed72ceae5900d3356cd86b995337d2bdd96fce3c1e1435279cbe17b3ebbde9f
checkpoint-5252/config.json738 Bb2a87a8b9c4fedab5ba35c3cd4cb3b3ba927c595c356a4897c7bd7713ea25565
checkpoint-5252/model.safetensors343 MB88ac0939285009e3700cfc9b9a0912b14b092d200ef0df86efe4f2cf190ea4de
checkpoint-5252/optimizer.pt687 MB153aa259991e716cdd80eb64b8e893699d2b7918922e047777037df4359701fe
checkpoint-5252/preprocessor_config.json351 B445c77049d082004aa07593344d5e1f521f1198228bf586196f70ce7ae021414
checkpoint-5252/rng_state.pth14.2 KBf3616591574c0816a5b6e91268bf6c52243eb9267b149460ada41cf03819730e
checkpoint-5252/scheduler.pt1.06 KBee8086db50b520b9f2e97607eeb75dd66111eaca904ca2be391171cd3e5fc881
checkpoint-5252/trainer_state.json3.12 KBa503cc935f087793037de99699ae2bbc25a21be65dfc4b1bb7364c8787bff627
checkpoint-5252/training_args.bin5.30 KBe1d307efe97ad2b950b19663fa919e3bbd423f67768eda34dea61ffcd126e8a4
config.json738 Bb2a87a8b9c4fedab5ba35c3cd4cb3b3ba927c595c356a4897c7bd7713ea25565
model.safetensors343 MB88ac0939285009e3700cfc9b9a0912b14b092d200ef0df86efe4f2cf190ea4de
preprocessor_config.json351 B445c77049d082004aa07593344d5e1f521f1198228bf586196f70ce7ae021414
script/deepfake_vit.ipynb436 KBe41bbbddc5ac665545d659064cc24142d8e4af337200000dd8745d09c933a2d5
training_args.bin5.30 KBe1d307efe97ad2b950b19663fa919e3bbd423f67768eda34dea61ffcd126e8a4
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
3a99ae26f5 pinned now2026-11-15 02:51 UTC15 files · 1.37 GB

Use it

$ fw get prithivMLmods/Deep-Fake-Detector-v2-Model
# manifest sha256 9161c2c6ffd7… · 1.37 GB · 15 files
$ fw verify ./Deep-Fake-Detector-v2-Model prithivMLmods/Deep-Fake-Detector-v2-Model
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/prithivMLmods/Deep-Fake-Detector-v2-Model.json --dir ./Deep-Fake-Detector-v2-Model $ python3 fw.py verify ./Deep-Fake-Detector-v2-Model ./prithivMLmods__Deep-Fake-Detector-v2-Model.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download prithivMLmods/Deep-Fake-Detector-v2-Model --revision 3a99ae26f52c7ac7c3a53103b6cf3a8b617f7093 --local-dir ./Deep-Fake-Detector-v2-Model

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
2ed72ceae5900d3356cd86b995337d2bdd96fce3c1e1435279cbe17b3ebbde9f
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: prithivMLmods <huggingface.co/prithivMLmods>Newsgroups: alt.freeweights.visionSubject: Deep-Fake-Detector-v2-ModelDate: 2026-11-15Commit: 3a99ae2Signed: 2DC28CC7B26A283B ✓
Upstream
prithivMLmods/Deep-Fake-Detector-v2-Model
Pinned commit
3a99ae26f52c7ac7c3a53103b6cf3a8b617f7093
Manifest
Deep-Fake-Detector-v2-Model.json · .minisig
Manifest sha256
9161c2c6ffd7d625931a9cc377d6726b758b922caca5c8078a86d57309e9c47b
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:51 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/prithivMLmods/Deep-Fake-Detector-v2-Model.json $ curl -O https://freeweights.allternit.com/manifests/prithivMLmods/Deep-Fake-Detector-v2-Model.json.minisig $ minisign -Vm Deep-Fake-Detector-v2-Model.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

google/vit-base-patch16-224-in21k · this model is a finetune of it

1 model in the catalog name this one as their parent.

Quantizations
1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download prithivMLmods/Deep-Fake-Detector-v2-Model
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. Deep-Fake-Detector-v2-Model.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of Deep-Fake-Detector-v2-Model. Each has its own license check and page.

From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX