async load() {
        // neural network models url
        const MODEL_URL = env.app_resources + 'models';
        
        try {
            var loaded = await Promise.all([
                // face detection algorithms
                faceapi.nets.ssdMobilenetv1.loadFromUri(MODEL_URL), // SsdMobilenetv1Options

                //faceapi.nets.mtcnn.loadFromUri(MODEL_URL), // MtcnnOptions
                faceapi.nets.tinyFaceDetector.loadFromUri(MODEL_URL), // TinyFaceDetectorOptions

                // Models for landmarks, age/gender, recognition and expressions
                faceapi.nets.faceLandmark68Net.loadFromUri(MODEL_URL),
                faceapi.nets.ageGenderNet.loadFromUri(MODEL_URL),
                faceapi.nets.faceRecognitionNet.loadFromUri(MODEL_URL),
                faceapi.nets.faceExpressionNet.loadFromUri(MODEL_URL)
            ]);
            
        } catch(error) {
            return Promise.reject(new Error(error));

        }

    }
/* 
    * Promise that loads all the models
    */
Promise that loads all the models
Promise that loads all the models
async load() {
        const MODEL_URL = env.app_resources + 'models';
        try {
            var loaded = await Promise.all([
                faceapi.nets.ssdMobilenetv1.loadFromUri(MODEL_URL), 
                faceapi.nets.tinyFaceDetector.loadFromUri(MODEL_URL), 
                faceapi.nets.faceLandmark68Net.loadFromUri(MODEL_URL),
                faceapi.nets.ageGenderNet.loadFromUri(MODEL_URL),
                faceapi.nets.faceRecognitionNet.loadFromUri(MODEL_URL),
                faceapi.nets.faceExpressionNet.loadFromUri(MODEL_URL)
            ]);
        } catch(error) {
            return Promise.reject(new Error(error));
        }
    }
async load ( ) { const MODEL_URL = env . app_resources + 'models' ; try { var loaded = await Promise . all ( [ faceapi . nets . ssdMobilenetv1 . loadFromUri ( MODEL_URL ) , faceapi . nets . tinyFaceDetector . loadFromUri ( MODEL_URL ) , faceapi . nets . faceLandmark68Net . loadFromUri ( MODEL_URL ) , faceapi . nets . ageGenderNet . loadFromUri ( MODEL_URL ) , faceapi . nets . faceRecognitionNet . loadFromUri ( MODEL_URL ) , faceapi . nets . faceExpressionNet . loadFromUri ( MODEL_URL ) ] ) ; } catch ( error ) { return Promise . reject ( new Error ( error ) ) ; } }
Promise that loads all the models
Promise that loads all the models
// neural network models url // face detection algorithms // SsdMobilenetv1Options //faceapi.nets.mtcnn.loadFromUri(MODEL_URL), // MtcnnOptions // TinyFaceDetectorOptions // Models for landmarks, age/gender, recognition and expressions