mirror of https://github.com/vladmandic/human
full rebuild
parent
6fc29b98e0
commit
068aec432b
|
@ -30,7 +30,7 @@
|
||||||
- [**Build Process**](https://github.com/vladmandic/human/wiki/Build-Process)
|
- [**Build Process**](https://github.com/vladmandic/human/wiki/Build-Process)
|
||||||
- [**Performance Notes**](https://github.com/vladmandic/human/wiki/Performance)
|
- [**Performance Notes**](https://github.com/vladmandic/human/wiki/Performance)
|
||||||
- [**Performance Profiling**](https://github.com/vladmandic/human/wiki/Profiling)
|
- [**Performance Profiling**](https://github.com/vladmandic/human/wiki/Profiling)
|
||||||
- [**List of Models && Credits**](https://github.com/vladmandic/human/wiki/Models)
|
- [**List of Models & Credits**](https://github.com/vladmandic/human/wiki/Models)
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
|
@ -98511,7 +98511,7 @@ var config_default = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var version3 = "0.9.1";
|
var version3 = "0.9.2";
|
||||||
const now2 = () => {
|
const now2 = () => {
|
||||||
if (typeof performance !== "undefined")
|
if (typeof performance !== "undefined")
|
||||||
return performance.now();
|
return performance.now();
|
||||||
|
|
|
@ -4218,7 +4218,7 @@ var require_facepipeline = __commonJS((exports) => {
|
||||||
this.skipped++;
|
this.skipped++;
|
||||||
let useFreshBox = false;
|
let useFreshBox = false;
|
||||||
let detector;
|
let detector;
|
||||||
if (this.skipped > config2.detector.skipFrames || !config2.mesh.enabled) {
|
if (this.skipped > config2.detector.skipFrames || !config2.mesh.enabled || !config2.videoOptimized) {
|
||||||
detector = await this.boundingBoxDetector.getBoundingBoxes(input);
|
detector = await this.boundingBoxDetector.getBoundingBoxes(input);
|
||||||
if (input.shape[1] !== 255 && input.shape[2] !== 255)
|
if (input.shape[1] !== 255 && input.shape[2] !== 255)
|
||||||
this.skipped = 0;
|
this.skipped = 0;
|
||||||
|
@ -4445,7 +4445,7 @@ var require_age = __commonJS((exports) => {
|
||||||
async function predict2(image2, config2) {
|
async function predict2(image2, config2) {
|
||||||
if (!models.age)
|
if (!models.age)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config2.face.age.skipFrames && last.age && last.age > 0) {
|
if (frame < config2.face.age.skipFrames && config2.videoOptimized && last.age && last.age > 0) {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -4498,7 +4498,7 @@ var require_gender = __commonJS((exports) => {
|
||||||
async function predict2(image2, config2) {
|
async function predict2(image2, config2) {
|
||||||
if (!models.gender)
|
if (!models.gender)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config2.face.gender.skipFrames && last.gender !== "") {
|
if (frame < config2.face.gender.skipFrames && config2.videoOptimized && last.gender !== "") {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -4575,7 +4575,7 @@ var require_emotion = __commonJS((exports) => {
|
||||||
async function predict2(image2, config2) {
|
async function predict2(image2, config2) {
|
||||||
if (!models.emotion)
|
if (!models.emotion)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config2.face.emotion.skipFrames && last.length > 0) {
|
if (frame < config2.face.emotion.skipFrames && config2.videoOptimized && last.length > 0) {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -5374,7 +5374,7 @@ var require_handpipeline = __commonJS((exports) => {
|
||||||
this.skipped++;
|
this.skipped++;
|
||||||
let useFreshBox = false;
|
let useFreshBox = false;
|
||||||
let boxes;
|
let boxes;
|
||||||
if (this.skipped > config2.skipFrames || !config2.landmarks) {
|
if (this.skipped > config2.skipFrames || !config2.landmarks || !config2.videoOptimized) {
|
||||||
boxes = await this.boxDetector.estimateHandBounds(image2, config2);
|
boxes = await this.boxDetector.estimateHandBounds(image2, config2);
|
||||||
if (image2.shape[1] !== 255 && image2.shape[2] !== 255)
|
if (image2.shape[1] !== 255 && image2.shape[2] !== 255)
|
||||||
this.skipped = 0;
|
this.skipped = 0;
|
||||||
|
@ -24384,13 +24384,9 @@ var config_default = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// package.json
|
// package.json
|
||||||
var version = "0.9.0";
|
var version = "0.9.2";
|
||||||
|
|
||||||
// src/human.js
|
// src/human.js
|
||||||
const disableSkipFrames = {
|
|
||||||
face: {detector: {skipFrames: 0}, age: {skipFrames: 0}, gender: {skipFrames: 0}, emotion: {skipFrames: 0}},
|
|
||||||
hand: {skipFrames: 0}
|
|
||||||
};
|
|
||||||
const now = () => {
|
const now = () => {
|
||||||
if (typeof performance !== "undefined")
|
if (typeof performance !== "undefined")
|
||||||
return performance.now();
|
return performance.now();
|
||||||
|
@ -24657,8 +24653,6 @@ class Human {
|
||||||
this.state = "config";
|
this.state = "config";
|
||||||
let timeStamp;
|
let timeStamp;
|
||||||
this.config = mergeDeep(this.config, userConfig);
|
this.config = mergeDeep(this.config, userConfig);
|
||||||
if (!this.config.videoOptimized)
|
|
||||||
this.config = mergeDeep(this.config, disableSkipFrames);
|
|
||||||
this.state = "check";
|
this.state = "check";
|
||||||
const error = this.sanity(input);
|
const error = this.sanity(input);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,11 +5,11 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"package.json": {
|
"package.json": {
|
||||||
"bytes": 3616,
|
"bytes": 3629,
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/age/age.js": {
|
"src/age/age.js": {
|
||||||
"bytes": 1941,
|
"bytes": 1966,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"src/emotion/emotion.js": {
|
"src/emotion/emotion.js": {
|
||||||
"bytes": 2979,
|
"bytes": 3004,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"src/face/facepipeline.js": {
|
"src/face/facepipeline.js": {
|
||||||
"bytes": 13762,
|
"bytes": 13788,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -213,7 +213,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/gender/gender.js": {
|
"src/gender/gender.js": {
|
||||||
"bytes": 3382,
|
"bytes": 3407,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -251,7 +251,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"src/hand/handpipeline.js": {
|
"src/hand/handpipeline.js": {
|
||||||
"bytes": 7532,
|
"bytes": 7558,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -286,7 +286,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 16020,
|
"bytes": 15697,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -357,7 +357,7 @@
|
||||||
"dist/human.esm-nobundle.js.map": {
|
"dist/human.esm-nobundle.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 785345
|
"bytes": 784354
|
||||||
},
|
},
|
||||||
"dist/human.esm-nobundle.js": {
|
"dist/human.esm-nobundle.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
|
@ -375,7 +375,7 @@
|
||||||
"bytesInOutput": 51519
|
"bytesInOutput": 51519
|
||||||
},
|
},
|
||||||
"src/face/facepipeline.js": {
|
"src/face/facepipeline.js": {
|
||||||
"bytesInOutput": 12453
|
"bytesInOutput": 12480
|
||||||
},
|
},
|
||||||
"src/face/facemesh.js": {
|
"src/face/facemesh.js": {
|
||||||
"bytesInOutput": 2461
|
"bytesInOutput": 2461
|
||||||
|
@ -384,13 +384,13 @@
|
||||||
"bytesInOutput": 1118
|
"bytesInOutput": 1118
|
||||||
},
|
},
|
||||||
"src/age/age.js": {
|
"src/age/age.js": {
|
||||||
"bytesInOutput": 1563
|
"bytesInOutput": 1589
|
||||||
},
|
},
|
||||||
"src/gender/gender.js": {
|
"src/gender/gender.js": {
|
||||||
"bytesInOutput": 2736
|
"bytesInOutput": 2762
|
||||||
},
|
},
|
||||||
"src/emotion/emotion.js": {
|
"src/emotion/emotion.js": {
|
||||||
"bytesInOutput": 2438
|
"bytesInOutput": 2464
|
||||||
},
|
},
|
||||||
"src/embedding/embedding.js": {
|
"src/embedding/embedding.js": {
|
||||||
"bytesInOutput": 1769
|
"bytesInOutput": 1769
|
||||||
|
@ -432,7 +432,7 @@
|
||||||
"bytesInOutput": 4402
|
"bytesInOutput": 4402
|
||||||
},
|
},
|
||||||
"src/hand/handpipeline.js": {
|
"src/hand/handpipeline.js": {
|
||||||
"bytesInOutput": 7165
|
"bytesInOutput": 7192
|
||||||
},
|
},
|
||||||
"src/hand/anchors.js": {
|
"src/hand/anchors.js": {
|
||||||
"bytesInOutput": 256590
|
"bytesInOutput": 256590
|
||||||
|
@ -474,13 +474,13 @@
|
||||||
"bytesInOutput": 23
|
"bytesInOutput": 23
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 13473
|
"bytesInOutput": 13204
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 0
|
"bytesInOutput": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 431692
|
"bytes": 431555
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98884,7 +98884,7 @@ var config_default = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// package.json
|
// package.json
|
||||||
var version3 = "0.9.1";
|
var version3 = "0.9.2";
|
||||||
|
|
||||||
// src/human.js
|
// src/human.js
|
||||||
const now2 = () => {
|
const now2 = () => {
|
||||||
|
|
|
@ -69792,7 +69792,7 @@ return a / b;`;
|
||||||
this.skipped++;
|
this.skipped++;
|
||||||
let useFreshBox = false;
|
let useFreshBox = false;
|
||||||
let detector;
|
let detector;
|
||||||
if (this.skipped > config.detector.skipFrames || !config.mesh.enabled) {
|
if (this.skipped > config.detector.skipFrames || !config.mesh.enabled || !config.videoOptimized) {
|
||||||
detector = await this.boundingBoxDetector.getBoundingBoxes(input);
|
detector = await this.boundingBoxDetector.getBoundingBoxes(input);
|
||||||
if (input.shape[1] !== 255 && input.shape[2] !== 255)
|
if (input.shape[1] !== 255 && input.shape[2] !== 255)
|
||||||
this.skipped = 0;
|
this.skipped = 0;
|
||||||
|
@ -70019,7 +70019,7 @@ return a / b;`;
|
||||||
async function predict(image, config) {
|
async function predict(image, config) {
|
||||||
if (!models.age)
|
if (!models.age)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config.face.age.skipFrames && last.age && last.age > 0) {
|
if (frame < config.face.age.skipFrames && config.videoOptimized && last.age && last.age > 0) {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -70072,7 +70072,7 @@ return a / b;`;
|
||||||
async function predict(image, config) {
|
async function predict(image, config) {
|
||||||
if (!models.gender)
|
if (!models.gender)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config.face.gender.skipFrames && last.gender !== "") {
|
if (frame < config.face.gender.skipFrames && config.videoOptimized && last.gender !== "") {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -70149,7 +70149,7 @@ return a / b;`;
|
||||||
async function predict(image, config) {
|
async function predict(image, config) {
|
||||||
if (!models.emotion)
|
if (!models.emotion)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config.face.emotion.skipFrames && last.length > 0) {
|
if (frame < config.face.emotion.skipFrames && config.videoOptimized && last.length > 0) {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -70948,7 +70948,7 @@ return a / b;`;
|
||||||
this.skipped++;
|
this.skipped++;
|
||||||
let useFreshBox = false;
|
let useFreshBox = false;
|
||||||
let boxes;
|
let boxes;
|
||||||
if (this.skipped > config.skipFrames || !config.landmarks) {
|
if (this.skipped > config.skipFrames || !config.landmarks || !config.videoOptimized) {
|
||||||
boxes = await this.boxDetector.estimateHandBounds(image, config);
|
boxes = await this.boxDetector.estimateHandBounds(image, config);
|
||||||
if (image.shape[1] !== 255 && image.shape[2] !== 255)
|
if (image.shape[1] !== 255 && image.shape[2] !== 255)
|
||||||
this.skipped = 0;
|
this.skipped = 0;
|
||||||
|
@ -89691,10 +89691,6 @@ return a / b;`;
|
||||||
const gesture = __toModule(require_gesture());
|
const gesture = __toModule(require_gesture());
|
||||||
const image = __toModule(require_image());
|
const image = __toModule(require_image());
|
||||||
const profile = __toModule(require_profile());
|
const profile = __toModule(require_profile());
|
||||||
const disableSkipFrames = {
|
|
||||||
face: {detector: {skipFrames: 0}, age: {skipFrames: 0}, gender: {skipFrames: 0}, emotion: {skipFrames: 0}},
|
|
||||||
hand: {skipFrames: 0}
|
|
||||||
};
|
|
||||||
const now2 = () => {
|
const now2 = () => {
|
||||||
if (typeof performance !== "undefined")
|
if (typeof performance !== "undefined")
|
||||||
return performance.now();
|
return performance.now();
|
||||||
|
@ -89961,8 +89957,6 @@ return a / b;`;
|
||||||
this.state = "config";
|
this.state = "config";
|
||||||
let timeStamp;
|
let timeStamp;
|
||||||
this.config = mergeDeep(this.config, userConfig);
|
this.config = mergeDeep(this.config, userConfig);
|
||||||
if (!this.config.videoOptimized)
|
|
||||||
this.config = mergeDeep(this.config, disableSkipFrames);
|
|
||||||
this.state = "check";
|
this.state = "check";
|
||||||
const error = this.sanity(input);
|
const error = this.sanity(input);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
@ -99241,7 +99235,7 @@ return a / b;`;
|
||||||
};
|
};
|
||||||
|
|
||||||
// package.json
|
// package.json
|
||||||
var version3 = "0.9.0";
|
var version3 = "0.9.2";
|
||||||
return require_human();
|
return require_human();
|
||||||
})();
|
})();
|
||||||
//# sourceMappingURL=human.js.map
|
//# sourceMappingURL=human.js.map
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -12316,11 +12316,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"package.json": {
|
"package.json": {
|
||||||
"bytes": 3616,
|
"bytes": 3629,
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/age/age.js": {
|
"src/age/age.js": {
|
||||||
"bytes": 1941,
|
"bytes": 1966,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -12455,7 +12455,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"src/emotion/emotion.js": {
|
"src/emotion/emotion.js": {
|
||||||
"bytes": 2979,
|
"bytes": 3004,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -12503,7 +12503,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"src/face/facepipeline.js": {
|
"src/face/facepipeline.js": {
|
||||||
"bytes": 13762,
|
"bytes": 13788,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -12524,7 +12524,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/gender/gender.js": {
|
"src/gender/gender.js": {
|
||||||
"bytes": 3382,
|
"bytes": 3407,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -12562,7 +12562,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"src/hand/handpipeline.js": {
|
"src/hand/handpipeline.js": {
|
||||||
"bytes": 7532,
|
"bytes": 7558,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -12597,7 +12597,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 16020,
|
"bytes": 15697,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -12695,7 +12695,7 @@
|
||||||
"dist/human.js.map": {
|
"dist/human.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 5449697
|
"bytes": 5449363
|
||||||
},
|
},
|
||||||
"dist/human.js": {
|
"dist/human.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
|
@ -12740,7 +12740,7 @@
|
||||||
"bytesInOutput": 59051
|
"bytesInOutput": 59051
|
||||||
},
|
},
|
||||||
"src/face/facepipeline.js": {
|
"src/face/facepipeline.js": {
|
||||||
"bytesInOutput": 12942
|
"bytesInOutput": 12968
|
||||||
},
|
},
|
||||||
"src/face/facemesh.js": {
|
"src/face/facemesh.js": {
|
||||||
"bytesInOutput": 2556
|
"bytesInOutput": 2556
|
||||||
|
@ -12749,13 +12749,13 @@
|
||||||
"bytesInOutput": 1156
|
"bytesInOutput": 1156
|
||||||
},
|
},
|
||||||
"src/age/age.js": {
|
"src/age/age.js": {
|
||||||
"bytesInOutput": 1639
|
"bytesInOutput": 1664
|
||||||
},
|
},
|
||||||
"src/gender/gender.js": {
|
"src/gender/gender.js": {
|
||||||
"bytesInOutput": 2859
|
"bytesInOutput": 2884
|
||||||
},
|
},
|
||||||
"src/emotion/emotion.js": {
|
"src/emotion/emotion.js": {
|
||||||
"bytesInOutput": 2546
|
"bytesInOutput": 2571
|
||||||
},
|
},
|
||||||
"src/embedding/embedding.js": {
|
"src/embedding/embedding.js": {
|
||||||
"bytesInOutput": 1833
|
"bytesInOutput": 1833
|
||||||
|
@ -12797,7 +12797,7 @@
|
||||||
"bytesInOutput": 4572
|
"bytesInOutput": 4572
|
||||||
},
|
},
|
||||||
"src/hand/handpipeline.js": {
|
"src/hand/handpipeline.js": {
|
||||||
"bytesInOutput": 7470
|
"bytesInOutput": 7496
|
||||||
},
|
},
|
||||||
"src/hand/anchors.js": {
|
"src/hand/anchors.js": {
|
||||||
"bytesInOutput": 291926
|
"bytesInOutput": 291926
|
||||||
|
@ -12815,7 +12815,7 @@
|
||||||
"bytesInOutput": 5588
|
"bytesInOutput": 5588
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 15530
|
"bytesInOutput": 15237
|
||||||
},
|
},
|
||||||
"src/tf.js": {
|
"src/tf.js": {
|
||||||
"bytesInOutput": 46
|
"bytesInOutput": 46
|
||||||
|
@ -13427,7 +13427,7 @@
|
||||||
"bytesInOutput": 26
|
"bytesInOutput": 26
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 3646206
|
"bytes": 3646040
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4223,7 +4223,7 @@ var require_facepipeline = __commonJS((exports2) => {
|
||||||
this.skipped++;
|
this.skipped++;
|
||||||
let useFreshBox = false;
|
let useFreshBox = false;
|
||||||
let detector;
|
let detector;
|
||||||
if (this.skipped > config2.detector.skipFrames || !config2.mesh.enabled) {
|
if (this.skipped > config2.detector.skipFrames || !config2.mesh.enabled || !config2.videoOptimized) {
|
||||||
detector = await this.boundingBoxDetector.getBoundingBoxes(input);
|
detector = await this.boundingBoxDetector.getBoundingBoxes(input);
|
||||||
if (input.shape[1] !== 255 && input.shape[2] !== 255)
|
if (input.shape[1] !== 255 && input.shape[2] !== 255)
|
||||||
this.skipped = 0;
|
this.skipped = 0;
|
||||||
|
@ -4450,7 +4450,7 @@ var require_age = __commonJS((exports2) => {
|
||||||
async function predict2(image2, config2) {
|
async function predict2(image2, config2) {
|
||||||
if (!models.age)
|
if (!models.age)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config2.face.age.skipFrames && last.age && last.age > 0) {
|
if (frame < config2.face.age.skipFrames && config2.videoOptimized && last.age && last.age > 0) {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -4503,7 +4503,7 @@ var require_gender = __commonJS((exports2) => {
|
||||||
async function predict2(image2, config2) {
|
async function predict2(image2, config2) {
|
||||||
if (!models.gender)
|
if (!models.gender)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config2.face.gender.skipFrames && last.gender !== "") {
|
if (frame < config2.face.gender.skipFrames && config2.videoOptimized && last.gender !== "") {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -4580,7 +4580,7 @@ var require_emotion = __commonJS((exports2) => {
|
||||||
async function predict2(image2, config2) {
|
async function predict2(image2, config2) {
|
||||||
if (!models.emotion)
|
if (!models.emotion)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config2.face.emotion.skipFrames && last.length > 0) {
|
if (frame < config2.face.emotion.skipFrames && config2.videoOptimized && last.length > 0) {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -5379,7 +5379,7 @@ var require_handpipeline = __commonJS((exports2) => {
|
||||||
this.skipped++;
|
this.skipped++;
|
||||||
let useFreshBox = false;
|
let useFreshBox = false;
|
||||||
let boxes;
|
let boxes;
|
||||||
if (this.skipped > config2.skipFrames || !config2.landmarks) {
|
if (this.skipped > config2.skipFrames || !config2.landmarks || !config2.videoOptimized) {
|
||||||
boxes = await this.boxDetector.estimateHandBounds(image2, config2);
|
boxes = await this.boxDetector.estimateHandBounds(image2, config2);
|
||||||
if (image2.shape[1] !== 255 && image2.shape[2] !== 255)
|
if (image2.shape[1] !== 255 && image2.shape[2] !== 255)
|
||||||
this.skipped = 0;
|
this.skipped = 0;
|
||||||
|
@ -24394,13 +24394,9 @@ var config_default = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// package.json
|
// package.json
|
||||||
var version = "0.9.0";
|
var version = "0.9.2";
|
||||||
|
|
||||||
// src/human.js
|
// src/human.js
|
||||||
const disableSkipFrames = {
|
|
||||||
face: {detector: {skipFrames: 0}, age: {skipFrames: 0}, gender: {skipFrames: 0}, emotion: {skipFrames: 0}},
|
|
||||||
hand: {skipFrames: 0}
|
|
||||||
};
|
|
||||||
const now = () => {
|
const now = () => {
|
||||||
if (typeof performance !== "undefined")
|
if (typeof performance !== "undefined")
|
||||||
return performance.now();
|
return performance.now();
|
||||||
|
@ -24667,8 +24663,6 @@ class Human {
|
||||||
this.state = "config";
|
this.state = "config";
|
||||||
let timeStamp;
|
let timeStamp;
|
||||||
this.config = mergeDeep(this.config, userConfig);
|
this.config = mergeDeep(this.config, userConfig);
|
||||||
if (!this.config.videoOptimized)
|
|
||||||
this.config = mergeDeep(this.config, disableSkipFrames);
|
|
||||||
this.state = "check";
|
this.state = "check";
|
||||||
const error = this.sanity(input);
|
const error = this.sanity(input);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -95941,7 +95941,7 @@ var require_facepipeline = __commonJS((exports2) => {
|
||||||
this.skipped++;
|
this.skipped++;
|
||||||
let useFreshBox = false;
|
let useFreshBox = false;
|
||||||
let detector;
|
let detector;
|
||||||
if (this.skipped > config2.detector.skipFrames || !config2.mesh.enabled) {
|
if (this.skipped > config2.detector.skipFrames || !config2.mesh.enabled || !config2.videoOptimized) {
|
||||||
detector = await this.boundingBoxDetector.getBoundingBoxes(input);
|
detector = await this.boundingBoxDetector.getBoundingBoxes(input);
|
||||||
if (input.shape[1] !== 255 && input.shape[2] !== 255)
|
if (input.shape[1] !== 255 && input.shape[2] !== 255)
|
||||||
this.skipped = 0;
|
this.skipped = 0;
|
||||||
|
@ -96168,7 +96168,7 @@ var require_age = __commonJS((exports2) => {
|
||||||
async function predict2(image2, config2) {
|
async function predict2(image2, config2) {
|
||||||
if (!models.age)
|
if (!models.age)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config2.face.age.skipFrames && last.age && last.age > 0) {
|
if (frame < config2.face.age.skipFrames && config2.videoOptimized && last.age && last.age > 0) {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -96221,7 +96221,7 @@ var require_gender = __commonJS((exports2) => {
|
||||||
async function predict2(image2, config2) {
|
async function predict2(image2, config2) {
|
||||||
if (!models.gender)
|
if (!models.gender)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config2.face.gender.skipFrames && last.gender !== "") {
|
if (frame < config2.face.gender.skipFrames && config2.videoOptimized && last.gender !== "") {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -96298,7 +96298,7 @@ var require_emotion = __commonJS((exports2) => {
|
||||||
async function predict2(image2, config2) {
|
async function predict2(image2, config2) {
|
||||||
if (!models.emotion)
|
if (!models.emotion)
|
||||||
return null;
|
return null;
|
||||||
if (frame < config2.face.emotion.skipFrames && last.length > 0) {
|
if (frame < config2.face.emotion.skipFrames && config2.videoOptimized && last.length > 0) {
|
||||||
frame += 1;
|
frame += 1;
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
@ -97097,7 +97097,7 @@ var require_handpipeline = __commonJS((exports2) => {
|
||||||
this.skipped++;
|
this.skipped++;
|
||||||
let useFreshBox = false;
|
let useFreshBox = false;
|
||||||
let boxes;
|
let boxes;
|
||||||
if (this.skipped > config2.skipFrames || !config2.landmarks) {
|
if (this.skipped > config2.skipFrames || !config2.landmarks || !config2.videoOptimized) {
|
||||||
boxes = await this.boxDetector.estimateHandBounds(image2, config2);
|
boxes = await this.boxDetector.estimateHandBounds(image2, config2);
|
||||||
if (image2.shape[1] !== 255 && image2.shape[2] !== 255)
|
if (image2.shape[1] !== 255 && image2.shape[2] !== 255)
|
||||||
this.skipped = 0;
|
this.skipped = 0;
|
||||||
|
@ -120218,13 +120218,9 @@ var config_default = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// package.json
|
// package.json
|
||||||
var version3 = "0.9.0";
|
var version3 = "0.9.2";
|
||||||
|
|
||||||
// src/human.js
|
// src/human.js
|
||||||
const disableSkipFrames = {
|
|
||||||
face: {detector: {skipFrames: 0}, age: {skipFrames: 0}, gender: {skipFrames: 0}, emotion: {skipFrames: 0}},
|
|
||||||
hand: {skipFrames: 0}
|
|
||||||
};
|
|
||||||
const now = () => {
|
const now = () => {
|
||||||
if (typeof performance !== "undefined")
|
if (typeof performance !== "undefined")
|
||||||
return performance.now();
|
return performance.now();
|
||||||
|
@ -120491,8 +120487,6 @@ class Human {
|
||||||
this.state = "config";
|
this.state = "config";
|
||||||
let timeStamp;
|
let timeStamp;
|
||||||
this.config = mergeDeep(this.config, userConfig);
|
this.config = mergeDeep(this.config, userConfig);
|
||||||
if (!this.config.videoOptimized)
|
|
||||||
this.config = mergeDeep(this.config, disableSkipFrames);
|
|
||||||
this.state = "check";
|
this.state = "check";
|
||||||
const error = this.sanity(input);
|
const error = this.sanity(input);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,11 +5,11 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"package.json": {
|
"package.json": {
|
||||||
"bytes": 3616,
|
"bytes": 3629,
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/age/age.js": {
|
"src/age/age.js": {
|
||||||
"bytes": 1941,
|
"bytes": 1966,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"src/emotion/emotion.js": {
|
"src/emotion/emotion.js": {
|
||||||
"bytes": 2979,
|
"bytes": 3004,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"src/face/facepipeline.js": {
|
"src/face/facepipeline.js": {
|
||||||
"bytes": 13762,
|
"bytes": 13788,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -213,7 +213,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/gender/gender.js": {
|
"src/gender/gender.js": {
|
||||||
"bytes": 3382,
|
"bytes": 3407,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -251,7 +251,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"src/hand/handpipeline.js": {
|
"src/hand/handpipeline.js": {
|
||||||
"bytes": 7532,
|
"bytes": 7558,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -286,7 +286,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 16020,
|
"bytes": 15697,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/tf.js"
|
"path": "src/tf.js"
|
||||||
|
@ -357,7 +357,7 @@
|
||||||
"dist/human.node-nobundle.js.map": {
|
"dist/human.node-nobundle.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 801852
|
"bytes": 800532
|
||||||
},
|
},
|
||||||
"dist/human.node-nobundle.js": {
|
"dist/human.node-nobundle.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
|
@ -375,7 +375,7 @@
|
||||||
"bytesInOutput": 51530
|
"bytesInOutput": 51530
|
||||||
},
|
},
|
||||||
"src/face/facepipeline.js": {
|
"src/face/facepipeline.js": {
|
||||||
"bytesInOutput": 12455
|
"bytesInOutput": 12482
|
||||||
},
|
},
|
||||||
"src/face/facemesh.js": {
|
"src/face/facemesh.js": {
|
||||||
"bytesInOutput": 2465
|
"bytesInOutput": 2465
|
||||||
|
@ -384,13 +384,13 @@
|
||||||
"bytesInOutput": 1120
|
"bytesInOutput": 1120
|
||||||
},
|
},
|
||||||
"src/age/age.js": {
|
"src/age/age.js": {
|
||||||
"bytesInOutput": 1566
|
"bytesInOutput": 1592
|
||||||
},
|
},
|
||||||
"src/gender/gender.js": {
|
"src/gender/gender.js": {
|
||||||
"bytesInOutput": 2739
|
"bytesInOutput": 2765
|
||||||
},
|
},
|
||||||
"src/emotion/emotion.js": {
|
"src/emotion/emotion.js": {
|
||||||
"bytesInOutput": 2441
|
"bytesInOutput": 2467
|
||||||
},
|
},
|
||||||
"src/embedding/embedding.js": {
|
"src/embedding/embedding.js": {
|
||||||
"bytesInOutput": 1773
|
"bytesInOutput": 1773
|
||||||
|
@ -432,7 +432,7 @@
|
||||||
"bytesInOutput": 4404
|
"bytesInOutput": 4404
|
||||||
},
|
},
|
||||||
"src/hand/handpipeline.js": {
|
"src/hand/handpipeline.js": {
|
||||||
"bytesInOutput": 7167
|
"bytesInOutput": 7194
|
||||||
},
|
},
|
||||||
"src/hand/anchors.js": {
|
"src/hand/anchors.js": {
|
||||||
"bytesInOutput": 256592
|
"bytesInOutput": 256592
|
||||||
|
@ -477,10 +477,10 @@
|
||||||
"bytesInOutput": 23
|
"bytesInOutput": 23
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 13478
|
"bytesInOutput": 13209
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 432048
|
"bytes": 431911
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
||||||
Subproject commit 79cd119c0c5714324a0dae82477ce36e1d5f40a1
|
Subproject commit 75fc9234c2888e58abd97a7ee2da630da942b0f3
|
Loading…
Reference in New Issue