registerCustomClassifier method
Registers a custom TensorFlow Lite or CoreML model for real-time edge classification.
Implementation
Future<bool> registerCustomClassifier({
required String modelAssetPath,
required List<String> labels,
double threshold = 0.5,
}) {
if (!_isRunning) throw StateError('Camera is not running.');
if (modelAssetPath.trim().isEmpty) {
throw ArgumentError.value(
modelAssetPath,
'modelAssetPath',
'Model asset path cannot be empty.',
);
}
if (labels.isEmpty) {
throw ArgumentError.value(
labels,
'labels',
'Labels list cannot be empty.',
);
}
return NexoraSdkPlatform.instance.registerCustomClassifier(
modelAssetPath: modelAssetPath,
labels: labels,
threshold: threshold,
);
}