added skipInitial flag

pull/293/head
Vladimir Mandic 2021-03-01 17:20:02 -05:00
parent 5c712d792b
commit 23205e8173
4 changed files with 10 additions and 3 deletions

View File

@ -76,6 +76,8 @@ 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)
skipInitial: false, // if previous detection resulted in no faces detected,
// should skipFrames be reset immediately
minConfidence: 0.2, // 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%)
@ -154,6 +156,8 @@ export default {
// e.g., if model is running st 25 FPS, we can re-use existing bounding
// box for updated hand skeleton analysis as the hand probably
// hasn't moved much in short time (10 * 1/25 = 0.25 sec)
skipInitial: false, // if previous detection resulted in no faces detected,
// should skipFrames be reset immediately
minConfidence: 0.1, // threshold for discarding a prediction
iouThreshold: 0.1, // threshold for deciding whether boxes overlap too much
// in non-maximum suppression

View File

@ -8,8 +8,9 @@ import draw from './draw.js';
import Menu from './menu.js';
import GLBench from './gl-bench.js';
// const userConfig = {}; // add any user configuration overrides
const userConfig = {}; // add any user configuration overrides
/*
const userConfig = {
backend: 'wasm',
async: false,
@ -18,6 +19,7 @@ const userConfig = {
body: { enabled: false },
hand: { enabled: false },
};
*/
const human = new Human(userConfig);

View File

@ -90,7 +90,8 @@ export class HandPipeline {
if (this.storedBoxes.length > 0) useFreshBox = true;
}
const hands: Array<{}> = [];
// log('hand', `skipped: ${this.skipped} max: ${config.hand.maxHands} detected: ${this.detectedHands} stored: ${this.storedBoxes.length} new: ${boxes?.length}`);
if (config.hand.skipInitial && this.detectedHands === 0) this.skipped = 0;
// go through working set of boxes
for (let i = 0; i < this.storedBoxes.length; i++) {

2
wiki

@ -1 +1 @@
Subproject commit 35cb9ec10d7036a8a2ec425c00798050dd9eafea
Subproject commit c283c4a21d26dc0ba03e576dae8e6fbd3af12ac8