edge-impulse-linux 1.13.0 → 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/cli-common/model-monitor.js +17 -3
- package/build/cli-common/model-monitor.js.map +1 -1
- package/build/library/classifier/audio-classifier.d.ts +1 -0
- package/build/library/classifier/audio-classifier.js +3 -0
- package/build/library/classifier/audio-classifier.js.map +1 -1
- package/build/library/classifier/image-classifier.d.ts +1 -0
- package/build/library/classifier/image-classifier.js +3 -0
- package/build/library/classifier/image-classifier.js.map +1 -1
- package/build/library/classifier/linux-impulse-runner.d.ts +18 -1
- package/build/library/classifier/linux-impulse-runner.js +22 -0
- package/build/library/classifier/linux-impulse-runner.js.map +1 -1
- package/build/sdk/studio/sdk/api/adminApi.d.ts +56 -0
- package/build/sdk/studio/sdk/api/adminApi.js +316 -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/learnApi.d.ts +22 -0
- package/build/sdk/studio/sdk/api/learnApi.js +160 -0
- package/build/sdk/studio/sdk/api/learnApi.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/feature.d.ts +1 -1
- package/build/sdk/studio/sdk/model/feature.js +1 -1
- package/build/sdk/studio/sdk/model/feature.js.map +1 -1
- package/build/sdk/studio/sdk/model/getPretrainedModelResponseAllOfModel.d.ts +7 -0
- package/build/sdk/studio/sdk/model/getPretrainedModelResponseAllOfModel.js +5 -0
- package/build/sdk/studio/sdk/model/getPretrainedModelResponseAllOfModel.js.map +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/kerasConfig.d.ts +0 -2
- package/build/sdk/studio/sdk/model/kerasConfig.js +0 -5
- package/build/sdk/studio/sdk/model/kerasConfig.js.map +1 -1
- package/build/sdk/studio/sdk/model/kerasModelMetadataMetricsOnDevicePerformance.d.ts +8 -0
- package/build/sdk/studio/sdk/model/kerasModelMetadataMetricsOnDevicePerformance.js +10 -0
- package/build/sdk/studio/sdk/model/kerasModelMetadataMetricsOnDevicePerformance.js.map +1 -1
- package/build/sdk/studio/sdk/model/kerasResponse.d.ts +0 -2
- package/build/sdk/studio/sdk/model/kerasResponse.js +0 -5
- package/build/sdk/studio/sdk/model/kerasResponse.js.map +1 -1
- 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/objectDetectionLastLayer.d.ts +1 -1
- package/build/sdk/studio/sdk/model/objectDetectionLastLayer.js +1 -1
- package/build/sdk/studio/sdk/model/objectDetectionLastLayer.js.map +1 -1
- package/build/sdk/studio/sdk/model/optimizeConfigSearchSpaceSource.d.ts +1 -1
- package/build/sdk/studio/sdk/model/optimizeConfigSearchSpaceSource.js +1 -1
- package/build/sdk/studio/sdk/model/optimizeConfigSearchSpaceSource.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/profileModelInfo.d.ts +15 -0
- package/build/sdk/studio/sdk/model/profileModelInfo.js +20 -0
- package/build/sdk/studio/sdk/model/profileModelInfo.js.map +1 -1
- package/build/sdk/studio/sdk/model/profileTfLiteResponse.d.ts +15 -0
- package/build/sdk/studio/sdk/model/profileTfLiteResponse.js +20 -0
- package/build/sdk/studio/sdk/model/profileTfLiteResponse.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/projectInfoResponse.d.ts +2 -0
- package/build/sdk/studio/sdk/model/projectInfoResponse.js +5 -0
- package/build/sdk/studio/sdk/model/projectInfoResponse.js.map +1 -1
- package/build/sdk/studio/sdk/model/projectInfoResponseAllOf.d.ts +2 -0
- package/build/sdk/studio/sdk/model/projectInfoResponseAllOf.js +5 -0
- package/build/sdk/studio/sdk/model/projectInfoResponseAllOf.js.map +1 -1
- package/build/sdk/studio/sdk/model/setKerasParameterRequest.d.ts +0 -2
- package/build/sdk/studio/sdk/model/setKerasParameterRequest.js +0 -5
- package/build/sdk/studio/sdk/model/setKerasParameterRequest.js.map +1 -1
- package/build/sdk/studio/sdk/model/tunerRun.d.ts +4 -0
- package/build/sdk/studio/sdk/model/tunerRun.js +5 -0
- package/build/sdk/studio/sdk/model/tunerRun.js.map +1 -1
- package/build/sdk/studio/sdk/model/updateProjectRequest.d.ts +1 -0
- package/build/sdk/studio/sdk/model/updateProjectRequest.js +5 -0
- package/build/sdk/studio/sdk/model/updateProjectRequest.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 +9 -11
|
@@ -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,15 +1,14 @@
|
|
|
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"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "
|
|
10
|
-
"eslint": "
|
|
11
|
-
"
|
|
12
|
-
"lint": "npm run fast-lint && npm run eslint",
|
|
9
|
+
"build": "tsc -p .",
|
|
10
|
+
"eslint": "eslint . -c .eslintrc.json --ext .ts,.js",
|
|
11
|
+
"lint": "npm run eslint",
|
|
13
12
|
"test": "tsc -b . && TS_NODE_PROJECT=./tsconfig.json mocha --config ./test/.mocharc.js",
|
|
14
13
|
"watch-runner": "func() { tsc-watch -b . --onSuccess \"node build/cli/linux/runner.js $1\" --noClear; }; func",
|
|
15
14
|
"verify-build": "echo \"import { EdgeImpulseApi } from './build/sdk/studio/index.js'\" | node --input-type=module && [ $(find ./build/sdk -type f | wc -l) -gt 50 ]"
|
|
@@ -34,19 +33,19 @@
|
|
|
34
33
|
"dependencies": {
|
|
35
34
|
"@aws-sdk/client-iot-data-plane": "3.624.0",
|
|
36
35
|
"@aws-sdk/client-secrets-manager": "3.624.0",
|
|
37
|
-
"@aws-sdk/client-s3": "3.
|
|
36
|
+
"@aws-sdk/client-s3": "3.635.0",
|
|
38
37
|
"@types/uuid": "10.0.0",
|
|
39
38
|
"async-mutex": "0.2.6",
|
|
40
39
|
"borc": "2.1.2",
|
|
41
40
|
"cbor": "5.0.2",
|
|
42
41
|
"commander": "4.1.1",
|
|
43
|
-
"express": "4.21.
|
|
42
|
+
"express": "4.21.2",
|
|
44
43
|
"form-data": "4.0.0",
|
|
45
44
|
"inquirer": "7.0.0",
|
|
46
45
|
"multer": "1.4.5-lts.1",
|
|
47
|
-
"node-fetch": "2.
|
|
46
|
+
"node-fetch": "2.7.0",
|
|
48
47
|
"npm-registry-fetch": "5.0.0",
|
|
49
|
-
"request": "2.88.
|
|
48
|
+
"request": "2.88.2",
|
|
50
49
|
"sharp": "0.32.6",
|
|
51
50
|
"socket.io": "2.5.1",
|
|
52
51
|
"tsee": "1.3.4",
|
|
@@ -63,7 +62,7 @@
|
|
|
63
62
|
"@types/multer": "1.4.11",
|
|
64
63
|
"@types/node": "20.14.14",
|
|
65
64
|
"@types/npm-registry-fetch": "4.0.1",
|
|
66
|
-
"@types/request": "2.48.
|
|
65
|
+
"@types/request": "2.48.12",
|
|
67
66
|
"@types/sharp": "0.32.0",
|
|
68
67
|
"@types/socket.io": "2.1.4",
|
|
69
68
|
"@types/ws": "6.0.4",
|
|
@@ -72,7 +71,6 @@
|
|
|
72
71
|
"eslint": "8.57.0",
|
|
73
72
|
"eslint-plugin-mocha": "10.5.0",
|
|
74
73
|
"mocha": "9.2.2",
|
|
75
|
-
"oxlint": "0.12.0",
|
|
76
74
|
"ts-node": "10.9.2",
|
|
77
75
|
"tsc-watch": "6.2.0",
|
|
78
76
|
"typescript": "4.9.5"
|