Deepstack image_processing in Home Assistant Node Red

Hi

If im running a Deepstack server on 10.10.0.150:85 and the image_processing is working fine.
How can I then in Node Red, get the info fore/from the processing image, so I can see if there is person on the image by “target: person” so I can send a notification by Telegram.

I know how to send message, by don’t know how I can get the info from the processing image on the deepstack server, and if “target: person” is more then 70% confidence from the image, then I will send a message, if under 70% or non persons are detected on the processing image, then do nothing.

How can I get these info from the deepstack server into Node Red?

Hi!
Sorry, that in Russian language.
Можете попробовать этот код. Частично этот код взят у автора одного из сообщений, которые находятся на данном форуме.

Code
[
    {
        "id": "f478a965.c5e7f8",
        "type": "function",
        "z": "80727dcf.73b28",
        "name": "Formdata",
        "func": "var fileData = msg.payload;\nmsg.headers = {'Content-Type': 'multipart/form-data'};\n\nmsg.payload = {\n 'image' : {\n 'value': fileData,\n 'options': {\n 'filename': 'snap1.jpg'\n }\n }\n};\n\nreturn msg;\n\n\n// Original:\n// var fileData = msg.payload;\n// msg.headers = {'Content-Type': 'multipart/form-data'};\n\n// msg.payload = {\n// 'image' : {\n// 'value': fileData,\n// 'options': {\n// 'filename': 'image.jpg'\n// }\n// }\n// };\n\n// return msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 420,
        "y": 120,
        "wires": [
            [
                "b920cedb.c9bf2"
            ]
        ]
    },
    {
        "id": "b920cedb.c9bf2",
        "type": "http request",
        "z": "80727dcf.73b28",
        "name": "",
        "method": "POST",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "http://localhost:83/v1/vision/detection",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "x": 570,
        "y": 120,
        "wires": [
            [
                "6057485a.bdbb78",
                "b85dd07e.debb5",
                "e92bb695.bd74b8"
            ]
        ]
    },
    {
        "id": "6057485a.bdbb78",
        "type": "function",
        "z": "80727dcf.73b28",
        "name": "Count Persons",
        "func": "var newMsg = {};\nvar count = 0\nvar confid = 0.95\nfor (var i = 0; i < msg.payload.predictions.length; i++) {\n if (msg.payload.predictions[i].label == \"person\" & msg.payload.predictions[i].confidence >= confid){\n count = count + 1;\n\n }\n\n}\nnewMsg.payload = \"No. of persons seen (with confidence  >\" + confid +\"):\" + count; \nreturn newMsg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 820,
        "y": 180,
        "wires": [
            [
                "4cc5ad2c.17c864"
            ]
        ]
    },
    {
        "id": "4cc5ad2c.17c864",
        "type": "debug",
        "z": "80727dcf.73b28",
        "name": "111",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1110,
        "y": 180,
        "wires": []
    },
    {
        "id": "3a5a822e.56877e",
        "type": "jimp-image",
        "z": "80727dcf.73b28",
        "name": "",
        "data": "/opt/iobroker/iobroker-data/snap/liudy-11.jpg",
        "dataType": "str",
        "ret": "buf",
        "parameter1": "",
        "parameter1Type": "msg",
        "parameter2": "",
        "parameter2Type": "msg",
        "parameter3": "",
        "parameter3Type": "msg",
        "parameter4": "",
        "parameter4Type": "msg",
        "parameter5": "",
        "parameter5Type": "msg",
        "parameter6": "",
        "parameter6Type": "msg",
        "parameter7": "",
        "parameter7Type": "msg",
        "parameter8": "",
        "parameter8Type": "msg",
        "sendProperty": "payload",
        "parameterCount": 0,
        "jimpFunction": "none",
        "selectedJimpFunction": {
            "name": "none",
            "fn": "none",
            "description": "Just loads the image.",
            "parameters": []
        },
        "x": 230,
        "y": 120,
        "wires": [
            [
                "f478a965.c5e7f8",
                "40ca33f0.83c8cc"
            ]
        ]
    },
    {
        "id": "8d72a3f8.4dfcc",
        "type": "inject",
        "z": "80727dcf.73b28",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 110,
        "y": 120,
        "wires": [
            [
                "3a5a822e.56877e"
            ]
        ]
    },
    {
        "id": "40ca33f0.83c8cc",
        "type": "image",
        "z": "80727dcf.73b28",
        "name": "",
        "width": "480",
        "data": "payload",
        "dataType": "msg",
        "thumbnail": false,
        "active": true,
        "pass": false,
        "outputs": 0,
        "x": 140,
        "y": 180,
        "wires": []
    },
    {
        "id": "49c27ff5.6aab8",
        "type": "debug",
        "z": "80727dcf.73b28",
        "name": "333",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1110,
        "y": 320,
        "wires": []
    },
    {
        "id": "b85dd07e.debb5",
        "type": "switch",
        "z": "80727dcf.73b28",
        "name": "if -> success: true",
        "property": "payload.success",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 530,
        "y": 180,
        "wires": [
            [
                "f0304c03.6f068",
                "af6f7bce.5617f8",
                "cf8565a4.1eef28",
                "76a4f20b.08063c"
            ]
        ]
    },
    {
        "id": "f0304c03.6f068",
        "type": "change",
        "z": "80727dcf.73b28",
        "name": "0.confidence",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload.predictions.0.confidence",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 810,
        "y": 300,
        "wires": [
            [
                "49c27ff5.6aab8"
            ]
        ]
    },
    {
        "id": "af6f7bce.5617f8",
        "type": "change",
        "z": "80727dcf.73b28",
        "name": "0.label",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload.predictions.0.label",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 790,
        "y": 260,
        "wires": [
            [
                "cb73efcc.9251"
            ]
        ]
    },
    {
        "id": "cb73efcc.9251",
        "type": "debug",
        "z": "80727dcf.73b28",
        "name": "222",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1110,
        "y": 260,
        "wires": []
    },
    {
        "id": "e92bb695.bd74b8",
        "type": "debug",
        "z": "80727dcf.73b28",
        "name": "000",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1110,
        "y": 120,
        "wires": []
    },
    {
        "id": "cf8565a4.1eef28",
        "type": "change",
        "z": "80727dcf.73b28",
        "name": "1.label",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload.predictions.1.label",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 790,
        "y": 440,
        "wires": [
            [
                "fda9d64f.6034d8"
            ]
        ]
    },
    {
        "id": "76a4f20b.08063c",
        "type": "change",
        "z": "80727dcf.73b28",
        "name": "1.confidence",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload.predictions.1.confidence",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 810,
        "y": 480,
        "wires": [
            [
                "d5fb950e.406468"
            ]
        ]
    },
    {
        "id": "fda9d64f.6034d8",
        "type": "debug",
        "z": "80727dcf.73b28",
        "name": "444",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1110,
        "y": 440,
        "wires": []
    },
    {
        "id": "d5fb950e.406468",
        "type": "debug",
        "z": "80727dcf.73b28",
        "name": "555",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1110,
        "y": 500,
        "wires": []
    }
]