Example

from transformers import AutoImageProcessor, Dinov2WithRegistersForImageClassification
import torch
import numpy as np
from PIL import Image
import os
import pandas as pd

image_processor = AutoImageProcessor.from_pretrained('WpythonW/dinoV2-deepfake-detector')
model = Dinov2WithRegistersForImageClassification.from_pretrained("WpythonW/dinoV2-deepfake-detector")
model.config.id2label = {0: "FAKE", 1: "REAL"}
model.config.label2id = {"FAKE": 0, "REAL": 1}

real = Image.open('real.jpg')
fake = Image.open('fake1.png')

inputs = image_processor([real, fake], return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits
Downloads last month
45
Safetensors
Model size
22.1M params
Tensor type
F32
·
Inference Providers NEW
This model is not currently available via any of the supported third-party Inference Providers, and HF Inference API was unable to determine this model's library.

Model tree for WpythonW/dinoV2-deepfake-detector

Finetuned
(1)
this model