edge-impulse-linux 1.13.1 → 1.14.0
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/build/cli/linux/runner-utils.d.ts +1 -0
- package/build/cli/linux/runner-utils.js +45 -2
- package/build/cli/linux/runner-utils.js.map +1 -1
- package/build/cli/linux/runner.js +55 -7
- package/build/cli/linux/runner.js.map +1 -1
- package/build/cli/linux/webserver/public/inference-server.js +17 -1
- package/build/cli/linux/webserver/public/inference-server.js.map +1 -1
- package/build/cli/linux/webserver/public/webserver.js +108 -1
- package/build/cli/linux/webserver/public/webserver.js.map +1 -1
- package/build/sdk/studio/sdk/api/adminApi.d.ts +20 -0
- package/build/sdk/studio/sdk/api/adminApi.js +148 -0
- package/build/sdk/studio/sdk/api/adminApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/classifyApi.d.ts +12 -0
- package/build/sdk/studio/sdk/api/classifyApi.js +24 -0
- package/build/sdk/studio/sdk/api/classifyApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/dSPApi.d.ts +4 -0
- package/build/sdk/studio/sdk/api/dSPApi.js +8 -0
- package/build/sdk/studio/sdk/api/dSPApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/rawDataApi.d.ts +8 -0
- package/build/sdk/studio/sdk/api/rawDataApi.js +16 -0
- package/build/sdk/studio/sdk/api/rawDataApi.js.map +1 -1
- package/build/sdk/studio/sdk/model/aIActionsDataCategory.d.ts +1 -1
- package/build/sdk/studio/sdk/model/aIActionsDataCategory.js +1 -1
- package/build/sdk/studio/sdk/model/aIActionsDataCategory.js.map +1 -1
- package/build/sdk/studio/sdk/model/adminApiUser.d.ts +0 -1
- package/build/sdk/studio/sdk/model/adminApiUser.js +0 -5
- package/build/sdk/studio/sdk/model/adminApiUser.js.map +1 -1
- package/build/sdk/studio/sdk/model/exportOriginalDataRequest.d.ts +1 -1
- package/build/sdk/studio/sdk/model/getUserResponse.d.ts +2 -1
- package/build/sdk/studio/sdk/model/getUserResponse.js +5 -5
- package/build/sdk/studio/sdk/model/getUserResponse.js.map +1 -1
- package/build/sdk/studio/sdk/model/getUserResponseAllOf.d.ts +2 -0
- package/build/sdk/studio/sdk/model/getUserResponseAllOf.js +5 -0
- package/build/sdk/studio/sdk/model/getUserResponseAllOf.js.map +1 -1
- package/build/sdk/studio/sdk/model/getUserResponseAllOfLastAcceptedTermsOfService.d.ts +26 -0
- package/build/sdk/studio/sdk/model/getUserResponseAllOfLastAcceptedTermsOfService.js +34 -0
- package/build/sdk/studio/sdk/model/getUserResponseAllOfLastAcceptedTermsOfService.js.map +1 -0
- package/build/sdk/studio/sdk/model/models.d.ts +1 -0
- package/build/sdk/studio/sdk/model/models.js +3 -0
- package/build/sdk/studio/sdk/model/models.js.map +1 -1
- package/build/sdk/studio/sdk/model/organizationUser.d.ts +0 -1
- package/build/sdk/studio/sdk/model/organizationUser.js +0 -5
- package/build/sdk/studio/sdk/model/organizationUser.js.map +1 -1
- package/build/sdk/studio/sdk/model/projectCollaborator.d.ts +0 -1
- package/build/sdk/studio/sdk/model/projectCollaborator.js +0 -5
- package/build/sdk/studio/sdk/model/projectCollaborator.js.map +1 -1
- package/build/sdk/studio/sdk/model/user.d.ts +0 -1
- package/build/sdk/studio/sdk/model/user.js +0 -5
- package/build/sdk/studio/sdk/model/user.js.map +1 -1
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/all.css +4616 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/all.min.css +5 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/brands.css +15 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/brands.min.css +5 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/fontawesome.css +4582 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/fontawesome.min.css +5 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/regular.css +15 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/regular.min.css +5 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/solid.css +16 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/solid.min.css +5 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/svg-with-js.css +371 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/svg-with-js.min.css +5 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/v4-shims.css +2172 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/css/v4-shims.min.css +5 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-brands-400.eot +0 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-brands-400.svg +3717 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-brands-400.ttf +0 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-brands-400.woff +0 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-brands-400.woff2 +0 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-regular-400.eot +0 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-regular-400.svg +801 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-regular-400.ttf +0 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-regular-400.woff +0 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-regular-400.woff2 +0 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-solid-900.eot +0 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-solid-900.svg +5034 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-solid-900.ttf +0 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-solid-900.woff +0 -0
- package/cli/linux/webserver/public/assets/fontawesome-free-5.15.4-web/webfonts/fa-solid-900.woff2 +0 -0
- package/cli/linux/webserver/public/assets/js/argon-dashboard.js +1093 -0
- package/cli/linux/webserver/public/assets/js/argon-dashboard.js.map +1 -0
- package/cli/linux/webserver/public/assets/js/argon-dashboard.min.js +2 -0
- package/cli/linux/webserver/public/assets/js/argon.min.js +18 -0
- package/cli/linux/webserver/public/assets/js/plugins/bootstrap/dist/js/bootstrap.bundle.js +7021 -0
- package/cli/linux/webserver/public/assets/js/plugins/jquery/dist/core.js +398 -0
- package/cli/linux/webserver/public/assets/js/plugins/jquery/dist/jquery.min.js +24 -0
- package/cli/linux/webserver/public/assets/mobileclient.css +6 -0
- package/cli/linux/webserver/public/index.html +15 -2
- package/cli/linux/webserver/public/inference-server.js +18 -1
- package/cli/linux/webserver/public/webserver.js +130 -1
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>Edge Impulse for Linux</title>
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0" />
|
|
8
8
|
<link rel="stylesheet" href="/assets/argon-dashboard.css">
|
|
9
|
-
<link rel="stylesheet" href="/fontawesome-free/css/all.min.css">
|
|
9
|
+
<link rel="stylesheet" href="/assets/fontawesome-free-5.15.4-web/css/all.min.css">
|
|
10
10
|
<link rel="stylesheet" href="/assets/mobileclient.css">
|
|
11
11
|
<!-- generics -->
|
|
12
12
|
<link rel="icon" href="/assets/favicon-color/favicon-32.png" sizes="32x32">
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<meta name="msapplication-TileColor" content="#FFFFFF">
|
|
27
27
|
<meta name="msapplication-TileImage" content="assets/favicon-color/favicon-144.png">
|
|
28
28
|
|
|
29
|
-
<!-- (c) Copyright 2021,
|
|
29
|
+
<!-- (c) Copyright 2021-2025, EdgeImpulse Inc. -->
|
|
30
30
|
</head>
|
|
31
31
|
|
|
32
32
|
<body>
|
|
@@ -38,6 +38,17 @@
|
|
|
38
38
|
<div class="col align-middle">
|
|
39
39
|
<h1 class="text-dark mb-0 border-left pl-4">...</h1>
|
|
40
40
|
</div>
|
|
41
|
+
<div class="pl-0 col-auto text-right my--1">
|
|
42
|
+
<div class="dropdown">
|
|
43
|
+
<a class="btn btn-icon-only text-gray mr-0" href="#" role="button"
|
|
44
|
+
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="Configure thresholds">
|
|
45
|
+
<i class="fas fa-cog"></i>
|
|
46
|
+
</a>
|
|
47
|
+
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow" id="thresholds-body">
|
|
48
|
+
<h3>Thresholds</h3>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
41
52
|
</div>
|
|
42
53
|
<div class="row mt-4" id="loading-view">
|
|
43
54
|
<div class="col">
|
|
@@ -105,6 +116,8 @@
|
|
|
105
116
|
</div>
|
|
106
117
|
</footer>
|
|
107
118
|
|
|
119
|
+
<script src="/assets/js/plugins/jquery/dist/jquery.min.js"></script>
|
|
120
|
+
<script src="/assets/js/plugins/bootstrap/dist/js/bootstrap.bundle.js"></script>
|
|
108
121
|
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
|
|
109
122
|
<script type="text/javascript" src="/webserver.js"></script>
|
|
110
123
|
<script>
|
|
@@ -185,9 +185,26 @@ window.InferenceServer = async () => {
|
|
|
185
185
|
el.style.left = (bb.x) + 'px';
|
|
186
186
|
el.style.top = (bb.y) + 'px';
|
|
187
187
|
|
|
188
|
+
let scoreFontSize = '';
|
|
189
|
+
let scoreText = bb.value.toFixed(2);
|
|
190
|
+
if (bb.width < 15) {
|
|
191
|
+
scoreFontSize = '4px';
|
|
192
|
+
scoreText = bb.value.toFixed(1);
|
|
193
|
+
}
|
|
194
|
+
else if (bb.width < 20) {
|
|
195
|
+
scoreFontSize = '6px';
|
|
196
|
+
scoreText = bb.value.toFixed(1);
|
|
197
|
+
}
|
|
198
|
+
else if (bb.width < 32) {
|
|
199
|
+
scoreFontSize = '9px';
|
|
200
|
+
}
|
|
201
|
+
|
|
188
202
|
let score = document.createElement('div');
|
|
189
203
|
score.style.color = 'white';
|
|
190
|
-
|
|
204
|
+
if (scoreFontSize) {
|
|
205
|
+
score.style.fontSize = scoreFontSize;
|
|
206
|
+
}
|
|
207
|
+
score.textContent = scoreText;
|
|
191
208
|
el.appendChild(score);
|
|
192
209
|
|
|
193
210
|
// Center align the score
|
|
@@ -19,6 +19,7 @@ window.WebServer = async () => {
|
|
|
19
19
|
resultsTable: document.querySelector('#results-table'),
|
|
20
20
|
resultsThead: document.querySelector('#results-table thead tr'),
|
|
21
21
|
resultsTbody: document.querySelector('#results-table tbody'),
|
|
22
|
+
thresholdsBody: document.querySelector('#thresholds-body'),
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
const colors = [
|
|
@@ -34,6 +35,114 @@ window.WebServer = async () => {
|
|
|
34
35
|
el.style.display = '';
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
function bindThresholdSettings(thresholds) {
|
|
39
|
+
els.thresholdsBody.innerHTML = '';
|
|
40
|
+
|
|
41
|
+
let h3 = document.createElement('h3');
|
|
42
|
+
h3.textContent = 'Thresholds';
|
|
43
|
+
els.thresholdsBody.appendChild(h3);
|
|
44
|
+
|
|
45
|
+
if (!thresholds) {
|
|
46
|
+
let msgEl = document.createElement('div');
|
|
47
|
+
let emEl = document.createElement('em');
|
|
48
|
+
emEl.classList.add('text-sm');
|
|
49
|
+
emEl.textContent = 'Model does not support setting thresholds. Re-build the eim file to change the thresholds.';
|
|
50
|
+
msgEl.appendChild(emEl);
|
|
51
|
+
els.thresholdsBody.appendChild(msgEl);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (thresholds.length === 0) {
|
|
56
|
+
let msgEl = document.createElement('div');
|
|
57
|
+
let emEl = document.createElement('em');
|
|
58
|
+
emEl.classList.add('text-sm');
|
|
59
|
+
emEl.textContent = 'Model does not have any settable thresholds.';
|
|
60
|
+
msgEl.appendChild(emEl);
|
|
61
|
+
els.thresholdsBody.appendChild(msgEl);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
let thresholdsDiv = document.createElement('div');
|
|
66
|
+
thresholdsDiv.classList.add('mb--3');
|
|
67
|
+
|
|
68
|
+
let thresholdHintContainer = document.createElement('div');
|
|
69
|
+
thresholdHintContainer.classList.add('mb-3');
|
|
70
|
+
function setThresholdHint() {
|
|
71
|
+
let em = document.createElement('em');
|
|
72
|
+
em.classList.add('text-sm', 'd-block');
|
|
73
|
+
em.textContent = `To override the thresholds, start the runner with:`;
|
|
74
|
+
|
|
75
|
+
let code = document.createElement('code');
|
|
76
|
+
code.classList.add('d-block');
|
|
77
|
+
|
|
78
|
+
let opts = [];
|
|
79
|
+
for (let threshold of thresholds) {
|
|
80
|
+
for (let k of Object.keys(threshold)) {
|
|
81
|
+
if (k === 'id' || k === 'type') continue;
|
|
82
|
+
if (typeof threshold[k] !== 'number') continue;
|
|
83
|
+
|
|
84
|
+
let rounded = Math.round(threshold[k] * 1000) / 1000;
|
|
85
|
+
opts.push(`${threshold.id}.${k}=${rounded}`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
code.textContent = `--thresholds ${opts.join(',')}`;
|
|
90
|
+
|
|
91
|
+
thresholdHintContainer.textContent = '';
|
|
92
|
+
thresholdHintContainer.appendChild(em);
|
|
93
|
+
thresholdHintContainer.appendChild(code);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
for (let threshold of thresholds) {
|
|
97
|
+
|
|
98
|
+
for (let k of Object.keys(threshold)) {
|
|
99
|
+
if (k === 'id' || k === 'type') continue;
|
|
100
|
+
if (typeof threshold[k] !== 'number') continue;
|
|
101
|
+
|
|
102
|
+
let rowEl = document.createElement('div');
|
|
103
|
+
rowEl.classList.add('mb-3');
|
|
104
|
+
|
|
105
|
+
let labelEl = document.createElement('label');
|
|
106
|
+
labelEl.classList.add('form-control-label', 'w-100');
|
|
107
|
+
labelEl.textContent = `${threshold.type}: ${k} (block ID: ${threshold.id})`;
|
|
108
|
+
|
|
109
|
+
let inputEl = document.createElement('input');
|
|
110
|
+
inputEl.classList.add('form-control', 'form-control-sm', 'text-default', 'font-monospace');
|
|
111
|
+
let rounded = Math.round(threshold[k] * 1000) / 1000;
|
|
112
|
+
inputEl.value = rounded;
|
|
113
|
+
|
|
114
|
+
rowEl.appendChild(labelEl);
|
|
115
|
+
rowEl.appendChild(inputEl);
|
|
116
|
+
|
|
117
|
+
thresholdsDiv.appendChild(rowEl);
|
|
118
|
+
|
|
119
|
+
inputEl.oninput = () => {
|
|
120
|
+
if (!inputEl.value || isNaN(Number(inputEl.value))) return;
|
|
121
|
+
|
|
122
|
+
threshold[k] = Number(inputEl.value);
|
|
123
|
+
|
|
124
|
+
socket.emit('threshold-override', {
|
|
125
|
+
id: threshold.id,
|
|
126
|
+
key: k,
|
|
127
|
+
value: Number(inputEl.value),
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
setThresholdHint();
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
setThresholdHint();
|
|
136
|
+
thresholdsDiv.appendChild(thresholdHintContainer);
|
|
137
|
+
|
|
138
|
+
els.thresholdsBody.appendChild(thresholdsDiv);
|
|
139
|
+
|
|
140
|
+
// prevent closing on click inside the dropdown menu
|
|
141
|
+
document.querySelector('.dropdown-menu').addEventListener('click', ev => {
|
|
142
|
+
ev.stopPropagation();
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
37
146
|
// Here is how we connect back to the server
|
|
38
147
|
const socket = io.connect(location.origin);
|
|
39
148
|
socket.on('connect', () => {
|
|
@@ -41,9 +150,12 @@ window.WebServer = async () => {
|
|
|
41
150
|
});
|
|
42
151
|
|
|
43
152
|
socket.on('hello', (opts) => {
|
|
153
|
+
console.log('hello', opts);
|
|
154
|
+
|
|
44
155
|
els.title.textContent = opts.projectName;
|
|
45
156
|
|
|
46
157
|
switchView(els.views.captureCamera);
|
|
158
|
+
bindThresholdSettings(opts.thresholds);
|
|
47
159
|
});
|
|
48
160
|
|
|
49
161
|
socket.on('image', (opts) => {
|
|
@@ -230,9 +342,26 @@ window.WebServer = async () => {
|
|
|
230
342
|
el.style.left = (bb.x) + 'px';
|
|
231
343
|
el.style.top = (bb.y) + 'px';
|
|
232
344
|
|
|
345
|
+
let scoreFontSize = '';
|
|
346
|
+
let scoreText = bb.value.toFixed(2);
|
|
347
|
+
if (bb.width < 15) {
|
|
348
|
+
scoreFontSize = '4px';
|
|
349
|
+
scoreText = bb.value.toFixed(1);
|
|
350
|
+
}
|
|
351
|
+
else if (bb.width < 20) {
|
|
352
|
+
scoreFontSize = '6px';
|
|
353
|
+
scoreText = bb.value.toFixed(1);
|
|
354
|
+
}
|
|
355
|
+
else if (bb.width < 32) {
|
|
356
|
+
scoreFontSize = '9px';
|
|
357
|
+
}
|
|
358
|
+
|
|
233
359
|
let score = document.createElement('div');
|
|
234
360
|
score.style.color = 'white';
|
|
235
|
-
|
|
361
|
+
if (scoreFontSize) {
|
|
362
|
+
score.style.fontSize = scoreFontSize;
|
|
363
|
+
}
|
|
364
|
+
score.textContent = scoreText;
|
|
236
365
|
el.appendChild(score);
|
|
237
366
|
|
|
238
367
|
// Center align the score
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edge-impulse-linux",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Node.js SDK and tools for Edge Impulse for Linux",
|
|
5
5
|
"directories": {
|
|
6
6
|
"example": "examples"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"borc": "2.1.2",
|
|
40
40
|
"cbor": "5.0.2",
|
|
41
41
|
"commander": "4.1.1",
|
|
42
|
-
"express": "4.21.
|
|
42
|
+
"express": "4.21.2",
|
|
43
43
|
"form-data": "4.0.0",
|
|
44
44
|
"inquirer": "7.0.0",
|
|
45
45
|
"multer": "1.4.5-lts.1",
|