mirror of https://github.com/vladmandic/human
update build pipeline
parent
37cf9e37d1
commit
554ed81f49
|
@ -9,7 +9,10 @@
|
|||
|
||||
## Changelog
|
||||
|
||||
### **HEAD -> main** 2022/08/10 mandic00@live.com
|
||||
### **HEAD -> main** 2022/08/12 mandic00@live.com
|
||||
|
||||
|
||||
### **origin/main** 2022/08/10 mandic00@live.com
|
||||
|
||||
|
||||
### **2.9.3** 2022/08/10 mandic00@live.com
|
||||
|
|
41
TODO.md
41
TODO.md
|
@ -22,13 +22,9 @@ N/A
|
|||
## Known Issues
|
||||
|
||||
### Face with Attention
|
||||
`FaceMesh-Landmarks` model is supported only with `CPU` and `WebGL` backends due to `TFJS` issues
|
||||
|
||||
### WASM
|
||||
|
||||
Support for **WASM SIMD** and **WASM MultiThreading** is still disabled by default in **Chromium** based browsers
|
||||
Suggestion is to enable it manually for major performance boost
|
||||
Enable via <chrome://flags/#enable-experimental-webassembly-features>
|
||||
`FaceMesh-Attention` is not supported in `Node` or in browser using `WASM` backend due to missing kernel op in **TFJS**
|
||||
Model is supported using `WebGL` backend in browser
|
||||
|
||||
### WebGPU
|
||||
|
||||
|
@ -40,30 +36,43 @@ Enable via <chrome://flags/#enable-unsafe-webgpu>
|
|||
Running in **web workers** requires `OffscreenCanvas` which is still disabled by default in **Firefox**
|
||||
Enable via `about:config` -> `gfx.offscreencanvas.enabled`
|
||||
|
||||
### Face Detection
|
||||
### Face Detection & Hand Detection
|
||||
|
||||
Enhanced rotation correction for face detection is not working in **NodeJS** due to missing kernel op in **TFJS**
|
||||
Enhanced rotation correction for face detection and hand detection is not working in **NodeJS** due to missing kernel op in **TFJS**
|
||||
Feature is automatically disabled in **NodeJS** without user impact
|
||||
|
||||
### Object Detection
|
||||
|
||||
`NanoDet` model is not supported in `Node` or in browser using `WASM` backend due to missing kernel op in **TFJS**
|
||||
Model is supported using `WebGL` backend in browser
|
||||
|
||||
<hr><br>
|
||||
|
||||
## Pending Release Changes
|
||||
|
||||
- Add **InsightFace** model as alternative for face embedding/descriptor detection
|
||||
compatible with multiple variations of **InsightFace** models
|
||||
configurable using `config.face.insightface` config section
|
||||
see `demo/faceid/index.ts` for usage
|
||||
models can be downloaded from <https://github.com/vladmandic/insightface>
|
||||
- Add `human.check()` which validates all kernel ops for currently loaded models with currently selected backend
|
||||
Example: `console.error(human.check());`
|
||||
Compatible with multiple variations of **InsightFace** models
|
||||
Configurable using `config.face.insightface` config section
|
||||
See `demo/faceid/index.ts` for usage
|
||||
Models can be downloaded from <https://github.com/vladmandic/insightface>
|
||||
- Add `human.check()` which validates all kernel ops for currently loaded models with currently selected backend
|
||||
Example: `console.error(human.check());`
|
||||
- Host models in <human-models>
|
||||
Models can be directly used without downloading to local storage
|
||||
Example: `modelPath: 'https://vladmandic.github.io/human-models/models/facemesh.json'`
|
||||
- Host models in **Google Cloud Bucket**
|
||||
Models can be directly used without downloading to local storage
|
||||
Example: `modelPath: 'https://storage.googleapis.com/human-models/facemesh.json'`
|
||||
- Fix **MobileFaceNet** model as alternative for face embedding/descriptor detection
|
||||
configurable using `config.face.mobilefacenet` config section
|
||||
Configurable using `config.face.mobilefacenet` config section
|
||||
- Fix **EfficientPose** module as alternative body detection
|
||||
- Fix **NanoDet** module as alternative object detection
|
||||
- Fix `demo/multithread/node-multiprocess.js` demo
|
||||
- Fix `human.match` when using mixed descriptor lengths
|
||||
- Increased test coverage
|
||||
run using `npm run test`
|
||||
Run using `npm run test`
|
||||
- Increase availability of alternative models
|
||||
See `models/model.json` for full list
|
||||
- Update **NMS** methods resulting in some performance improvements
|
||||
- Update profiling methods in `human.profile()`
|
||||
- Update project dependencies
|
||||
|
|
8
build.js
8
build.js
|
@ -6,6 +6,7 @@ const APIExtractor = require('@microsoft/api-extractor');
|
|||
const tf = require('@tensorflow/tfjs-node');
|
||||
const package = require('./package.json');
|
||||
|
||||
const logFile = 'test/build.log';
|
||||
const modelsOut = 'models/models.json';
|
||||
const modelsFolders = [
|
||||
'./models',
|
||||
|
@ -71,9 +72,8 @@ async function analyzeModels() {
|
|||
}
|
||||
|
||||
async function main() {
|
||||
log.logFile(logFile);
|
||||
log.data('Build', { name: package.name, version: package.version });
|
||||
// generate model signature
|
||||
await analyzeModels();
|
||||
// run production build
|
||||
const build = new Build();
|
||||
await build.run('production');
|
||||
|
@ -102,7 +102,9 @@ async function main() {
|
|||
copy('types/human.d.ts', 'dist/human.node-gpu.d.ts');
|
||||
copy('types/human.d.ts', 'dist/human.node.d.ts');
|
||||
copy('types/human.d.ts', 'dist/human.node-wasm.d.ts');
|
||||
log.info('Human Build complete...');
|
||||
// generate model signature
|
||||
await analyzeModels();
|
||||
log.info('Human Build complete...', { logFile });
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
@ -1,24 +1,39 @@
|
|||
2022-08-12 09:12:16 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.9.3"}
|
||||
2022-08-12 09:12:16 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2022-08-12 09:12:16 [36mINFO: [39m Toolchain: {"build":"0.7.9","esbuild":"0.15.1","typescript":"4.7.4","typedoc":"0.23.10","eslint":"8.21.0"}
|
||||
2022-08-12 09:12:16 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-08-12 09:12:16 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||
2022-08-12 09:12:16 [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":608}
|
||||
2022-08-12 09:12:16 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":75,"inputBytes":654779,"outputBytes":307161}
|
||||
2022-08-12 09:12:16 [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":612}
|
||||
2022-08-12 09:12:16 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":75,"inputBytes":654783,"outputBytes":307165}
|
||||
2022-08-12 09:12:16 [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":664}
|
||||
2022-08-12 09:12:16 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":75,"inputBytes":654835,"outputBytes":307215}
|
||||
2022-08-12 09:12:16 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":358}
|
||||
2022-08-12 09:12:16 [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":1032,"outputBytes":583}
|
||||
2022-08-12 09:12:16 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":75,"inputBytes":654754,"outputBytes":306014}
|
||||
2022-08-12 09:12:17 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":1271,"outputBytes":2787569}
|
||||
2022-08-12 09:12:17 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":75,"inputBytes":3441740,"outputBytes":1668900}
|
||||
2022-08-12 09:12:17 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":75,"inputBytes":3441740,"outputBytes":3072630}
|
||||
2022-08-12 09:12:23 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
||||
2022-08-12 09:12:25 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
||||
2022-08-12 09:12:25 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6716,"outputBytes":3141}
|
||||
2022-08-12 09:12:25 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15629,"outputBytes":7798}
|
||||
2022-08-12 09:12:35 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":109,"errors":0,"warnings":0}
|
||||
2022-08-12 09:12:35 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-08-12 09:12:35 [36mINFO: [39m Done...
|
||||
2022-08-12 09:50:24 [32mDATA: [39m Build {"name":"@vladmandic/human","version":"2.9.3"}
|
||||
2022-08-12 09:50:24 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.9.3"}
|
||||
2022-08-12 09:50:24 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2022-08-12 09:50:24 [36mINFO: [39m Toolchain: {"build":"0.7.9","esbuild":"0.15.1","typescript":"4.7.4","typedoc":"0.23.10","eslint":"8.21.0"}
|
||||
2022-08-12 09:50:24 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-08-12 09:50:24 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||
2022-08-12 09:50:24 [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":608}
|
||||
2022-08-12 09:50:24 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":75,"inputBytes":654779,"outputBytes":307161}
|
||||
2022-08-12 09:50:24 [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":612}
|
||||
2022-08-12 09:50:24 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":75,"inputBytes":654783,"outputBytes":307165}
|
||||
2022-08-12 09:50:24 [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":664}
|
||||
2022-08-12 09:50:24 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":75,"inputBytes":654835,"outputBytes":307215}
|
||||
2022-08-12 09:50:24 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":358}
|
||||
2022-08-12 09:50:24 [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":1032,"outputBytes":583}
|
||||
2022-08-12 09:50:24 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":75,"inputBytes":654754,"outputBytes":306014}
|
||||
2022-08-12 09:50:24 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":1271,"outputBytes":2787569}
|
||||
2022-08-12 09:50:24 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":75,"inputBytes":3441740,"outputBytes":1668900}
|
||||
2022-08-12 09:50:24 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":75,"inputBytes":3441740,"outputBytes":3072630}
|
||||
2022-08-12 09:50:31 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
||||
2022-08-12 09:50:33 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
||||
2022-08-12 09:50:33 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6716,"outputBytes":3141}
|
||||
2022-08-12 09:50:33 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15629,"outputBytes":7798}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":109,"errors":0,"warnings":0}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m Copy: {"input":"tfjs/tfjs.esm.d.ts"}
|
||||
2022-08-12 09:50:42 [36mINFO: [39m Done...
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m API-Extractor: {"succeeeded":true,"errors":0,"warnings":198}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m Copy: {"input":"types/human.d.ts"}
|
||||
2022-08-12 09:50:42 [36mINFO: [39m Analyze models: {"folders":8,"result":"models/models.json"}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m Models {"folder":"./models","models":13}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m Models {"folder":"../human-models/models","models":42}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m Models {"folder":"../blazepose/model/","models":4}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m Models {"folder":"../anti-spoofing/model","models":1}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m Models {"folder":"../efficientpose/models","models":3}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m Models {"folder":"../insightface/models","models":5}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m Models {"folder":"../movenet/models","models":3}
|
||||
2022-08-12 09:50:42 [35mSTATE:[39m Models {"folder":"../nanodet/models","models":4}
|
||||
2022-08-12 09:50:43 [35mSTATE:[39m Models: {"count":57,"totalSize":383017442}
|
||||
2022-08-12 09:50:43 [36mINFO: [39m Human Build complete... {"logFile":"test/build.log"}
|
||||
|
|
1750
test/test.log
1750
test/test.log
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue