async loadApp(settings = null) {

        const app = settings? settings : {
                name: 'Detect',
                method: this.draw, // this.recognize
                //algorithm: faceapi.SsdMobilenetv1Options,
                options: {
                    //welcome: "Show yourselves and we will detect your faces",
                    detection: true,
                    //age: true,
                    //gender: true,
                    //expression: true,
                    ////puppeteer: true,
                    //landmarks: true,
                    //recognition: true
                }
        };
        
        // load recognition models for use in the "Where is" app
        try {
           app.options.recognitionModel = settings && settings.models && app.options.recognition? await this.loadRecognition(settings.models) : null; 
        } catch (error) {
            console.log(error);
        }
        

        var button = document.createElement('button');
        button.innerHTML = app.name;
        button.id = 'app' + app.id;
        button.addEventListener('click', !app.custom ? this.detectFaces(app, this) : this.custom(app, this));
        document.getElementById('apps').appendChild(button);

    }
/* 
     * Promise that loads the app settings
     * @settings: Optional. Every app is controlled by a set of configuration that degines its behavior
     * - name: String. defines the name of the app that will appear in the UI
     * - custom: Boolean. When true, the application bypasses detection or recognition by calling a callback method
     * - method: 2 framework methods can be called. "draw" is for drawing on top of the medium. "recognize" is for calling the facial recognition. Any other callback method can be used
     * - algorithm: the faceapi algorithm used. The default algorithm is SsdMobilenetv1Options
     * - options: 
     *      - welcome: String. welcome message
     *      - detection: Boolean. when true it draws a box around detected faces
     *      - age, gender, expression: Boolean. when true, they are evaluated
     *      - landmarks: Boolean. when true, the line drawing is drawn on top of the face
     *      - recognition: Boolean. when true the recognition engine is called
     * - models
     *      - labels: Array. Collection of the names of "faces" to be recognized. A folder of the same name needs to be created in the "recognition" folder
     *      - images: Array. Collection of the pictures associated with a label. Used only to create on the fly training of one face
     *      - sampleSize: Integer. size of the picture of sample
     */
Promise that loads the app settings
@settings: Optional. Every app is controlled by a set of configuration that degines its behavior
- name: String. defines the name of the app that will appear in the UI
- custom: Boolean. When true, the application bypasses detection or recognition by calling a callback method
- method: 2 framework methods can be called. "draw" is for drawing on top of the medium. "recognize" is for calling the facial recognition. Any other callback method can be used
- algorithm: the faceapi algorithm used. The default algorithm is SsdMobilenetv1Options
- options:
- welcome: String. welcome message
- detection: Boolean. when true it draws a box around detected faces
- age, gender, expression: Boolean. when true, they are evaluated
- landmarks: Boolean. when true, the line drawing is drawn on top of the face
- recognition: Boolean. when true the recognition engine is called
- models
- labels: Array. Collection of the names of "faces" to be recognized. A folder of the same name needs to be created in the "recognition" folder
- images: Array. Collection of the pictures associated with a label. Used only to create on the fly training of one face
- sampleSize: Integer. size of the picture of sample
Promise that loads the app settings @settings : Optional . Every app is controlled by a set of configuration that degines its behavior - name : String . defines the name of the app that will appear in the UI - custom : Boolean . When true the application bypasses detection or recognition by calling a callback method - method : 2 framework methods can be called . " draw " is for drawing on top of the medium . " recognize " is for calling the facial recognition . Any other callback method can be used - algorithm : the faceapi algorithm used . The default algorithm is SsdMobilenetv1Options - options : - welcome : String . welcome message - detection : Boolean . when true it draws a box around detected faces - age gender expression : Boolean . when true they are evaluated - landmarks : Boolean . when true the line drawing is drawn on top of the face - recognition : Boolean . when true the recognition engine is called - models - labels : Array . Collection of the names of " faces " to be recognized . A folder of the same name needs to be created in the " recognition " folder - images : Array . Collection of the pictures associated with a label . Used only to create on the fly training of one face - sampleSize : Integer . size of the picture of sample
async loadApp(settings = null) {
        const app = settings? settings : {
                name: 'Detect',
                method: this.draw, 
                options: {
                    detection: true,
                }
        };
        try {
           app.options.recognitionModel = settings && settings.models && app.options.recognition? await this.loadRecognition(settings.models) : null; 
        } catch (error) {
            console.log(error);
        }
        var button = document.createElement('button');
        button.innerHTML = app.name;
        button.id = 'app' + app.id;
        button.addEventListener('click', !app.custom ? this.detectFaces(app, this) : this.custom(app, this));
        document.getElementById('apps').appendChild(button);
    }
async loadApp ( settings = null ) { const app = settings ? settings : { name : 'Detect' , method : this . draw , options : { detection : true , } } ; try { app . options . recognitionModel = settings && settings . models && app . options . recognition ? await this . loadRecognition ( settings . models ) : null ; } catch ( error ) { console . log ( error ) ; } var button = document . createElement ( 'button' ) ; button . innerHTML = app . name ; button . id = 'app' + app . id ; button . addEventListener ( 'click' , ! app . custom ? this . detectFaces ( app , this ) : this . custom ( app , this ) ) ; document . getElementById ( 'apps' ) . appendChild ( button ) ; }
Promise that loads the app settings
 @settings: Optional.
Promise that loads the app settings @settings : Optional .
// this.recognize //algorithm: faceapi.SsdMobilenetv1Options, //welcome: "Show yourselves and we will detect your faces", //age: true, //gender: true, //expression: true, ////puppeteer: true, //landmarks: true, //recognition: true // load recognition models for use in the "Where is" app