I use Deepstack and a Google Coral to process images from my front gate cam. Works great but I see opportunities for improvent. I see that I’m now able to extract and test individual attributes and take actions based on those values (fantastic!). However, I’m pondering how this info might be used CORRECTLY.
When an object of interest (car/person/truck) is detected, the Deepstack object gives this output:
It’s actually much more but for clarity, lets focus on the ROI attribute. I check it in the automation to see if the Region of Interest (ROI) is greater than 1 which implies DeepStack found what I’m looking for, in this case, only 1 actual car with confidence > 85% out of 7 possibilities.
I’m now able to check this ROI attribute to see if it is greater than 1 and then do things:
However, as I look at the ROI attributes after the fact (like 10 minutes later), the attributes is still 1. so, how will the Automation ever trigger again if the next time the ROI is 1 again, in other words, if the result is STILL = 1?
Do I manually reset the attributes after each run of the automation? Do the attributes reset to zero with each call to the image_processing.frontgate_object_detection service and then get set after it has run?
I know this question is specific to DeepStack, but I’d like to understand the broader implications as it relates to using any object’s attributes. Things could get out of hand quickly…
Not sure if it helps massively but I use DOODS for image processing and sometimes that gets stuck on a number higher than 0 (1 most often than not), I assumed it was something I had done wrong but maybe it’s an issue between HA and the application perhaps? It usually resets itself after a little while but it’s definitely longer than it should be sometimes!
This is why I’m asking. I used to check the Deepstack object and it was 1 if an object was detected and 0 if not, but it wouldn’t reset to 0 sometimes for hours…
Obviously it’s not working as intended but perhaps you could have an automation that says if that attribute is higher than 0 for X amount of time then trigger an homeassistant.update_entity (or similar as I’m not sure if that’ll actually force it to update).