mirror of https://github.com/vladmandic/human
update backend notes
parent
628f8b9e93
commit
fffa021911
19
Backends.md
19
Backends.md
|
@ -16,12 +16,15 @@ as TensorFlow implementation in JavaScript is by far the slowest
|
||||||
|
|
||||||
## WASM Backend
|
## WASM Backend
|
||||||
|
|
||||||
- WASM backend has good resuts under specific conditions:
|
WASM backend has good resuts under specific conditions:
|
||||||
- Enable WASM SIMD support in your browser
|
|
||||||
|
- Enable WASM SIMD support in your browser
|
||||||
(CPU parallel processing instructions)
|
(CPU parallel processing instructions)
|
||||||
- Reduce size of input image (e.g. webcam)
|
- Reduce size of input image (e.g. webcam)
|
||||||
as WASM does not have optimized image extraction methods
|
as WASM does not have optimized image extraction methods
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
### Loading WASM Files
|
### Loading WASM Files
|
||||||
|
|
||||||
WASM backend requires access to `wasm` files which are part of `@tensorflow/tfjs-backend-wasm` package and included in
|
WASM backend requires access to `wasm` files which are part of `@tensorflow/tfjs-backend-wasm` package and included in
|
||||||
|
@ -34,7 +37,15 @@ Cross-Origin-Opener-Policy: same-origin
|
||||||
Cross-Origin-Embedder-Policy: require-corp
|
Cross-Origin-Embedder-Policy: require-corp
|
||||||
```
|
```
|
||||||
|
|
||||||
Or load WASM files from a CDN such as <https://www.jsdelivr.com/package/npm/@tensorflow/tfjs-backend-wasm?path=dist>
|
Or configure `Human` load WASM files directly from a CDN:
|
||||||
|
|
||||||
|
```json
|
||||||
|
wasmPath: 'https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.8.0/dist/'
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that version of WASM binaries **must** match version of TFJS used by `Human` library
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
### How to enable WASM SIMD support
|
### How to enable WASM SIMD support
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue