Views
No views yet
| Metric | Value |
|---|---|
| Accuracy | 0.923 |
| Real precision / recall | 0.88 / 0.99 |
| AI precision / recall | 0.98 / 0.86 |
google/vit-base-patch16-224Rajarshi-Roy-research/Defactify_Image_Dataset (Defactify Challenge @ AAAI),
rebalanced 50/50 by undersampling the AI class stratified across the 5 generators.1from transformers import AutoImageProcessor, AutoModelForImageClassification
2from PIL import Image
3import torch
4
5processor = AutoImageProcessor.from_pretrained("delpot/steganograph-ia-detector")
6model = AutoModelForImageClassification.from_pretrained("delpot/steganograph-ia-detector")
7
8image = Image.open("path/to/image.jpg").convert("RGB")
9inputs = processor(image, return_tensors="pt")
10
11with torch.no_grad():
12 logits = model(**inputs).logits
13
14predicted = logits.argmax(-1).item()
15print(model.config.id2label[predicted])