Skip to content
pubscout

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.

WASM-ready
$ flutter pub add nsfw_detect
Source repository

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.

Works with

Packages commonly used together with nsfw_detect: ones it builds on, ones built on it, and its own family.