mirror of https://github.com/vladmandic/human
rebuild
parent
7835126870
commit
a3d890119c
|
@ -1,6 +1,5 @@
|
||||||
.vscode
|
.vscode
|
||||||
node_modules
|
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
assets/tf*
|
|
||||||
*.swp
|
*.swp
|
||||||
|
node_modules/
|
||||||
types/lib
|
types/lib
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
### **HEAD -> main** 2022/04/01 mandic00@live.com
|
### **HEAD -> main** 2022/04/05 mandic00@live.com
|
||||||
|
|
||||||
|
|
||||||
### **2.6.5** 2022/04/01 mandic00@live.com
|
### **2.6.5** 2022/04/01 mandic00@live.com
|
||||||
|
|
10
package.json
10
package.json
|
@ -53,7 +53,7 @@
|
||||||
"tensorflow"
|
"tensorflow"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@microsoft/api-extractor": "^7.20.0",
|
"@microsoft/api-extractor": "^7.21.2",
|
||||||
"@tensorflow/tfjs": "^3.15.0",
|
"@tensorflow/tfjs": "^3.15.0",
|
||||||
"@tensorflow/tfjs-backend-cpu": "^3.15.0",
|
"@tensorflow/tfjs-backend-cpu": "^3.15.0",
|
||||||
"@tensorflow/tfjs-backend-wasm": "^3.15.0",
|
"@tensorflow/tfjs-backend-wasm": "^3.15.0",
|
||||||
|
@ -74,11 +74,11 @@
|
||||||
"@vladmandic/tfjs": "github:vladmandic/tfjs",
|
"@vladmandic/tfjs": "github:vladmandic/tfjs",
|
||||||
"canvas": "^2.9.1",
|
"canvas": "^2.9.1",
|
||||||
"dayjs": "^1.11.0",
|
"dayjs": "^1.11.0",
|
||||||
"esbuild": "^0.14.31",
|
"esbuild": "^0.14.34",
|
||||||
"eslint": "8.12.0",
|
"eslint": "8.13.0",
|
||||||
"eslint-config-airbnb-base": "^15.0.0",
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
"eslint-plugin-html": "^6.2.0",
|
"eslint-plugin-html": "^6.2.0",
|
||||||
"eslint-plugin-import": "^2.25.4",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-json": "^3.1.0",
|
"eslint-plugin-json": "^3.1.0",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-promise": "^6.0.0",
|
"eslint-plugin-promise": "^6.0.0",
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"seedrandom": "^3.0.5",
|
"seedrandom": "^3.0.5",
|
||||||
"tslib": "^2.3.1",
|
"tslib": "^2.3.1",
|
||||||
"typedoc": "0.22.13",
|
"typedoc": "0.22.14",
|
||||||
"typescript": "4.6.3"
|
"typescript": "4.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ export async function loadModel(modelPath: string | undefined): Promise<GraphMod
|
||||||
const modelCached = options.cacheModels && Object.keys(cachedModels).includes(cachedModelName); // is model found in cache
|
const modelCached = options.cacheModels && Object.keys(cachedModels).includes(cachedModelName); // is model found in cache
|
||||||
const tfLoadOptions = typeof fetch === 'undefined' ? {} : { fetchFunc: (url, init?) => httpHandler(url, init) };
|
const tfLoadOptions = typeof fetch === 'undefined' ? {} : { fetchFunc: (url, init?) => httpHandler(url, init) };
|
||||||
const model: GraphModel = new tf.GraphModel(modelCached ? cachedModelName : modelUrl, tfLoadOptions) as unknown as GraphModel; // create model prototype and decide if load from cache or from original modelurl
|
const model: GraphModel = new tf.GraphModel(modelCached ? cachedModelName : modelUrl, tfLoadOptions) as unknown as GraphModel; // create model prototype and decide if load from cache or from original modelurl
|
||||||
|
let loaded = false;
|
||||||
try {
|
try {
|
||||||
// @ts-ignore private function
|
// @ts-ignore private function
|
||||||
model.findIOHandler(); // decide how to actually load a model
|
model.findIOHandler(); // decide how to actually load a model
|
||||||
|
@ -38,10 +39,11 @@ export async function loadModel(modelPath: string | undefined): Promise<GraphMod
|
||||||
const artifacts = await model.handler.load(); // load manifest
|
const artifacts = await model.handler.load(); // load manifest
|
||||||
model.loadSync(artifacts); // load weights
|
model.loadSync(artifacts); // load weights
|
||||||
if (options.verbose) log('load model:', model['modelUrl']);
|
if (options.verbose) log('load model:', model['modelUrl']);
|
||||||
|
loaded = true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
log('error loading model:', modelUrl, err);
|
log('error loading model:', modelUrl, err);
|
||||||
}
|
}
|
||||||
if (options.cacheModels && !modelCached) { // save model to cache
|
if (loaded && options.cacheModels && !modelCached) { // save model to cache
|
||||||
try {
|
try {
|
||||||
const saveResult = await model.save(cachedModelName);
|
const saveResult = await model.save(cachedModelName);
|
||||||
log('model saved:', cachedModelName, saveResult);
|
log('model saved:', cachedModelName, saveResult);
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
2022-04-05 07:49:00 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.6.5"}
|
2022-04-10 10:11:37 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.6.5"}
|
||||||
2022-04-05 07:49:00 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
2022-04-10 10:11:37 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||||
2022-04-05 07:49:00 [36mINFO: [39m Toolchain: {"build":"0.7.2","esbuild":"0.14.31","typescript":"4.6.3","typedoc":"0.22.13","eslint":"8.12.0"}
|
2022-04-10 10:11:37 [36mINFO: [39m Toolchain: {"build":"0.7.2","esbuild":"0.14.34","typescript":"4.6.3","typedoc":"0.22.14","eslint":"8.13.0"}
|
||||||
2022-04-05 07:49:00 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
2022-04-10 10:11:37 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
2022-04-10 10:11:37 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":595}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":595}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":64,"inputBytes":564501,"outputBytes":293301}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":64,"inputBytes":564552,"outputBytes":293314}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":599}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":599}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":64,"inputBytes":564505,"outputBytes":293305}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":64,"inputBytes":564556,"outputBytes":293318}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":651}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":651}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":64,"inputBytes":564557,"outputBytes":293355}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":64,"inputBytes":564608,"outputBytes":293368}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":394}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":394}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":1068,"outputBytes":615}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":1068,"outputBytes":615}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":64,"inputBytes":564521,"outputBytes":292260}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":64,"inputBytes":564572,"outputBytes":292273}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1344714}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1344714}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":64,"inputBytes":1908620,"outputBytes":1635990}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":64,"inputBytes":1908671,"outputBytes":1636003}
|
||||||
2022-04-05 07:49:00 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":64,"inputBytes":1908620,"outputBytes":2113774}
|
2022-04-10 10:11:37 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":64,"inputBytes":1908671,"outputBytes":2113825}
|
||||||
2022-04-05 07:49:06 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":112}
|
2022-04-10 10:11:43 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":112}
|
||||||
2022-04-05 07:49:07 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":72,"generated":true}
|
2022-04-10 10:11:45 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":72,"generated":true}
|
||||||
2022-04-05 07:49:07 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5862,"outputBytes":2915}
|
2022-04-10 10:11:45 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5862,"outputBytes":2915}
|
||||||
2022-04-05 07:49:07 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":7820}
|
2022-04-10 10:11:45 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":7820}
|
||||||
2022-04-05 07:49:15 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":96,"errors":0,"warnings":0}
|
2022-04-10 10:11:54 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":96,"errors":0,"warnings":0}
|
||||||
2022-04-05 07:49:15 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
2022-04-10 10:11:54 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||||
2022-04-05 07:49:15 [36mINFO: [39m Done...
|
2022-04-10 10:11:54 [36mINFO: [39m Done...
|
||||||
|
|
1368
test/test.log
1368
test/test.log
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue