alt.freeweights.vision / AI-Anime-Image-Detector-ViT-ONNX
From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject:

AI-Anime-Image-Detector-ViT-ONNX

Date: 2026-11-15Commit: 8bf474bSigned: 2DC28CC7B26A283B ✓

Image classification model. Onnx weights, 969 MB in all. Published by onnx-community under Apache-2.0.

vision969MBAI-Anime-Image-Detector-ViT-ONNXonnxpermissive
FactsParamsnot statedSize969 MBFormatsonnxTaskimage classificationLicenseApache-2.0From sourcepermissive
$ fw get onnx-community/AI-Anime-Image-Detector-ViT-ONNX
# manifest sha256 c47f8a37d409… · 969 MB · 12 files
$ fw verify ./AI-Anime-Image-Detector-ViT-ONNX onnx-community/AI-Anime-Image-Detector-ViT-ONNX
From sourceHosted (signed)onnx-community/AI-Anime-Image-Detector-ViT-ONNXLast check: 2026-11-15 05:23 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of AI-Anime-Image-Detector-ViT.

Runs withOpenVINOUltralyticsConvert withOliveONNXOptimumScan withModelScan

Overview

Size
969 MB
Weights
53.4 MB (smallest of 8 ONNX variants)
Parameters
not stated
Formats
onnx
Task
image classification
License
Apache-2.0 (permissive)
Files
12, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Base model: legekka/AI-Anime-Image-Detector-ViT

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 05:23 UTCpassed

Model card

From the publisher at commit 8bf474b. Shown as plain text with links; images open at the publisher.

AI-Anime-Image-Detector-ViT (ONNX)#

This is an ONNX version of legekka/AI-Anime-Image-Detector-ViT. 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 Anime Image Detector ViT#

This is a proof of concept model for detecting anime style AI images. Using Vision Transformer, it was trained on 1M human-made real and 217K AI generated anime images. During training either type appeared in equal amount to avoid biases. The model was trained on a single RTX 3090 GPU for about 40 hours, ~35 epochs.

The training logs are available on my wandb.

Evaluation#

Each checkpoint was evaluated on 500-500 real and AI images.

Final result:

  • Training Loss: 0.1009
  • Eval Loss: 0.1386

It seems like using random crops helped the model to generalize better, however, the training dataset only contained 512x512 images, which meant that every cropped image had bilinear interpolation. Training the model on 1024x1024 images could probably further improve its performance. (Maybe I'll do it later)

Performance comparison#

We did a small eval test with ~5000 images on the current available AI image detectors. Note that these models were not specificly trained on anime images.

ModelAccuracy
dima806/ai_vs_real_image_detection35,97%
Organika/sdxl-detector43,29%
Nahrawy/AIorNot64,74%
jacoballessio/ai-image-detect-distilled68,94%
umm-maybe/AI-image-detector75,45%
mmanikanta/VIT_AI_image_detector79,65%
legekka/AI-Anime-Image-Detector-HD-ViT WIP94,26%
legekka/AI-Anime-Image-Detector-ViT (Ours)94,68%

Usage#

Example inference code:

from transformers import AutoModelForImageClassification, AutoFeatureExtractor
import torch
from PIL import Image

model = AutoModelForImageClassification.from_pretrained("legekka/AI-Anime-Image-Detector-ViT")
feature_extractor = AutoFeatureExtractor.from_pretrained("legekka/AI-Anime-Image-Detector-ViT")

model.eval()

image = Image.open("example.jpg")
inputs = feature_extractor(images=image, return_tensors="pt")

outputs = model(**inputs)
logits = outputs.logits

label = model.config.id2label[torch.argmax(logits).item()]
confidence = torch.nn.functional.softmax(logits, dim=1)[0][torch.argmax(logits)].item()

print(f"Prediction: {label} ({round(confidence * 100)}%)")

Files

12 files · 969 MBWeights 53.4 MB (smallest of 8 ONNX variants). Sizes and sha256 from the signed manifest.
Hide all 12 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md3.19 KB69acbd164480c9bba236cda364807a3e9517dbf8c5d7428ef68b04968cccf41d
config.json728 B22cda722ec6f7d03126e3444e9fbb2677ee1c38dbd9ee49d6970e6735c613ad2
onnx/model.onnx351 MBe41152273859c845f8579fd5aaf670ffe370fc94547c0a369916eda0d77f3561
onnx/model_bnb4.onnx58.7 MB179d510f4d1e0fe3d9114acd7d8795970d9495d414a7390df203b0589506fe32
onnx/model_fp16.onnx176 MB68b1c08bf46b6e64c922862f3c57c09bef2583d2afad3d1fea2f9c7f316e4ef0
onnx/model_int8.onnx88.9 MBc0b61e3cb4b070c14cc19bcf0a3228b4f88cad89d3f93b90721abd4df7dc4899
onnx/model_q4.onnx64.0 MBc24f34a334eba553d0ef07b9829142e93b2d4d6acf62121cf04476c3e3fb052a
onnx/model_q4f16.onnx53.4 MBa803508e82847f3f421578e6ba08686cb3a9b117eda7f70ca21594856b3efc39
onnx/model_quantized.onnx88.9 MBc0b61e3cb4b070c14cc19bcf0a3228b4f88cad89d3f93b90721abd4df7dc4899
onnx/model_uint8.onnx88.9 MBee542570b90c799024a08865b96b5d2d8c916976a3b9811ac1ce0dee27a59f7d
preprocessor_config.json351 B967e6855ff8a6d8035ca7590cb726f547399fda22b39f8996660525dcf24c147
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
8bf474b0c2 pinned now2026-11-15 05:23 UTC12 files · 969 MB

Use it

$ fw get onnx-community/AI-Anime-Image-Detector-ViT-ONNX
# manifest sha256 c47f8a37d409… · 969 MB · 12 files
$ fw verify ./AI-Anime-Image-Detector-ViT-ONNX onnx-community/AI-Anime-Image-Detector-ViT-ONNX
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/onnx-community/AI-Anime-Image-Detector-ViT-ONNX.json --dir ./AI-Anime-Image-Detector-ViT-ONNX $ python3 fw.py verify ./AI-Anime-Image-Detector-ViT-ONNX ./onnx-community__AI-Anime-Image-Detector-ViT-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/AI-Anime-Image-Detector-ViT-ONNX --revision 8bf474b0c20e159b36225661c54153af047396e6 --local-dir ./AI-Anime-Image-Detector-ViT-ONNX

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
69acbd164480c9bba236cda364807a3e9517dbf8c5d7428ef68b04968cccf41d
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject: AI-Anime-Image-Detector-ViT-ONNXDate: 2026-11-15Commit: 8bf474bSigned: 2DC28CC7B26A283B ✓
Upstream
onnx-community/AI-Anime-Image-Detector-ViT-ONNX
Pinned commit
8bf474b0c20e159b36225661c54153af047396e6
Manifest
AI-Anime-Image-Detector-ViT-ONNX.json · .minisig
Manifest sha256
c47f8a37d4093cbff558f0dff8cc23c932199c32a4538251baf128bb509a5a1c
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:23 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/AI-Anime-Image-Detector-ViT-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/AI-Anime-Image-Detector-ViT-ONNX.json.minisig $ minisign -Vm AI-Anime-Image-Detector-ViT-ONNX.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

legekka/AI-Anime-Image-Detector-ViT · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/AI-Anime-Image-Detector-ViT-ONNX
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. AI-Anime-Image-Detector-ViT-ONNX.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX
From: timm <huggingface.co/timm>Subject: beit_base_patch16_224.in22k_ft_in22k_in1k