enable handtrack as default model

pull/193/head
Vladimir Mandic 2021-09-28 12:02:17 -04:00
parent 9274f42fba
commit d343b0b408
10 changed files with 34 additions and 21 deletions

View File

@ -138,7 +138,7 @@ var config = {
detector: { detector: {
modelPath: "blazeface.json", modelPath: "blazeface.json",
rotation: true, rotation: true,
maxDetected: 15, maxDetected: 1,
skipFrames: 15, skipFrames: 15,
minConfidence: 0.2, minConfidence: 0.2,
iouThreshold: 0.1, iouThreshold: 0.1,
@ -179,12 +179,12 @@ var config = {
enabled: true, enabled: true,
rotation: true, rotation: true,
skipFrames: 18, skipFrames: 18,
minConfidence: 0.8, minConfidence: 0.5,
iouThreshold: 0.2, iouThreshold: 0.2,
maxDetected: -1, maxDetected: -1,
landmarks: true, landmarks: true,
detector: { detector: {
modelPath: "handdetect.json" modelPath: "handtrack.json"
}, },
skeleton: { skeleton: {
modelPath: "handskeleton.json" modelPath: "handskeleton.json"

File diff suppressed because one or more lines are too long

6
dist/human.esm.js vendored
View File

@ -134,7 +134,7 @@ var config = {
detector: { detector: {
modelPath: "blazeface.json", modelPath: "blazeface.json",
rotation: true, rotation: true,
maxDetected: 15, maxDetected: 1,
skipFrames: 15, skipFrames: 15,
minConfidence: 0.2, minConfidence: 0.2,
iouThreshold: 0.1, iouThreshold: 0.1,
@ -175,12 +175,12 @@ var config = {
enabled: true, enabled: true,
rotation: true, rotation: true,
skipFrames: 18, skipFrames: 18,
minConfidence: 0.8, minConfidence: 0.5,
iouThreshold: 0.2, iouThreshold: 0.2,
maxDetected: -1, maxDetected: -1,
landmarks: true, landmarks: true,
detector: { detector: {
modelPath: "handdetect.json" modelPath: "handtrack.json"
}, },
skeleton: { skeleton: {
modelPath: "handskeleton.json" modelPath: "handskeleton.json"

File diff suppressed because one or more lines are too long

2
dist/human.js vendored

File diff suppressed because one or more lines are too long

View File

@ -181,7 +181,7 @@ var config = {
detector: { detector: {
modelPath: "blazeface.json", modelPath: "blazeface.json",
rotation: true, rotation: true,
maxDetected: 15, maxDetected: 1,
skipFrames: 15, skipFrames: 15,
minConfidence: 0.2, minConfidence: 0.2,
iouThreshold: 0.1, iouThreshold: 0.1,
@ -222,12 +222,12 @@ var config = {
enabled: true, enabled: true,
rotation: true, rotation: true,
skipFrames: 18, skipFrames: 18,
minConfidence: 0.8, minConfidence: 0.5,
iouThreshold: 0.2, iouThreshold: 0.2,
maxDetected: -1, maxDetected: -1,
landmarks: true, landmarks: true,
detector: { detector: {
modelPath: "handdetect.json" modelPath: "handtrack.json"
}, },
skeleton: { skeleton: {
modelPath: "handskeleton.json" modelPath: "handskeleton.json"

View File

@ -182,7 +182,7 @@ var config = {
detector: { detector: {
modelPath: "blazeface.json", modelPath: "blazeface.json",
rotation: true, rotation: true,
maxDetected: 15, maxDetected: 1,
skipFrames: 15, skipFrames: 15,
minConfidence: 0.2, minConfidence: 0.2,
iouThreshold: 0.1, iouThreshold: 0.1,
@ -223,12 +223,12 @@ var config = {
enabled: true, enabled: true,
rotation: true, rotation: true,
skipFrames: 18, skipFrames: 18,
minConfidence: 0.8, minConfidence: 0.5,
iouThreshold: 0.2, iouThreshold: 0.2,
maxDetected: -1, maxDetected: -1,
landmarks: true, landmarks: true,
detector: { detector: {
modelPath: "handdetect.json" modelPath: "handtrack.json"
}, },
skeleton: { skeleton: {
modelPath: "handskeleton.json" modelPath: "handskeleton.json"

6
dist/human.node.js vendored
View File

@ -181,7 +181,7 @@ var config = {
detector: { detector: {
modelPath: "blazeface.json", modelPath: "blazeface.json",
rotation: true, rotation: true,
maxDetected: 15, maxDetected: 1,
skipFrames: 15, skipFrames: 15,
minConfidence: 0.2, minConfidence: 0.2,
iouThreshold: 0.1, iouThreshold: 0.1,
@ -222,12 +222,12 @@ var config = {
enabled: true, enabled: true,
rotation: true, rotation: true,
skipFrames: 18, skipFrames: 18,
minConfidence: 0.8, minConfidence: 0.5,
iouThreshold: 0.2, iouThreshold: 0.2,
maxDetected: -1, maxDetected: -1,
landmarks: true, landmarks: true,
detector: { detector: {
modelPath: "handdetect.json" modelPath: "handtrack.json"
}, },
skeleton: { skeleton: {
modelPath: "handskeleton.json" modelPath: "handskeleton.json"

View File

@ -356,7 +356,7 @@ const config: Config = {
rotation: true, // use best-guess rotated face image or just box with rotation as-is rotation: true, // use best-guess rotated face image or just box with rotation as-is
// 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
// this parameter is not valid in nodejs // this parameter is not valid in nodejs
maxDetected: 15, // maximum number of faces detected in the input maxDetected: 1, // 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: 15, // how many max frames to go without re-running the face bounding box detector skipFrames: 15, // how many max frames to go without re-running the face bounding box detector
// only used when cacheSensitivity is not zero // only used when cacheSensitivity is not zero
@ -425,14 +425,14 @@ const config: Config = {
// 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 hand skeleton analysis as the hand // box for updated hand skeleton analysis as the hand
// hasn't moved much in short time (10 * 1/25 = 0.25 sec) // hasn't moved much in short time (10 * 1/25 = 0.25 sec)
minConfidence: 0.8, // threshold for discarding a prediction minConfidence: 0.5, // threshold for discarding a prediction
iouThreshold: 0.2, // ammount of overlap between two detected objects before one object is removed iouThreshold: 0.2, // ammount of overlap between two detected objects before one object is removed
maxDetected: -1, // maximum number of hands detected in the input maxDetected: -1, // maximum number of hands detected in the input
// should be set to the minimum number for performance // should be set to the minimum number for performance
// set to -1 to autodetect based on number of detected faces // set to -1 to autodetect based on number of detected faces
landmarks: true, // detect hand landmarks or just hand boundary box landmarks: true, // detect hand landmarks or just hand boundary box
detector: { detector: {
modelPath: 'handdetect.json', // hand detector model, can be absolute path or relative to modelBasePath modelPath: 'handtrack.json', // hand detector model, can be absolute path or relative to modelBasePath
// can be 'handdetect' or 'handtrack' // can be 'handdetect' or 'handtrack'
}, },
skeleton: { skeleton: {

View File

@ -3762,3 +3762,16 @@
2021-09-28 12:01:34 STATE: Compile: {"name":"tfjs/browser/esm/bundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":8,"inputBytes":3088,"outputBytes":2377041} 2021-09-28 12:01:34 STATE: Compile: {"name":"tfjs/browser/esm/bundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":8,"inputBytes":3088,"outputBytes":2377041}
2021-09-28 12:01:34 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":49,"inputBytes":2881238,"outputBytes":1417108} 2021-09-28 12:01:34 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":49,"inputBytes":2881238,"outputBytes":1417108}
2021-09-28 12:01:35 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":49,"inputBytes":2881238,"outputBytes":2627639} 2021-09-28 12:01:35 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":49,"inputBytes":2881238,"outputBytes":2627639}
2021-09-28 12:01:58 INFO:  Watch: {"event":"modify","input":"src/config.ts"}
2021-09-28 12:01:59 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
2021-09-28 12:01:59 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":49,"inputBytes":505471,"outputBytes":421102}
2021-09-28 12:01:59 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
2021-09-28 12:01:59 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":49,"inputBytes":505479,"outputBytes":421106}
2021-09-28 12:01:59 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
2021-09-28 12:01:59 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":49,"inputBytes":505546,"outputBytes":421178}
2021-09-28 12:01:59 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1631}
2021-09-28 12:01:59 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":3088,"outputBytes":793}
2021-09-28 12:01:59 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":49,"inputBytes":504989,"outputBytes":422544}
2021-09-28 12:01:59 STATE: Compile: {"name":"tfjs/browser/esm/bundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":8,"inputBytes":3088,"outputBytes":2377041}
2021-09-28 12:02:00 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":49,"inputBytes":2881237,"outputBytes":1417106}
2021-09-28 12:02:00 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":49,"inputBytes":2881237,"outputBytes":2627637}