Flutter SDK · iOS & Android

On-device NSFW detection.
No uploads. No cloud.

Pass image bytes, get back labels, confidence scores, and bounding boxes. Everything runs on the user's device — images never leave the phone.

main.dart
// 1. initialize once (e.g. in main())
await XPunge.initialize('xp1.your-api-key');

// 2. analyze any image
final detections = await XPunge.analyzeImage(imageBytes);

// 3. use the results
for (final d in detections) {
  print('${d.label}${(d.confidence * 100).toInt()}%');
  print('box: ${d.boundingBox}');
}
5.1 MB
Model size
3%
Misclassification rate vs. 38% for ViT
1.6%
False positive rate on swimwear
1.23×
Gender FPR disparity (FAccT audit)
0 uploads
Images sent to any server
Why xPunge
Built for the constraint that matters most

The model runs entirely on-device via CoreML (iOS) and LiteRT (Android). That constraint isn't a tradeoff — it turned out to be an advantage.

🔒
True privacy
Images are processed locally and never transmitted. No server ever sees the content your users are analyzing.
Fast on-device inference
YOLO26n runs NMS-free with native end-to-end inference. ~39ms CPU latency. No network round-trip, no cold starts.
🎯
Anatomy detection, not scene classification
xPunge detects specific anatomical regions with bounding boxes — not "looks like NSFW." This eliminates the false positives that plague whole-image classifiers.
⚖️
Fairness-audited
Evaluated against the FAccT 2024 methodology. Gender FPR disparity ratio of 1.23× — lower than all models audited in the original Garcia et al. study.
📦
Tiny footprint
5.1 MB model — 17× smaller than InceptionV3 classifiers, 175× smaller than CLIP-based models. Ships inside your app bundle.
🧩
Simple Flutter API
Three methods. initialize(), analyzeImage(), analyzeFile(). Works with any Uint8List — JPEG, PNG, HEIF, WebP.
📄
Benchmarks & fairness audit
Three independent evaluations — against Google Cloud Vision SafeSearch, a Vision Transformer classifier, and the FAccT 2024 fairness methodology — are documented in full. Read the paper →
Quickstart
Up and running in minutes

Get an API key from the developer dashboard, then add the plugin to your Flutter project.

1
Get an API key
Sign up at the developer dashboard. Register your app's bundle ID or package name. A free key (1,000 images/month) is issued immediately.
2
Add the dependency
In your pubspec.yaml:
pubspec.yaml
dependencies:
  xpunge: ^1.0.0
3
Initialize & detect
Call initialize() once at app start. Then analyzeImage() returns a list of Detection objects — each with a label, confidence score, and bounding box.
Full example
import 'package:xpunge/xpunge.dart';

// In main() or app initialization
await XPunge.initialize('xp1.your-api-key');

// From bytes
List<Detection> results =
    await XPunge.analyzeImage(imageBytes);

// From a File
List<Detection> results =
    await XPunge.analyzeFile(file);

// From an XFile (image_picker, etc.)
List<Detection> results =
    await XPunge.analyzeXFile(xfile);
Detection class
class Detection {
  final String  label;        // e.g. "explicit"
  final double  confidence;   // 0.0 – 1.0
  final Rect    boundingBox;  // pixel coords
  // free tier: boundingBox = Rect.zero
}
Start free. Scale when you're ready.

Priced per image — cheaper than Google Cloud Vision at every tier. All paid plans include full bounding boxes, video frame analysis, and email support.

Free
$0
forever
1,000
images / month
Get started
Basic
$29
/ month
50,000
images / month · $0.00058 / img
Subscribe
Growth
$149
/ month
500,000
images / month · $0.00030 / img
Subscribe
Scale
$499
/ month
5,000,000
images / month · $0.00010 / img
Subscribe
Enterprise
Custom
 
5M+
images / month · negotiated
Contact us
All plans billed monthly. Cancel anytime via the Stripe customer portal.
Google Cloud Vision SafeSearch costs $0.0015/image at every volume.