Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork358
Build Process
If you want to modify the library and perform a full rebuild:
clone repository, install dependencies, check for errors and run full rebuild from which creates bundles from/src
into/dist
:
git clone https://github.com/vladmandic/humancd humannpm install --dev# installs all project dependenciesnpm run build
This will rebuild library itself (all variations) as well as demo
Build process is written as JavaScript module@vladmandic/build
which usesbuild.json
as configuration file which can be modified to change any build parameters
Build creates a customtfjs
bundle to optimize size and avoid unnecessary polyfills
Production build runs following operations:
- Compile TypeScript
- Create dist minified bundles
- Run Linter
- Create TypeDoc API specification
- Compile TS type definitions
- Create TS type definitions rollup
Dev build runs following operations:
- Start HTTP/HTTPS web server
- Compile TypeScript
- Create dist non-minified bundles
- Run in file watch mode
Production build is started by runningnpm run build
2022-07-1808:21:08DATA:Build{name:'@vladmandic/human',version:'2.9.0'}2022-07-1808:21:08INFO:Analyze:{modelsDir:'../human-models/models',modelsOut:'models/models.json'}2022-07-1808:21:08STATE:Models:{count:42,totalSize:173272189}2022-07-1808:21:08INFO:Application:{name:'@vladmandic/human',version:'2.9.0'}2022-07-1808:21:08INFO:Environment:{profile:'production',config:'.build.json',package:'package.json',tsconfig:true,eslintrc:true,git:true}2022-07-1808:21:08INFO:Toolchain:{build:'0.7.7',esbuild:'0.14.49',typescript:'4.7.4',typedoc:'0.23.8',eslint:'8.20.0'}2022-07-1808:21:08INFO:Build:{profile:'production',steps:['clean','compile','typings','typedoc','lint','changelog']}2022-07-1808:21:08STATE:Clean:{locations:['dist/*','types/lib/*','typedoc/*']}2022-07-1808:21:08STATE: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-07-1808:21:08STATE:Compile:{name:'human/nodejs/cpu',format:'cjs',platform:'node',input:'src/human.ts',output:'dist/human.node.js',files:74,inputBytes:647848,outputBytes:304014}2022-07-1808:21:08STATE: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-07-1808:21:08STATE:Compile:{name:'human/nodejs/gpu',format:'cjs',platform:'node',input:'src/human.ts',output:'dist/human.node-gpu.js',files:74,inputBytes:647852,outputBytes:304018}2022-07-1808:21:08STATE: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-07-1808:21:08STATE:Compile:{name:'human/nodejs/wasm',format:'cjs',platform:'node',input:'src/human.ts',output:'dist/human.node-wasm.js',files:74,inputBytes:647904,outputBytes:304068}2022-07-1808:21:09STATE: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-07-1808:21:09STATE: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-07-1808:21:09STATE:Compile:{name:'human/browser/esm/nobundle',format:'esm',platform:'browser',input:'src/human.ts',output:'dist/human.esm-nobundle.js',files:74,inputBytes:647823,outputBytes:302893}2022-07-1808:21:09STATE:Compile:{name:'tfjs/browser/esm/custom',format:'esm',platform:'browser',input:'tfjs/tf-custom.ts',output:'dist/tfjs.esm.js',files:11,inputBytes:1140,outputBytes:2799617}2022-07-1808:21:09STATE:Compile:{name:'human/browser/iife/bundle',format:'iife',platform:'browser',input:'src/human.ts',output:'dist/human.js',files:74,inputBytes:3446857,outputBytes:1678594}2022-07-1808:21:09STATE:Compile:{name:'human/browser/esm/bundle',format:'esm',platform:'browser',input:'src/human.ts',output:'dist/human.esm.js',files:74,inputBytes:3446857,outputBytes:3078417}2022-07-1808:21:16STATE:Typings:{input:'src/human.ts',output:'types/lib',files:30}2022-07-1808:21:18STATE:TypeDoc:{input:'src/human.ts',output:'typedoc',objects:76,generated:true}2022-07-1808:21:18STATE:Compile:{name:'demo/typescript',format:'esm',platform:'browser',input:'demo/typescript/index.ts',output:'demo/typescript/index.js',files:1,inputBytes:6371,outputBytes:3094}2022-07-1808:21:18STATE: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-07-1808:21:28STATE:Lint:{locations:['*.json','src/**/*.ts','test/**/*.js','demo/**/*.js'],files:107,errors:0,warnings:0}2022-07-1808:21:28STATE:ChangeLog:{repository:'https://github.com/vladmandic/human',branch:'main',output:'CHANGELOG.md'}2022-07-1808:21:28INFO:Done...2022-07-1808:21:28STATE:Copy:{input:'tfjs/tfjs.esm.d.ts'}2022-07-1808:21:29STATE:API-Extractor:{succeeeded:true,errors:0,warnings:197}2022-07-1808:21:29STATE:Copy:{input:'types/human.d.ts'}2022-07-1808:21:29INFO:HumanBuildcomplete...
Only project depdendency is@tensorflow/tfjs
Development dependencies are:
- esbuild used to compile TS sources and generate dist bundles
- eslint used for code linting
- typescript used to generate typings
- typedoc used to generate API specifications
Development build is started by runningnpm run dev
Human Library Wiki Pages
3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition