Skip to page content
SAVRN
Search Plan a project

Open-weight model · Image classification

datapoisoning-detector-v1-medium

by Mike Afton ifmain/datapoisoning-detector-v1-medium

datapoisoning-detector-v1-medium is an open-weight model for image classification from Mike Afton, released under Apache License 2.0. Its published files total 731.8 MB.

Original diagrams for this release. Editable SVG versions: architecture · inference and distillation. Weights and completed test results are included in this release bundle.

Parameters—
Context—
Weights730.9 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Model Card

By Mike Afton, published under apache-2.0, revision 3d17f6b72b6f.

Original diagrams for this release. Editable SVG versions: architecture · inference and distillation. Weights and completed test results are included in this release bundle. The detector compares encoder blocks 1, 2 and 3 with the final posterior-mean representation of a frozen FLUX.2 VAE. Each stream is projected to an 8 × 8 token grid. The three early-to-final differences are fused with all four feature streams before transformer classification. Inputs are native-resolution 128 × 128 RGB crops with a central 96 × 96 active region. The VAE decoder and generative FLUX transformer are not used. The training run excludes CelebA-HQ from training, validation and patch caches; it is used only…

Read Mike Afton's full model card

Architecture at a glance

Original diagrams for this release. Editable SVG versions: architecture · inference and distillation.

Weights and completed test results are included in this release bundle.

Code and training · Evaluation reports

Model repository

The detector compares encoder blocks 1, 2 and 3 with the final posterior-mean representation of a frozen FLUX.2 VAE. Each stream is projected to an 8 × 8 token grid. The three early-to-final differences are fused with all four feature streams before transformer classification. Inputs are native-resolution 128 × 128 RGB crops with a central 96 × 96 active region. The VAE decoder and generative FLUX transformer are not used.

The training run excludes CelebA-HQ from training, validation and patch caches; it is used only for the separate internal evaluation below. It contains 21,464 training, 1,257 validation and 1,446 test records. Large starts with newly initialized trainable parameters and the licensed frozen VAE encoder. Students learn from this new Large through temperature-2 Bernoulli KL soft-target distillation: 50% distillation and 50% supervised classification plus paired ranking. Checkpoint selection uses validation recall at a target false-positive rate of 1%, with ROC-AUC as the tie-breaker. A decline receives two additional recovery epochs unless a sustained overfitting signal is observed.

Image-level inference averages five crop logits. Scores are not calibrated probabilities. All benchmark tables below use the internal CAT evaluation and unchanged release thresholds.

Variant Total parameters Trainable parameters Status
Large 296,264,065 261,838,209 Evaluated
Medium 182,722,433 148,296,577 Evaluated
Small 82,635,137 48,209,281 Evaluated
Tiny 43,280,257 8,854,401 Evaluated

Internal benchmark: CAT CelebA-HQ

All 2,000 eligible images in the archived subset: 200 per protection method and 200 clean controls. Noisy baseline excluded. Original five-crop inference and unchanged release thresholds, not experimental sliding-window calibration.

Detection recall

Percentage of protected images correctly detected. Higher is better.

Protection Large Medium Small Tiny
advdm- 100.00% (200/200) 100.00% (200/200) 100.00% (200/200) 100.00% (200/200)
advdm+ 100.00% (200/200) 100.00% (200/200) 100.00% (200/200) 100.00% (200/200)
anti-dreambooth 3.00% (6/200) 38.00% (76/200) 23.00% (46/200) 1.50% (3/200)
glaze2 99.00% (198/200) 99.00% (198/200) 99.50% (199/200) 99.50% (199/200)
metacloak 0.50% (1/200) 29.00% (58/200) 12.50% (25/200) 2.50% (5/200)
mist 100.00% (200/200) 100.00% (200/200) 100.00% (200/200) 100.00% (200/200)
sds- 100.00% (200/200) 100.00% (200/200) 100.00% (200/200) 100.00% (200/200)
sds+ 100.00% (200/200) 100.00% (200/200) 100.00% (200/200) 100.00% (200/200)
sdsT5 100.00% (200/200) 100.00% (200/200) 100.00% (200/200) 100.00% (200/200)

Clean-image specificity

Percentage of clean images correctly accepted as clean. Higher is better. All models use the same 200 clean controls.

Evaluation pool Large Medium Small Tiny
Shared clean controls 100.00% (200/200) 100.00% (200/200) 100.00% (200/200) 100.00% (200/200)

Overall results

Metric Large Medium Small Tiny
Accuracy 80.2500% 86.6000% 83.5000% 80.3500%
Protected-image recall 78.0556% 85.1111% 81.6667% 78.1667%
Clean-image specificity 100.0000% 100.0000% 100.0000% 100.0000%
False positive rate 0.00% 0.00% 0.00% 0.00%
True positives 1405 1532 1470 1407
False negatives 395 268 330 393
False positives 0 0 0 0
True negatives 200 200 200 200
Decision threshold (logit) -1.5164062976837156 -1.1406249999999998 -0.7234374880790709 -1.8132812976837156

Bold marks the highest per-method recall or specificity, including ties. Published reference results are listed separately below.

Evaluation-only source: CAT, CelebA-HQ subset. This subset was excluded from training and validation of the currently released checkpoints and was not used to fit their thresholds. The project author confirms having reviewed the source terms and permission for this evaluation use. Images are not redistributed. Protection methods share underlying originals.

Detailed protocol and results.

Published reference alongside the internal benchmark

Detection recall

Protection Our Medium (%) LightShed Table 2 (%)
AdvDM (+) 100.00% Not reported
AdvDM (-) 100.00% Not reported
Anti-DreamBooth 38.00% Not reported
Glaze 2 / published Glaze 99.00% 97.26%
MetaCloak 29.00% 91.77%
Mist 100.00% 99.84%
SDS (+) 100.00% Not reported
SDS (-) 100.00% Not reported
SDS T5 100.00% Not reported

Clean-image specificity

Protection Our Medium (%) LightShed Table 2 (%)
AdvDM (+) 100.00% Not reported
AdvDM (-) 100.00% Not reported
Anti-DreamBooth 100.00% Not reported
Glaze 2 / published Glaze 100.00% 97.70%
MetaCloak 100.00% 84.32%
Mist 100.00% 100.00%
SDS (+) 100.00% Not reported
SDS (-) 100.00% Not reported
SDS T5 100.00% Not reported

Our numbers come exclusively from the internal CAT benchmark above. Clean specificity uses the same 200 controls for every row. LightShed numbers are published results on its own evaluation, not measurements on this internal set. Glaze 2 is shown alongside published Glaze; versions and settings are not asserted identical. Bold marks the larger reported value, including ties, not a controlled head-to-head win. Not reported means absent from Table 2. LightShed source, Table 2.

License and data provenance

The author licenses the code and the rights they hold in the new model weights under Apache-2.0. The frozen BFL VAE component is Apache-2.0. This grant does not establish third-party rights in training images. Retained sources include VGGFace2 and WikiArt through CAT, robust-style-mimicry, XAI, Helen, Open Images, DiffVax and user-supplied data; their commercial permissions have not all been verified. See the provenance report.

Citation

If you find our work helpful, feel free to give us a cite.

@misc{ifmain2026datapoisoningdetector,
    title = {DataPoisoning Detector v1: Multi-Level FLUX VAE Features for Protective-Perturbation Detection},
    url = {https://github.com/ifmain/datapoisoning-detector-v1},
    author = {{ifmain}},
    month = {October},
    year = {2026}
}

Selected protection and dataset references: REFERENCES.bib.

Component layout

detector/ contains the trained projection, fusion and classification head. vae/ contains the frozen FLUX VAE encoder and its configuration; no decoder is included. Load the repository root or its detector/ directory with dpdetector.load_detector. The two component state dictionaries reconstruct the original checkpoint exactly.

Identity and Version

Repository
ifmain/datapoisoning-detector-v1-medium
Publisher
Mike Afton
Task
Image classification
Modality
Image
Library
Not stated by the source
Parameters
Not stated by the source
Languages
Not stated by the source
Revision
3d17f6b72b6fc94ebecf65abb23d09005e282acb
First published
2026-10-02
Last updated
2026-10-03

Files and Weights

21 files, 731.8 MB in total. The weights are 2 files totalling 730.9 MB in safetensors.

Weights2 files · 730.9 MB
Configuration4 files · 2.5 KB
Documentation3 files · 22.0 KB
Other11 files · 825.8 KB
Repository1 file · 1.8 KB
Every file
FileTypeSizeSHA-256
detector/model.safetensorsWeights593.2 MB 6ef2a3090b4d
vae/model.safetensorsWeights137.7 MB 90e9db41696d
assets/published-comparison.jsonConfiguration778 B —
detector/config.jsonConfiguration632 B —
model_index.jsonConfiguration190 B —
vae/config.jsonConfiguration861 B —
LICENSEDocumentation11.4 KB —
NOTICEDocumentation478 B —
README.mdDocumentation10.1 KB —
CITATION.cffOther264 B —
REFERENCES.bibOther3.0 KB —
assets/architecture.pngOther201.2 KB 5309225344b5
assets/architecture.svgOther17.0 KB —
assets/cat-celebahq-medium.pngOther152.9 KB 9f2838ded23e
assets/cat-celebahq-medium.svgOther11.5 KB —
assets/inference-distillation.pngOther241.0 KB 649e432f68b4
assets/inference-distillation.svgOther12.7 KB —
assets/published-comparison.pngOther147.0 KB 2c7db2241207
assets/published-comparison.svgOther28.0 KB —
licenses/Apache-2.0.txtOther11.4 KB —
.gitattributesRepository1.8 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
730.9 MB
Download from Mike Afton

Released by Mike Afton through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published730.9 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About datapoisoning-detector-v1-medium

Can I use datapoisoning-detector-v1-medium commercially?

Yes. datapoisoning-detector-v1-medium is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Image classification

swinv2-tiny-patch4-window16-256

Microsoft

Swin Transformer v2 model pre-trained on ImageNet-1k at resolution 256x256. It was introduced in the paper Swin Transformer V2: Scaling Up Capacity and Resolution by Liu et al. and first released in this repository. Disclaimer: The team releasing Swin Transformer v2 did not write a model card for this model so this model card has been written by the Hugging Face team. The Swin Transformer is a type of Vision Transformer. It builds hierarchical feature maps by merging image patches (shown in gray) in deeper layers and has linear computation complexity to input image size due to computation of self-attention only within each local window (shown in red). It can thus serve as a general-purpose…

Open weights apache-2.0 transformers

Model · Image classification

AI-image-detector

Matthew Maybe

NOTE: Unless you are trying to detect imagery generated using older models such as VQGAN+CLIP, please use the updated version of this detector instead. This model is a proof-of-concept demonstration of using a ViT model to predict whether an artistic image was generated using AI. It was created in October 2022, and as such, the training data did not include any samples generated by Midjourney 5, SDXL, or DALLE-3. It still may be able to correctly identify samples from these more recent models due to being trained on outputs of their predecessors. Furthermore the intended scope of this tool is artistic images; that is to say, it is not a deepfake photo detector, and general computer imagery…

Open weights cc-by-4.0 transformers

Measured on device (edge-compat): Raspberry Pi 5 · LiteRT 2.2.0.dev20260804 · CPU/XNNPACK, 4 threads · 34.1 ms p50 (2026-08-31); browser · Chromium 151 (2026-08-11). Record: https://github.com/john-rocky/edge-compat/blob/main/cards/plantnet-300k-resnet18/CARD.md On-device fine-grained plant species identification — 1081 species — running fully on the LiteRT CompiledModel GPU delegate (no CPU fallback). A PlantNet-300K (NeurIPS 2021) ResNet18. ~16 ms/frame on a Pixel 8a. (mean [0.485,0.456,0.406], std [0.229,0.224,0.225]; center-crop then resize 224). Labels: class index i maps to the i-th species when the PlantNet-300K species-id strings are sorted (torchvision ImageFolder order); names…

Open weights apache-2.0 litert

Model · Image classification

traffic-sign-adverse-weather

Yy

Official model checkpoints for the solution in the Traffic Sign Recognition under Adverse Weather Competition. See classes.txt for the 25 traffic sign classes. For inference scripts, training code, and in-depth engineering retrospective, visit the GitHub Repository.

Open weights mit timm

Model · Image classification

tinyvit-5m-int8-imagenet

Core Epoch

TinyViT-5M (timm/tinyvit5m224.distin22kftin1k, Apache-2.0) quantized to INT8 with Kenosis — 128-image calibration, no retraining. 80.53% top-1 from a 9.2 MB single file, on ONNX Runtime or OpenVINO, CPU or GPU, no accelerator required. ImageNet-1K validation, 49,872 images (disjoint from the 128 calibration images). Measured on a CPU with AVX-VNNI; on CPUs without VNNI this model's INT8 top-1 sits ~0.9 below FP32 rather than 0.34. Input 1x3x224x224, RGB, /255, ImageNet mean/std. Output logits [1,1000], sorted-synset order. runclassify.py / evalimagenet.py reproduce the demo and table. tinyvit5m224int8kenosis.onnx (9,228,567 B) — SHA-256…

Open weights apache-2.0 onnx