nsfw_detect
2.8.3, released 12 days ago by an unverified publisher
On-device NSFW and explicit content detection for images, videos, and camera feeds.
What it does
Analyzes images, videos, picked media, photo libraries, and camera frames on-device for NSFW content using machine learning models. It operates completely locally without server uploads or telemetry.
AI-written summary of version 2.8.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to moderate user-uploaded media or camera streams directly on the device.
- Privacy and data compliance require that media never leaves the user's phone.
- You want to scan local video files, photo libraries, or picked media items.
Skip it when
- You are targeting web platforms for anything other than one-shot file and byte scanning.
- You cannot accept the app bundle size overhead of bundled or downloadable ML models.
- Your application depends on features requiring cloud-based neural networks.
Strengths
- Runs entirely on-device with no media uploads or external telemetry.
- Supports both image and video files, camera feeds, URLs, and photo library assets.
- Includes customizable ensembles, per-category thresholds, and decision stores.
Weaknesses
- Model weights increase app size or require dynamic downloading.
- Detection is probabilistic and must be treated as a single moderation signal.
- Photo library and camera scanning require strict platform permission configurations.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 3
Requires platform-specific usage descriptions in Info.plist (iOS) and permissions in AndroidManifest.xml for camera and photo library access.
import 'package:nsfw_detect/nsfw_detect.dart';
final result = await NsfwDetector.instance.scanFile('/path/to/file.jpg');
if (result.isNsfw) {
// Handle NSFW content
}Alternatives
Packages that do the same job and could replace nsfw_detect.
- google_mlkit_object_detection
Detect and track objects in images or live camera feeds using Google's ML Kit.
87Compare - apple_vision_recognize_text
Flutter plugin to use Apple Vision Text Recognition in an image or live camera feed.
56Compare
Works with
Packages commonly used together with nsfw_detect: ones it builds on, ones built on it, and its own family.
- webnsfw_detect depends on itLightweight bindings for browser APIs via JS interop
- plugin_platform_interfacensfw_detect depends on itReusable base class for platform interfaces of Flutter federated plugins.
- shared_preferencesnsfw_detect depends on itFlutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.