Downloads · 30 days
18
4% of all-time downloads
boluobobo/ItsNotAI-ai-detector-v1
ItsNotAI-ai-detector-v1 is a image classification model from boluobobo. Use it when you need a label for an image. It is set up for transformers. The card lists the license as apache-2.0.
Detect AI-generated images | Identify the AI generator | Verify human-made artwork
Downloads · 30 days
18
4% of all-time downloads
All-time downloads
411
Public
Parameters
303M
2.4 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors1.2 GB · 100%
From the Hugging Face model README
Detect AI-generated images | Identify the AI generator | Verify human-made artwork
A Vision Transformer model that detects AI-generated images and identifies the specific AI generator used (33 classes).
Website: https://itsnotai.org
| Version | Features | Link |
|---|---|---|
| v2 (Latest) | Dual-head, FLUX detection, improved Midjourney | ItsNotAI-ai-detector-v2 |
| v1 (This) | Single-head, 33-class classification | Current page |
Recommendation: Use v2 for better binary (Real/AI) classification. Use v1 if you only need source identification without the binary head.
Note: This is one of the models used by ItsNotAI. For official verification at itsnotai.org, we use an ensemble of multiple models combined with human expert review to ensure maximum accuracy.
Most AI detectors focus on catching AI usage. ItsNotAI takes the opposite approach: helping artists prove their work is human-made.
Verifiable Label: Beyond just a percentage score, we provide artists with a verifiable "Not AI" label that can be embedded in their work.
Industry-Focused: We specialize in digital painting, manga illustration, and texture design, developed in deep collaboration with 100+ professional artists.
Artist-First: Our industry endorsements and artist partnerships create a trust network that goes beyond pure technical metrics.
This model can:
Real: All real images (from ImageNet, COCO, FFHQ, CelebA-HQ, AFHQ, LSUN, MetFaces, Landscape)
AI Sources:
| Label | Description |
|---|---|
| stable_diffusion | Stable Diffusion 1.x/2.x/XL |
| latent_diffusion | Latent Diffusion Models |
| glide | OpenAI GLIDE |
| dalle | DALL-E series |
| midjourney | Midjourney |
| stylegan1 | StyleGAN v1 |
| stylegan2 | StyleGAN v2 |
| stylegan3 | StyleGAN v3 |
| pro_gan | Progressive GAN |
| big_gan | BigGAN |
| gau_gan | GauGAN / NVIDIA Canvas |
| cycle_gan | CycleGAN |
| star_gan | StarGAN |
| ddpm | Denoising Diffusion Probabilistic Models |
| vq_diffusion | VQ-Diffusion |
| palette | Palette Diffusion |
| gansformer | GANsformer |
| projected_gan | Projected GAN |
| diffusion_gan | Diffusion GAN |
| denoising_diffusion_gan | Denoising Diffusion GAN |
| taming_transformer | Taming Transformers |
| generative_inpainting | Generative Inpainting |
| lama | LaMa Inpainting |
| mat | MAT Inpainting |
| cips | CIPS |
| face_synthetics | Face Synthetics |
| sfhq | Synthetic Faces HQ |
from transformers import AutoModelForImageClassification, AutoImageProcessor
from PIL import Image
import torch
# Load model
model_id = "boluobobo/ItsNotAI-ai-detector-v1"
model = AutoModelForImageClassification.from_pretrained(model_id)
processor = AutoImageProcessor.from_pretrained(model_id)
def detect_image(image_path):
image = Image.open(image_path).convert("RGB")
inputs = processor(image, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)[0]
# Get top predictions
top_indices = probs.argsort(descending=True)[:5]
predictions = []
for idx in top_indices:
label = model.config.id2label[str(idx.item())]
score = probs[idx].item()
predictions.append({"label": label, "score": round(score, 3)})
return {
"predicted_source": predictions[0]["label"],
"confidence": predictions[0]["score"],
"top5_predictions": predictions
}
# Example
result = detect_image("test.jpg")
print(f"Predicted Source: {result['predicted_source']}")
print(f"Confidence: {result['confidence']:.1%}")
Example Output:
{
"predicted_source": "stable_diffusion",
"confidence": 0.452,
"top5_predictions": [
{"label": "stable_diffusion", "score": 0.452},
{"label": "latent_diffusion", "score": 0.213},
{"label": "glide", "score": 0.089},
{"label": "ddpm", "score": 0.056},
{"label": "imagenet", "score": 0.042}
]
}
Note: v1 returns source classification only. For binary Real/AI detection, use v2 with its dedicated binary head.
| Metric | Value |
|---|---|
| Accuracy | 93.51% |
| Precision | 95.40% |
| Recall | 93.51% |
| F1 Score | 94.11% |
pip install transformers torch pillow
from transformers import AutoModelForImageClassification, AutoImageProcessor
from PIL import Image
import torch
# Load model
model_id = "boluobobo/ItsNotAI-ai-detector-v1"
model = AutoModelForImageClassification.from_pretrained(model_id)
processor = AutoImageProcessor.from_pretrained(model_id)
# Load image
image = Image.open("your_image.jpg").convert("RGB")
# Predict
inputs = processor(image, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)
pred_idx = outputs.logits.argmax(-1).item()
# Get label
label = model.config.id2label[pred_idx]
confidence = probs[0][pred_idx].item()
print(f"Prediction: {label}")
print(f"Confidence: {confidence:.2%}")
import json
from huggingface_hub import hf_hub_download
# Download source metadata
meta_path = hf_hub_download(repo_id=model_id, filename="source_meta.json")
with open(meta_path) as f:
meta = json.load(f)
source_names = meta["source_names"]
# Get all probabilities
for i, (name, prob) in enumerate(zip(source_names, probs[0].tolist())):
if prob > 0.01: # Show only >1%
print(f" {name}: {prob:.2%}")
Q: Can this detect Midjourney images? A: Yes, the model can detect images from Midjourney, Stable Diffusion, DALL-E, and 25+ other AI generators.
Q: Does it work on digital paintings? A: Yes! We specialize in digital art, manga, and illustration detection with input from 100+ professional artists.
Q: How is this different from other AI detectors? A: ItsNotAI focuses on helping artists prove their work is human-made, not just catching AI usage. We provide verifiable labels for authentic artwork.
Q: What image formats are supported? A: PNG, JPG, WEBP, and other common formats. Images are automatically resized to 224x224 for processing.
@misc{itsnotai2025,
title={ItsNotAI: Multi-class AI Image Detection},
author={ItsNotAI Team},
year={2025},
url={https://huggingface.co/boluobobo/ItsNotAI-ai-detector-v1}
}
Apache 2.0