import * as faceDetection from '@tensorflow-models/face-detection'; /** * Enhanced ModelLoadingService * Supports multiple models: ID detection + face detection */ declare class ModelLoadingService { private backendReady; private backendPromise; private idDetectionModel; private idModelReady; private idModelPromise; private faceDetector; private faceModelReady; private faceModelPromise; /** * Initialize TensorFlow.js backend * This MUST be called before loading any models */ initializeBackend(): Promise; private _initBackend; /** * Initialize everything (backward compatible with your existing code) */ initialize(): Promise; /** * Non-blocking init (backward compatible) */ init(): void; /** * Load ID Detection Model (your existing model) */ loadIDDetectionModel(): Promise; private _loadIDModel; /** * Load Face Detection Model */ loadFaceDetectionModel(): Promise; private _loadFaceModel; /** * Initialize both models at once */ initializeAll(): Promise; /** * Get ID Detection Model */ getIDModel(): any | null; /** * Get Face Detection Model */ getFaceDetector(): faceDetection.FaceDetector | null; /** * Check if ID model is ready */ isIDModelReady(): boolean; /** * Check if face model is ready */ isFaceModelReady(): boolean; /** * Check if backend is ready */ isBackendReady(): boolean; /** * Legacy method - backward compatible */ isReady(): boolean; /** * Detect faces using the loaded face detection model */ detectFaces(input: HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): Promise; /** * Log current memory usage */ private logMemory; /** * Get current backend name */ getBackend(): string; /** * Clean up resources */ dispose(): void; } export declare const modelLoadingService: ModelLoadingService; export {};