---
title: ai-image-detect-distilled-ONNX
canonical_url: "https://www.modelscope.cn/models/onnx-community/ai-image-detect-distilled-ONNX"
md_url: "https://www.modelscope.cn/models/onnx-community/ai-image-detect-distilled-ONNX.md"
repository: onnx-community/ai-image-detect-distilled-ONNX
last_updated: 2026-03-05
license: mit
pipeline_tag: image-classification
tasks:
  - image-classification
model_type:
  - vit
architectures:
  - ViTForImageClassification
base_model:
  - jacoballessio/ai-image-detect-distilled
base_model_relation: finetune
library_name:
  - onnx
  - pytorch
frameworks:
  - pytorch
downloads: 19
stars: 0
tags:
  - image-classification
  - pytorch
  - ViT
  - transformers
  - real-fake-detection
  - deep-fake
  - ai-detect
  - ai-image-detection
---

# ai-image-detect-distilled-ONNX

> ai-image-detect-distilled-ONNX - onnx-community 在 ModelScope 开源的模型。ai-image-detect-distilled (ONNX)

onnx-community/ai-image-detect-distilled-ONNX 是 ModelScope 魔搭社区上的image-classification模型，采用 mit 许可，基于 jacoballessio/ai-image-detect-distilled 构建。

- **Repository**: onnx-community/ai-image-detect-distilled-ONNX
- **License**: mit
- **Tasks**: image-classification
- **Base model**: jacoballessio/ai-image-detect-distilled
- **Tags**: image-classification, pytorch, ViT, transformers, real-fake-detection, deep-fake, ai-detect, ai-image-detection
- **Downloads**: 19
- **Stars**: 0
- **Last updated**: 2026-03-05

Source: https://www.modelscope.cn/models/onnx-community/ai-image-detect-distilled-ONNX

---

# ai-image-detect-distilled (ONNX)


This is an ONNX version of [jacoballessio/ai-image-detect-distilled](https://huggingface.co/jacoballessio/ai-image-detect-distilled). It was automatically converted and uploaded using [this Hugging Face Space](https://huggingface.co/spaces/onnx-community/convert-to-onnx).


## Usage with Transformers.js


See the pipeline documentation for `image-classification`: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.ImageClassificationPipeline


---


# AI Detection Model

## Model Architecture and Training

Three separate models were initially trained:
1. Midjourney vs. Real Images
2. Stable Diffusion vs. Real Images
3. Stable Diffusion Fine-tunings vs. Real Images

Data preparation process:
- Used Google's Open Image Dataset for real images
- Described real images using BLIP (Bootstrapping Language-Image Pre-training)
- Generated Stable Diffusion images using BLIP descriptions
- Found similar Midjourney images based on BLIP descriptions

This approach ensured real and AI-generated images were as similar as possible, differing only in their origin.

The three models were then distilled into a small ViT model with 11.8 Million Parameters, combining their learned features for more efficient detection.

## Data Sources

- Google's Open Image Dataset: [link](https://storage.googleapis.com/openimages/web/index.html)
- Ivan Sivkov's Midjourney Dataset: [link](https://www.kaggle.com/datasets/ivansivkovenin/midjourney-prompts-image-part8)
- TANREI(NAMA)'s Stable Diffusion Prompts Dataset: [link](https://www.kaggle.com/datasets/tanreinama/900k-diffusion-prompts-dataset)

## Performance

- Validation Set: 74% accuracy
  - Held out from training data to assess generalization

- Custom Real-World Set: 72% accuracy
  - Composed of self-captured images and online-sourced images
  - Designed to be more representative of internet-based images

- Comparative Analysis:
  - Outperformed other popular AI detection models by 5 percentage points on both sets
  - Other models achieved 89% and 79% on validation and real-world sets respectively

## Key Insights

1. Strong generalization on validation data (75% accuracy)
2. Good adaptability to diverse, real-world images (72% accuracy)
3. Consistent outperformance of other popular models
4. 10-point accuracy drop from validation to real-world set indicates room for improvement
5. Comprehensive training on multiple AI generation techniques contributes to model versatility
6. Focus on subtle differences in image generation rather than content disparities

## Future Directions

- Expand dataset with more diverse, real-world examples to bridge the performance gap
- Improve generalization to internet-sourced images
- Conduct error analysis on misclassified samples to identify patterns
- Integrate new AI image generation techniques as they emerge
- Consider fine-tuning for specific domains where detection accuracy is critical
