diff --git a/Configuration.md b/Configuration.md index 984368b..828f4c1 100644 --- a/Configuration.md +++ b/Configuration.md @@ -41,7 +41,7 @@ config = { // when backend is set outside of Human library wasmPath: '../assets/', // path for wasm binaries // only used for backend: wasm - debug: false, // print additional status messages to console + debug: true, // print additional status messages to console async: true, // execute enabled models in parallel // this disables per-model performance data but // slightly increases performance @@ -97,28 +97,25 @@ config = { enabled: true, // controls if specified modul is enabled // face.enabled is required for all face models: // detector, mesh, iris, age, gender, emotion - // running detector only with mesh disabled is not recommended as detector prepares list of candidates - // which are then validated and stabilized by mesh - // running detetor-only produces fast but unreliable results with false positives // (note: module is not loaded until it is required) detector: { modelPath: '../models/blazeface-back.json', - inputSize: 256, // fixed value - rotation: false, // 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 + // this parameter is not valid in nodejs maxFaces: 10, // maximum number of faces detected in the input // 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 // 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.5, // threshold for discarding a prediction - iouThreshold: 0.2, // threshold for deciding whether boxes overlap too much in + minConfidence: 0.2, // threshold for discarding a prediction + iouThreshold: 0.1, // threshold for deciding whether boxes overlap too much in // non-maximum suppression (0.1 means drop if overlap 10%) - scoreThreshold: 0.5, // threshold for deciding when to remove boxes based on score + scoreThreshold: 0.2, // threshold for deciding when to remove boxes based on score // in non-maximum suppression, // this is applied on detection objects only and before minConfidence }, @@ -126,19 +123,16 @@ config = { mesh: { enabled: true, modelPath: '../models/facemesh.json', - inputSize: 192, // fixed value }, iris: { enabled: true, modelPath: '../models/iris.json', - inputSize: 64, // fixed value }, age: { enabled: true, - modelPath: '../models/age-ssrnet-imdb.json', - inputSize: 64, // fixed value + modelPath: '../models/age.json', skipFrames: 31, // how many frames to go without re-running the detector // only used for video inputs }, @@ -146,23 +140,20 @@ config = { gender: { enabled: true, minConfidence: 0.1, // threshold for discarding a prediction - modelPath: '../models/gender.json', // can be 'gender' or 'gender-ssrnet-imdb' - inputSize: 64, // fixed value - skipFrames: 41, // how many frames to go without re-running the detector + modelPath: '../models/gender.json', + skipFrames: 32, // how many frames to go without re-running the detector // only used for video inputs }, emotion: { enabled: true, - inputSize: 64, // fixed value - minConfidence: 0.2, // threshold for discarding a prediction - skipFrames: 21, // how many frames to go without re-running the detector + minConfidence: 0.1, // threshold for discarding a prediction + skipFrames: 33, // how many frames to go without re-running the detector modelPath: '../models/emotion.json', }, embedding: { enabled: false, - inputSize: 112, // fixed value modelPath: '../models/mobilefacenet.json', }, }, @@ -170,23 +161,20 @@ config = { body: { enabled: true, modelPath: '../models/posenet.json', // can be 'posenet' or 'blazepose' - inputSize: 257, // fixed value, 257 for posenet and 256 for blazepose maxDetections: 10, // maximum number of people detected in the input // should be set to the minimum number for performance // only valid for posenet as blazepose only detects single pose - scoreThreshold: 0.5, // threshold for deciding when to remove boxes based on score + scoreThreshold: 0.3, // threshold for deciding when to remove boxes based on score // in non-maximum suppression // only valid for posenet as blazepose only detects single pose nmsRadius: 20, // radius for deciding points are too close in non-maximum suppression // only valid for posenet as blazepose only detects single pose - modelType: 'posenet-mobilenet', // can be 'posenet-mobilenet', 'posenet-resnet', 'blazepose' }, hand: { enabled: true, rotation: false, // use best-guess rotated hand image or just box with rotation as-is // false means higher performance, but incorrect finger mapping if hand is inverted - inputSize: 256, // fixed value skipFrames: 12, // how many frames to go without re-running the hand bounding box detector // only used for video inputs // e.g., if model is running st 25 FPS, we can re-use existing bounding @@ -209,7 +197,7 @@ config = { modelPath: '../models/handskeleton.json', }, }, -}; +} ```
diff --git a/Demos.md b/Demos.md index 5b15013..64237c4 100644 --- a/Demos.md +++ b/Demos.md @@ -58,7 +58,7 @@ node demo/node.js 10:28:53.445 Human: setting backend: tensorflow 10:28:53.505 Human: load model: /models/faceboxes 10:28:53.505 Human: load model: /models/iris -10:28:53.522 Human: load model: /models/age-ssrnet-imdb +10:28:53.522 Human: load model: /models/age 10:28:53.529 Human: load model: /models/gender 10:28:53.535 Human: load model: /models/emotion 10:28:53.607 Human: load model: /models/handdetect @@ -176,8 +176,8 @@ found 0 vulnerabilities 2020-12-12 10:12:55 DATA: GET/2.0 200 application/json 79014 /models/blazeface-back.json ::ffff:192.168.0.200 2020-12-12 10:12:55 DATA: GET/2.0 200 application/json 89231 /models/facemesh.json ::ffff:192.168.0.200 2020-12-12 10:12:55 DATA: GET/2.0 200 application/json 121966 /models/iris.json ::ffff:192.168.0.200 -2020-12-12 10:12:55 DATA: GET/2.0 200 application/json 94507 /models/age-ssrnet-imdb.json ::ffff:192.168.0.200 -2020-12-12 10:12:55 DATA: GET/2.0 200 application/json 93349 /models/gender-ssrnet-imdb.json ::ffff:192.168.0.200 +2020-12-12 10:12:55 DATA: GET/2.0 200 application/json 94507 /models/age.json ::ffff:192.168.0.200 +2020-12-12 10:12:55 DATA: GET/2.0 200 application/json 93349 /models/gender.json ::ffff:192.168.0.200 2020-12-12 10:12:55 DATA: GET/2.0 200 application/json 17954 /models/emotion.json ::ffff:192.168.0.200 2020-12-12 10:12:55 DATA: GET/2.0 200 application/json 48039 /models/posenet.json ::ffff:192.168.0.200 2020-12-12 10:12:55 DATA: GET/2.0 200 application/json 128180 /models/handdetect.json ::ffff:192.168.0.200 @@ -185,9 +185,9 @@ found 0 vulnerabilities 2020-12-12 10:12:55 DATA: GET/2.0 200 application/octet-stream 538928 /models/blazeface-back.bin ::ffff:192.168.0.200 2020-12-12 10:12:55 DATA: GET/2.0 200 application/octet-stream 2599092 /models/iris.bin ::ffff:192.168.0.200 2020-12-12 10:12:55 DATA: GET/2.0 200 application/octet-stream 2955780 /models/facemesh.bin ::ffff:192.168.0.200 -2020-12-12 10:12:55 DATA: GET/2.0 200 application/octet-stream 161240 /models/age-ssrnet-imdb.bin ::ffff:192.168.0.200 +2020-12-12 10:12:55 DATA: GET/2.0 200 application/octet-stream 161240 /models/age.bin ::ffff:192.168.0.200 2020-12-12 10:12:55 DATA: GET/2.0 200 application/octet-stream 5032780 /models/posenet.bin ::ffff:192.168.0.200 -2020-12-12 10:12:55 DATA: GET/2.0 200 application/octet-stream 161236 /models/gender-ssrnet-imdb.bin ::ffff:192.168.0.200 +2020-12-12 10:12:55 DATA: GET/2.0 200 application/octet-stream 161236 /models/gender.bin ::ffff:192.168.0.200 2020-12-12 10:12:55 DATA: GET/2.0 200 application/octet-stream 7031064 /models/handdetect.bin ::ffff:192.168.0.200 2020-12-12 10:12:55 DATA: GET/2.0 200 application/octet-stream 820516 /models/emotion.bin ::ffff:192.168.0.200 2020-12-12 10:12:55 DATA: GET/2.0 200 application/octet-stream 5502280 /models/handskeleton.bin ::ffff:192.168.0.200 diff --git a/Models.md b/Models.md index 6c9e9a9..41befb2 100644 --- a/Models.md +++ b/Models.md @@ -40,7 +40,7 @@ Default models in Human library are: | MediaPipe FaceMesh | 88K | facemesh.json | 2.9M | facemesh.bin | 118 | | MediaPipe Iris | 120K | iris.json | 2.5M | iris.bin | 191 | | Oarriaga Emotion | 18K | emotion.json | 802K | emotion.bin | 23 | -| SSR-Net Age (IMDB) | 93K | age-ssrnet-imdb.json | 158K | age-ssrnet-imdb.bin | 158 | +| SSR-Net Age (IMDB) | 93K | age.json | 158K | age.bin | 158 | | SSR-Net Gender (IMDB) | 92K | gender-ssrnet-imdb.json | 158K | gender-ssrnet-imdb.bin | 157 | | Oarriaga Gender | 30K | gender.json | 198K | gender.bin | 39 | | PoseNet | 47K | posenet.json | 4.8M | posenet.bin | 62 |