update docs

master
Vladimir Mandic 2020-11-09 06:51:40 -05:00
parent b70041ff6b
commit f99c0de2e9
2 changed files with 28 additions and 8 deletions

@ -1,7 +1,7 @@
# @vladmandic/human
Version: **0.8.2**
Version: **0.8.3**
Description: **human: 3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition**
Author: **Vladimir Mandic <mandic00@live.com>**
@ -10,9 +10,11 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
## Changelog
### **HEAD -> main** 2020/11/08 mandic00@live.com
### **HEAD -> main, origin/main, origin/HEAD** 2020/11/08 mandic00@live.com
### **origin/main, origin/HEAD** 2020/11/08 mandic00@live.com
### **0.8.3** 2020/11/08 mandic00@live.com
- refresh
- optimizations
### **0.8.2** 2020/11/08 mandic00@live.com
- fix typos

@ -6,14 +6,21 @@ Demos are included in `/demo`:
**Browser**:
- `index.html`: Full demo using Browser with ESM module, includes selectable backends and webworkers
it loads `dist/demo-browser-index.js` which is built from sources in `demo`, starting with `demo/browser`
alternatively you can load `demo/browser.js` directly
*You can run browser demo either live from git pages, by serving demo folder from your web server or use
included micro http2 server with source file monitoring and dynamic rebuild*
<br>
### Changing Demo Target
Demo in `demo/index.html` loads `dist/demo-browser-index.js` which is built from sources in `demo`, starting with `demo/browser`
This bundled version is needed since mobile browsers (e.g. Chrome on Android) do not support native modules loading yet
If your target is desktop, alternatively you can load `demo/browser.js` directly and skip requirement to rebuild demo from sources every time
<br>
### Dev Server
To use dev server, you must have an SSL certificate since browsers enforce *https* for webcam access
@ -25,7 +32,7 @@ Self-signed test certificate was generated using:
openssl req -x509 -newkey rsa:4096 -nodes -keyout dev-server.key -out dev-server.crt -days 365 -subj "/C=US/ST=Florida/L=Miami/O=@vladmandic"
```
If you want to use your own certificate, edit `dev-server.js`:
If you want to use your own certificate, edit `dev-server/dev-server.js`:
```js
const options = {
key: fs.readFileSync('dev-server/dev-server.key'),
@ -39,7 +46,7 @@ npm run dev
```
On first start, it will install all development dependencies required to rebuild `Human` library
By default, web server will run on port `8000` which is configurable in `dev-server.js:options.port`
By default, web server will run on port `8000` which is configurable in `dev-server/dev-server.js:options.port`
```log
> @vladmandic/human@0.7.5 dev /home/vlado/dev/human
@ -56,7 +63,18 @@ found 0 vulnerabilities
2020-11-06 16:19:16 DATA: GET/2.0 200 text/javascript 1708910 /dist/demo-browser-index.js ::ffff:192.168.0.200
```
*If you want to test `wasm` or `webgpu` backends, enable loading in `index.html`*
### WASM and WebGPU
While `CPU` and `WebGL` backends are included in the bundle, `WASM` and `WebGPU` are not to keep the size at minimum
If you want to use `WASM` (supported) or `WebGPU` (experimental) backends
enable loading of required modules in `index.html`:
```html
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.7.0/dist/tf.es2017.js">
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@2.7.0/dist/tf-backend-wasm.es2017.js">
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-webgpu@0.0.1-alpha.0/dist/tf-webgpu.js">
```
<br>