update to tfjs 3.2.0

pull/46/head
Vladimir Mandic 2021-02-25 08:12:39 -05:00
parent 6ad9c84b0a
commit a3e213532e
15 changed files with 1264 additions and 1254 deletions

View File

@ -6,7 +6,7 @@ This is updated **face-api.js** with latest available TensorFlow/JS as the origi
Forked from [face-api.js](https://github.com/justadudewhohacks/face-api.js) version **0.22.2** released on March 22nd, 2020
Currently based on **`TensorFlow/JS` 3.1.0**
Currently based on **`TensorFlow/JS` 3.2.0**
### Why?

684
dist/face-api.esm.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"inputs": {
"dist/tfjs.esm.js": {
"bytes": 1055692,
"bytes": 1047714,
"imports": []
},
"src/draw/drawContour.ts": {
@ -1292,7 +1292,7 @@
]
},
"package.json": {
"bytes": 1870,
"bytes": 1854,
"imports": []
},
"src/xception/extractParams.ts": {
@ -2591,7 +2591,7 @@
"imports": [],
"exports": [],
"inputs": {},
"bytes": 1447909
"bytes": 1464548
},
"dist/face-api.esm.js": {
"imports": [],
@ -2717,12 +2717,13 @@
"validateConfig",
"version"
],
"entryPoint": "src/index.ts",
"inputs": {
"src/env/isNodejs.ts": {
"bytesInOutput": 181
},
"dist/tfjs.esm.js": {
"bytesInOutput": 1047120
"bytesInOutput": 1039131
},
"src/draw/index.ts": {
"bytesInOutput": 280
@ -3187,7 +3188,7 @@
"bytesInOutput": 446
}
},
"bytes": 1134597
"bytes": 1126608
}
}
}

684
dist/face-api.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

11
dist/face-api.json vendored
View File

@ -1,7 +1,7 @@
{
"inputs": {
"dist/tfjs.esm.js": {
"bytes": 1055692,
"bytes": 1047714,
"imports": []
},
"src/draw/drawContour.ts": {
@ -1292,7 +1292,7 @@
]
},
"package.json": {
"bytes": 1870,
"bytes": 1854,
"imports": []
},
"src/xception/extractParams.ts": {
@ -2591,11 +2591,12 @@
"imports": [],
"exports": [],
"inputs": {},
"bytes": 1447916
"bytes": 1464555
},
"dist/face-api.js": {
"imports": [],
"exports": [],
"entryPoint": "src/index.ts",
"inputs": {
"src/env/isNodejs.ts": {
"bytesInOutput": 181
@ -2604,7 +2605,7 @@
"bytesInOutput": 3011
},
"dist/tfjs.esm.js": {
"bytesInOutput": 1047182
"bytesInOutput": 1039193
},
"src/draw/index.ts": {
"bytesInOutput": 280
@ -3066,7 +3067,7 @@
"bytesInOutput": 446
}
},
"bytes": 1134760
"bytes": 1126771
}
}
}

770
dist/tfjs.esm.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

87
dist/tfjs.esm.json vendored
View File

@ -5,7 +5,7 @@
"imports": []
},
"node_modules/@tensorflow/tfjs-core/dist/util_base.js": {
"bytes": 20096,
"bytes": 20100,
"imports": []
},
"node_modules/@tensorflow/tfjs-core/dist/environment.js": {
@ -56,7 +56,7 @@
]
},
"node_modules/@tensorflow/tfjs-core/dist/profiler.js": {
"bytes": 4460,
"bytes": 4499,
"imports": [
{
"path": "node_modules/@tensorflow/tfjs-core/dist/environment.js",
@ -773,7 +773,7 @@
]
},
"node_modules/@tensorflow/tfjs-core/dist/ops/browser.js": {
"bytes": 8954,
"bytes": 9105,
"imports": [
{
"path": "node_modules/@tensorflow/tfjs-core/dist/engine.js",
@ -19323,7 +19323,7 @@
]
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/flags_webgl.js": {
"bytes": 6399,
"bytes": 7125,
"imports": [
{
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js",
@ -19593,7 +19593,7 @@
]
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/backend_webgl.js": {
"bytes": 37906,
"bytes": 38346,
"imports": [
{
"path": "node_modules/@tensorflow/tfjs-backend-webgl/dist/flags_webgl.js",
@ -23917,7 +23917,7 @@
]
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Concat.js": {
"bytes": 4118,
"bytes": 4180,
"imports": [
{
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js",
@ -24434,7 +24434,7 @@
]
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Pack.js": {
"bytes": 1697,
"bytes": 1947,
"imports": [
{
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js",
@ -25237,7 +25237,7 @@
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js": {
"bytes": 74296,
"bytes": 64769,
"imports": [
{
"path": "(disabled):path",
@ -25262,11 +25262,11 @@
]
},
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js": {
"bytes": 3441,
"bytes": 3172,
"imports": []
},
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js": {
"bytes": 28635,
"bytes": 26723,
"imports": [
{
"path": "(disabled):path",
@ -25279,7 +25279,7 @@
]
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/backend_wasm.js": {
"bytes": 14751,
"bytes": 14972,
"imports": [
{
"path": "node_modules/@tensorflow/tfjs-backend-wasm/dist/flags_wasm.js",
@ -25364,7 +25364,7 @@
"imports": [],
"exports": [],
"inputs": {},
"bytes": 1129446
"bytes": 1142745
},
"dist/tfjs.esm.js": {
"imports": [],
@ -25832,6 +25832,7 @@
"zeros",
"zerosLike"
],
"entryPoint": "src/tfjs/tf-browser.ts",
"inputs": {
"(disabled):node_modules/node-fetch/browser.js": {
"bytesInOutput": 18
@ -25876,16 +25877,16 @@
"bytesInOutput": 18
},
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js": {
"bytesInOutput": 45664
"bytesInOutput": 39230
},
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js": {
"bytesInOutput": 18153
"bytesInOutput": 16473
},
"node_modules/@tensorflow/tfjs-core/dist/backends/backend.js": {
"bytesInOutput": 1032
},
"node_modules/@tensorflow/tfjs-core/dist/util_base.js": {
"bytesInOutput": 6291
"bytesInOutput": 6295
},
"node_modules/@tensorflow/tfjs-core/dist/environment.js": {
"bytesInOutput": 2118
@ -25903,7 +25904,7 @@
"bytesInOutput": 1966
},
"node_modules/@tensorflow/tfjs-core/dist/profiler.js": {
"bytesInOutput": 1324
"bytesInOutput": 1335
},
"node_modules/@tensorflow/tfjs-core/dist/tape.js": {
"bytesInOutput": 1538
@ -28471,7 +28472,7 @@
"bytesInOutput": 512
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/UnsortedSegmentSum.js": {
"bytesInOutput": 754
"bytesInOutput": 756
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/register_all_kernels.js": {
"bytesInOutput": 490
@ -28486,7 +28487,7 @@
"bytesInOutput": 8548
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/flags_webgl.js": {
"bytesInOutput": 2228
"bytesInOutput": 2409
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/glsl_version.js": {
"bytesInOutput": 1626
@ -28549,7 +28550,7 @@
"bytesInOutput": 388
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/backend_webgl.js": {
"bytesInOutput": 14364
"bytesInOutput": 14521
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/version.js": {
"bytesInOutput": 15
@ -28921,7 +28922,7 @@
"bytesInOutput": 818
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FusedConv2D.js": {
"bytesInOutput": 1155
"bytesInOutput": 1157
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FusedDepthwiseConv2D.js": {
"bytesInOutput": 895
@ -29170,7 +29171,7 @@
"bytesInOutput": 918
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ScatterNd.js": {
"bytesInOutput": 725
"bytesInOutput": 727
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/select_gpu.js": {
"bytesInOutput": 594
@ -29248,7 +29249,7 @@
"bytesInOutput": 3184
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/UnsortedSegmentSum.js": {
"bytesInOutput": 1095
"bytesInOutput": 1097
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/register_all_kernels.js": {
"bytesInOutput": 487
@ -29311,7 +29312,7 @@
"bytesInOutput": 360
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Concat.js": {
"bytesInOutput": 1127
"bytesInOutput": 1165
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Conv2D.js": {
"bytesInOutput": 1093
@ -29437,7 +29438,7 @@
"bytesInOutput": 174
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Pack.js": {
"bytesInOutput": 514
"bytesInOutput": 588
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/PadV2.js": {
"bytesInOutput": 613
@ -29479,25 +29480,25 @@
"bytesInOutput": 14
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ScatterNd.js": {
"bytesInOutput": 614
"bytesInOutput": 612
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Select.js": {
"bytesInOutput": 509
"bytesInOutput": 505
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sigmoid.js": {
"bytesInOutput": 333
"bytesInOutput": 329
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sin.js": {
"bytesInOutput": 14
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Slice.js": {
"bytesInOutput": 1268
"bytesInOutput": 1262
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Softmax.js": {
"bytesInOutput": 409
"bytesInOutput": 405
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SplitV.js": {
"bytesInOutput": 373
"bytesInOutput": 371
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sqrt.js": {
"bytesInOutput": 14
@ -29506,46 +29507,46 @@
"bytesInOutput": 14
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SquaredDifference.js": {
"bytesInOutput": 25
"bytesInOutput": 23
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Step.js": {
"bytesInOutput": 331
"bytesInOutput": 327
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StridedSlice.js": {
"bytesInOutput": 1878
"bytesInOutput": 1874
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sub.js": {
"bytesInOutput": 25
"bytesInOutput": 23
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sum.js": {
"bytesInOutput": 759
"bytesInOutput": 755
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tanh.js": {
"bytesInOutput": 14
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tile.js": {
"bytesInOutput": 559
"bytesInOutput": 555
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/TopK.js": {
"bytesInOutput": 544
"bytesInOutput": 540
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Unpack.js": {
"bytesInOutput": 480
"bytesInOutput": 478
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ZerosLike.js": {
"bytesInOutput": 176
"bytesInOutput": 174
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/register_all_kernels.js": {
"bytesInOutput": 294
"bytesInOutput": 292
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/flags_wasm.js": {
"bytesInOutput": 484
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/backend_wasm.js": {
"bytesInOutput": 4771
"bytesInOutput": 4755
},
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js": {
"bytesInOutput": 3414
"bytesInOutput": 3145
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/version.js": {
"bytesInOutput": 16
@ -29557,7 +29558,7 @@
"bytesInOutput": 0
}
},
"bytes": 1055692
"bytes": 1047714
}
}
}

View File

@ -3,8 +3,8 @@ import * as faceapi from '../dist/face-api.esm.js';
// configuration options
const modelPath = 'https://vladmandic.github.io/face-api/model/'; // path to model folder that will be loaded using http
// const modelPath = '../model/'; // path to model folder that will be loaded using http
const imgSize = 720; // maximum image size in pixels
const minScore = 0.1; // minimum score
const imgSize = 800; // maximum image size in pixels
const minScore = 0.3; // minimum score
const maxResults = 10; // maximum number of results to return
const samples = ['sample (1).jpg', 'sample (2).jpg', 'sample (3).jpg', 'sample (4).jpg', 'sample (5).jpg', 'sample (6).jpg']; // sample images to be loaded using http

View File

@ -2,7 +2,7 @@ import * as faceapi from '../dist/face-api.esm.js';
// configuration options
const modelPath = 'https://vladmandic.github.io/face-api/model/'; // path to model folder that will be loaded using http
const minScore = 0.1; // minimum score
const minScore = 0.2; // minimum score
const maxResults = 5; // maximum number of results to return
let optionsSSDMobileNet;
@ -59,6 +59,7 @@ function drawFaces(canvas, data, fps) {
}
async function detectVideo(video, canvas) {
if (!video || video.paused) return false;
const t0 = performance.now();
faceapi
.detectAllFaces(video, optionsSSDMobileNet)
@ -76,6 +77,7 @@ async function detectVideo(video, canvas) {
log(`Detect Error: ${str(err)}`);
return false;
});
return false;
}
// just initialize everything and call main function
@ -120,9 +122,14 @@ async function setupCamera() {
// @ts-ignore
if (video && video.readyState >= 2) {
// @ts-ignore
if (video.paused) video.play();
// @ts-ignore
else video.pause();
if (video.paused) {
// @ts-ignore
video.play();
detectVideo(video, canvas);
} else {
// @ts-ignore
video.pause();
}
}
// @ts-ignore
log(`Camera state: ${video.paused ? 'paused' : 'playing'}`);

210
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@vladmandic/face-api",
"version": "0.13.3",
"version": "0.30.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -156,16 +156,16 @@
}
},
"@tensorflow/tfjs": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs/-/tfjs-3.1.0.tgz",
"integrity": "sha512-6w3LHpALAlBd8m3G+Gx/OvZeOYepvuBtu80+YbajSIEBp/gMJW2NCF4/mHyHcq1f1xJen0+LpwaCL7oho9v+FA==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs/-/tfjs-3.2.0.tgz",
"integrity": "sha512-rgcHHhzI+JVl206eMbYO8WzBW3DO9pinEbgtUWdxjfk+a4ojlqvJ34RPEISMSQZRR5KRCA7E/dHFv9+EULfqmw==",
"requires": {
"@tensorflow/tfjs-backend-cpu": "3.1.0",
"@tensorflow/tfjs-backend-webgl": "3.1.0",
"@tensorflow/tfjs-converter": "3.1.0",
"@tensorflow/tfjs-core": "3.1.0",
"@tensorflow/tfjs-data": "3.1.0",
"@tensorflow/tfjs-layers": "3.1.0",
"@tensorflow/tfjs-backend-cpu": "3.2.0",
"@tensorflow/tfjs-backend-webgl": "3.2.0",
"@tensorflow/tfjs-converter": "3.2.0",
"@tensorflow/tfjs-core": "3.2.0",
"@tensorflow/tfjs-data": "3.2.0",
"@tensorflow/tfjs-layers": "3.2.0",
"argparse": "^1.0.10",
"chalk": "^4.1.0",
"core-js": "3",
@ -174,30 +174,30 @@
}
},
"@tensorflow/tfjs-backend-cpu": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.1.0.tgz",
"integrity": "sha512-BsuDEg11z3QDuvjZSge/ssITl/GHUvHjvHgJOptz4lVwAMFxzNErkL/e8fUeWQp2SI2m7oWsx2vx/H1Y9cd3Gg==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.2.0.tgz",
"integrity": "sha512-L3Pp7FHO92BaeG8Uuc/RJMJ/e61UrIbKgFHS3MKr0zcbmEsqGfos6/5yR1EHj7SoYG2nPlC5+6HxbYy0zp22IA==",
"requires": {
"@types/seedrandom": "2.4.27",
"seedrandom": "2.4.3"
}
},
"@tensorflow/tfjs-backend-wasm": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-3.1.0.tgz",
"integrity": "sha512-PKnIrPG1LunQrX1BaFo4GTa0fAM0c/CgCmpGVanFsIwH4Fs6BDfxLOm58ykojXPER0zv71761jFFwNh+5AGncw==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-3.2.0.tgz",
"integrity": "sha512-gXxhJWRCmkcwSNatG7eGrmHKmjJC/AxvQdToHymkp1KtRazrsMWFrROoj1HuHwK1hCZyGa90ldmXlY9QdzFkuQ==",
"dev": true,
"requires": {
"@tensorflow/tfjs-backend-cpu": "3.1.0",
"@tensorflow/tfjs-backend-cpu": "3.2.0",
"@types/emscripten": "~0.0.34"
}
},
"@tensorflow/tfjs-backend-webgl": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.1.0.tgz",
"integrity": "sha512-9J80sJR35Cg6BxTmQE8ljF4XLT3DXdvfLKF3C1xhRqV25PWsBvwlcvEuv6yCXp109topqJgbVnsmewS6vvVtDw==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.2.0.tgz",
"integrity": "sha512-WORXpDt5Ey5/+a4NioyrJkfbJUlleaSELpHnxeDsGt6BpRC2P/1pVJS1IjnBD/f4QlOm3mhouN2Oq28dRhRvqA==",
"requires": {
"@tensorflow/tfjs-backend-cpu": "3.1.0",
"@tensorflow/tfjs-backend-cpu": "3.2.0",
"@types/offscreencanvas": "~2019.3.0",
"@types/seedrandom": "2.4.27",
"@types/webgl-ext": "0.0.30",
@ -206,14 +206,14 @@
}
},
"@tensorflow/tfjs-converter": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.1.0.tgz",
"integrity": "sha512-V1DJ9ha9fy7pSXm6H6IGH4iF/5V32o32M8ZhFy7eydYUNWTJau8svpFI/i8AhJ1htVHKXtPTEPAo/T5XXsWN/g=="
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.2.0.tgz",
"integrity": "sha512-iE2Q0naHR8OVcMc9RluebMObsPysru7X1y+mWtkPNnYlNUJORxfkEitrMbVDAKw6lsivIfo4Ar5UcstiG8/ckQ=="
},
"@tensorflow/tfjs-core": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-3.1.0.tgz",
"integrity": "sha512-KGSJEB6CTIk5YVgKbdpW0nAKuNtWaMdqYSrNYX43IAGdNrH0vDsipACH/bhrQyo9/NYiK/4Jbkr4k9pGwwiPJQ==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-3.2.0.tgz",
"integrity": "sha512-MZnTk9wcJai5lTfkC8T1rr6/M9C4eO0DfojZghopZXDflCTndLPIKcudx6E8qfrmZOkRSqMIwB7A8UFs7f+3Kg==",
"requires": {
"@types/offscreencanvas": "~2019.3.0",
"@types/seedrandom": "2.4.27",
@ -223,25 +223,25 @@
}
},
"@tensorflow/tfjs-data": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-data/-/tfjs-data-3.1.0.tgz",
"integrity": "sha512-ZxcOvgiTK/Q6DEwCJj7TxyonqA0eCkNkV+SVODU900CHwigpihlpguzRK6h20spa7YNliLDtPfALX+qyvl0isg==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-data/-/tfjs-data-3.2.0.tgz",
"integrity": "sha512-fG4rYJlxh/B9fzgc+/qdj5gPI485RsDUM99mErxovlh3UMIdRgMeHHdFse44VlyAShEAgsOehuWovhY5520kEw==",
"requires": {
"@types/node-fetch": "^2.1.2",
"node-fetch": "~2.6.1"
}
},
"@tensorflow/tfjs-layers": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-layers/-/tfjs-layers-3.1.0.tgz",
"integrity": "sha512-Qd5ZwdpaoKvH6Khq2U9mdeO7MArnRmKDC9/WWVfbss7+l8LC800pT9ESzIiO3P/qtDuHV1ssa0wOD31TadMOZQ=="
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-layers/-/tfjs-layers-3.2.0.tgz",
"integrity": "sha512-TgTpH6RI+NmL4s8pQ76wkq15p79SfSQLOfFL2rGmJgatQRuA/mxLlH5GLir5HwwER3a0Vj8lMbexxCAGTqr2Xg=="
},
"@tensorflow/tfjs-node": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node/-/tfjs-node-3.1.0.tgz",
"integrity": "sha512-FhMfDgR/usnOeuDdqYXW62Z5aU+f60mPmkjwxMCwsLLYG6/fEjaeeJXu+rgwxOP+DwboLiE25EomUDNDqjrDYw==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node/-/tfjs-node-3.2.0.tgz",
"integrity": "sha512-4k8HvT+lFauy30EMoKhLvXykQ4xKfi5yTs0EdWue80z9XNNDIMG3932owBpWMeaRb5P0ONUuv9MSu+pi17rNnA==",
"requires": {
"@tensorflow/tfjs": "3.1.0",
"@tensorflow/tfjs": "3.2.0",
"adm-zip": "^0.4.11",
"google-protobuf": "^3.9.2",
"https-proxy-agent": "^2.2.1",
@ -262,11 +262,11 @@
}
},
"@tensorflow/tfjs-node-gpu": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node-gpu/-/tfjs-node-gpu-3.1.0.tgz",
"integrity": "sha512-l0Pl53GsOg9lCpBABhyGvLVRdBTKwjf+uk551W+PbC9uX5giYgN6ARUeyGafcV3xkjR2zJgYluSpnBR2zyWYSg==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node-gpu/-/tfjs-node-gpu-3.2.0.tgz",
"integrity": "sha512-zAQPT9RwA5KOFFtkRzUGXE+9loJeJWbxkw2OnIPdB8+18c8s6/ICsHpN9nYLhelR+9wl877aaN4wQVR5T7iQDw==",
"requires": {
"@tensorflow/tfjs": "3.1.0",
"@tensorflow/tfjs": "3.2.0",
"adm-zip": "^0.4.11",
"google-protobuf": "^3.9.2",
"https-proxy-agent": "^2.2.1",
@ -339,13 +339,13 @@
"integrity": "sha512-oGaKsBbxQOY5+aJFV3KECDhGaXt+yZJt2y/OZsnQGLRkH6Fvr7rv4pCt3SRH1somIHfej/c4u7NSpCyd9x+1Ow=="
},
"@typescript-eslint/eslint-plugin": {
"version": "4.15.2-alpha.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.2-alpha.5.tgz",
"integrity": "sha512-Okg0nPUVzRGfZbKh9Wy9XOhMJoZF1lzha54mqj+Xu0BcaR4G0BvrzJtCi0gxSWMCQVMCIqKSd/+IJ/t/LSVDnQ==",
"version": "4.15.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.2.tgz",
"integrity": "sha512-uiQQeu9tWl3f1+oK0yoAv9lt/KXO24iafxgQTkIYO/kitruILGx3uH+QtIAHqxFV+yIsdnJH+alel9KuE3J15Q==",
"dev": true,
"requires": {
"@typescript-eslint/experimental-utils": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/scope-manager": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/experimental-utils": "4.15.2",
"@typescript-eslint/scope-manager": "4.15.2",
"debug": "^4.1.1",
"functional-red-black-tree": "^1.0.1",
"lodash": "^4.17.15",
@ -381,28 +381,28 @@
}
},
"@typescript-eslint/experimental-utils": {
"version": "4.15.2-alpha.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.2-alpha.5.tgz",
"integrity": "sha512-1rhF1EXDddZSN4K03pIWw3kPjLRPhzYB+YV+1ql/3juhbO32H+JsduWvxVKZxRLNYrUv108eATRZDFX+zaiq/A==",
"version": "4.15.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.2.tgz",
"integrity": "sha512-Fxoshw8+R5X3/Vmqwsjc8nRO/7iTysRtDqx6rlfLZ7HbT8TZhPeQqbPjTyk2RheH3L8afumecTQnUc9EeXxohQ==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.3",
"@typescript-eslint/scope-manager": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/types": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/typescript-estree": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/scope-manager": "4.15.2",
"@typescript-eslint/types": "4.15.2",
"@typescript-eslint/typescript-estree": "4.15.2",
"eslint-scope": "^5.0.0",
"eslint-utils": "^2.0.0"
}
},
"@typescript-eslint/parser": {
"version": "4.15.2-alpha.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.15.2-alpha.5.tgz",
"integrity": "sha512-vjUQTvDoOP4c3wWXeGaN97Mq8+K6zgiB7Krmz4hfqt4/DW/bPGpbdcss/F3hnm85dN/ysvUdKLQO9AE8h2HgIQ==",
"version": "4.15.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.15.2.tgz",
"integrity": "sha512-SHeF8xbsC6z2FKXsaTb1tBCf0QZsjJ94H6Bo51Y1aVEZ4XAefaw5ZAilMoDPlGghe+qtq7XdTiDlGfVTOmvA+Q==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/types": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/typescript-estree": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/scope-manager": "4.15.2",
"@typescript-eslint/types": "4.15.2",
"@typescript-eslint/typescript-estree": "4.15.2",
"debug": "^4.1.1"
},
"dependencies": {
@ -424,29 +424,29 @@
}
},
"@typescript-eslint/scope-manager": {
"version": "4.15.2-alpha.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.15.2-alpha.5.tgz",
"integrity": "sha512-sGMtXZawkTj/YIy+VGfrIXXoSPA1NaV0JezDUHRpTx/kvo1TZxveF4jnyT4XcWwer4s5/vsm/v8MxwBpvYEmpw==",
"version": "4.15.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.15.2.tgz",
"integrity": "sha512-Zm0tf/MSKuX6aeJmuXexgdVyxT9/oJJhaCkijv0DvJVT3ui4zY6XYd6iwIo/8GEZGy43cd7w1rFMiCLHbRzAPQ==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/visitor-keys": "4.15.2-alpha.5+763a2520"
"@typescript-eslint/types": "4.15.2",
"@typescript-eslint/visitor-keys": "4.15.2"
}
},
"@typescript-eslint/types": {
"version": "4.15.2-alpha.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.15.2-alpha.5.tgz",
"integrity": "sha512-Tvu/uHSbgbo05i/k+kvJGscMXwac0k0sqyoT7qMjgi04J/uILQMH4xNI69YxotW+kqGgempkRntV6y0IAJ1ePg==",
"version": "4.15.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.15.2.tgz",
"integrity": "sha512-r7lW7HFkAarfUylJ2tKndyO9njwSyoy6cpfDKWPX6/ctZA+QyaYscAHXVAfJqtnY6aaTwDYrOhp+ginlbc7HfQ==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "4.15.2-alpha.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.2-alpha.5.tgz",
"integrity": "sha512-+JdPiYlrIEGeMK69exqREiIV3pRJojnnKDvM+XMWfTOAfc32p3Lq78znoyObIG1JoTxdQt5d8g0R5rs4jfCI8A==",
"version": "4.15.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.2.tgz",
"integrity": "sha512-cGR8C2g5SPtHTQvAymEODeqx90pJHadWsgTtx6GbnTWKqsg7yp6Eaya9nFzUd4KrKhxdYTTFBiYeTPQaz/l8bw==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/visitor-keys": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/types": "4.15.2",
"@typescript-eslint/visitor-keys": "4.15.2",
"debug": "^4.1.1",
"globby": "^11.0.1",
"is-glob": "^4.0.1",
@ -481,12 +481,12 @@
}
},
"@typescript-eslint/visitor-keys": {
"version": "4.15.2-alpha.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.2-alpha.5.tgz",
"integrity": "sha512-6w/osQgyClFQYK53Rcmveyj+XpIgokp4PBhhe2C0vzFOZKnSgjKFKxE0Z2Jj2gAaiCfLdTlb3GDEfa6GQRwhQA==",
"version": "4.15.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.2.tgz",
"integrity": "sha512-TME1VgSb7wTwgENN5KVj4Nqg25hP8DisXxNBojM4Nn31rYaNDIocNm5cmjOFfh42n7NVERxWrDFoETO/76ePyg==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.15.2-alpha.5+763a2520",
"@typescript-eslint/types": "4.15.2",
"eslint-visitor-keys": "^2.0.0"
}
},
@ -763,9 +763,9 @@
"dev": true
},
"core-js": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.3.tgz",
"integrity": "sha512-KPYXeVZYemC2TkNEkX/01I+7yd+nX3KddKwZ1Ww7SKWdI2wQprSgLmrTddT8nw92AjEklTsPBoSdQBhbI1bQ6Q=="
"version": "3.9.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.9.0.tgz",
"integrity": "sha512-PyFBJaLq93FlyYdsndE5VaueA9K5cNB7CGzeCj191YYLhkQM0gdZR2SKihM70oF0wdqKSKClv/tEBOpoRmdOVQ=="
},
"core-util-is": {
"version": "1.0.2",
@ -914,9 +914,9 @@
}
},
"esbuild": {
"version": "0.8.50",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.50.tgz",
"integrity": "sha512-oidFLXssA7IccYzkqLVZSqNJDwDq8Mh/vqvrW+3fPWM7iUiC5O2bCllhnO8+K9LlyL/2Z6n+WwRJAz9fqSIVRg==",
"version": "0.8.52",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.52.tgz",
"integrity": "sha512-b5KzFweLLXoXQwdC/e2+Z80c8uo2M5MgP7yQEEebkFw6In4T9CvYcNoM2ElvJt8ByO04zAZUV0fZkXmXoi2s9A==",
"dev": true
},
"escalade": {
@ -1311,9 +1311,9 @@
"dev": true
},
"fastq": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.10.1.tgz",
"integrity": "sha512-AWuv6Ery3pM+dY7LYS8YIaCiQvUaos9OB1RyNgaOWnaX+Tik7Onvcsf8x8c+YtDeT0maYLniBip2hox5KtEXXA==",
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz",
"integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==",
"dev": true,
"requires": {
"reusify": "^1.0.4"
@ -1514,9 +1514,9 @@
}
},
"google-protobuf": {
"version": "3.15.1",
"resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.15.1.tgz",
"integrity": "sha512-Ss2fADC0TpZXn6bqGgPJMUWoD1y9J7BTtJRVvf+quNxXRtQnrpubiFCdgoown+OetNsU4H3YbJgnpxYY/3kH6g=="
"version": "3.15.2",
"resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.15.2.tgz",
"integrity": "sha512-HU67XsVFarxjHceJgrX0K75zzUFS+95LTArAncQ1BI156oEZR+fWXgk6Fxn4fNIpmrB0fwklwjXhMB0DQe0YNg=="
},
"graceful-fs": {
"version": "4.2.4",
@ -1839,16 +1839,16 @@
}
},
"mime-db": {
"version": "1.45.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
"integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w=="
"version": "1.46.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
"integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ=="
},
"mime-types": {
"version": "2.1.28",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz",
"integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==",
"version": "2.1.29",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz",
"integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==",
"requires": {
"mime-db": "1.45.0"
"mime-db": "1.46.0"
}
},
"minimatch": {
@ -2050,14 +2050,14 @@
}
},
"object.values": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.2.tgz",
"integrity": "sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==",
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.3.tgz",
"integrity": "sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw==",
"dev": true,
"requires": {
"call-bind": "^1.0.0",
"call-bind": "^1.0.2",
"define-properties": "^1.1.3",
"es-abstract": "^1.18.0-next.1",
"es-abstract": "^1.18.0-next.2",
"has": "^1.0.3"
}
},
@ -2631,9 +2631,9 @@
"dev": true
},
"typescript": {
"version": "4.3.0-dev.20210220",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.0-dev.20210220.tgz",
"integrity": "sha512-Ffv8BO3iOhCJbHMnc+JDbO4LwflNRVW1UJ3XGI/zOlwy7fGPKgCbuvn7cBgtHZCFV6GYzoRJivNjM+oUF6FM4w==",
"version": "4.3.0-dev.20210225",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.0-dev.20210225.tgz",
"integrity": "sha512-EdKY+0vy3jYPqWZDj6x3VTC30e3Rq+flaFpCLH9r2bwX0+VTOqZuM3qOQpWoq4L1c4p/ye2xJd3Y79iweqzlCw==",
"dev": true
},
"uri-js": {
@ -2795,9 +2795,9 @@
}
},
"yargs-parser": {
"version": "20.2.5",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.5.tgz",
"integrity": "sha512-jYRGS3zWy20NtDtK2kBgo/TlAoy5YUuhD9/LZ7z7W4j1Fdw2cqD0xEEclf8fxc8xjD6X5Qr+qQQwCEsP8iRiYg=="
"version": "20.2.6",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.6.tgz",
"integrity": "sha512-AP1+fQIWSM/sMiET8fyayjx/J+JmTPt2Mr0FkrgqB4todtfa53sOsrSAcIrJRD5XS20bKUwaDIuMkWKCEiQLKA=="
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@vladmandic/face-api",
"version": "0.13.3",
"version": "0.30.0",
"description": "FaceAPI: AI-powered Face Detection, Face Embedding & Recognition Using Tensorflow/JS",
"main": "dist/face-api.node.js",
"module": "dist/face-api.esm.js",
@ -38,18 +38,18 @@
},
"homepage": "https://github.com/vladmandic/face-api#readme",
"dependencies": {
"@tensorflow/tfjs-node": "^3.1.0",
"@tensorflow/tfjs-node-gpu": "^3.1.0",
"@tensorflow/tfjs-node": "^3.2.0",
"@tensorflow/tfjs-node-gpu": "^3.2.0",
"@vladmandic/pilogger": "^0.2.14"
},
"devDependencies": {
"@tensorflow/tfjs": "^3.1.0",
"@tensorflow/tfjs-backend-wasm": "^3.1.0",
"@tensorflow/tfjs": "^3.2.0",
"@tensorflow/tfjs-backend-wasm": "^3.2.0",
"@types/node": "^14.14.31",
"@typescript-eslint/eslint-plugin": "^4.15.2-alpha.5",
"@typescript-eslint/parser": "^4.15.2-alpha.5",
"@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^4.15.2",
"chokidar": "^3.5.1",
"esbuild": "^0.8.50",
"esbuild": "^0.8.52",
"eslint": "^7.20.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1",
@ -58,6 +58,6 @@
"eslint-plugin-promise": "^4.3.1",
"rimraf": "^3.0.2",
"tslib": "^2.1.0",
"typescript": "^4.3.0-dev.20210220"
"typescript": "^4.3.0-dev.20210225"
}
}

View File

@ -113,7 +113,7 @@ const targets = {
entryPoints: ['src/tfjs/tf-browser.ts'],
outfile: 'dist/tfjs.esm.js',
metafile: 'dist/tfjs.esm.json',
external: ['fs', 'buffer', 'util', '@tensorflow'],
external: ['fs', 'buffer', 'util', 'os', '@tensorflow'],
},
esm: {
platform: 'browser',
@ -121,7 +121,7 @@ const targets = {
entryPoints: ['src/index.ts'],
outfile: 'dist/face-api.esm-nobundle.js',
metafile: 'dist/face-api.esm-nobundle.json',
external: ['fs', 'buffer', 'util', '@tensorflow', 'tfjs.esm.js'],
external: ['fs', 'buffer', 'util', 'os', '@tensorflow', 'tfjs.esm.js'],
},
},
browserBundle: {
@ -131,7 +131,7 @@ const targets = {
entryPoints: ['src/tfjs/tf-browser.ts'],
outfile: 'dist/tfjs.esm.js',
metafile: 'dist/tfjs.esm.json',
external: ['fs', 'buffer', 'util'],
external: ['fs', 'buffer', 'util', 'os'],
},
iife: {
platform: 'browser',
@ -140,7 +140,7 @@ const targets = {
entryPoints: ['src/index.ts'],
outfile: 'dist/face-api.js',
metafile: 'dist/face-api.json',
external: ['fs', 'buffer', 'util'],
external: ['fs', 'buffer', 'util', 'os'],
},
esm: {
platform: 'browser',
@ -148,7 +148,7 @@ const targets = {
entryPoints: ['src/index.ts'],
outfile: 'dist/face-api.esm.js',
metafile: 'dist/face-api.esm.json',
external: ['fs', 'buffer', 'util'],
external: ['fs', 'buffer', 'util', 'os'],
},
},
};