UNPKG

mitsuke-live

Version:

Real-time object detection library for web browsers using TensorFlow.js and YOLO

27 lines (26 loc) 933 B
import { startFlashEffect } from "./client-helpers/visual-effects.js"; import { applySmoothTransform, createSmoothTransformState, normalizeDetectionCoordinates, updateSmoothTargets } from "./client-helpers/three-helpers.js"; import { MLClientError } from "./errors/ml-client-error.js"; import { DetectionController } from "./lib/detection-controller.js"; async function createDetector(videoElementId, canvasElementId, modelPath, metadataPath, options = {}) { const detectionController = new DetectionController( modelPath, metadataPath, options ); try { await detectionController.initialize(videoElementId, canvasElementId); return detectionController; } catch (error) { throw new MLClientError(error); } } export { applySmoothTransform, createDetector, createSmoothTransformState, normalizeDetectionCoordinates, startFlashEffect, updateSmoothTargets }; //# sourceMappingURL=main.js.map