This integration is getting very complex and reimplements a lot of functionality in https://github.com/robmarkcole/HASS-Deepstack-object I am thinking now that the scope of the object detection integrations such as this and deepstack-object should be limited to performing object detection, saving basic snapshots and firing events. Then a separate integration or tool/addon should consume the events and apply all the filtering rules on ROI, confidence, and object class. This tool would have a dedicated visual UI for drawing ROI, selecting targets from drop down list, etc. For flexibility MQTT could be used so this tool is not necessarily tied to HA. Probably an automation can be used to forward object_detected events to an MQTT topic. Perhaps https://github.com/blakeblackshear/frigate can be used?
This integration is getting very complex and reimplements a lot of functionality in https://github.com/robmarkcole/HASS-Deepstack-object I am thinking now that the scope of the object detection integrations such as this and deepstack-object should be limited to performing object detection, saving basic snapshots and firing events. Then a separate integration or tool/addon should consume the events and apply all the filtering rules on ROI, confidence, and object class. This tool would have a dedicated visual UI for drawing ROI, selecting targets from drop down list, etc. For flexibility MQTT could be used so this tool is not necessarily tied to HA. Probably an automation can be used to forward
object_detected
events to an MQTT topic. Perhaps https://github.com/blakeblackshear/frigate can be used?