Downloads · 30 days
55
1% of all-time downloads
ideepankarsharma2003/AI_ImageClassification_MidjourneyV6_SDXL
AI_ImageClassification_MidjourneyV6_SDXL is a image classification model from ideepankarsharma2003. Use it when you need a label for an image. It is set up for transformers.
This model is a Swin Transformer-based classifier designed to distinguish between AI-generated and human-created images, specifically focusing on outputs from Midjourney V6 and Stable Diffusion XL (SDXL). It has been…
Downloads · 30 days
55
1% of all-time downloads
All-time downloads
7K
Public
Parameters
86.8M
3.5 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors347 MB · 100%
How the weights are stored.
F3286.7M · 100%
From the Hugging Face model README
This model is a Swin Transformer-based classifier designed to distinguish between AI-generated and human-created images, specifically focusing on outputs from Midjourney V6 and Stable Diffusion XL (SDXL). It has been trained on a curated dataset of AI-generated images.
This model can be used for detecting AI-generated images from Midjourney V6 and SDXL. It is useful for content moderation, fact-checking, and detecting synthetic media.
This model is trained specifically on Midjourney V6 and Stable Diffusion XL datasets. It may not generalize well to images generated by other AI models. Additionally, biases in the dataset could lead to false positives (flagging real images as AI-generated) or false negatives (failing to detect AI-generated content).
Users should verify results with additional tools and not solely rely on this model for high-stakes decisions. Model performance should be tested on domain-specific datasets before deployment.
You can use this model with the 🤗 Transformers library:
from transformers import AutoModelForImageClassification, AutoFeatureExtractor
from PIL import Image
import torch
# Load model and feature extractor
model_name = "ideepankarsharma2003/AI_ImageClassification_MidjourneyV6_SDXL"
model = AutoModelForImageClassification.from_pretrained(model_name)
feature_extractor = AutoFeatureExtractor.from_pretrained(model_name)
# Load and preprocess image
image = Image.open("path_to_image.jpg")
inputs = feature_extractor(images=image, return_tensors="pt")
# Perform inference
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
predicted_label = logits.argmax(-1).item()
# Label Mapping
id2label = {0: "ai_gen", 1: "human"}
print("Predicted label:", id2label[predicted_label])
The model was trained on the following datasets:
The model was evaluated on a separate validation split from the training datasets.
The model effectively distinguishes between AI-generated and human-created images, but its performance may be affected by dataset biases and out-of-distribution examples.
If you use this model, please cite:
@misc{ai_image_classification,
author = {Deepankar Sharma},
title = {AI Image Classification - Midjourney V6 & SDXL},
year = {2024},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/ideepankarsharma2003/AI_ImageClassification_MidjourneyV6_SDXL}}
}