diff --git a/README.md b/README.md
index b15f6f0f..c84b8c0c 100644
--- a/README.md
+++ b/README.md
@@ -41,8 +41,7 @@ There are multiple ways to use `Human` library, pick one that suits you:
- `dist/human.js`: IIFE format minified bundle with TFJS for Browsers
- `dist/human.esm.js`: ESM format minified bundle with TFJS for Browsers
- `dist/human.esm-nobundle.js`: ESM format non-minified bundle without TFJS for Browsers
-- `dist/human.cjs`: CommonJS format minified bundle with TFJS for NodeJS
-- `dist/human-nobundle.cjs`: CommonJS format non-minified bundle without TFJS for NodeJS
+- `dist/human.cjs`: CommonJS format non-minified bundle without TFJS for NodeJS
All versions include `sourcemap`
@@ -116,21 +115,13 @@ Entry point is bundle in CJS 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
Install with:
-```shell
- npm install @vladmandic/human
-```
-And then use with:
-```js
- const human = require('@vladmandic/human'); // points to @vladmandic/human/dist/human.cjs
-```
-or
```shell
npm install @vladmandic/human @tensorflow/tfjs-node
```
And then use with:
```js
const tf = require('@tensorflow/tfjs-node'); // can also use '@tensorflow/tfjs-node-gpu' if you have environment with CUDA extensions
- const human = require('@vladmandic/human/dist/human-nobundle.cjs');
+ const human = require('@vladmandic/human'); // points to @vladmandic/human/dist/human.cjs
```
@@ -164,11 +155,10 @@ If your application resides in a different folder, modify `modelPath` property i
Demos are included in `/demo`:
Browser:
-- `demo-esm`: Full demo using Browser with ESM module, includes selectable backends and webworkers
-- `demo-iife`: Older demo using Browser with IIFE module
+- `index.html`, `browser.js`, `worker.js`: Full demo using Browser with ESM module, includes selectable backends and webworkers
NodeJS:
-- `demo-node`: Demo using NodeJS with CJS module
+- `node.js`: Demo using NodeJS with CJS module
This is a very simple demo as althought `Human` library is compatible with NodeJS execution
and is able to load images and models from local filesystem,
diff --git a/src/config.js b/config.js
similarity index 100%
rename from src/config.js
rename to config.js
diff --git a/demo/demo-esm.js b/demo/browser.js
similarity index 99%
rename from demo/demo-esm.js
rename to demo/browser.js
index 7a505050..a178d1e3 100644
--- a/demo/demo-esm.js
+++ b/demo/browser.js
@@ -11,6 +11,7 @@ const ui = {
columns: 3,
busy: false,
facing: 'user',
+ worker: 'worker.js',
};
const config = {
@@ -243,7 +244,7 @@ function webWorker(input, image, canvas) {
if (!worker) {
// create new webworker and add event handler only once
log('Creating worker thread');
- worker = new Worker('demo-esm-webworker.js', { type: 'module' });
+ worker = new Worker(ui.worker, { type: 'module' });
// after receiving message from webworker, parse&draw results and send new frame for processing
worker.addEventListener('message', (msg) => drawResults(input, msg.data, canvas));
}
diff --git a/demo/demo-iife.html b/demo/demo-iife.html
deleted file mode 100644
index 0296c31c..00000000
--- a/demo/demo-iife.html
+++ /dev/null
@@ -1,422 +0,0 @@
-