enable minify

pull/46/head
Vladimir Mandic 2021-03-31 07:01:22 -04:00
parent efd2019e19
commit c15e6a5ba4
23 changed files with 4526 additions and 245150 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
node_modules node_modules
pnpm-lock.yaml pnpm-lock.yaml
test

View File

@ -1,6 +1,6 @@
# @vladmandic/face-api # @vladmandic/face-api
Version: **1.1.5** Version: **1.1.6**
Description: **FaceAPI: AI-powered Face Detection, Description & Recognition using Tensorflow/JS** Description: **FaceAPI: AI-powered Face Detection, Description & Recognition using Tensorflow/JS**
Author: **Vladimir Mandic <mandic00@live.com>** Author: **Vladimir Mandic <mandic00@live.com>**
@ -9,7 +9,7 @@ Repository: **<git+https://github.com/vladmandic/face-api.git>**
## Changelog ## Changelog
### **HEAD -> master** 2021/03/25 mandic00@live.com ### **1.1.6** 2021/03/26 mandic00@live.com
### **1.1.5** 2021/03/23 mandic00@live.com ### **1.1.5** 2021/03/23 mandic00@live.com

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

77556
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

77562
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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4678
dist/face-api.node.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

75644
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

View File

@ -43,15 +43,15 @@
"@tensorflow/tfjs-backend-wasm": "^3.3.0", "@tensorflow/tfjs-backend-wasm": "^3.3.0",
"@tensorflow/tfjs-node": "^3.3.0", "@tensorflow/tfjs-node": "^3.3.0",
"@tensorflow/tfjs-node-gpu": "^3.3.0", "@tensorflow/tfjs-node-gpu": "^3.3.0",
"@types/node": "^14.14.36", "@types/node": "^14.14.37",
"@typescript-eslint/eslint-plugin": "^4.19.0", "@typescript-eslint/eslint-plugin": "^4.20.0",
"@typescript-eslint/parser": "^4.19.0", "@typescript-eslint/parser": "^4.20.0",
"@vladmandic/pilogger": "^0.2.15", "@vladmandic/pilogger": "^0.2.15",
"canvas": "^2.7.0", "canvas": "^2.7.0",
"chokidar": "^3.5.1", "chokidar": "^3.5.1",
"dayjs": "^1.10.4", "dayjs": "^1.10.4",
"esbuild": "^0.10.1", "esbuild": "^0.11.2",
"eslint": "^7.22.0", "eslint": "^7.23.0",
"eslint-config-airbnb-base": "^14.2.1", "eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1", "eslint-plugin-import": "^2.22.1",
"eslint-plugin-json": "^2.1.2", "eslint-plugin-json": "^2.1.2",

View File

@ -1,8 +1,5 @@
#!/usr/bin/env -S node --trace-warnings
/* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable node/no-unpublished-require */ /* eslint-disable node/no-unpublished-require */
/* eslint-disable node/shebang */
const esbuild = require('esbuild'); const esbuild = require('esbuild');
const ts = require('typescript'); const ts = require('typescript');
@ -42,9 +39,9 @@ const tsconfig = {
// common configuration // common configuration
const common = { const common = {
banner, banner,
minifyWhitespace: false, minifyWhitespace: true,
minifyIdentifiers: false, minifyIdentifiers: true,
minifySyntax: false, minifySyntax: true,
bundle: true, bundle: true,
sourcemap: true, sourcemap: true,
metafile: true, metafile: true,

0
server/serve.js Executable file → Normal file
View File

View File

@ -10,7 +10,7 @@
--color-panel-divider: #eee; --color-panel-divider: #eee;
--color-comment-tag: #707070; --color-comment-tag: #707070;
--color-comment-tag-text: #fff; --color-comment-tag-text: #fff;
--color-code-background: rgba(#000, 0.04); --color-code-background: rgba(0, 0, 0, 0.04);
--color-ts: #9600ff; --color-ts: #9600ff;
--color-ts-interface: #647f1b; --color-ts-interface: #647f1b;
--color-ts-enum: #937210; --color-ts-enum: #937210;

View File

@ -142,7 +142,7 @@
<aside class="tsd-sources"> <aside class="tsd-sources">
<p>Overrides <a href="detectfacestaskbase.html">DetectFacesTaskBase</a>.<a href="detectfacestaskbase.html#run">run</a></p> <p>Overrides <a href="detectfacestaskbase.html">DetectFacesTaskBase</a>.<a href="detectfacestaskbase.html#run">run</a></p>
<ul> <ul>
<li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L27">globalApi/DetectFacesTasks.ts:27</a></li> <li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L23">globalApi/DetectFacesTasks.ts:23</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4>
@ -201,7 +201,7 @@
<li class="tsd-description"> <li class="tsd-description">
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L61">globalApi/DetectFacesTasks.ts:61</a></li> <li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L57">globalApi/DetectFacesTasks.ts:57</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PredictAllAgeAndGenderTask</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>detection<span class="tsd-signature-symbol">: </span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></h4> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PredictAllAgeAndGenderTask</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>detection<span class="tsd-signature-symbol">: </span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></h4>
@ -218,7 +218,7 @@
<li class="tsd-description"> <li class="tsd-description">
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L54">globalApi/DetectFacesTasks.ts:54</a></li> <li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L50">globalApi/DetectFacesTasks.ts:50</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PredictAllFaceExpressionsTask</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>detection<span class="tsd-signature-symbol">: </span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></h4> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PredictAllFaceExpressionsTask</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>detection<span class="tsd-signature-symbol">: </span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></h4>
@ -235,7 +235,7 @@
<li class="tsd-description"> <li class="tsd-description">
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L46">globalApi/DetectFacesTasks.ts:46</a></li> <li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L42">globalApi/DetectFacesTasks.ts:42</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-parameters-title">Parameters</h4> <h4 class="tsd-parameters-title">Parameters</h4>

View File

@ -142,7 +142,7 @@
<aside class="tsd-sources"> <aside class="tsd-sources">
<p>Overrides <a href="detectfacestaskbase.html">DetectFacesTaskBase</a>.<a href="detectfacestaskbase.html#run">run</a></p> <p>Overrides <a href="detectfacestaskbase.html">DetectFacesTaskBase</a>.<a href="detectfacestaskbase.html#run">run</a></p>
<ul> <ul>
<li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L70">globalApi/DetectFacesTasks.ts:70</a></li> <li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L66">globalApi/DetectFacesTasks.ts:66</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol">&gt;</span></h4> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol">&gt;</span></h4>
@ -201,7 +201,7 @@
<li class="tsd-description"> <li class="tsd-description">
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L102">globalApi/DetectFacesTasks.ts:102</a></li> <li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L98">globalApi/DetectFacesTasks.ts:98</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PredictSingleAgeAndGenderTask</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>detection<span class="tsd-signature-symbol">: </span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></h4> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PredictSingleAgeAndGenderTask</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>detection<span class="tsd-signature-symbol">: </span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></h4>
@ -218,7 +218,7 @@
<li class="tsd-description"> <li class="tsd-description">
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L95">globalApi/DetectFacesTasks.ts:95</a></li> <li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L91">globalApi/DetectFacesTasks.ts:91</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PredictSingleFaceExpressionsTask</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>detection<span class="tsd-signature-symbol">: </span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></h4> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PredictSingleFaceExpressionsTask</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>detection<span class="tsd-signature-symbol">: </span><a href="facedetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></h4>
@ -235,7 +235,7 @@
<li class="tsd-description"> <li class="tsd-description">
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L87">globalApi/DetectFacesTasks.ts:87</a></li> <li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/DetectFacesTasks.ts#L83">globalApi/DetectFacesTasks.ts:83</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-parameters-title">Parameters</h4> <h4 class="tsd-parameters-title">Parameters</h4>

View File

@ -981,7 +981,7 @@
<li class="tsd-description"> <li class="tsd-description">
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/allFaces.ts#L27">globalApi/allFaces.ts:27</a></li> <li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/allFaces.ts#L19">globalApi/allFaces.ts:19</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-parameters-title">Parameters</h4> <h4 class="tsd-parameters-title">Parameters</h4>
@ -1007,7 +1007,7 @@
<li class="tsd-description"> <li class="tsd-description">
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/allFaces.ts#L9">globalApi/allFaces.ts:9</a></li> <li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/allFaces.ts#L7">globalApi/allFaces.ts:7</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-parameters-title">Parameters</h4> <h4 class="tsd-parameters-title">Parameters</h4>
@ -1033,7 +1033,7 @@
<li class="tsd-description"> <li class="tsd-description">
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/allFaces.ts#L18">globalApi/allFaces.ts:18</a></li> <li>Defined in <a href="https://github.com/vladmandic/face-api/blob/main/src/globalApi/allFaces.ts#L13">globalApi/allFaces.ts:13</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-parameters-title">Parameters</h4> <h4 class="tsd-parameters-title">Parameters</h4>