mirror of https://github.com/vladmandic/human
updated build docs
parent
0815d53e58
commit
8b7ff45ead
|
@ -17,25 +17,29 @@ This will rebuild library itself (all variations) as well as demo
|
|||
Build process is written as JavaScript `server/build.js` which can be modified to change any build parameters
|
||||
Build creates a custom `tfjs` bundle to optimize size and avoid unnecessary polyfills
|
||||
|
||||
```log
|
||||
> @vladmandic/human@0.9.4 dev /home/vlado/dev/human
|
||||
> npm install && node server/dev.js
|
||||
Build is started by running `npm run build`
|
||||
|
||||
audited 323 packages in 2.475s
|
||||
```log
|
||||
> @vladmandic/human@0.9.9 build /home/vlado/dev/human
|
||||
> npm install && rimraf dist/* && node server/build.js && node server/changelog.js
|
||||
|
||||
audited 330 packages in 2.272s
|
||||
found 0 vulnerabilities
|
||||
|
||||
2020-11-17 12:27:57 INFO: @vladmandic/human version 0.9.4
|
||||
2020-11-17 12:27:57 INFO: User: vlado Platform: linux Arch: x64 Node: v15.0.1
|
||||
2020-11-17 12:27:57 INFO: Build: file startup all target: es2018
|
||||
2020-11-17 12:27:57 STATE: HTTP2 server listening: 8000
|
||||
2020-11-17 12:27:57 STATE: Monitoring: [ 'package.json', 'config.js', 'demo', 'src', [length]: 4 ]
|
||||
2020-11-17 12:26:19 STATE: Build: { modules: 1061, moduleBytes: 3772720, imports: 7, importBytes: 200, outputBytes: 1586281, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2020-11-17 12:27:57 STATE: Build: { imports: 35, importBytes: 1987856, outputBytes: 1837720, outputFiles: 'dist/human.js' }
|
||||
2020-11-17 12:27:58 STATE: Build: { imports: 35, importBytes: 1987856, outputBytes: 1838222, outputFiles: 'dist/human.esm.js' }
|
||||
2020-11-17 12:27:58 STATE: Build: { imports: 35, importBytes: 1987856, outputBytes: 1838231, outputFiles: 'dist/human.esm-nobundle.js' }
|
||||
2020-11-17 12:27:58 STATE: Build: { imports: 35, importBytes: 1987856, outputBytes: 1838727, outputFiles: 'dist/human.node.js' }
|
||||
2020-11-17 12:27:59 STATE: Build: { imports: 35, importBytes: 1987856, outputBytes: 1838736, outputFiles: 'dist/human.node-nobundle.js' }
|
||||
2020-11-17 12:27:59 STATE: Build: { imports: 5, importBytes: 1895176, outputBytes: 1882924, outputFiles: 'dist/demo-browser-index.js' }
|
||||
2020-11-21 12:06:29 INFO: @vladmandic/human version 0.9.9
|
||||
2020-11-21 12:06:29 INFO: User: vlado Platform: linux Arch: x64 Node: v15.0.1
|
||||
2020-11-21 12:06:29 INFO: Build: file startup all target: es2018
|
||||
2020-11-21 12:06:29 STATE: Build for: node type: tfjs: { imports: 1, importBytes: 39, outputBytes: 1044, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2020-11-21 12:06:29 STATE: Build for: node type: node: { imports: 35, importBytes: 403608, outputBytes: 249844, outputFiles: 'dist/human.node.js' }
|
||||
2020-11-21 12:06:29 STATE: Build for: nodeGPU type: tfjs: { imports: 1, importBytes: 43, outputBytes: 1048, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2020-11-21 12:06:29 STATE: Build for: nodeGPU type: node: { imports: 35, importBytes: 403612, outputBytes: 249852, outputFiles: 'dist/human.node-gpu.js' }
|
||||
2020-11-21 12:06:30 STATE: Build for: browserNoBundle type: tfjs: { imports: 1, importBytes: 1798, outputBytes: 260, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2020-11-21 12:06:30 STATE: Build for: browserNoBundle type: esm: { imports: 35, importBytes: 402824, outputBytes: 248844, outputFiles: 'dist/human.esm.nobundle.js' }
|
||||
2020-11-21 12:06:30 STATE: Build for: browserBundle type: tfjs: { modules: 1061, moduleBytes: 3772720, imports: 7, importBytes: 1798, outputBytes: 1531180, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2020-11-21 12:06:30 STATE: Build for: browserBundle type: iife: { imports: 35, importBytes: 1933744, outputBytes: 1783188, outputFiles: 'dist/human.js' }
|
||||
2020-11-21 12:06:31 STATE: Build for: browserBundle type: esm: { imports: 35, importBytes: 1933744, outputBytes: 1783877, outputFiles: 'dist/human.esm.js' }
|
||||
2020-11-21 12:06:32 STATE: Build for: browserBundle type: demo: { imports: 5, importBytes: 1844123, outputBytes: 1830367, outputFiles: 'dist/demo-browser-index.js' }
|
||||
2020-11-21 12:06:32 STATE: Change log updated: /home/vlado/dev/human/wiki/Change-Log.md
|
||||
```
|
||||
|
||||
<br>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
# @vladmandic/human
|
||||
|
||||
Version: **0.9.8**
|
||||
Version: **0.9.9**
|
||||
Description: **Human: 3D Face Detection, Face Embedding & Recognition, Body Pose Tracking, Hand & Finger Tracking, Iris Analysis, Age & Gender & Emotion Prediction & Gesture Recognition**
|
||||
|
||||
Author: **Vladimir Mandic <mandic00@live.com>**
|
||||
|
@ -10,9 +10,10 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
|||
|
||||
## Changelog
|
||||
|
||||
### **HEAD -> main** 2020/11/21 mandic00@live.com
|
||||
### **HEAD -> main, origin/main, origin/HEAD** 2020/11/21 mandic00@live.com
|
||||
|
||||
### **origin/main, origin/HEAD** 2020/11/20 mandic00@live.com
|
||||
### **0.9.9** 2020/11/21 mandic00@live.com
|
||||
- new screenshots
|
||||
- camera exception handling
|
||||
|
||||
### **0.9.8** 2020/11/19 mandic00@live.com
|
||||
|
|
29
Demos.md
29
Demos.md
|
@ -69,26 +69,23 @@ On first start, it will install all development dependencies required to rebuild
|
|||
By default, web server will run on port `8000` which is configurable in `server/dev.js:options.port`
|
||||
|
||||
```log
|
||||
> @vladmandic/human@0.9.4 dev /home/vlado/dev/human
|
||||
> @vladmandic/human@0.9.9 dev /home/vlado/dev/human
|
||||
> npm install && node server/dev.js
|
||||
|
||||
audited 323 packages in 2.475s
|
||||
audited 330 packages in 2.506s
|
||||
found 0 vulnerabilities
|
||||
|
||||
2020-11-17 12:27:57 INFO: @vladmandic/human version 0.9.4
|
||||
2020-11-17 12:27:57 INFO: User: vlado Platform: linux Arch: x64 Node: v15.0.1
|
||||
2020-11-17 12:27:57 INFO: Build: file startup all target: es2018
|
||||
2020-11-17 12:27:57 STATE: HTTP2 server listening: 8000
|
||||
2020-11-17 12:27:57 STATE: Monitoring: [ 'package.json', 'config.js', 'demo', 'src', [length]: 4 ]
|
||||
2020-11-17 12:26:19 STATE: Build: { modules: 1061, moduleBytes: 3772720, imports: 7, importBytes: 200, outputBytes: 1586281, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2020-11-17 12:27:57 STATE: Build: { imports: 35, importBytes: 1987856, outputBytes: 1837720, outputFiles: 'dist/human.js' }
|
||||
2020-11-17 12:27:58 STATE: Build: { imports: 35, importBytes: 1987856, outputBytes: 1838222, outputFiles: 'dist/human.esm.js' }
|
||||
2020-11-17 12:27:58 STATE: Build: { imports: 35, importBytes: 1987856, outputBytes: 1838231, outputFiles: 'dist/human.esm-nobundle.js' }
|
||||
2020-11-17 12:27:58 STATE: Build: { imports: 35, importBytes: 1987856, outputBytes: 1838727, outputFiles: 'dist/human.node.js' }
|
||||
2020-11-17 12:27:59 STATE: Build: { imports: 35, importBytes: 1987856, outputBytes: 1838736, outputFiles: 'dist/human.node-nobundle.js' }
|
||||
2020-11-17 12:27:59 STATE: Build: { imports: 5, importBytes: 1895176, outputBytes: 1882924, outputFiles: 'dist/demo-browser-index.js' }
|
||||
2020-11-17 12:28:02 DATA: GET/2.0 200 text/html 5050 / ::ffff:192.168.0.200
|
||||
2020-11-17 12:28:02 DATA: GET/2.0 200 text/javascript 1882924 /dist/demo-browser-index.js ::ffff:192.168.0.200
|
||||
2020-11-21 12:15:05 INFO: @vladmandic/human version 0.9.9
|
||||
2020-11-21 12:15:05 INFO: User: vlado Platform: linux Arch: x64 Node: v15.0.1
|
||||
2020-11-21 12:15:05 INFO: Build: file startup all target: es2018
|
||||
2020-11-21 12:15:05 STATE: HTTP2 server listening: 8000
|
||||
2020-11-21 12:15:05 STATE: Monitoring: [ 'package.json', 'config.js', 'demo', 'src', [length]: 4 ]
|
||||
2020-11-21 12:15:05 STATE: Build for: browserBundle type: tfjs: { modules: 1061, moduleBytes: 3772720, imports: 7, importBytes: 1798, outputBytes: 1531180, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2020-11-21 12:15:06 STATE: Build for: browserBundle type: iife: { imports: 35, importBytes: 1933744, outputBytes: 1783188, outputFiles: 'dist/human.js' }
|
||||
2020-11-21 12:15:06 STATE: Build for: browserBundle type: esm: { imports: 35, importBytes: 1933744, outputBytes: 1783877, outputFiles: 'dist/human.esm.js' }
|
||||
2020-11-21 12:15:07 STATE: Build for: browserBundle type: demo: { imports: 5, importBytes: 1844123, outputBytes: 1830367, outputFiles: 'dist/demo-browser-index.js' }
|
||||
2020-11-21 12:15:10 DATA: GET/2.0 200 text/html 6463 / ::ffff:192.168.0.200
|
||||
2020-11-21 12:15:10 DATA: GET/2.0 200 text/javascript 1830367 /dist/demo-browser-index.js ::ffff:192.168.0.200
|
||||
...
|
||||
```
|
||||
<br>
|
||||
|
|
22
Install.md
22
Install.md
|
@ -18,8 +18,8 @@ There are multiple ways to use `Human` library, pick one that suits you:
|
|||
- `dist/human.js`: IIFE format bundle with TFJS for Browsers
|
||||
- `dist/human.esm.js`: ESM format bundle with TFJS for Browsers
|
||||
- `dist/human.esm-nobundle.js`: ESM format bundle without TFJS for Browsers
|
||||
- `dist/human.node.js`: CommonJS format bundle with TFJS for NodeJS
|
||||
- `dist/human.node-nobundle.js`: CommonJS format bundle without TFJS for NodeJS
|
||||
- `dist/human.node.js`: CommonJS format for NodeJS, optimized for usage with `tfjs-node`
|
||||
- `dist/human.node-gpu.js`: CommonJS format for NodeJS, optimized for usage with `tfjs-node-gpu`
|
||||
|
||||
All versions include `sourcemap` *(.map)* and build `manifest` *(.json)*
|
||||
While `Human` is in pre-release mode, all bundles are non-minified
|
||||
|
@ -93,7 +93,7 @@ Or if you prefer to package your version of `tfjs`, you can use `nobundle` versi
|
|||
|
||||
Install with:
|
||||
```shell
|
||||
npm install @vladmandic/human @tensorflow/tfjs-node
|
||||
npm install @vladmandic/human @tensorflow/tfjs
|
||||
```
|
||||
```js
|
||||
import tf from '@tensorflow/tfjs'
|
||||
|
@ -107,8 +107,8 @@ Install with:
|
|||
|
||||
*Recommended for `NodeJS` projects that will execute in the backend*
|
||||
|
||||
Entry point is bundle in CommonJS format `dist/human.node.js`
|
||||
You also need to install and include `tfjs-node` or `tfjs-node-gpu` in your project so it can register an optimized backend
|
||||
`Human` library for NodeJS does not include TFJS due to platform-specific binary dependencies - you need to install and include `tfjs-node` or `tfjs-node-gpu` in your project so it can register an optimized backend before loading `Human`
|
||||
Entry point are bundles in CommonJS format `dist/human.node.js` and `dist/human.node-gpu.js`
|
||||
|
||||
Install with:
|
||||
```shell
|
||||
|
@ -121,6 +121,18 @@ And then use with:
|
|||
const human = new Human();
|
||||
```
|
||||
|
||||
Or for CUDA accelerated NodeJS backend:
|
||||
```shell
|
||||
npm install @vladmandic/human @tensorflow/tfjs-node-gpu
|
||||
```
|
||||
And then use with:
|
||||
```js
|
||||
const tf = require('@tensorflow/tfjs-node-gpu'); // can also use '@tensorflow/tfjs-node-gpu' if you have environment with CUDA extensions
|
||||
const Human = require('@vladmandic/human/dist/human.node-gpu.js').default; // points to @vladmandic/human/dist/human.node.js
|
||||
const human = new Human();
|
||||
```
|
||||
|
||||
|
||||
Since NodeJS projects load `weights` from local filesystem instead of using `http` calls, you must modify default configuration to include correct paths with `file://` prefix
|
||||
|
||||
For example:
|
||||
|
|
Loading…
Reference in New Issue