
Classification model used to classify real images and AI generated images.\
The model used is swin-tiny-patch4-window7-224 finetued on aiornot dataset.\
To use the model
```
import torch
from transformers import AutoFeatureExtractor, AutoModelForImageClassification

labels = ["Real", "AI"]
feature_extractor = AutoFeatureExtractor.from_pretrained("Nahrawy/AIorNot")
model = AutoModelForImageClassification.from_pretrained("Nahrawy/AIorNot")

input = feature_extractor(image, return_tensors="pt")
with torch.no_grad():
  outputs = model(**input)
  logits = outputs.logits
prediction = logits.argmax(-1).item()
label = labels[prediction] 
```
{"language": ["en"], "license": "apache-2.0", "tags": ["generative ai", "classification"], "datasets": ["competitions/aiornot"], "metrics": ["accuracy"]}
transformers pytorch swin image-classification generative ai classification en dataset:competitions/aiornot license:apache-2.0 autotrain_compatible endpoints_compatible has_space region:us
TAGS
#transformers #pytorch #swin #image-classification #generative ai #classification #en #dataset-competitions/aiornot #license-apache-2.0 #autotrain_compatible #endpoints_compatible #has_space #region-us 


Classification model used to classify real images and AI generated images.\
The model used is swin-tiny-patch4-window7-224 finetued on aiornot dataset.\
To use the model

TAGS
#transformers #pytorch #swin #image-classification #generative ai #classification #en #dataset-competitions/aiornot #license-apache-2.0 #autotrain_compatible #endpoints_compatible #has_space #region-us 

TAGS
#transformers #pytorch #swin #image-classification #generative ai #classification #en #dataset-competitions/aiornot #license-apache-2.0 #autotrain_compatible #endpoints_compatible #has_space #region-us 
