Page 1 of 1

Detected object increases by 1

Posted: Mon Feb 03, 2020 4:54 pm
by Jamieeburgess
Hi there,
Seem to now have my system firing on all cylinders and reporting correctly :D
I have a feeling this may be possible with the changes you made to MQTT, but how do I track the number of objects detected. I was previously using Deepstack and the JSON parsed to MQTT would be:
{
“Person” : “2”,
“Car” : “1”
}
Right now I have an issue / challenge where there is a car on the drive. So any motion occurring fires an alert indicating a car is detected (but obviously not a new car).

Previously I just added a global value of car in Node-Red, and if that value increased by 1 then fire the alert. This was useful as if 2 cars were there, it only fired when the new ones arrived the first time. Not every time any motion caused and alarm.

Any thoughts?

Re: Detected object increases by 1

Posted: Mon Feb 03, 2020 5:17 pm
by asker
1. The JSON lists all the objects detected, so to count "car" you can simply total the # of "car" objects in the returned JSON
2. With regards to stationary objects not showing up again, check out "match_past_detections" in objectconfig.

Re: Detected object increases by 1

Posted: Mon Feb 03, 2020 10:57 pm
by Jamieeburgess
Epic, thank you! Appreciate you taking the time to respond!

Re: Detected object increases by 1

Posted: Tue Feb 04, 2020 8:40 pm
by Johnny1337
If I change "past_det_max_diff_area=5%" to 10% or set a lower value, what is happening then?

Re: Detected object increases by 1

Posted: Tue Feb 04, 2020 9:00 pm
by asker
Johnny1337 wrote: Tue Feb 04, 2020 8:40 pm If I change "past_det_max_diff_area=5%" to 10% or set a lower value, what is happening then?
Exactly what the text above it says. In other words, a stationery object doesn't always have the same "bounding box" around it. Let's assume you have a car standing still - if you ran object detection, you'd see the "bounding box" jiggle around. The change in box is due to different lighting conditions, other objects etc. So this setting gives you a "variation" control which basically says: If the new box is within X% distance of a previously detected box of the same category, assume its the same.