Skip to content

Instantly share code, notes, and snippets.

@rikukissa
Last active February 11, 2018 14:38
Show Gist options
  • Select an option

  • Save rikukissa/a97c30f2a21bea3b61f559412489c3ec to your computer and use it in GitHub Desktop.

Select an option

Save rikukissa/a97c30f2a21bea3b61f559412489c3ec to your computer and use it in GitHub Desktop.
Google face detection for Node-RED
[
{
"id": "d6e8fa47.38bfd8",
"type": "http request",
"z": "a2a19eb0.8be53",
"name": "Google Vision",
"method": "POST",
"ret": "obj",
"url":
"https://vision.googleapis.com/v1/images:annotate?key=AIAIAIAIAIAIAXYXYXYXYXYXYXYXYXY",
"tls": "",
"x": 500,
"y": 340,
"wires": [["bb0db296.7d3a"]]
},
{
"id": "21a0085b.d37e98",
"type": "function",
"z": "a2a19eb0.8be53",
"name": "Create request",
"func":
"msg.payload = {\n \"requests\": [\n {\n \"image\": {\n \"content\": msg.payload.toString('base64')\n },\n \"features\": [\n {\n \"maxResults\": 5,\n \"type\": \"FACE_DETECTION\"\n }\n ]\n }\n ]\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 320,
"y": 340,
"wires": [["d6e8fa47.38bfd8"]]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment