updated to enable tree shakeable module
parent
a174193617
commit
baaccc2f2c
16
README.md
16
README.md
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
## Note
|
## Note
|
||||||
|
|
||||||
This is updated **face-api.js** with latest available tensorflow/js as original face-api.js is not compatible with **tfjs 2.0+**.
|
This is updated **face-api.js** with latest available TensorFlow/JS as the original face-api.js is not compatible with **tfjs 2.0+**.
|
||||||
If original repository is updated, this one will become obsolete.
|
Currently based on **TFJS-Core 2.4.0**.
|
||||||
|
|
||||||
Forked from **face-api.js** version **0.22.2** released on March 22nd, 2020
|
Forked from **face-api.js** version **0.22.2** released on March 22nd, 2020
|
||||||
|
|
||||||
|
@ -14,13 +14,15 @@ Forked from **face-api.js** version **0.22.2** released on March 22nd, 2020
|
||||||
|
|
||||||
- Removed tests, docs, examples
|
- Removed tests, docs, examples
|
||||||
- Updated all package dependencies
|
- Updated all package dependencies
|
||||||
- Modified to make compatible with TensorFlow/JS 2.0+
|
- Compatible with TensorFlow/JS 2.0+
|
||||||
- Trivial code changes for updated TypeScript type checking
|
- Updated type casting for TypeScript type checking
|
||||||
- Removed unnecesary package dependencies (karma, jasmine, etc.)
|
- Removed unnecesary package dependencies (karma, jasmine, etc.)
|
||||||
- Updated Typescript build process to target ES2018 instead of dual ES5/ES6
|
- Typescript build process now targets ES2017 and instead of dual ES5/ES6
|
||||||
- Changed browser bundle process to use ESBuild instead of Rollup
|
- Browser bundle process uses ESBuild instead of Rollup
|
||||||
- Updated TensorFlow/JS dependencies since backends were removed from @tensorflow/tfjs-core
|
- New TensorFlow/JS dependencies since backends were removed from @tensorflow/tfjs-core
|
||||||
- Updated mobileNetv1 model due to batchNorm() dependency
|
- Updated mobileNetv1 model due to batchNorm() dependency
|
||||||
|
- Fully tree shakable when imported as an ESM module
|
||||||
|
- Added `version` class that returns JSON objecgt with version of FaceAPI as well as linked TFJS
|
||||||
- Removed following models as they are either obsolete or non-functional with tfjs 2.0+
|
- Removed following models as they are either obsolete or non-functional with tfjs 2.0+
|
||||||
- mtcnn: Mostly obsolete
|
- mtcnn: Mostly obsolete
|
||||||
- tinyYolov2: Non-functional since weights are missing
|
- tinyYolov2: Non-functional since weights are missing
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@vladmandic/face-api",
|
"name": "@vladmandic/face-api",
|
||||||
"version": "0.5.1",
|
"version": "0.5.2",
|
||||||
"description": "JavaScript module for Face Detection and Face Recognition Using Tensorflow/JS",
|
"description": "JavaScript module for Face Detection and Face Recognition Using Tensorflow/JS",
|
||||||
"main": "dist/face-api.node.js",
|
"main": "dist/face-api.node.js",
|
||||||
"browser": "dist/face-api.esm.js",
|
"browser": "dist/face-api.esm.js",
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile": "tsc",
|
"compile": "tsc",
|
||||||
"clean": "rimraf build dist",
|
"clean": "rimraf build/ dist/",
|
||||||
"cjs": "esbuild --bundle --outfile=./dist/face-api.cjs.js --target=es2017 --platform=browser --format=cjs --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
"cjs": "esbuild --bundle --outfile=./dist/face-api.cjs.js --target=es2017 --platform=browser --format=cjs --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
||||||
"node": "esbuild --bundle --outfile=./dist/face-api.node.js --target=es2017 --platform=node --format=esm --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
"node": "esbuild --bundle --outfile=./dist/face-api.node.js --target=es2017 --platform=node --format=esm --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
||||||
"esm": "esbuild --bundle --outfile=./dist/face-api.esm.js --target=es2017 --platform=browser --format=esm --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
"esm": "esbuild --bundle --outfile=./dist/face-api.esm.js --target=es2017 --platform=browser --format=esm --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
||||||
|
|
|
@ -24061,7 +24061,7 @@ function resizeResults(results, dimensions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// build/package.json
|
// build/package.json
|
||||||
var version2 = "0.5.1";
|
var version2 = "0.5.2";
|
||||||
|
|
||||||
// build/src/index.js
|
// build/src/index.js
|
||||||
__export(exports, {
|
__export(exports, {
|
||||||
|
|
|
@ -24061,7 +24061,7 @@ function resizeResults(results, dimensions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// build/package.json
|
// build/package.json
|
||||||
var version2 = "0.5.1";
|
var version2 = "0.5.2";
|
||||||
|
|
||||||
// build/src/index.js
|
// build/src/index.js
|
||||||
const node = typeof process !== "undefined" ? process.version : false;
|
const node = typeof process !== "undefined" ? process.version : false;
|
||||||
|
|
|
@ -24192,7 +24192,7 @@ Expected: ${expectedFlat}.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// build/package.json
|
// build/package.json
|
||||||
var version2 = "0.5.1";
|
var version2 = "0.5.2";
|
||||||
return require_src();
|
return require_src();
|
||||||
})();
|
})();
|
||||||
//# sourceMappingURL=face-api.iife.js.map
|
//# sourceMappingURL=face-api.iife.js.map
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -24057,7 +24057,7 @@ function resizeResults(results, dimensions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// build/package.json
|
// build/package.json
|
||||||
var version2 = "0.5.1";
|
var version2 = "0.5.2";
|
||||||
|
|
||||||
// build/src/index.js
|
// build/src/index.js
|
||||||
const node = typeof process !== "undefined" ? process.version : false;
|
const node = typeof process !== "undefined" ? process.version : false;
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "14.10.2",
|
"version": "14.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.10.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.1.tgz",
|
||||||
"integrity": "sha512-IzMhbDYCpv26pC2wboJ4MMOa9GKtjplXfcAqrMeNJpUUwpM/2ATt2w1JPUXwS6spu856TvKZL2AOmeU2rAxskw==",
|
"integrity": "sha512-oTQgnd0hblfLsJ6BvJzzSL+Inogp3lq9fGgqRkMB/ziKMgEUaFl801OncOzUmalfzt14N0oPHMK47ipl+wbTIw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/offscreencanvas": {
|
"@types/offscreencanvas": {
|
||||||
|
@ -210,9 +210,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "4.1.0-dev.20200916",
|
"version": "4.1.0-dev.20200918",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.0-dev.20200916.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.0-dev.20200918.tgz",
|
||||||
"integrity": "sha512-ly2k/AZ3AyfIyLWhBSnW3x7aDufIS9uNRagFZin36jXb6DvZEZwtyx138u8iSvtKE1AV/VNyWLLBkZYojgBM1g==",
|
"integrity": "sha512-cEcXJvz55OH3k3cmpMYoVfqdAQ2YvgeccUmccmleUnQ8VqR8T/7GI761Qky/vGZO/VhiU3Y8xJF3oLkAkNrG1g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"wrappy": {
|
"wrappy": {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile": "tsc",
|
"compile": "tsc",
|
||||||
"clean": "rimraf build dist",
|
"clean": "rimraf build/ dist/",
|
||||||
"cjs": "esbuild --bundle --outfile=./dist/face-api.cjs.js --target=es2017 --platform=browser --format=cjs --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
"cjs": "esbuild --bundle --outfile=./dist/face-api.cjs.js --target=es2017 --platform=browser --format=cjs --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
||||||
"node": "esbuild --bundle --outfile=./dist/face-api.node.js --target=es2017 --platform=node --format=esm --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
"node": "esbuild --bundle --outfile=./dist/face-api.node.js --target=es2017 --platform=node --format=esm --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
||||||
"esm": "esbuild --bundle --outfile=./dist/face-api.esm.js --target=es2017 --platform=browser --format=esm --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
"esm": "esbuild --bundle --outfile=./dist/face-api.esm.js --target=es2017 --platform=browser --format=esm --sourcemap --log-level=error --tsconfig=./tsconfig.json build/src/index.js",
|
||||||
|
|
Loading…
Reference in New Issue