|
1 | | -const path = require('path') |
2 | 1 | const fs = require('fs/promises') |
3 | 2 |
|
4 | 3 | let tf, Human, Jimp, wasm |
@@ -32,10 +31,10 @@ if (process.argv.length < 3) throw new Error('Incorrect arguments: node classifi |
32 | 31 |
|
33 | 32 | const config = { |
34 | 33 | cacheSensitivity: 0.01, |
35 | | - //modelBasePath: 'file://node_modules/@vladmandic/human/models/', |
| 34 | + // modelBasePath: 'file://node_modules/@vladmandic/human/models/', |
36 | 35 | modelBasePath: 'https://vladmandic.github.io/human-models/models/', |
37 | 36 | backend: PUREJS ? 'wasm' : 'tensorflow', |
38 | | - //wasmPath: 'file://node_modules/@tensorflow/tfjs-backend-wasm/dist/', |
| 37 | + // wasmPath: 'file://node_modules/@tensorflow/tfjs-backend-wasm/dist/', |
39 | 38 | wasmPath: `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf.version_core}/dist/`, |
40 | 39 | debug: false, |
41 | 40 | async: false, |
@@ -67,7 +66,7 @@ async function main() { |
67 | 66 | paths = process.argv.slice(2) |
68 | 67 | } |
69 | 68 |
|
70 | | - Human.env.updateBackend(); |
| 69 | + Human.env.updateBackend() |
71 | 70 | const human = new Human.Human(config) |
72 | 71 |
|
73 | 72 | for (const path of paths) { |
@@ -99,7 +98,7 @@ async function main() { |
99 | 98 | } |
100 | 99 |
|
101 | 100 | if (PUREJS) { |
102 | | - wasm.setWasmPaths(config.wasmPath, true); |
| 101 | + wasm.setWasmPaths(config.wasmPath, true) |
103 | 102 | } |
104 | 103 | tf.setBackend(PUREJS ? 'wasm' : 'tensorflow') |
105 | 104 | .then(() => main()) |
|
0 commit comments