flutter_nsfw 0.0.2 copy "flutter_nsfw: ^0.0.2" to clipboard
flutter_nsfw: ^0.0.2 copied to clipboard

discontinued
outdated

flutter plugin for detecting NSFW content from images and videos.

Flutter NSFW #

License

  • 1- Download, tflite modle and put it in assets folder
  • 2 - Add the path of the tfliet to pubspec.yaml
  • 3 - Read the file using path_provider plugin
  • 4 - Initialize the plugin before use as
Directory  appDocDir = await  getApplicationDocumentsDirectory();
String  appDocPath = appDocDir.path;
var  file = File(appDocPath + "/nsfw.tflite");
if (!file.existsSync()) {
var  data = await  rootBundle.load("assets/model/nsfw.tflite");
final  buffer = data.buffer;
await  file.writeAsBytes(
buffer.asUint8List(data.offsetInBytes, data.lengthInBytes));
}
await  FlutterNsfw.initNsfw(file.path);
  • 5 - get photo NSFW probability
  FlutterNsfw.getPhotoNSFWScore(photoPath);
  • 6 - Get video NSFW probability by providing video path and NSFW threshold above which to classify video as nsfw you may choose to enter optional parameters too.
FlutterNsfw.detectNSFWVideo(
videoPath: videoPath,
nsfwThreshold: 0.9,
durationPerFrame: 1000);
16
likes
0
pub points
61%
popularity

Publisher

verified publisherahsanali.xyz

flutter plugin for detecting NSFW content from images and videos.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_nsfw