spawn static method
Future<HandDetectorIsolate>
spawn({
- HandMode mode = HandMode.boxesAndLandmarks,
- HandLandmarkModel landmarkModel = HandLandmarkModel.full,
- double detectorConf = 0.45,
- int maxDetections = 10,
- double minLandmarkScore = 0.5,
- int interpreterPoolSize = 1,
- PerformanceConfig performanceConfig = const PerformanceConfig(),
- bool enableGestures = false,
- double gestureMinConfidence = 0.5,
Spawns a new isolate with an initialized HandDetector.
Deprecated: Use HandDetector with HandDetector.initialize instead.
Implementation
static Future<HandDetectorIsolate> spawn({
HandMode mode = HandMode.boxesAndLandmarks,
HandLandmarkModel landmarkModel = HandLandmarkModel.full,
double detectorConf = 0.45,
int maxDetections = 10,
double minLandmarkScore = 0.5,
int interpreterPoolSize = 1,
PerformanceConfig performanceConfig = const PerformanceConfig(),
bool enableGestures = false,
double gestureMinConfidence = 0.5,
}) async {
final detector = HandDetector();
await detector.initialize(
mode: mode,
landmarkModel: landmarkModel,
detectorConf: detectorConf,
maxDetections: maxDetections,
minLandmarkScore: minLandmarkScore,
interpreterPoolSize: interpreterPoolSize,
performanceConfig: performanceConfig,
enableGestures: enableGestures,
gestureMinConfidence: gestureMinConfidence,
);
return HandDetectorIsolate._(detector: detector);
}