quantize handdetect model

pull/280/head
Vladimir Mandic 2021-05-29 18:29:57 -04:00
parent 5916b7ff18
commit 363e1a3370
5 changed files with 15 additions and 11 deletions

View File

@ -9,8 +9,9 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
## Changelog
### **HEAD -> main** 2021/05/28 mandic00@live.com
### **HEAD -> main** 2021/05/29 mandic00@live.com
- added experimental movenet-lightning and removed blazepose from default dist
- added experimental face.rotation.gaze
- fix and optimize for mobile platform
- lock typescript to 4.2 due to typedoc incompatibility with 4.3

View File

@ -7,13 +7,12 @@ N/A
## Exploring Features
- Switch from PoseNet to MoveNet
- Optimize HandPose
- Implement demo as installable PWA with model caching
- Implement results interpolation on library level
## Explore Models
- InsightFace
RetinaFace detector and ArcFace recognition
<https://github.com/deepinsight/insightface>
- InsightFace: RetinaFace detector and ArcFace recognition: <https://github.com/deepinsight/insightface>
## In Progress

View File

@ -15,7 +15,7 @@ import webRTC from './helpers/webrtc.js';
let human;
const userConfig = {
warmup: 'none',
warmup: 'full',
/*
backend: 'webgl',
async: false,
@ -33,8 +33,8 @@ const userConfig = {
},
hand: { enabled: false },
// body: { enabled: true, modelPath: 'posenet.json' },
body: { enabled: true, modelPath: 'movenet-lightning.json' },
// body: { enabled: true, modelPath: 'blazepose.json' },
body: { enabled: true, modelPath: 'movenet-lightning.json' },
object: { enabled: false },
gesture: { enabled: true },
*/

View File

@ -287,8 +287,8 @@ const config: Config = {
body: {
enabled: true,
modelPath: 'posenet.json', // body model, can be absolute path or relative to modelBasePath
// can be 'posenet', 'blazepose', 'efficientpose', 'movenet'
modelPath: 'movenet-lightning.json', // body model, can be absolute path or relative to modelBasePath
// can be 'posenet', 'blazepose', 'efficientpose', 'movenet-lightning', 'movenet-thunder'
maxDetected: 1, // maximum number of people detected in the input
// should be set to the minimum number for performance
// only valid for posenet as other models detects single pose

View File

@ -60,6 +60,10 @@ export class Human {
* - Details: {@link Config}
*/
config: Config;
/** Last known result of detect run
* - Can be accessed anytime after initial detection
*/
result: Result;
/** Current state of Human library
* - Can be polled to determine operations that are currently executed
*/
@ -548,7 +552,7 @@ export class Human {
this.perf.total = Math.trunc(now() - timeStart);
this.state = 'idle';
const res = {
this.result = {
face: faceRes,
body: bodyRes,
hand: handRes,
@ -564,7 +568,7 @@ export class Human {
tf.dispose(process.tensor);
// log('Result:', result);
resolve(res);
resolve(this.result);
});
}