From 2566a9633f2f0127e0bc5b1cfdf7c6dfc7c97d63 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 20 Oct 2020 07:58:20 -0400 Subject: [PATCH] log initialization --- src/human.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/human.js b/src/human.js index 25e320bd..47a54a15 100644 --- a/src/human.js +++ b/src/human.js @@ -8,6 +8,8 @@ const fxImage = require('./imagefx.js'); const defaults = require('../config.js').default; const app = require('../package.json'); +let first = true; + // static config override for non-video detection const override = { face: { detector: { skipFrames: 0 }, age: { skipFrames: 0 }, emotion: { skipFrames: 0 } }, @@ -199,11 +201,11 @@ class Human { perf.backend = Math.trunc(now() - timeStamp); // check number of loaded models - const loadedModels = Object.values(this.models).filter((a) => a).length; - if (loadedModels === 0) { + if (first) { this.log('Human library starting'); this.log('Configuration:', this.config); this.log('Flags:', tf.ENV.flags); + first = false; } // load models if enabled