Downloads · 30 days
0
divine2k/ai-image-detectors
ai-image-detectors is a machine learning model from divine2k. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This repository contains trained PyTorch model weights used for detecting AI-generated images vs real photographs.
Downloads · 30 days
0
Access
Public
Updated Jan 6, 2026
Repo size
333 MB
Likes
0
Public
Click a slice to open those files.
.pth333 MB · 100%
From the Hugging Face model README
This repository contains trained PyTorch model weights used for detecting AI-generated images vs real photographs.
The models are designed to be used together as an ensemble and are consumed by the Hugging Face Space:
👉 https://huggingface.co/spaces/divine2k/ai_image-classification
| Model | Architecture | File |
|---|---|---|
| Model 1 | ResNet50 | resnet50_ai_real_final.pth |
| Model 2 | EfficientNet-B0 | efficientNet_BO_Final.pth |
| Model 3 | ConvNeXt Tiny | convNext_final.pth |
All models are binary classifiers:
Final prediction is obtained via majority voting.
AI, Real✅ Research
✅ Demonstrations
✅ Academic projects
✅ Detection benchmarking
❌ Not intended for forensic or legal decisions
❌ Not guaranteed to generalize to unseen generators or heavy post-processing
import torch
import torch.nn as nn
from torchvision.models import resnet50
from huggingface_hub import hf_hub_download
path = hf_hub_download(
repo_id="divine2k/ai-image-detectors",
filename="resnet50_ai_real_final.pth"
)
model = resnet50(weights=None)
model.fc = nn.Linear(model.fc.in_features, 1)
model.load_state_dict(torch.load(path, map_location="cpu"))
model.eval()
⚠️ Important: These files contain state_dict only. You must recreate the architecture before loading.
Performance drops on:
Thresholds may require calibration per dataset
This model is provided to support:
It should not be used to:
MIT License You are free to use, modify, and redistribute with attribution.
If you use this work in research or demos, please reference:
divine2k/ai-image-detectors