Hello All,
I am trying to get the webserver.ts file to detect multiple bounding boxes, or count how many there are. In this section of code, it says 1 bounding box with a threshold of 0.5:
let r = result.result;
if (r.bounding_boxes) {
// one box per label, minimum score 0.5
let bb: { width: number, height: number, x: number, y: number, value: number, label: string }[] = [];
for (let b of r.bounding_boxes.filter(x => x.value >= 0.5)) {
if (!bb.find(x => x.label === b.label)) {
bb.push(b);
}
How would we change it to detect multiple bounding boxes, I.E. multiple seats with people in them. For example, we know the total number of chairs in the room so we want twilio to say: “3 out of 24 chairs taken”. So when twilio see’s our class (seattaken bounding boxes) it can say 3 out of 24/4 out of 24/ 5 out of 24/ 23 out of 24 etc… Is this possible? We have it working with just one but are not sure how to do it with multiple ones, we’ve tried a few things but any guidance is appreciated. Thank you.