idmission-web-sdk 1.0.192 → 1.0.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sdk2.cjs.development.js +24 -12
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +24 -12
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +24 -12
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -48,7 +48,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
48
48
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
49
49
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
50
50
|
|
|
51
|
-
var webSdkVersion = '1.0.
|
|
51
|
+
var webSdkVersion = '1.0.194';
|
|
52
52
|
|
|
53
53
|
function getPlatform() {
|
|
54
54
|
if (typeof window === 'undefined') return;
|
|
@@ -1918,18 +1918,20 @@ function loadDocumentDetectionModel(url) {
|
|
|
1918
1918
|
return [4 /*yield*/, tf__namespace.loadGraphModel(url)];
|
|
1919
1919
|
case 1:
|
|
1920
1920
|
documentDetectionModel = _c.sent();
|
|
1921
|
-
return [4 /*yield*/, tf__namespace.ready()
|
|
1922
|
-
// warm the model by predicting on an empty image
|
|
1923
|
-
];
|
|
1921
|
+
return [4 /*yield*/, tf__namespace.ready()];
|
|
1924
1922
|
case 2:
|
|
1925
1923
|
_c.sent();
|
|
1924
|
+
_c.label = 3;
|
|
1925
|
+
case 3:
|
|
1926
|
+
_c.trys.push([3,, 5, 6]);
|
|
1927
|
+
tf__namespace.engine().startScope();
|
|
1926
1928
|
zeroes = tf__namespace.zeros([448, 448, 3]);
|
|
1927
1929
|
tfInt32 = tf__namespace.cast(zeroes, 'int32');
|
|
1928
1930
|
tf4d_ = tf__namespace.tensor4d(Array.from(tfInt32.dataSync()), [1, 448, 448, 3]);
|
|
1929
1931
|
tf4d = tf__namespace.cast(tf4d_, 'int32');
|
|
1930
1932
|
_b = (_a = tf__namespace).dispose;
|
|
1931
1933
|
return [4 /*yield*/, documentDetectionModel.executeAsync(tf4d)];
|
|
1932
|
-
case
|
|
1934
|
+
case 4:
|
|
1933
1935
|
_b.apply(_a, [_c.sent()]);
|
|
1934
1936
|
tfInt32.dispose();
|
|
1935
1937
|
tf4d.dispose();
|
|
@@ -1943,6 +1945,11 @@ function loadDocumentDetectionModel(url) {
|
|
|
1943
1945
|
scores: outputKeys.indexOf('Identity_4'),
|
|
1944
1946
|
labels: outputKeys.indexOf('Identity_2')
|
|
1945
1947
|
};
|
|
1948
|
+
return [3 /*break*/, 6];
|
|
1949
|
+
case 5:
|
|
1950
|
+
tf__namespace.engine().endScope();
|
|
1951
|
+
return [7 /*endfinally*/];
|
|
1952
|
+
case 6:
|
|
1946
1953
|
return [2 /*return*/, documentDetectionModel];
|
|
1947
1954
|
}
|
|
1948
1955
|
});
|
|
@@ -1985,22 +1992,22 @@ function loadFocusModel(url) {
|
|
|
1985
1992
|
return [4 /*yield*/, tf__namespace.loadLayersModel(url)];
|
|
1986
1993
|
case 1:
|
|
1987
1994
|
focusModel = _e.sent();
|
|
1988
|
-
return [4 /*yield*/, tf__namespace.ready()
|
|
1989
|
-
// warm the model by predicting on an empty image...
|
|
1990
|
-
];
|
|
1995
|
+
return [4 /*yield*/, tf__namespace.ready()];
|
|
1991
1996
|
case 2:
|
|
1992
1997
|
_e.sent();
|
|
1998
|
+
_e.label = 3;
|
|
1999
|
+
case 3:
|
|
2000
|
+
_e.trys.push([3,, 6, 7]);
|
|
2001
|
+
tf__namespace.engine().startScope();
|
|
1993
2002
|
zeroes = tf__namespace.zeros([448, 448, 3]);
|
|
1994
2003
|
tfInt32 = tf__namespace.cast(zeroes, 'float32');
|
|
1995
2004
|
_b = (_a = tf__namespace).tensor4d;
|
|
1996
2005
|
_d = (_c = Array).from;
|
|
1997
2006
|
return [4 /*yield*/, tfInt32.data()];
|
|
1998
|
-
case
|
|
2007
|
+
case 4:
|
|
1999
2008
|
tf4d_ = _b.apply(_a, [_d.apply(_c, [_e.sent()]), [1, 448, 448, 3]]);
|
|
2000
2009
|
tf4d = tf__namespace.cast(tf4d_, 'float32');
|
|
2001
|
-
|
|
2002
|
-
case 4:
|
|
2003
|
-
warmupResult = _e.sent();
|
|
2010
|
+
warmupResult = focusModel.predict(tf4d);
|
|
2004
2011
|
return [4 /*yield*/, warmupResult.data()];
|
|
2005
2012
|
case 5:
|
|
2006
2013
|
_e.sent();
|
|
@@ -2009,6 +2016,11 @@ function loadFocusModel(url) {
|
|
|
2009
2016
|
tf4d.dispose();
|
|
2010
2017
|
tf4d_.dispose();
|
|
2011
2018
|
tf__namespace.dispose(zeroes);
|
|
2019
|
+
return [3 /*break*/, 7];
|
|
2020
|
+
case 6:
|
|
2021
|
+
tf__namespace.engine().endScope();
|
|
2022
|
+
return [7 /*endfinally*/];
|
|
2023
|
+
case 7:
|
|
2012
2024
|
return [2 /*return*/, focusModel];
|
|
2013
2025
|
}
|
|
2014
2026
|
});
|