ai-source-detector (ONNX)

This is an ONNX version of yaya36095/ai-source-detector. 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


AI Source Detector (ViT-Base)

Detects and classifies the source of AI-generated images into five classes
(stable_diffusion, midjourney, dalle, real, other_ai).

Model Details

  • Architecture: ViT-Base Patch-16 ร— 224
  • Parameters: 86 M
  • Fine-tuning epochs: 10
  • Optimizer: AdamW (lr = 3e-5, wd = 0.01)
  • Hardware: 1ร— NVIDIA RTX 4090 (24 GB)

Training Data

Class Images
Stable Diffusion 12 000
Midjourney 10 500
DALL-E 3 9 400
Real 11 800
Other AI 8 200

Total โ‰ˆ 52 k images - 80 % train / 10 % val / 10 % test.

Evaluation

Metric Top-1 Macro F1
Validation 92.8 % 0.928
Test 91.6 % 0.914
Confusion Matrix (click to open)

Usage

from transformers import ViTImageProcessor, ViTForImageClassification, pipeline
classifier = pipeline(
    task="image-classification",
    model="yaya36095/ai-source-detector",
    top_k=1
)
classifier("demo.jpg")
# โ†’ [{'label': 'stable_diffusion', 'score': 0.97}]
Downloads last month
14
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for onnx-community/ai-source-detector-ONNX

Quantized
(1)
this model