updated manifest

pull/50/head
Vladimir Mandic 2020-11-04 20:52:26 -05:00
parent 3c6f416a0e
commit 5b6f980132
18 changed files with 46 additions and 32 deletions

View File

@ -4,7 +4,7 @@
"icons": [ "icons": [
{ "src": "../assets/icon.png", "sizes": "853x853", "type": "image/png", "purpose": "any maskable" } { "src": "../assets/icon.png", "sizes": "853x853", "type": "image/png", "purpose": "any maskable" }
], ],
"start_url": "/", "start_url": "./index.html",
"scope": "/", "scope": "/",
"display": "standalone", "display": "standalone",
"background_color": "#000000", "background_color": "#000000",

View File

@ -33133,7 +33133,7 @@ var Kx = we((YV) => {
var KV = {backend: "webgl", console: true, async: false, profile: false, deallocate: false, scoped: false, videoOptimized: true, filter: {enabled: true, width: 0, height: 0, return: true, brightness: 0, contrast: 0, sharpness: 0, blur: 0, saturation: 0, hue: 0, negative: false, sepia: false, vintage: false, kodachrome: false, technicolor: false, polaroid: false, pixelate: 0}, gesture: {enabled: true}, face: {enabled: true, detector: {modelPath: "../models/blazeface-back.json", inputSize: 256, maxFaces: 10, skipFrames: 10, minConfidence: 0.5, iouThreshold: 0.3, scoreThreshold: 0.5}, mesh: {enabled: true, modelPath: "../models/facemesh.json", inputSize: 192}, iris: {enabled: true, modelPath: "../models/iris.json", enlargeFactor: 2.3, inputSize: 64}, age: {enabled: true, modelPath: "../models/ssrnet-age-imdb.json", inputSize: 64, skipFrames: 10}, gender: {enabled: true, minConfidence: 0.8, modelPath: "../models/ssrnet-gender-imdb.json"}, emotion: {enabled: true, inputSize: 64, minConfidence: 0.5, skipFrames: 10, modelPath: "../models/emotion.json"}}, body: {enabled: true, modelPath: "../models/posenet.json", inputResolution: 257, outputStride: 16, maxDetections: 10, scoreThreshold: 0.5, nmsRadius: 20}, hand: {enabled: true, inputSize: 256, skipFrames: 10, minConfidence: 0.5, iouThreshold: 0.3, scoreThreshold: 0.5, enlargeFactor: 1.65, maxHands: 10, detector: {modelPath: "../models/handdetect.json"}, skeleton: {modelPath: "../models/handskeleton.json"}}}; var KV = {backend: "webgl", console: true, async: false, profile: false, deallocate: false, scoped: false, videoOptimized: true, filter: {enabled: true, width: 0, height: 0, return: true, brightness: 0, contrast: 0, sharpness: 0, blur: 0, saturation: 0, hue: 0, negative: false, sepia: false, vintage: false, kodachrome: false, technicolor: false, polaroid: false, pixelate: 0}, gesture: {enabled: true}, face: {enabled: true, detector: {modelPath: "../models/blazeface-back.json", inputSize: 256, maxFaces: 10, skipFrames: 10, minConfidence: 0.5, iouThreshold: 0.3, scoreThreshold: 0.5}, mesh: {enabled: true, modelPath: "../models/facemesh.json", inputSize: 192}, iris: {enabled: true, modelPath: "../models/iris.json", enlargeFactor: 2.3, inputSize: 64}, age: {enabled: true, modelPath: "../models/ssrnet-age-imdb.json", inputSize: 64, skipFrames: 10}, gender: {enabled: true, minConfidence: 0.8, modelPath: "../models/ssrnet-gender-imdb.json"}, emotion: {enabled: true, inputSize: 64, minConfidence: 0.5, skipFrames: 10, modelPath: "../models/emotion.json"}}, body: {enabled: true, modelPath: "../models/posenet.json", inputResolution: 257, outputStride: 16, maxDetections: 10, scoreThreshold: 0.5, nmsRadius: 20}, hand: {enabled: true, inputSize: 256, skipFrames: 10, minConfidence: 0.5, iouThreshold: 0.3, scoreThreshold: 0.5, enlargeFactor: 1.65, maxHands: 10, detector: {modelPath: "../models/handdetect.json"}, skeleton: {modelPath: "../models/handskeleton.json"}}};
}); });
var $x = we((JG, jx) => { var $x = we((JG, jx) => {
jx.exports = {name: "@vladmandic/human", version: "0.7.1", description: "human: 3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition", sideEffects: false, main: "dist/human.node.js", module: "dist/human.esm.js", browser: "dist/human.esm.js", author: "Vladimir Mandic <mandic00@live.com>", bugs: {url: "https://github.com/vladmandic/human/issues"}, homepage: "https://github.com/vladmandic/human#readme", license: "MIT", engines: {node: ">=14.0.0"}, repository: {type: "git", url: "git+https://github.com/vladmandic/human.git"}, dependencies: {}, peerDependencies: {}, devDependencies: {"@tensorflow/tfjs": "^2.7.0", "@tensorflow/tfjs-node": "^2.7.0", "@vladmandic/pilogger": "^0.2.7", dayjs: "^1.9.4", esbuild: "^0.7.22", eslint: "^7.12.1", "eslint-config-airbnb-base": "^14.2.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-json": "^2.1.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", rimraf: "^3.0.2", seedrandom: "^3.0.5", "simple-git": "^2.21.0"}, scripts: {start: "node --trace-warnings --unhandled-rejections=strict --trace-uncaught --no-deprecation src/node.js", lint: "eslint src/*.js demo/*.js", "build-iife": "esbuild --bundle --minify --platform=browser --sourcemap --target=esnext --format=iife --external:fs --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js", "build-esm-bundle": "esbuild --bundle --minify --platform=browser --sourcemap --target=esnext --format=esm --external:fs --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js", "build-esm-nobundle": "esbuild --bundle --minify --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js", "build-node": "esbuild --bundle --minify --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --outfile=dist/human.node.js src/human.js", "build-node-nobundle": "esbuild --bundle --minify --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js", "build-demo": "esbuild --bundle --platform=browser --sourcemap --target=es2018 --format=esm --external:fs --metafile=dist/demo-browser-index.json --outfile=dist/demo-browser-index.js demo/browser.js", build: "rimraf dist/* && npm run build-iife && npm run build-esm-bundle && npm run build-esm-nobundle && npm run build-node && npm run build-node-nobundle && npm run build-demo && ls -l dist/", update: "npm update --depth 20 --force && npm dedupe && npm prune && npm audit", changelog: "node changelog.js"}, keywords: ["tensorflowjs", "face-detection", "face-geometry", "body-tracking", "hand-tracking", "iris-tracking", "age-estimation", "emotion-detection", "gender-prediction", "gesture-recognition"]}; jx.exports = {name: "@vladmandic/human", version: "0.7.2", description: "human: 3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition", sideEffects: false, main: "dist/human.node.js", module: "dist/human.esm.js", browser: "dist/human.esm.js", author: "Vladimir Mandic <mandic00@live.com>", bugs: {url: "https://github.com/vladmandic/human/issues"}, homepage: "https://github.com/vladmandic/human#readme", license: "MIT", engines: {node: ">=14.0.0"}, repository: {type: "git", url: "git+https://github.com/vladmandic/human.git"}, dependencies: {}, peerDependencies: {}, devDependencies: {"@tensorflow/tfjs": "^2.7.0", "@tensorflow/tfjs-node": "^2.7.0", "@vladmandic/pilogger": "^0.2.7", dayjs: "^1.9.4", esbuild: "^0.7.22", eslint: "^7.12.1", "eslint-config-airbnb-base": "^14.2.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-json": "^2.1.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", rimraf: "^3.0.2", seedrandom: "^3.0.5", "simple-git": "^2.21.0"}, scripts: {start: "node --trace-warnings --unhandled-rejections=strict --trace-uncaught --no-deprecation src/node.js", lint: "eslint src/*.js demo/*.js", "build-iife": "esbuild --bundle --minify --platform=browser --sourcemap --target=esnext --format=iife --external:fs --global-name=Human --metafile=dist/human.json --outfile=dist/human.js src/human.js", "build-esm-bundle": "esbuild --bundle --minify --platform=browser --sourcemap --target=esnext --format=esm --external:fs --metafile=dist/human.esm.json --outfile=dist/human.esm.js src/human.js", "build-esm-nobundle": "esbuild --bundle --minify --platform=browser --sourcemap --target=esnext --format=esm --external:@tensorflow --external:fs --metafile=dist/human.esm-nobundle.json --outfile=dist/human.esm-nobundle.js src/human.js", "build-node": "esbuild --bundle --minify --platform=node --sourcemap --target=esnext --format=cjs --metafile=dist/human.node.json --outfile=dist/human.node.js src/human.js", "build-node-nobundle": "esbuild --bundle --minify --platform=node --sourcemap --target=esnext --format=cjs --external:@tensorflow --metafile=dist/human.node.json --outfile=dist/human.node-nobundle.js src/human.js", "build-demo": "esbuild --bundle --platform=browser --sourcemap --target=es2018 --format=esm --external:fs --metafile=dist/demo-browser-index.json --outfile=dist/demo-browser-index.js demo/browser.js", build: "rimraf dist/* && npm run build-iife && npm run build-esm-bundle && npm run build-esm-nobundle && npm run build-node && npm run build-node-nobundle && npm run build-demo && ls -l dist/", update: "npm update --depth 20 --force && npm dedupe && npm prune && npm audit", changelog: "node changelog.js"}, keywords: ["tensorflowjs", "face-detection", "face-geometry", "body-tracking", "hand-tracking", "iris-tracking", "age-estimation", "emotion-detection", "gender-prediction", "gesture-recognition"]};
}); });
const Kt = zt(); const Kt = zt();
const Xx = K2(); const Xx = K2();
@ -34161,6 +34161,7 @@ async function processImage(input) {
image.src = ""; image.src = "";
resolve(true); resolve(true);
}; };
image.crossOrigin = "anonymous";
image.src = input; image.src = input;
}); });
} }
@ -34198,11 +34199,24 @@ async function detectSampleImages() {
await processImage(sample); await processImage(sample);
status(""); status("");
} }
function setupMenu() { async function detectExternalSources(url) {
await processImage(url);
}
async function getExternalSources() {
const res = await fetch("external.json");
if (res && res.ok)
return res.json();
return [];
}
async function setupMenu() {
menu2 = new menu_default(document.body, "...", {top: "1rem", right: "1rem"}); menu2 = new menu_default(document.body, "...", {top: "1rem", right: "1rem"});
const btn = menu2.addButton("Start Video", "Pause Video", () => detectVideo()); const btn = menu2.addButton("Start Video", "Pause Video", () => detectVideo());
menu2.addButton("Process Images", "Process Images", () => detectSampleImages()); menu2.addButton("Process Images", "Process Images", () => detectSampleImages());
document.getElementById("play").addEventListener("click", () => btn.click()); document.getElementById("play").addEventListener("click", () => btn.click());
const sources = await getExternalSources();
for (const source of sources) {
menu2.addButton(`Poll: ${source.name}`, `Stop: ${source.name}`, () => detectExternalSources(source.url));
}
menu2.addHTML('<hr style="min-width: 200px; border-style: inset; border-color: dimgray">'); menu2.addHTML('<hr style="min-width: 200px; border-style: inset; border-color: dimgray">');
menu2.addList("Backend", ["cpu", "webgl", "wasm", "webgpu"], config.backend, (val) => config.backend = val); menu2.addList("Backend", ["cpu", "webgl", "wasm", "webgpu"], config.backend, (val) => config.backend = val);
menu2.addBool("Enable Profiler", config, "profile"); menu2.addBool("Enable Profiler", config, "profile");

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{ {
"inputs": { "inputs": {
"demo/browser.js": { "demo/browser.js": {
"bytes": 17175, "bytes": 17624,
"imports": [ "imports": [
{ {
"path": "dist/human.esm.js" "path": "dist/human.esm.js"
@ -31,7 +31,7 @@
"dist/demo-browser-index.js.map": { "dist/demo-browser-index.js.map": {
"imports": [], "imports": [],
"inputs": {}, "inputs": {},
"bytes": 5519617 "bytes": 5520375
}, },
"dist/demo-browser-index.js": { "dist/demo-browser-index.js": {
"imports": [], "imports": [],
@ -49,10 +49,10 @@
"bytesInOutput": 12356 "bytesInOutput": 12356
}, },
"demo/browser.js": { "demo/browser.js": {
"bytesInOutput": 15336 "bytesInOutput": 15787
} }
}, },
"bytes": 1704459 "bytes": 1704910
} }
} }
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -106,7 +106,7 @@
] ]
}, },
"src/handpose/handpose.js": { "src/handpose/handpose.js": {
"bytes": 2766, "bytes": 2839,
"imports": [ "imports": [
{ {
"path": "src/handpose/handdetector.js" "path": "src/handpose/handdetector.js"
@ -290,7 +290,7 @@
"dist/human.esm-nobundle.js.map": { "dist/human.esm-nobundle.js.map": {
"imports": [], "imports": [],
"inputs": {}, "inputs": {},
"bytes": 611623 "bytes": 611698
}, },
"dist/human.esm-nobundle.js": { "dist/human.esm-nobundle.js": {
"imports": [], "imports": [],

2
dist/human.esm.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/human.esm.json vendored
View File

@ -277,7 +277,7 @@
] ]
}, },
"src/handpose/handpose.js": { "src/handpose/handpose.js": {
"bytes": 2766, "bytes": 2839,
"imports": [ "imports": [
{ {
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js" "path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
@ -499,7 +499,7 @@
"dist/human.esm.js.map": { "dist/human.esm.js.map": {
"imports": [], "imports": [],
"inputs": {}, "inputs": {},
"bytes": 5407404 "bytes": 5407479
}, },
"dist/human.esm.js": { "dist/human.esm.js": {
"imports": [], "imports": [],

2
dist/human.js vendored

File diff suppressed because one or more lines are too long

4
dist/human.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/human.json vendored
View File

@ -277,7 +277,7 @@
] ]
}, },
"src/handpose/handpose.js": { "src/handpose/handpose.js": {
"bytes": 2766, "bytes": 2839,
"imports": [ "imports": [
{ {
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js" "path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
@ -499,7 +499,7 @@
"dist/human.js.map": { "dist/human.js.map": {
"imports": [], "imports": [],
"inputs": {}, "inputs": {},
"bytes": 5407400 "bytes": 5407475
}, },
"dist/human.js": { "dist/human.js": {
"imports": [], "imports": [],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/human.node.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -106,7 +106,7 @@
] ]
}, },
"src/handpose/handpose.js": { "src/handpose/handpose.js": {
"bytes": 2766, "bytes": 2839,
"imports": [ "imports": [
{ {
"path": "src/handpose/handdetector.js" "path": "src/handpose/handdetector.js"
@ -290,7 +290,7 @@
"dist/human.node-nobundle.js.map": { "dist/human.node-nobundle.js.map": {
"imports": [], "imports": [],
"inputs": {}, "inputs": {},
"bytes": 623135 "bytes": 623210
}, },
"dist/human.node-nobundle.js": { "dist/human.node-nobundle.js": {
"imports": [], "imports": [],