From 250187f259654b5378267fc39c376618f1b37057 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 9 Nov 2020 14:26:10 -0500 Subject: [PATCH] reimplemented blazeface processing --- config.js | 6 +++--- demo/browser.js | 3 +-- demo/index.html | 4 ++-- src/gesture.js | 24 +++++++++++++----------- src/hand/handpipeline.js | 5 +++-- src/human.js | 6 ++++++ src/image.js | 4 +++- 7 files changed, 31 insertions(+), 21 deletions(-) diff --git a/config.js b/config.js index c806503c..bd761720 100644 --- a/config.js +++ b/config.js @@ -71,10 +71,10 @@ export default { // e.g., if model is running st 25 FPS, we can re-use existing bounding // box for updated face analysis as the head probably hasn't moved much // in short time (10 * 1/25 = 0.25 sec) - minConfidence: 0.1, // threshold for discarding a prediction - iouThreshold: 0.1, // threshold for deciding whether boxes overlap too much in + minConfidence: 0.5, // threshold for discarding a prediction + iouThreshold: 0.2, // threshold for deciding whether boxes overlap too much in // non-maximum suppression (0.1 means drop if overlap 10%) - scoreThreshold: 0.2, // threshold for deciding when to remove boxes based on score + scoreThreshold: 0.5, // threshold for deciding when to remove boxes based on score // in non-maximum suppression, // this is applied on detection objects only and before minConfidence }, diff --git a/demo/browser.js b/demo/browser.js index 598b5d94..e47942ea 100644 --- a/demo/browser.js +++ b/demo/browser.js @@ -393,8 +393,7 @@ async function main() { // this is not required, just pre-warms all models for faster initial inference if (ui.modelsWarmup) { status('initializing'); - const warmup = new ImageData(256, 256); - await human.detect(warmup, userConfig); + await human.warmup(userConfig); } status('human: ready'); document.getElementById('loader').style.display = 'none'; diff --git a/demo/index.html b/demo/index.html index b45f2bf5..6f798dd5 100644 --- a/demo/index.html +++ b/demo/index.html @@ -19,8 +19,8 @@ - - + +