FlutterNsfw class

Constructors

FlutterNsfw()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

platformVersion Future<String?>
no setter

Static Methods

detectNSFWVideo({required String videoPath, required double nsfwThreshold, int frameWidth = 200, int frameHeight = 300, int durationPerFrame = 6000}) Future
Call to detect weather video is NSFW or not /// videoPath Video file url / nsfwThreshold minimum treshold above which to classify as NSFW like 0.7 /frameWidth frame width while detecting nsfw / frameHeight frame height while detecting nsfw / durationPerFrame duration per frame while detecting nsfw
getPhotoNSFWScore(String filePath) Future
Call to get the result
initNsfw(String modelPath, {bool enableLog = true, bool isOpenGPU = true, int numThreads = 4}) Future<void>
initialization modelPath Model path is required for android only you can either choose to upload model in you asset folder or upload in firebse ml enableLog Whether to enable log isOpenGPU Whether to enable GPU scanning acceleration, some models that are compatible and unfriendly can be turned off. On by default numThreads Internally allocated threads when scanning data. Default 4