VorlonCD / bi-aidetection

Alarm system for Blue Iris based on Artificial Intelligence.
https://ipcamtalk.com/threads/tool-tutorial-free-ai-person-detection-for-blue-iris.37330/
GNU General Public License v2.0
203 stars 45 forks source link

Requesting a Separate Cool Down for Alerts #52

Open petermai6655 opened 4 years ago

petermai6655 commented 4 years ago

Hello. I've been using Blue Iris's sound alerts, but I wanted to try using sound alerts in AITool instead because it allows me to have different sounds for different objects. One thing that I've noticed is that if the object stays in the picture, AITool will continuously send sound alerts. With my setup on Blue Iris, it would alert only when first triggered. Then, it will stay triggered if the object is detected again within a set amount of time. It will only reset if AITool stops sending triggers to Blue Iris within a specified timeframe. I'm wondering if this could be implemented. It might work in a similar way to the dynamic masking, but only considering what object is detected and not position? Since Blue Iris depends on the triggers from AITool to continue recording, I can't use the normal cooldown for this case.

VorlonCD commented 4 years ago

In theory if you have dynamic masking enabled, the sound should only happen before the masking engine decides it is a duplicate object. The latest version could work better in that respect. If not, let me know when you are getting the extra alerts.

AITOOL-VORLONCD.zip

petermai6655 commented 4 years ago

Dynamic masking would block triggers from sending to Blue Iris right? I want AITool to still trigger Blue Iris so it knows to continue recording, but just reduce the number of alerts.

VorlonCD commented 4 years ago

Can you further define the logic? Would it be sufficient if each camera remembered the last detected OBJECTNAME and time, and only triggered the alerts (all alerts or only sound) when it has been over ALERTCOOLDOWNTIME since OBJECTNAME was last detected? That would be fairly easy as long as you didnt care 'where' the OBJECTNAME was detected.

petermai6655 commented 4 years ago

Right now, I'm running into the issue where I have 4 cameras in the front. So if a person is detected, AITool would repeat the sound multiple times when I walk by. It gets worse when I'm triggering a camera repeatedly. So if I'm gardening, for example, AITool would just continuously play the "there's someone in the front" sound that I have programmed. I don't have dynamic masking enabled in this case because I want Blue Iris to record the entire duration of the event. (I've set Blue Iris to record for 30 secs and continues recording if AITool is still triggering.)

Would be nice if there was a cooldown on sounds. An alert cooldown for all cameras would work to fix the problem. However, there's a small problem that comes to mind. If I was in the backyard, that'll trigger the cooldown timer, so if I have a delivery in my front yard, there wouldn't be an alert. However, to keep it simple, I would say that a sound cooldown on all cameras would work. If you implement a cooldown for the cameras individually, then it might get too complex because you might need to set up camera groups or something as well to fix the problem of a sound firing multiple times because of multiple cameras being in the same area.

VorlonCD commented 3 years ago

@petermai6655 - This one has a cooldown specific to sound actions. Let me how it works. AITool-VorlonCD-v2.0.700.zip