| --- |
| license: mit |
| library_name: onnx |
| tags: |
| - image-classification |
| - ai-image-detection |
| - deepfake-detection |
| - onnx |
| - webgpu |
| base_model: OwensLab/commfor-model-384 |
| --- |
| |
| # Detectra v3 |
|
|
| On-device AI-image detector powering the [Detectra Chrome extension](https://github.com/ashhart/Detectra): |
| a ViT-S/16 @384 binary classifier (`sigmoid(logit)` = probability the image is |
| AI-generated), exported to single-file fp16 ONNX for ONNX Runtime Web |
| (WebGPU/WASM). |
|
|
| Fine-tuned from the MIT-licensed |
| [Community Forensics ViT-S](https://huggingface.co/OwensLab/commfor-model-384) |
| (Park & Owens, CVPR 2025) on modern generators (DALL·E 3, Midjourney, Flux, |
| SD3.5, Recraft, HiDream), in-the-wild social media (WildRF train), and a |
| replay slice of CommunityForensics-Small — plus, new in v3, non-photographic |
| REAL classes that defeat most detectors: human paintings (WikiArt), hand-drawn |
| anime, meme composites and webpage screenshots. GPT-4o and Ideogram were held |
| out of training entirely. |
|
|
| Preprocessing: shortest edge → 440 (bilinear) → center-crop 384 → [0,1] → |
| ImageNet normalize. Input `pixel_values` 1×3×384×384 fp32, output `logit` 1×1. |
|
|
| Held-out results through the extension pipeline @0.65 threshold: |
| WildRF-test 97.0% balanced accuracy (mangled 96.9%), modern-generator eval |
| 99.4% BA (TPR 98.9% incl. never-trained GPT-4o/Ideogram). Per-category TNR on |
| difficult reals: paintings 99.7% (held-out n=1,200), hand-drawn anime 100%, memes 97.6%, webpage |
| screenshots 100%. Full training + evaluation code: |
| https://github.com/ashhart/Detectra |
|
|
| sha256(model.onnx) = 1414b9aafaa01a644ed706224973f09b53a1388282104409862df9893b1b962b |
|
|
| ## Files |
| - model.onnx — fp16 ONNX export (deployed by the extension) |
| - model.safetensors — fp32 fine-tuned checkpoint (for further training/audit) |
|
|