mirror of https://github.com/vladmandic/human
fix performance issue when running with low confidence
parent
b02a2962f3
commit
f4bc35c3b3
|
@ -75,7 +75,7 @@ export default {
|
||||||
// false means higher performance, but incorrect mesh mapping if face angle is above 20 degrees
|
// false means higher performance, but incorrect mesh mapping if face angle is above 20 degrees
|
||||||
maxFaces: 10, // maximum number of faces detected in the input
|
maxFaces: 10, // maximum number of faces detected in the input
|
||||||
// should be set to the minimum number for performance
|
// should be set to the minimum number for performance
|
||||||
skipFrames: 11, // how many frames to go without re-running the face bounding box detector
|
skipFrames: 21, // how many frames to go without re-running the face bounding box detector
|
||||||
// only used for video inputs
|
// only used for video inputs
|
||||||
// e.g., if model is running st 25 FPS, we can re-use existing bounding
|
// 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
|
// box for updated face analysis as the head probably hasn't moved much
|
||||||
|
@ -94,7 +94,6 @@ export default {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
modelPath: '../models/facemesh.json',
|
modelPath: '../models/facemesh.json',
|
||||||
inputSize: 192, // fixed value
|
inputSize: 192, // fixed value
|
||||||
returnRawData: false, // in addition to standard mesh and box values, return raw normalized values as well
|
|
||||||
},
|
},
|
||||||
|
|
||||||
iris: {
|
iris: {
|
||||||
|
@ -116,7 +115,7 @@ export default {
|
||||||
minConfidence: 0.1, // threshold for discarding a prediction
|
minConfidence: 0.1, // threshold for discarding a prediction
|
||||||
modelPath: '../models/gender.json', // can be 'gender' or 'gender-ssrnet-imdb'
|
modelPath: '../models/gender.json', // can be 'gender' or 'gender-ssrnet-imdb'
|
||||||
inputSize: 64, // fixed value
|
inputSize: 64, // fixed value
|
||||||
skipFrames: 41, // how many frames to go without re-running the detector
|
skipFrames: 32, // how many frames to go without re-running the detector
|
||||||
// only used for video inputs
|
// only used for video inputs
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -124,7 +123,7 @@ export default {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
inputSize: 64, // fixed value
|
inputSize: 64, // fixed value
|
||||||
minConfidence: 0.1, // threshold for discarding a prediction
|
minConfidence: 0.1, // threshold for discarding a prediction
|
||||||
skipFrames: 21, // how many frames to go without re-running the detector
|
skipFrames: 33, // how many frames to go without re-running the detector
|
||||||
modelPath: '../models/emotion.json',
|
modelPath: '../models/emotion.json',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,13 @@ const userConfig = { backend: 'webgl' }; // add any user configuration overrides
|
||||||
|
|
||||||
/*
|
/*
|
||||||
const userConfig = {
|
const userConfig = {
|
||||||
backend: 'wasm',
|
backend: 'webgl',
|
||||||
async: false,
|
async: false,
|
||||||
warmup: 'face',
|
warmup: 'face',
|
||||||
videoOptimized: false,
|
videoOptimized: true,
|
||||||
face: { enabled: true, iris: { enabled: false }, mesh: { enabled: true }, age: { enabled: false }, gender: { enabled: false }, emotion: { enabled: false }, embedding: { enabled: false } },
|
face: { enabled: true, iris: { enabled: false }, mesh: { enabled: true }, age: { enabled: false }, gender: { enabled: false }, emotion: { enabled: false }, embedding: { enabled: false } },
|
||||||
hand: { enabled: false },
|
hand: { enabled: false },
|
||||||
gestures: { enabled: true },
|
gesture: { enabled: false },
|
||||||
body: { enabled: false, modelType: 'blazepose', modelPath: '../models/blazepose.json' },
|
body: { enabled: false, modelType: 'blazepose', modelPath: '../models/blazepose.json' },
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
@ -424,6 +424,7 @@ function setupMenu() {
|
||||||
});
|
});
|
||||||
menu.display.addHTML('<hr style="border-style: inset; border-color: dimgray">');
|
menu.display.addHTML('<hr style="border-style: inset; border-color: dimgray">');
|
||||||
menu.display.addBool('use 3D depth', human.draw.options, 'useDepth');
|
menu.display.addBool('use 3D depth', human.draw.options, 'useDepth');
|
||||||
|
menu.display.addBool('draw with curves', human.draw.options, 'useCurves');
|
||||||
menu.display.addBool('print labels', human.draw.options, 'drawLabels');
|
menu.display.addBool('print labels', human.draw.options, 'drawLabels');
|
||||||
menu.display.addBool('draw points', human.draw.options, 'drawPoints');
|
menu.display.addBool('draw points', human.draw.options, 'drawPoints');
|
||||||
menu.display.addBool('draw boxes', human.draw.options, 'drawBoxes');
|
menu.display.addBool('draw boxes', human.draw.options, 'drawBoxes');
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/vladmandic/human.git"
|
"url": "git+https://github.com/vladmandic/human.git"
|
||||||
},
|
},
|
||||||
"dependencies": {},
|
|
||||||
"peerDependencies": {},
|
"peerDependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tensorflow/tfjs": "^3.2.0",
|
"@tensorflow/tfjs": "^3.2.0",
|
||||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
||||||
Subproject commit 0b8afcd5149686d64d6f00bebe33937cd175d949
|
Subproject commit f981107e84085bb5ac93441162e900a0d73d0503
|
Loading…
Reference in New Issue