Hello
I'm using the node-red-contrib-tfjs-coco-ssd node for object detection. The msg.payload is an array with objects and other arrays inside and looks like this:
[
{"bbox":[97.20104217529297,303.84454250335693,736.6763687133789,605.1833009719849],
"class":"car",
"score":0.972379744052887},
{"bbox":[1258.2083129882812,170.14039278030396,906.0614013671875,560.3293204307556],
"class":"car",
"score":0.952843189239502},
{"bbox":[737.4549865722656,286.9120788574219,512.7299499511719,357.6991367340088],
"class":"person",
"score":0.9017499685287476},
{"bbox":[1959.5710754394531,273.81558179855347,494.97406005859375,259.57021951675415],
"class":"person",
"score":0.8203449249267578},
{"bbox":[2402.5328063964844,280.58627128601074,150.6939697265625,158.15484523773193],
"class":"car",
"score":0.6040482521057129}
]
For further operations I would like to pass (with the node UPD OUT) a msg.payload as a STRING which only delivers the information how often a CAR and how often a PERSON was counted.
For example: [ { "car" : 3, "person" : 2 } ]
I've tried a lot with SPLIT/CHANGE /JOIN notes, but without success so far. Therefore I hope one of you can give me a help.
Thank you, Best regards