Pass image bytes, get back labels, confidence scores, and bounding boxes. Everything runs on the user's device — images never leave the phone.
// 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}'); }
The same model, the same key, and the same privacy guarantee across your entire stack.
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.
initialize(), analyzeImage(), analyzeFile(). Flutter, React Native — same key, same calls, same results.Get an API key from the developer dashboard, then add xPunge to your project.
dependencies: xpunge: ^1.0.0
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);
class Detection { final String label; // e.g. 'breast' final double confidence; // 0.0 – 1.0 final Rect boundingBox; // pixel coords // free tier: boundingBox = Rect.zero }
npm install xpunge
import { initialize, analyzeImage, analyzeFile } from 'xpunge'; // Call once at app startup await initialize('xp1.your-api-key'); // From base64 const detections = await analyzeImage(base64String); // From file path const detections = await analyzeFile('/path/to/image.jpg');
interface Detection { label: 'breast' | 'penis' | 'anus' | 'rear' | 'vagina'; confidence: number; // 0.0 – 1.0 x: number; // normalized 0.0 – 1.0 y: number; width: number; height: number; // free tier: x, y, width, height = 0 }
dependencies: [ .package( url: "https://github.com/markatlarge/xpunge-ios", from: "0.1.0" ), ]
import XpungeSDK let detector = XpungeDetector() // Initialize once try detector.initialize(apiKey: "xp1.your-api-key") // From image Data (JPEG, PNG, HEIF, WebP) let detections = detector.analyzeImage(imageData) // From a file path let detections = detector.analyzeFile(path: "/path/to/image.jpg") for d in detections { print("\(d.label) \(Int(d.confidence * 100))%") print("at (\(d.x), \(d.y))") }
struct Detection { let label: String // "breast" | "penis" | ... let confidence: Double // 0.0–1.0 let x: Double // normalized 0–1 let y: Double let width: Double let height: Double // free tier: x, y, width, height = 0 }
// project-level build.gradle repositories { maven { url = uri("https://maven.pkg.github.com/markatlarge/xpunge-android") credentials { username = System.getenv("GITHUB_USERNAME") password = System.getenv("GITHUB_TOKEN") } } } // app-level build.gradle dependencies { implementation 'com.xpunge:xpunge-android:0.1.0' }
import com.xpunge.android.XpungeDetector val detector = XpungeDetector(context) // Initialize once detector.initialize("xp1.your-api-key") // From a file path val detections = detector.analyzeFile("/path/to/image.jpg") // From raw bytes (JPEG, PNG, HEIF, WebP) val detections = detector.analyzeImage(imageByteArray) for (d in detections) { Log.d("xPunge", "${d.label} ${(d.confidence*100).toInt()}%") } // Release when done detector.dispose()
data class Detection( val label: String, // "breast" | "penis" | ... val confidence: Double, // 0.0–1.0 val x: Double, // normalized 0–1 val y: Double, val width: Double, val height: Double, // free tier: x, y, width, height = 0.0 )
Priced per image — cheaper than Google Cloud Vision at every tier. All paid plans include full bounding boxes, video frame analysis, and email support.