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

Deep-Fake-Detector-v2-Model-ONNX

Date: 2026-11-15Commit: 4ea3d66Signed: 2DC28CC7B26A283B ✓

Image classification model. Onnx weights, 935 MB in all. Published by onnx-community under Apache-2.0.

vision935MBDeep-Fake-Detector-v2-Model-ONNXonnxpermissive
FactsParamsnot statedSize935 MBFormatsonnxTaskimage classificationLicenseApache-2.0From sourcepermissive
$ fw get onnx-community/Deep-Fake-Detector-v2-Model-ONNX
# manifest sha256 fd01527ccf11… · 935 MB · 13 files
$ fw verify ./Deep-Fake-Detector-v2-Model-ONNX onnx-community/Deep-Fake-Detector-v2-Model-ONNX
From sourceHosted (signed)onnx-community/Deep-Fake-Detector-v2-Model-ONNXLast check: 2026-11-15 05:12 UTC

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

Quantized of Deep-Fake-Detector-v2-Model.

Works with

Runs with

Ranked by fit to this model (onnx), then by GitHub stars.

Convert with

Scan with

Overview

Size
935 MB
Weights
49.7 MB (smallest of 8 ONNX variants)
Parameters
not stated
Formats
onnx
Task
image classification
License
Apache-2.0 (permissive)
Files
13, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Base model: prithivMLmods/Deep-Fake-Detector-v2-Model

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 05:12 UTCpassed

Model card

From the publisher at commit 4ea3d66. Shown as plain text with links; images open at the publisher.

Deep-Fake-Detector-v2-Model (ONNX)#

This is an ONNX version of prithivMLmods/Deep-Fake-Detector-v2-Model. It was automatically converted and uploaded using this Hugging Face Space.

Usage with Transformers.js#

See the pipeline documentation for image-classification: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.ImageClassificationPipeline


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

13 files · 935 MBWeights 49.7 MB (smallest of 8 ONNX variants). Sizes and sha256 from the signed manifest.
Hide all 13 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md6.22 KBd6aa7b277ea93b9b656132053d3bc8178f7f440e1281ff4f6a0ac73eee43178d
config.json781 Bd4de7306401cddb6101a46c48d167f9d7bae0ce065e28fae2693c983797e64c8
onnx/model.onnx343 MB2e0662a81744aca769e240fd1daa3f44225c50d0565fd8fb8f702d1f26609c91
onnx/model_bnb4.onnx51.5 MBcafa8f6543f2892d7d63263c5484077b5416bf7507b4e5eb7a42f7ee7637b442
onnx/model_fp16.onnx172 MB07eee7514086ff66fdec3e3f55155e76cdb8e00a788c185e4c95d58040811191
onnx/model_int8.onnx87.3 MBd8238e449fc640c2f0959e36e8aa778bd006065c0a8af4c7f6f54c8be9c9d9e4
onnx/model_q4.onnx56.8 MBe239476e94466b225d490147c2f3c1ea64e969f0e09ae4f772e15a16d8e393a9
onnx/model_q4f16.onnx49.7 MBd3ac808c1e632abe7d62160e67db63d10f6a952ebc0507cf3b6d5cd0de4a2594
onnx/model_quantized.onnx87.3 MB3519c22b9695f99ddc00821228eeac91239065a90bfbdb4917858b3ec1dcfc42
onnx/model_uint8.onnx87.3 MB3519c22b9695f99ddc00821228eeac91239065a90bfbdb4917858b3ec1dcfc42
preprocessor_config.json353 Bae9bb157b9629887cc74913a4e7c12c9308f374f0930e8072320e8f2e1583c5e
quantize_config.json310 B9b60b5877b9a1687b5cddbc06124a974cb7536af9dbf5295279bf73c3823170c
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
4ea3d66dfb pinned now2026-11-15 05:12 UTC13 files · 935 MB

Use it

$ fw get onnx-community/Deep-Fake-Detector-v2-Model-ONNX
# manifest sha256 fd01527ccf11… · 935 MB · 13 files
$ fw verify ./Deep-Fake-Detector-v2-Model-ONNX onnx-community/Deep-Fake-Detector-v2-Model-ONNX
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/onnx-community/Deep-Fake-Detector-v2-Model-ONNX.json --dir ./Deep-Fake-Detector-v2-Model-ONNX $ python3 fw.py verify ./Deep-Fake-Detector-v2-Model-ONNX ./onnx-community__Deep-Fake-Detector-v2-Model-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/Deep-Fake-Detector-v2-Model-ONNX --revision 4ea3d66dfb1bedca29727c6a0c6fa061d5f3f9c9 --local-dir ./Deep-Fake-Detector-v2-Model-ONNX

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
d6aa7b277ea93b9b656132053d3bc8178f7f440e1281ff4f6a0ac73eee43178d
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: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject: Deep-Fake-Detector-v2-Model-ONNXDate: 2026-11-15Commit: 4ea3d66Signed: 2DC28CC7B26A283B ✓
Upstream
onnx-community/Deep-Fake-Detector-v2-Model-ONNX
Pinned commit
4ea3d66dfb1bedca29727c6a0c6fa061d5f3f9c9
Manifest
Deep-Fake-Detector-v2-Model-ONNX.json · .minisig
Manifest sha256
fd01527ccf11319942da0864cb94331c0b98ad9af1290a26ba9f28801a413891
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:12 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/Deep-Fake-Detector-v2-Model-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/Deep-Fake-Detector-v2-Model-ONNX.json.minisig $ minisign -Vm Deep-Fake-Detector-v2-Model-ONNX.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

prithivMLmods/Deep-Fake-Detector-v2-Model · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/Deep-Fake-Detector-v2-Model-ONNX
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-ONNX.json. Provenance. Takedown history: none.
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