This module provides a node that vectorizes facial photos using AI in Node-RED.
These nodes require node.js version 18.16.1 and Node-RED version 3.1.0.
This node is part of the Facial Recognition with AI package.
If you would like to see the entire package, please go to the link.
@good-i-deer/node-red-contrib-vision-ai
The AI used in this node uses the Inception ResNet v1 architecture, an implementation of the FaceNet model in Pytorch, and is trained on the VGGFace2 dataset.
It converts the pre-trained model into onnx format and operates through the onnx-runtime module. Files are provided directly to reduce dependency on external APIs.
The input image buffer is converted into 512 vector values and provided.
The Node-Red-Contrib-Face-Vectorization requires Node-RED to be installed.
cd ~/.node-red
npm install @good-i-deer/node-red-contrib-face-vectorization
Restart your Node-RED instance
Single Image
- The input is an image file containing one face. Used for input to one image buffer.
Image Array
- The image buffer can be input in the form of an array. It can be used when there is a possibility of extracting and transmitting face photos of multiple people from linked nodes.
Name
- The name of the node displayed on the screen.
Input Type
- You can choose whether to insert one image buffer or multiple image buffers. In case of multiple image buffers, you can put them in the form of an Array.
Return Type
- You can choose whether to receive the vector result as output or save it as a file. The exported data is in the form of an array of vector arrays of faces. When selecting save as file, Path and Method are activated. We recommend saving as a text file.
Path
- This is where you enter the desired root, including the file name and extension, when saving a text file. If you do not specify an absolute path, it will be determined based on the execution space.
Method
- When saving a file, you can decide whether to overwrite or add. Create a file if it does not already exist.
Array of Arrays
- Vectors for faces are output in the form of an array to msg.payload.
Text File
- Save vector data in file format. Depending on the method, overwrite or add to the input path.
Here are some example flows face vectorization.
[
{
"id": "e64532d90f9d901d",
"type": "tab",
"label": "Example",
"disabled": false,
"info": "",
"env": []
},
{
"id": "41638e97512ab913",
"type": "good-face-vectorization",
"z": "e64532d90f9d901d",
"name": "",
"inputType": "0",
"returnType": "0",
"method": "0",
"path": "",
"x": 450,
"y": 40,
"wires": [
[
"754b7ba59d20b8b7"
]
]
},
{
"id": "361b506c1fd58e5e",
"type": "file in",
"z": "e64532d90f9d901d",
"name": "image input",
"filename": "",
"filenameType": "str",
"format": "",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 250,
"y": 40,
"wires": [
[
"41638e97512ab913"
]
]
},
{
"id": "754b7ba59d20b8b7",
"type": "debug",
"z": "e64532d90f9d901d",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 640,
"y": 40,
"wires": []
},
{
"id": "559e69aa7caf19ed",
"type": "inject",
"z": "e64532d90f9d901d",
"name": "start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 90,
"y": 40,
"wires": [
[
"361b506c1fd58e5e"
]
]
}
]
Use GitHub Issues to ask questions or to discuss new features.
GOOD-I-DEER in SSAFY(Samsung Software Academy for Youth) 9th
Copyright Samsung Automation Studio Team under the Apache 2.0 license
- Node-RED Creating Nodes
- SamsungAutomationStudio Github Repository
- FaceNet: A Unified Embedding for Face Recognition and Clustering
- VGGFace2
- inception_resnet_v1