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

discontinued
outdated

nsfw detector nsfw image detector nsfw video detector nsfw detection NSFW Detection NSFW Detector NSFW Image Detector NSFW Video Detector NSFW video NSFW image NSFW detector

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
60%
popularity

Publisher

verified publisherahsanali.xyz

nsfw detector nsfw image detector nsfw video detector nsfw detection NSFW Detection NSFW Detector NSFW Image Detector NSFW Video Detector NSFW video NSFW image NSFW detector

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_nsfw