detectBytesInBackground static method
Runs NSFW detection in a background isolate via compute.
Loads a fresh interpreter in the background isolate, runs detection, and closes the interpreter before returning the result.
Implementation
static Future<NsfwResult?> detectBytesInBackground(
Uint8List imageData, {
double threshold = _kNSFWThreshold,
}) {
_validateThreshold(threshold);
return compute(_detectInIsolate, _IsolatePayload(imageData, threshold));
}