forked from iceglow/node-red-contrib-deepstack
/
deepstack-face-registration.html
87 lines (79 loc) · 3.29 KB
/
deepstack-face-registration.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
76
77
78
79
80
81
82
83
84
85
86
87
<script type="text/javascript">
RED.nodes.registerType('deepstack-face-registration',{
category: 'function',
color: '#4682b4',
defaults: {
name: {value:""},
server: {value:"", type:"deepstack-server"},
userid: {value: "", required: false},
outputs: {value:1}
},
inputs:1,
outputs:1,
outputLabels: 'Registration result',
icon: "font-awesome/fa-user",
label: function() {
return this.name||"Face Registration";
}
});
</script>
<script type="text/x-red" data-template-name="deepstack-face-registration">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
</div>
<div class="form-row">
<label for="node-input-server"><i class="icon-tag"></i> Deepstack server</label>
<input type="text" id="node-input-server">
</div>
<hr />
<div class="form-row">
<label for="node-input-userid"><i class="icon-tag"></i> Userid</label>
<input type="text" id="node-input-userid" size="5" placeholder="if empty, set msg.userid">
</div>
<div class="form-row">
<input type="checkbox" id="node-input-rejectUnauthorized" style="display: inline-block; width: auto; vertical-align: top;">
<label for="node-input-rejectUnauthorized" style="width: 90%;">Reject unauthorized</label>
</div>
</script>
<script type="text/x-red" data-help-name="deepstack-face-registration">
<p>A node to register faces using the Deepstack Face Registration API.</p>
<h3>Inputs</h3>
<p>The node takes one single input, the image to be sent.</p>
<dl class="message-properties">
<dt>payload
<span class="property-type">buffer</span>
</dt>
<dd> the image buffer to send to Deepstack. </dd>
<dt class="optional">userid
<span class="property-type">string</span>
</dt>
<dd> user id to register the face for. Optional and if present will override 'userid' from node configuration.</dd>
</dl>
<h3>Outputs</h3>
<p>The result of the facee registration.</p>
<ol class="node-ports">
<li>Standard output
<dl class="message-properties">
<dt>payload <span class="property-type">string</span></dt>
<dd>Deepstack Face Registration result.</dd>
<dt>success <span class="property-type">boolean</span></dt>
<dd>Deepstack Face Registration status.</dd>
</dl>
</li>
<li>Standard error
<dl class="message-properties">
<dt>payload <span class="property-type">string</span></dt>
<dd>Deepstack Face Registration error.</dd>
<dt>success <span class="property-type">boolean</span></dt>
<dd>Deepstack Face Registration status.</dd>
</dl>
</li>
</ol>
<h3>Details</h3>
<p>Sends an image to the Deepstack Face Registration API and outputs the result.</p>
<h3>References</h3>
<ul>
<li><a href="https://deepstack.cc/">Deepstack</a> - the service performing the actual magic.</li>
</ul>
</script>