ONNX Model Zoo

pranjal-pravesh/prithivML-deepfake-detector-model-v1

By pranjal-pravesh · ↓ 0 · ♥ 0 · Updated 2026-03-06

What's in this repo

This page lists the files in pranjal-pravesh/prithivML-deepfake-detector-model-v1, including deepfake_detector_v1.onnx.

  • 1 ONNX models (.onnx files)
  • 3 files, including 1 .md, 1 .onnx
  • Last updated 2026-03-06

ONNX files

File Size Download
deepfake_detector_v1.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Deepfake Detector - ONNX Version

This repository contains the ONNX-optimized version of prithivMLmods/deepfake-detector-model-v1. It is a vision-based deepfake detection model built on the SigLIP architecture (SiglipForImageClassification).

Model Details

  • Model Type: Image Classification
  • Backbone: SigLIP (Signal-Language Image Pre-training)
  • Format: ONNX (Open Neural Network Exchange)
  • File Size: ~327.5 MB
  • Precision: FP32
  • Input Size: 224x224
  • Labels:
    • 0: Fake
    • 1: Real

Inference with ONNX Runtime

To run this model, you will need onnxruntime and numpy. If you want to use the standard SigLIP preprocessing, the transformers library's AutoImageProcessor is recommended.

Installation

pip install onnxruntime numpy Pillow transformers

Python Example

import onnxruntime as ort
import numpy as np
from PIL import Image
from transformers import AutoImageProcessor

# 1. Load the model and processor
model_path = "deepfake_detector_v1.onnx"
# You can load the processor from the original repo
processor = AutoImageProcessor.from_pretrained("prithivMLmods/deepfake-detector-model-v1")
session = ort.InferenceSession(model_path, providers=["CPUExecutionProvider"])

# 2. Prepare the image
image = Image.open("path_to_your_image.jpg").convert("RGB")
inputs = processor(images=image, return_tensors="np")
pixel_values = inputs["pixel_values"]

# 3. Run inference
outputs = session.run(["logits"], {"pixel_values": pixel_values})
logits = outputs[0]

# 4. Interpret results
probs = np.exp(logits) / np.sum(np.exp(logits), axis=-1, keepdims=True)
predicted_class = np.argmax(probs, axis=-1)[0]

id2label = {0: "Fake", 1: "Real"}
print(f"Prediction: {id2label[predicted_class]}")
print(f"Confidence: {probs[0][predicted_class]:.4f}")

Model Specification

Inputs

  • Name: pixel_values
  • Shape: (batch_size, 3, 224, 224)
  • Type: float32
  • Normalization: Standard SigLIP normalization (rescale 1/255, mean 0.5, std 0.5)

Outputs

  • Name: logits
  • Shape: (batch_size, 2)
  • Type: float32

Export Details

The model was exported using torch.onnx.export with opset 17. It features dynamic batch size support for the first dimension of input and output.


license: mit

Model info

onnx deepfake detection vision siglip onnx-runtime image-classification license:apache-2.0 region:us
↓ 0 ♥ 0

Created: 2026-03-06

Updated: 2026-03-06

View on Hugging Face

Files (3)

.gitattributes
README.md
deepfake_detector_v1.onnx ONNX

Related models