SFW API

Accuracy and methodology

We publish what we measure, with the test set size and confidence intervals, and we do not publish a single "accuracy" number: a binary accuracy hides exactly the cases a moderation team cares about.

The model

A multi-head vision transformer (ViT-B/16, SigLIP pre-training, 384 px input, letterboxed, horizontal-flip test-time augmentation). Heads predict "level ≥ 1", "level ≥ 2", "level ≥ 3", "adult object" and "art". Each head is calibrated so that its tuned threshold maps to a score of 50; the level is the highest level whose score is above 50, and ordinal clamping guarantees P(≥3) ≤ P(≥2) ≤ P(≥1).

The levels

LevelNameDefinition
0EverydayRegular, fully clothed content. Always allowed.
1RevealingSwimwear, lingerie and outfits that show more skin.
2Implied NudityUnclothed, with intimate areas covered or out of view.
3ExplicitVisible intimate areas.

Labelling rules that make results predictable: pose, camera angle, framing, facial expression, innuendo, tight clothes and cleavage never raise the level on their own. When a labeller is torn between two levels, the lower one wins, so the model is conservative by construction.

Published metrics

Model version pending, trained pending, evaluated on a frozen test split of 0 images that never touched training.

MetricValue95% CI
Model score (mAP over level ≥2, level ≥3, adult object, safe)pendingpending
Level accuracy (exact level, 4 classes)pendingpending
Recall at 98% precision, level ≥3pendingpending
Recall at 95% precision, level ≥2pendingpending
Everyday images flagged at level ≥1 (false positive rate)pendingpending

Numbers are exported from the labler evaluation of the production model before launch (ml/evaluate.py: paired bootstrap, 95% intervals). This placeholder must be replaced before the page goes live.

Known limitations

Reproduce it

Benchmarking with your own data is allowed and encouraged (see the acceptable use policy). The free tier is enough for a few hundred images; send disagreement sets to support@sfwapi.dev and we will look at them.