-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedge-impulse-classify.html
75 lines (73 loc) · 3.89 KB
/
edge-impulse-classify.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<script type="text/javascript">
RED.nodes.registerType('edge-impulse-classify',{
category: 'function',
color: '#FFCC66',
defaults: {
name: {value:""},
path: {value:""}
},
inputs:1,
outputs:1,
icon: "edge-impulse-logo.png",
label: function() {
return this.name||"edge impulse classify";
}
});
</script>
<script type="text/html" data-template-name="edge-impulse-classify">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-path"><i class="fa fa-tag"></i> Path</label>
<input type="text" id="node-input-path">
</div>
</script>
<script type="text/html" data-help-name="edge-impulse-classify">
<p>Performs an "edge impulse" classification and/or anomaly detection.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>Path <span class="property-type">configuration property</span>
</dt>
<dd><p>This is the folder where you have deployed the "edge impulse" WebAssembly library (see Prerequisites).</p>
<p>So it is the folder where your Node-RED application should find the 2 files: <code>edge-impulse-standalone.js</code> and <code>edge-impulse-standalone.wasm</code></p>
</dd>
<dt>payload
<span class="property-type">array</span>
</dt>
<dd><p>The input array that should be classified.</p>
<p>In case of audio classification it is typically the raw audio format (PCM)
of the audio fragment that should be classified converted into a javascript array.
It is important that this array has exactly the same size as the size of the audio fragments that are used for training the edge impulse.</p>
</dd>
</dl>
<h3>Outputs</h3>
<ol class="node-ports">
<li>Standard output
<dl class="message-properties">
<dt>payload <span class="property-type">Object</span></dt>
<dd>the classification outcome. An example of such an outcome:
<pre>{ "anomaly":0,
"results":[{"label":"other","value":1},
{"label":"ring", "value":2.582810076923181e-10}]}</pre>
</dd>
</dl>
</li>
</ol>
<h3>Prerequisites</h3>
<p>The "edge impulse", you (or someone else) have created and trained at <a href="https://www.edgeimpulse.com/">edge impulse</a>,
should be deployed as a WebAssembly library to a folder readable by your Node-RED application.
<p>It is easy to download your edge impulse project as a WebAssembly library using the online edge impulse studio: for this you need to select the "Deployment" menu,
then select create "WebAssembly" library and then select "Build". This will download a zip file consisting of 2 files: <code>edge-impulse-standalone.js</code> and <code>edge-impulse-standalone.wasm</code>.
So these 2 files must be copied to a folder that is accessible by your Node-RED application.
</p>
<h3>Details</h3>
For more details consult the <a href="https://github.com/janvda/node-red-contrib-edge-impulse">GitHub Readme</a>
<h3>References</h3>
<ul>
<li><a href="https://www.edgeimpulse.com/">Edge Impulse</a> - is the leading development platform for machine learning on edge devices, free for developers and trusted by enterprises.</li>
<li><a href="https://github.com/janvda/node-red-contrib-edge-impulse">GitHub janvda/node-red-contrib-edge-impulse</a> - the github repository for this node. Feel free to open new issues.</li>
<li><a href="https://github.com/janvda/node-red-doorbell">GitHub janvda/node-red-doorbell</a> - a project using this node to recognize the ring sound of a doorbell.</li>
</ul>
</script>