Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit d78dd3a

Browse files
committed
update dependencies and stricter linting rules
1 parent 461e074 commit d78dd3a

File tree

99 files changed

+194
-225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+194
-225
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# packageJson
1+
#
22

33
Version: **undefined**
44
Description: **undefined**
@@ -9,8 +9,13 @@
99

1010
## Changelog
1111

12-
### **HEAD -> master** 2021/09/29 [email protected]
12+
### **1.5.5** 2021/10/19 [email protected]
1313

14+
15+
### **origin/master** 2021/09/30 [email protected]
16+
17+
- allow backend change in demo via url params
18+
- add node-match demo
1419
- fix face matcher
1520

1621
### **1.5.4** 2021/09/29 [email protected]

dist/face-api.esm-nobundle.js

Lines changed: 3 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/face-api.esm-nobundle.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/face-api.esm.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60600,9 +60600,8 @@ function normalize(x, meanRgb) {
6060060600
function padToSquare(imgTensor, isCenterImage = false) {
6060160601
return tidy(() => {
6060260602
const [height, width] = imgTensor.shape.slice(1);
60603-
if (height === width) {
60603+
if (height === width)
6060460604
return imgTensor;
60605-
}
6060660605
const dimDiff = Math.abs(height - width);
6060760606
const paddingAmount = Math.round(dimDiff * (isCenterImage ? 0.5 : 1));
6060860607
const paddingAxis = height > width ? 2 : 1;
@@ -60614,11 +60613,7 @@ function padToSquare(imgTensor, isCenterImage = false) {
6061460613
const paddingTensorAppend = createPaddingTensor(paddingAmount);
6061560614
const remainingPaddingAmount = dimDiff - paddingTensorAppend.shape[paddingAxis];
6061660615
const paddingTensorPrepend = isCenterImage && remainingPaddingAmount ? createPaddingTensor(remainingPaddingAmount) : null;
60617-
const tensorsToStack = [
60618-
paddingTensorPrepend,
60619-
imgTensor,
60620-
paddingTensorAppend
60621-
].filter((t) => !!t).map((t) => cast(t, "float32"));
60616+
const tensorsToStack = [paddingTensorPrepend, imgTensor, paddingTensorAppend].filter((t) => !!t).map((t) => cast(t, "float32"));
6062260617
return concat(tensorsToStack, paddingAxis);
6062360618
});
6062460619
}
@@ -62213,7 +62208,7 @@ function drawFaceLandmarks(canvasArg, faceLandmarks) {
6221362208
}
6221462209

6221562210
// package.json
62216-
var version6 = "1.5.4";
62211+
var version6 = "1.5.5";
6221762212

6221862213
// src/xception/extractParams.ts
6221962214
function extractorsFactory2(extractWeights, paramMappings) {

dist/face-api.esm.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/face-api.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/face-api.node-gpu.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -665,9 +665,8 @@ var tf3 = __toModule(require_tfjs_esm());
665665
function padToSquare(imgTensor, isCenterImage = false) {
666666
return tf3.tidy(() => {
667667
const [height, width] = imgTensor.shape.slice(1);
668-
if (height === width) {
668+
if (height === width)
669669
return imgTensor;
670-
}
671670
const dimDiff = Math.abs(height - width);
672671
const paddingAmount = Math.round(dimDiff * (isCenterImage ? 0.5 : 1));
673672
const paddingAxis = height > width ? 2 : 1;
@@ -679,11 +678,7 @@ function padToSquare(imgTensor, isCenterImage = false) {
679678
const paddingTensorAppend = createPaddingTensor(paddingAmount);
680679
const remainingPaddingAmount = dimDiff - paddingTensorAppend.shape[paddingAxis];
681680
const paddingTensorPrepend = isCenterImage && remainingPaddingAmount ? createPaddingTensor(remainingPaddingAmount) : null;
682-
const tensorsToStack = [
683-
paddingTensorPrepend,
684-
imgTensor,
685-
paddingTensorAppend
686-
].filter((t) => !!t).map((t) => tf3.cast(t, "float32"));
681+
const tensorsToStack = [paddingTensorPrepend, imgTensor, paddingTensorAppend].filter((t) => !!t).map((t) => tf3.cast(t, "float32"));
687682
return tf3.concat(tensorsToStack, paddingAxis);
688683
});
689684
}
@@ -2307,7 +2302,7 @@ function drawFaceLandmarks(canvasArg, faceLandmarks) {
23072302
}
23082303

23092304
// package.json
2310-
var version = "1.5.4";
2305+
var version = "1.5.5";
23112306

23122307
// src/ageGenderNet/AgeGenderNet.ts
23132308
var tf20 = __toModule(require_tfjs_esm());

dist/face-api.node.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -665,9 +665,8 @@ var tf3 = __toModule(require_tfjs_esm());
665665
function padToSquare(imgTensor, isCenterImage = false) {
666666
return tf3.tidy(() => {
667667
const [height, width] = imgTensor.shape.slice(1);
668-
if (height === width) {
668+
if (height === width)
669669
return imgTensor;
670-
}
671670
const dimDiff = Math.abs(height - width);
672671
const paddingAmount = Math.round(dimDiff * (isCenterImage ? 0.5 : 1));
673672
const paddingAxis = height > width ? 2 : 1;
@@ -679,11 +678,7 @@ function padToSquare(imgTensor, isCenterImage = false) {
679678
const paddingTensorAppend = createPaddingTensor(paddingAmount);
680679
const remainingPaddingAmount = dimDiff - paddingTensorAppend.shape[paddingAxis];
681680
const paddingTensorPrepend = isCenterImage && remainingPaddingAmount ? createPaddingTensor(remainingPaddingAmount) : null;
682-
const tensorsToStack = [
683-
paddingTensorPrepend,
684-
imgTensor,
685-
paddingTensorAppend
686-
].filter((t) => !!t).map((t) => tf3.cast(t, "float32"));
681+
const tensorsToStack = [paddingTensorPrepend, imgTensor, paddingTensorAppend].filter((t) => !!t).map((t) => tf3.cast(t, "float32"));
687682
return tf3.concat(tensorsToStack, paddingAxis);
688683
});
689684
}
@@ -2307,7 +2302,7 @@ function drawFaceLandmarks(canvasArg, faceLandmarks) {
23072302
}
23082303

23092304
// package.json
2310-
var version = "1.5.4";
2305+
var version = "1.5.5";
23112306

23122307
// src/ageGenderNet/AgeGenderNet.ts
23132308
var tf20 = __toModule(require_tfjs_esm());

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@
5252
"@tensorflow/tfjs-layers": "^3.9.0",
5353
"@tensorflow/tfjs-node": "^3.9.0",
5454
"@tensorflow/tfjs-node-gpu": "^3.9.0",
55-
"@types/node": "^16.10.2",
56-
"@typescript-eslint/eslint-plugin": "^4.32.0",
57-
"@typescript-eslint/parser": "^4.32.0",
58-
"@vladmandic/build": "^0.5.3",
55+
"@types/node": "^16.11.1",
56+
"@typescript-eslint/eslint-plugin": "^5.1.0",
57+
"@typescript-eslint/parser": "^5.1.0",
58+
"@vladmandic/build": "^0.6.1",
5959
"@vladmandic/pilogger": "^0.3.3",
6060
"canvas": "^2.8.0",
6161
"chokidar": "^3.5.2",
6262
"dayjs": "^1.10.7",
63-
"esbuild": "^0.13.3",
64-
"eslint": "^7.32.0",
63+
"esbuild": "^0.13.8",
64+
"eslint": "^8.0.1",
6565
"eslint-config-airbnb-base": "^14.2.1",
66-
"eslint-plugin-import": "^2.24.2",
66+
"eslint-plugin-import": "^2.25.2",
6767
"eslint-plugin-json": "^3.1.0",
6868
"eslint-plugin-node": "^11.1.0",
6969
"eslint-plugin-promise": "^5.1.0",
@@ -72,7 +72,7 @@
7272
"seedrandom": "^3.0.5",
7373
"simple-git": "^2.46.0",
7474
"tslib": "^2.3.1",
75-
"typedoc": "^0.22.4",
76-
"typescript": "4.4.3"
75+
"typedoc": "^0.22.6",
76+
"typescript": "4.4.4"
7777
}
7878
}

src/NeuralNetwork.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ export abstract class NeuralNetwork<TNetParams> {
1010
this._name = name;
1111
}
1212

13-
protected _params: TNetParams | undefined = undefined
13+
protected _params: TNetParams | undefined = undefined;
1414

15-
protected _paramMappings: ParamMapping[] = []
15+
protected _paramMappings: ParamMapping[] = [];
1616

1717
public _name: any;
1818

0 commit comments

Comments
 (0)