pull/293/head
Vladimir Mandic 2022-09-08 08:02:26 -04:00
parent 632b405ec5
commit b89123b9b2
12 changed files with 173 additions and 167 deletions

View File

@ -12,8 +12,12 @@
### **HEAD -> main** 2022/09/07 mandic00@live.com ### **HEAD -> main** 2022/09/07 mandic00@live.com
### **origin/main** 2022/09/07 mandic00@live.com ### **release: 2.10.1** 2022/09/07 mandic00@live.com
### **2.10.1** 2022/09/07 mandic00@live.com
- release candidate
- add config flags - add config flags
- test update - test update
- release preview - release preview

View File

@ -43,3 +43,4 @@ Enable via `about:config` -> `gfx.offscreencanvas.enabled`
## Pending Release Changes ## Pending Release Changes
- Enable model cache when using web workers

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

5
dist/human.esm.js vendored
View File

@ -85206,7 +85206,7 @@ async function loadModel(modelPath) {
sizeDesired: models_exports[shortModelName], sizeDesired: models_exports[shortModelName],
inCache: false inCache: false
}; };
options2.cacheSupported = typeof window !== "undefined" && typeof window.localStorage !== "undefined" && typeof window.indexedDB !== "undefined"; options2.cacheSupported = typeof indexedDB !== "undefined";
let cachedModels = {}; let cachedModels = {};
try { try {
cachedModels = options2.cacheSupported && options2.cacheModels ? await io_exports.listModels() : {}; cachedModels = options2.cacheSupported && options2.cacheModels ? await io_exports.listModels() : {};
@ -85234,7 +85234,8 @@ async function loadModel(modelPath) {
if (loaded && options2.cacheModels && options2.cacheSupported && !modelStats[shortModelName].inCache) { if (loaded && options2.cacheModels && options2.cacheSupported && !modelStats[shortModelName].inCache) {
try { try {
const saveResult = await model20.save(cachedModelName); const saveResult = await model20.save(cachedModelName);
log("model saved:", cachedModelName, saveResult); if (options2.debug)
log("model saved:", cachedModelName, saveResult);
} catch (err) { } catch (err) {
log("error saving model:", modelUrl, err); log("error saving model:", modelUrl, err);
} }

File diff suppressed because one or more lines are too long

214
dist/human.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
dist/human.node.js vendored

File diff suppressed because one or more lines are too long

View File

@ -47,7 +47,7 @@ export async function loadModel(modelPath: string | undefined): Promise<GraphMod
sizeDesired: modelsDefs[shortModelName], sizeDesired: modelsDefs[shortModelName],
inCache: false, inCache: false,
}; };
options.cacheSupported = (typeof window !== 'undefined') && (typeof window.localStorage !== 'undefined') && (typeof window.indexedDB !== 'undefined'); // check if running in browser and if indexedb is available options.cacheSupported = (typeof indexedDB !== 'undefined'); // check if localStorage and indexedb are available
let cachedModels = {}; let cachedModels = {};
try { try {
cachedModels = (options.cacheSupported && options.cacheModels) ? await tf.io.listModels() : {}; // list all models already in cache // this fails for webview although localStorage is defined cachedModels = (options.cacheSupported && options.cacheModels) ? await tf.io.listModels() : {}; // list all models already in cache // this fails for webview although localStorage is defined
@ -76,7 +76,7 @@ export async function loadModel(modelPath: string | undefined): Promise<GraphMod
if (loaded && options.cacheModels && options.cacheSupported && !modelStats[shortModelName].inCache) { // save model to cache if (loaded && options.cacheModels && options.cacheSupported && !modelStats[shortModelName].inCache) { // save model to cache
try { try {
const saveResult = await model.save(cachedModelName); const saveResult = await model.save(cachedModelName);
log('model saved:', cachedModelName, saveResult); if (options.debug) log('model saved:', cachedModelName, saveResult);
} catch (err) { } catch (err) {
log('error saving model:', modelUrl, err); log('error saving model:', modelUrl, err);
} }

View File

@ -1,39 +1,39 @@
2022-09-07 12:39:03 DATA:  Build {"name":"@vladmandic/human","version":"2.10.1"} 2022-09-08 08:01:45 DATA:  Build {"name":"@vladmandic/human","version":"2.10.1"}
2022-09-07 12:39:03 INFO:  Application: {"name":"@vladmandic/human","version":"2.10.1"} 2022-09-08 08:01:45 INFO:  Application: {"name":"@vladmandic/human","version":"2.10.1"}
2022-09-07 12:39:03 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} 2022-09-08 08:01:45 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
2022-09-07 12:39:03 INFO:  Toolchain: {"build":"0.7.11","esbuild":"0.15.7","typescript":"4.8.2","typedoc":"0.23.14","eslint":"8.23.0"} 2022-09-08 08:01:45 INFO:  Toolchain: {"build":"0.7.11","esbuild":"0.15.7","typescript":"4.8.2","typedoc":"0.23.14","eslint":"8.23.0"}
2022-09-07 12:39:03 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]} 2022-09-08 08:01:45 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
2022-09-07 12:39:03 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]} 2022-09-08 08:01:45 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
2022-09-07 12:39:03 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":608} 2022-09-08 08:01:45 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":608}
2022-09-07 12:39:03 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":75,"inputBytes":656955,"outputBytes":308860} 2022-09-08 08:01:45 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":75,"inputBytes":656876,"outputBytes":308794}
2022-09-07 12:39:03 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":612} 2022-09-08 08:01:45 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":612}
2022-09-07 12:39:03 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":75,"inputBytes":656959,"outputBytes":308864} 2022-09-08 08:01:45 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":75,"inputBytes":656880,"outputBytes":308798}
2022-09-07 12:39:03 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":664} 2022-09-08 08:01:45 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":664}
2022-09-07 12:39:03 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":75,"inputBytes":657011,"outputBytes":308914} 2022-09-08 08:01:45 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":75,"inputBytes":656932,"outputBytes":308848}
2022-09-07 12:39:03 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":358} 2022-09-08 08:01:45 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":358}
2022-09-07 12:39:03 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":1088,"outputBytes":583} 2022-09-08 08:01:45 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":1088,"outputBytes":583}
2022-09-07 12:39:03 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":75,"inputBytes":656930,"outputBytes":307734} 2022-09-08 08:01:45 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":75,"inputBytes":656851,"outputBytes":307668}
2022-09-07 12:39:03 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":1344,"outputBytes":2821914} 2022-09-08 08:01:45 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":1344,"outputBytes":2821914}
2022-09-07 12:39:03 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":75,"inputBytes":3478261,"outputBytes":1687921} 2022-09-08 08:01:45 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":75,"inputBytes":3478182,"outputBytes":1687855}
2022-09-07 12:39:03 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":75,"inputBytes":3478261,"outputBytes":3109077} 2022-09-08 08:01:45 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":75,"inputBytes":3478182,"outputBytes":3109019}
2022-09-07 12:39:08 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":30} 2022-09-08 08:01:50 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":30}
2022-09-07 12:39:10 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true} 2022-09-08 08:01:52 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
2022-09-07 12:39:10 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6714,"outputBytes":3134} 2022-09-08 08:01:52 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6714,"outputBytes":3134}
2022-09-07 12:39:10 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15488,"outputBytes":7788} 2022-09-08 08:01:52 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15488,"outputBytes":7788}
2022-09-07 12:39:21 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":110,"errors":0,"warnings":0} 2022-09-08 08:02:03 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":110,"errors":0,"warnings":0}
2022-09-07 12:39:21 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"} 2022-09-08 08:02:04 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
2022-09-07 12:39:21 STATE: Copy: {"input":"tfjs/tfjs.esm.d.ts"} 2022-09-08 08:02:04 STATE: Copy: {"input":"tfjs/tfjs.esm.d.ts"}
2022-09-07 12:39:21 INFO:  Done... 2022-09-08 08:02:04 INFO:  Done...
2022-09-07 12:39:22 STATE: API-Extractor: {"succeeeded":true,"errors":0,"warnings":193} 2022-09-08 08:02:04 STATE: API-Extractor: {"succeeeded":true,"errors":0,"warnings":193}
2022-09-07 12:39:22 STATE: Copy: {"input":"types/human.d.ts"} 2022-09-08 08:02:04 STATE: Copy: {"input":"types/human.d.ts"}
2022-09-07 12:39:22 INFO:  Analyze models: {"folders":8,"result":"models/models.json"} 2022-09-08 08:02:04 INFO:  Analyze models: {"folders":8,"result":"models/models.json"}
2022-09-07 12:39:22 STATE: Models {"folder":"./models","models":13} 2022-09-08 08:02:04 STATE: Models {"folder":"./models","models":13}
2022-09-07 12:39:22 STATE: Models {"folder":"../human-models/models","models":42} 2022-09-08 08:02:04 STATE: Models {"folder":"../human-models/models","models":42}
2022-09-07 12:39:22 STATE: Models {"folder":"../blazepose/model/","models":4} 2022-09-08 08:02:04 STATE: Models {"folder":"../blazepose/model/","models":4}
2022-09-07 12:39:22 STATE: Models {"folder":"../anti-spoofing/model","models":1} 2022-09-08 08:02:04 STATE: Models {"folder":"../anti-spoofing/model","models":1}
2022-09-07 12:39:22 STATE: Models {"folder":"../efficientpose/models","models":3} 2022-09-08 08:02:04 STATE: Models {"folder":"../efficientpose/models","models":3}
2022-09-07 12:39:22 STATE: Models {"folder":"../insightface/models","models":5} 2022-09-08 08:02:04 STATE: Models {"folder":"../insightface/models","models":5}
2022-09-07 12:39:22 STATE: Models {"folder":"../movenet/models","models":3} 2022-09-08 08:02:04 STATE: Models {"folder":"../movenet/models","models":3}
2022-09-07 12:39:22 STATE: Models {"folder":"../nanodet/models","models":4} 2022-09-08 08:02:04 STATE: Models {"folder":"../nanodet/models","models":4}
2022-09-07 12:39:22 STATE: Models: {"count":57,"totalSize":383017442} 2022-09-08 08:02:05 STATE: Models: {"count":57,"totalSize":383017442}
2022-09-07 12:39:22 INFO:  Human Build complete... {"logFile":"test/build.log"} 2022-09-08 08:02:05 INFO:  Human Build complete... {"logFile":"test/build.log"}