spawn static method

Future<HandDetectorIsolate> spawn({
  1. HandMode mode = HandMode.boxesAndLandmarks,
  2. HandLandmarkModel landmarkModel = HandLandmarkModel.full,
  3. double detectorConf = 0.45,
  4. int maxDetections = 10,
  5. double minLandmarkScore = 0.5,
  6. int interpreterPoolSize = 1,
  7. PerformanceConfig performanceConfig = const PerformanceConfig(),
  8. bool enableGestures = false,
  9. 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);
}