sonic-widget 2.4.2 → 2.4.5
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/README.md +17 -20
- package/dist/index.js +1549 -1549
- package/dist/models/TasksVision/object/float16/efficientdet_lite0.tflite +0 -0
- package/dist/service-worker.js +11 -4
- package/package.json +1 -1
- /package/dist/models/TasksVision/{face_landmarker.task → face/float16/face_landmarker.task} +0 -0
- /package/dist/models/TasksVision/{hand_landmarker.task → hand/float16/hand_landmarker.task} +0 -0
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
Use this script tag to get access to the widget:
|
|
17
17
|
|
|
18
18
|
```html
|
|
19
|
-
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.4.
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.4.5/dist/index.min.js"></script>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
or
|
|
@@ -43,7 +43,7 @@ and adding path in `angular.json`
|
|
|
43
43
|
2. Use this script tag to get access to the widget at initial html page:
|
|
44
44
|
|
|
45
45
|
```html
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.4.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.4.5/dist/index.min.js"></script>
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
or
|
|
@@ -95,6 +95,9 @@ ngOnInit(): void {
|
|
|
95
95
|
isMalay: boolean, //used to change the default language english to malay
|
|
96
96
|
branchId: string, //used to identify the bank branch
|
|
97
97
|
sendLogsEmail: boolean, //used to send logs through email
|
|
98
|
+
blinkThreshold: number, // used for blink threshold
|
|
99
|
+
objectPersonThreshold: number, // used for object Person score threshold
|
|
100
|
+
objectPhoneThreshold: number, // used for object Phone score threshold
|
|
98
101
|
onMessage: function (data) {}, // callback function, when api response message or error or any other actions
|
|
99
102
|
};
|
|
100
103
|
|
|
@@ -112,23 +115,11 @@ ngOnInit(): void {
|
|
|
112
115
|
```javascript
|
|
113
116
|
const CACHE_NAME = 'demo-app-ai-tensorflow-models-cache-v1';
|
|
114
117
|
const urlsToCache = [
|
|
115
|
-
// coco ssd
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
"https://teachablemachine.withgoogle.com/models/ikFAYzyyu/metadata.json",
|
|
121
|
-
|
|
122
|
-
// mask model
|
|
123
|
-
"https://teachablemachine.withgoogle.com/models/_08Yck2dy/model.json",
|
|
124
|
-
"https://teachablemachine.withgoogle.com/models/_08Yck2dy/metadata.json",
|
|
125
|
-
|
|
126
|
-
// blazeface
|
|
127
|
-
'https://tfhub.dev/tensorflow/tfjs-model/blazeface/1/default/1/model.json?tfjs-format=file',
|
|
128
|
-
|
|
129
|
-
// handpose model
|
|
130
|
-
"https://tfhub.dev/mediapipe/tfjs-model/handpose_3d/detector/full/1/model.json?tfjs-format=file",
|
|
131
|
-
"https://tfhub.dev/mediapipe/tfjs-model/handpose_3d/landmark/full/1/model.json?tfjs-format=file"
|
|
118
|
+
// coco ssd - tensorflow model
|
|
119
|
+
// document model - teachable machine drive link or folder path
|
|
120
|
+
// mask model - teachable machine drive link or folder path
|
|
121
|
+
// face landmark model - mediapipe tasks-vision
|
|
122
|
+
// hand landmark model - mediapipe tasks-vision
|
|
132
123
|
// Add more model files if necessary
|
|
133
124
|
]
|
|
134
125
|
|
|
@@ -241,7 +232,7 @@ it can be added in `angular.json` by installing the npm package
|
|
|
241
232
|
4. Add a Script tag to the head tag or body tag. And use the latest version.
|
|
242
233
|
|
|
243
234
|
```html
|
|
244
|
-
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.4.
|
|
235
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.4.5/dist/index.min.js"></script>
|
|
245
236
|
```
|
|
246
237
|
|
|
247
238
|
5. Next, add the script tag at a necessary place. But add below the widget script.
|
|
@@ -266,6 +257,9 @@ it can be added in `angular.json` by installing the npm package
|
|
|
266
257
|
isMalay: boolean, //used to change the default language english to malay
|
|
267
258
|
branchId: string, // branch id to identify the branch of the bank
|
|
268
259
|
sendLogsEmail: boolean, //used to send logs through email
|
|
260
|
+
blinkThreshold: number, // threshold used to calculate the user blinked or not, with range limit 0-1(default value is 0.35)
|
|
261
|
+
objectPersonThreshold: number, // used for object Person score threshold with range limit 0-1(default value is 0.35)
|
|
262
|
+
objectPhoneThreshold: number, // used for object Phone score threshold with range limit 0-1(default value is 0.35)
|
|
269
263
|
onMessage: function (data) {}, // callback function, when api response message or error or any other actions
|
|
270
264
|
};
|
|
271
265
|
// get the element used in the action button
|
|
@@ -312,4 +306,7 @@ Check with **`data.code`**_
|
|
|
312
306
|
- _**`phone`** should pass as a string value. It is used to create an application for onboard sonic kyc._
|
|
313
307
|
- _**`applicationNo`** should pass as a string value. It is used to create an application for onboard sonic kyc._
|
|
314
308
|
- _**`sendLogsEmail`** is used to pass a boolean value. It is used to send logs to client email address._
|
|
309
|
+
- _**`blinkThreshold`** is used to pass a numerical value. It is used to check the user blinks (range 0-1 and default 0.35)._
|
|
310
|
+
- _**`objectPersonThreshold`** is used to pass a numerical value. It is used to check the image person as object found with required score as threshold (range 0-1 and default 0.95)._
|
|
311
|
+
- _**`objectPhoneThreshold`** is used to pass a numerical value. It is used to check the image phone/laptop as object found with required score as threshold (range 0-1 and default 0.5)._
|
|
315
312
|
- _**`onMessage`** is a callback function. It is getting called when the API gives a message or at any configuration error. Return data is an object with its API endpoint and result._
|