mirror of https://github.com/vladmandic/human
quantize handdetect model
parent
02930dfdb9
commit
a3bf652abc
|
@ -9,8 +9,9 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
||||||
|
|
||||||
## Changelog
|
## 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
|
- added experimental face.rotation.gaze
|
||||||
- fix and optimize for mobile platform
|
- fix and optimize for mobile platform
|
||||||
- lock typescript to 4.2 due to typedoc incompatibility with 4.3
|
- lock typescript to 4.2 due to typedoc incompatibility with 4.3
|
||||||
|
|
7
TODO.md
7
TODO.md
|
@ -7,13 +7,12 @@ N/A
|
||||||
## Exploring Features
|
## Exploring Features
|
||||||
|
|
||||||
- Switch from PoseNet to MoveNet
|
- Switch from PoseNet to MoveNet
|
||||||
- Optimize HandPose
|
- Implement demo as installable PWA with model caching
|
||||||
|
- Implement results interpolation on library level
|
||||||
|
|
||||||
## Explore Models
|
## Explore Models
|
||||||
|
|
||||||
- InsightFace
|
- InsightFace: RetinaFace detector and ArcFace recognition: <https://github.com/deepinsight/insightface>
|
||||||
RetinaFace detector and ArcFace recognition
|
|
||||||
<https://github.com/deepinsight/insightface>
|
|
||||||
|
|
||||||
## In Progress
|
## In Progress
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ import webRTC from './helpers/webrtc.js';
|
||||||
let human;
|
let human;
|
||||||
|
|
||||||
const userConfig = {
|
const userConfig = {
|
||||||
warmup: 'none',
|
warmup: 'full',
|
||||||
/*
|
/*
|
||||||
backend: 'webgl',
|
backend: 'webgl',
|
||||||
async: false,
|
async: false,
|
||||||
|
@ -33,8 +33,8 @@ const userConfig = {
|
||||||
},
|
},
|
||||||
hand: { enabled: false },
|
hand: { enabled: false },
|
||||||
// body: { enabled: true, modelPath: 'posenet.json' },
|
// body: { enabled: true, modelPath: 'posenet.json' },
|
||||||
body: { enabled: true, modelPath: 'movenet-lightning.json' },
|
|
||||||
// body: { enabled: true, modelPath: 'blazepose.json' },
|
// body: { enabled: true, modelPath: 'blazepose.json' },
|
||||||
|
body: { enabled: true, modelPath: 'movenet-lightning.json' },
|
||||||
object: { enabled: false },
|
object: { enabled: false },
|
||||||
gesture: { enabled: true },
|
gesture: { enabled: true },
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -287,8 +287,8 @@ const config: Config = {
|
||||||
|
|
||||||
body: {
|
body: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
modelPath: 'posenet.json', // body model, can be absolute path or relative to modelBasePath
|
modelPath: 'movenet-lightning.json', // body model, can be absolute path or relative to modelBasePath
|
||||||
// can be 'posenet', 'blazepose', 'efficientpose', 'movenet'
|
// can be 'posenet', 'blazepose', 'efficientpose', 'movenet-lightning', 'movenet-thunder'
|
||||||
maxDetected: 1, // maximum number of people detected in the input
|
maxDetected: 1, // maximum number of people detected in the input
|
||||||
// should be set to the minimum number for performance
|
// should be set to the minimum number for performance
|
||||||
// only valid for posenet as other models detects single pose
|
// only valid for posenet as other models detects single pose
|
||||||
|
|
|
@ -60,6 +60,10 @@ export class Human {
|
||||||
* - Details: {@link Config}
|
* - Details: {@link Config}
|
||||||
*/
|
*/
|
||||||
config: Config;
|
config: Config;
|
||||||
|
/** Last known result of detect run
|
||||||
|
* - Can be accessed anytime after initial detection
|
||||||
|
*/
|
||||||
|
result: Result;
|
||||||
/** Current state of Human library
|
/** Current state of Human library
|
||||||
* - Can be polled to determine operations that are currently executed
|
* - 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.perf.total = Math.trunc(now() - timeStart);
|
||||||
this.state = 'idle';
|
this.state = 'idle';
|
||||||
const res = {
|
this.result = {
|
||||||
face: faceRes,
|
face: faceRes,
|
||||||
body: bodyRes,
|
body: bodyRes,
|
||||||
hand: handRes,
|
hand: handRes,
|
||||||
|
@ -564,7 +568,7 @@ export class Human {
|
||||||
tf.dispose(process.tensor);
|
tf.dispose(process.tensor);
|
||||||
|
|
||||||
// log('Result:', result);
|
// log('Result:', result);
|
||||||
resolve(res);
|
resolve(this.result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue