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

discontinued
outdated

nsfw detector nsfw image detector nsfw video detector nsfw detection

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);
15
likes
0
points
40
downloads

Publisher

verified publisherahsanali.xyz

Weekly Downloads

nsfw detector nsfw image detector nsfw video detector nsfw detection

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_nsfw

Packages that implement flutter_nsfw