[tool] [tutorial] Free AI Person Detection for Blue Iris

Joined
Jul 12, 2017
Messages
12
Reaction score
0
Has anyone experienced the issue that the Alerts pane get filled up with multiple triggers from AI? I have set to send an HD image from Blue Iris every 1 second. Let's say the 1 event triggers 4 images in 4 seconds and AI marks all 4 images as legitimate, I will see all 4 alerts in Blue Iris when the main camera is triggered.

1615502016078.png

Any help is appreciated. Thank you!
 

spammenotinoz

Pulling my weight
Joined
Apr 4, 2019
Messages
208
Reaction score
128
Location
Sydney
Okay, so I have found a new use for AI Tool
a) Flag my BI Clips (I constant record), to quickly review footage
b) Send Telegram Alerts when people are detected when I am away
c) On Object detection, trigger a clone of my overview CAM (this creates a daily view) for my playback
The new use which I am still tinkering with is as follows;
When AI Tool detects a Car on my LPR cam (had to zoom out a little, but not much :(, it triggers a clone in BI configured with plate Recognizer "Free"
Actually seems to be working well, the AI Tool dynamic masking keeps the calls down low so I can stay under the free limit. Without this parked cars were sending me over the limit quickly.

I did try to fire the LPR cam only when the overview cam detected a car (worked fine, but found I was making too many called to "Plate Recognizer"
Probably a more efficient way, but just having a tinker with LPR.

Using an older HDW5831R-ZE Pro Series configured in 4MP mode. This camera served me well for many years, but just can't compete with newer low light models.
Daytime it's brilliant. It is varifocus and as the plates are quite reflective, I find once dialed in it's actually quite decent for LPR.

Until I played with LPR I didn't realise how many cars either don't have plates, or are un-readable (covered with dirt, blocked or missing letters).
When you think its dialed in at night you get the cars with the ultra-bright LED trick strips. It's not like I live in the country.
 
Last edited:

spammenotinoz

Pulling my weight
Joined
Apr 4, 2019
Messages
208
Reaction score
128
Location
Sydney
Has anyone experienced the issue that the Alerts pane get filled up with multiple triggers from AI? I have set to send an HD image from Blue Iris every 1 second. Let's say the 1 event triggers 4 images in 4 seconds and AI marks all 4 images as legitimate, I will see all 4 alerts in Blue Iris when the main camera is triggered.

View attachment 84462

Any help is appreciated. Thank you!
Has been a while since I set it up, I recommend;
a) Using the dynamic mask feature
b) Having a cooldown of at least 10sec under AI Tool -> Camera -> Actions (10s could be the default, perhaps you changed it)
Although I don't recall it being directly related, in BI -> Camera -> Triggers set a reasonable break-time such as 5-10seconds, not too small either.
 
Joined
Jul 12, 2017
Messages
12
Reaction score
0
Has been a while since I set it up, I recommend;
a) Using the dynamic mask feature
b) Having a cooldown of at least 10sec under AI Tool -> Camera -> Actions (10s could be the default, perhaps you changed it)
Although I don't recall it being directly related, in BI -> Camera -> Triggers set a reasonable break-time such as 5-10seconds, not too small either.
Thank you, I have implemented the changes you suggested and it seems to be working well for now!
 
Joined
Jul 12, 2017
Messages
12
Reaction score
0
I have finally got DeepStack installed on Docker on Windows using WSL2, running 2 instances at the moment. I have been seeing some crazy CPU usage when they are both being used, from 20% to all the way at 99% when DeepStack instances are working. Here is what I see in one of the instances:

1615582808265.png

This is what happens when both DeepStack instances are running at the same time. 70.4% usage.
1615582923051.png

Is this normal? Is it something I'm setting up incorrectly? Here is my machine's setup:

i7-7700K
16 GB RAM

Thanks in advance!
 

bohemian

n3wb
Joined
Apr 9, 2017
Messages
13
Reaction score
3
Okay, so I have found a new use for AI Tool
a) Flag my BI Clips (I constant record), to quickly review footage
b) Send Telegram Alerts when people are detected when I am away
c) On Object detection, trigger a clone of my overview CAM (this creates a daily view) for my playback
The new use which I am still tinkering with is as follows;
When AI Tool detects a Car on my LPR cam (had to zoom out a little, but not much :(, it triggers a clone in BI configured with plate Recognizer "Free"
Actually seems to be working well, the AI Tool dynamic masking keeps the calls down low so I can stay under the free limit. Without this parked cars were sending me over the limit quickly.

I did try to fire the LPR cam only when the overview cam detected a car (worked fine, but found I was making too many called to "Plate Recognizer"
Probably a more efficient way, but just having a tinker with LPR.

Using an older HDW5831R-ZE Pro Series configured in 4MP mode. This camera served me well for many years, but just can't compete with newer low light models.
Daytime it's brilliant. It is varifocus and as the plates are quite reflective, I find once dialed in it's actually quite decent for LPR.

Until I played with LPR I didn't realise how many cars either don't have plates, or are un-readable (covered with dirt, blocked or missing letters).
When you think its dialed in at night you get the cars with the ultra-bright LED trick strips. It's not like I live in the country.
Yeah, I am experimenting with something similar, but using Node Red running on Home Assistant to trigger (based on MQTT messages from AITool) and process the still images flagged as either "car" or "truck". That way I can really tune the number of API calls to LPR based on time between clips and overall confidence.

Still plugging away on this but I seem to be getting closer. Fun stuff!
 

jz3082

Young grasshopper
Joined
Dec 13, 2019
Messages
77
Reaction score
22
Location
Oklahoma, US
I have finally got DeepStack installed on Docker on Windows using WSL2, running 2 instances at the moment. I have been seeing some crazy CPU usage when they are both being used, from 20% to all the way at 99% when DeepStack instances are working. Here is what I see in one of the instances:

View attachment 84503

This is what happens when both DeepStack instances are running at the same time. 70.4% usage.
View attachment 84504

Is this normal? Is it something I'm setting up incorrectly? Here is my machine's setup:

i7-7700K
16 GB RAM

Thanks in advance!
This was my first WSL2 and Docker setup so I do not know if there is something not configured right or not on your end. I would stop the DeepStack instances and see what the CPU usage drops to. That way you know if it is Docker or DeepStack. If Docker is still high you can probably find some good resources to troubleshoot Docker high CPU usage. It looks odd that Docker is reporting 241% CPU usage.

I have an I7-6700 with 32 GB of ram. I have 5 instances of DeepStack running and at idle I am using a lot less CPU than you show. Docker reports less CPU usage than Vmmem shows in the Task Manager.

1615586656392.png

Below is what it looks like when I trigger 4 cameras 2 times each. That would be 16 images generated in 8 seconds. BI image quality is set to 50% in the daytime. Image size is currently about 512KB for each of the 16 images.

1615586887507.png

This shows AiTool is configure to use all 5 instances. The last used times are 6 seconds apart.

1615587074606.png

Below are my processing times using the CPU version of DeepStack in High mode.

1615587238045.png
 

chris.h

n3wb
Joined
Mar 2, 2021
Messages
7
Reaction score
1
Location
australia
Hi All, Seem to be having a wierd bug, or maybe its by design..

I want to alert to cars coming down the alley so i want to detect cars on that camera, but not in my carport.

i just cant seem to customise the detections per camera?? if i disable cars on one camera it says updated one camera.. but all of them change. and same in reverse.. enabling it enables it on all
AItool version 2.0.846.7731 built 3/3/21
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
432
Reaction score
117
Location
UK
Hi All, Seem to be having a wierd bug, or maybe its by design..

I want to alert to cars coming down the alley so i want to detect cars on that camera, but not in my carport.

i just cant seem to customise the detections per camera?? if i disable cars on one camera it says updated one camera.. but all of them change. and same in reverse.. enabling it enables it on all
AItool version 2.0.846.7731 built 3/3/21
Their seems to be a bug that has crept in that I have been dicussing with VorlonCD.
 

chris.h

n3wb
Joined
Mar 2, 2021
Messages
7
Reaction score
1
Location
australia
Yep, thats better!

Next question... How do i use dynamic masking? I want to ignore the car parked in my garage, except when a person has been seen in the last 5 minutes. whats happening at the moment is I walk into the garage and hop in my car, this triggers the camera to record but once I'm in the car there are no more triggers so I dont get the video of the car pulling out
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
432
Reaction score
117
Location
UK
Yep, thats better!

Next question... How do i use dynamic masking? I want to ignore the car parked in my garage, except when a person has been seen in the last 5 minutes. whats happening at the moment is I walk into the garage and hop in my car, this triggers the camera to record but once I'm in the car there are no more triggers so I dont get the video of the car pulling out
I would have thought the dynamic mask will mask out the car when stationary ( after a couple of hits or whatever you set) but when it moves it will record as its now outside the mask. I don't think the person and 5 minutes should be involved.
 

105437

BIT Beta Team
Joined
Jun 8, 2015
Messages
1,088
Reaction score
255
Do you just add another docker container running Deepstack locally on the same machine as Blue Iris? Do you mind listing out the steps briefly so I can get an idea of how to set it up properly for load balancing? Thanks!

I'm running on i7-7700K if that helps.
I'm running the CPU version of Deepstack on my Windows 10 PC with BI. I just enter all three locations in AITool and it load balances automatically... probably just round-robin and not actually looking at resource indicators.
 
Joined
Apr 14, 2020
Messages
5
Reaction score
3
Location
Illinois, USA
I think I’ve finally gotten AI Tool to process and trigger consistently and within a reasonable time. However I’m still having issues with MQTT.

So my MQTT is on a different server (Synology NAS) than Blue Iris and AI Tool (Windows Server). My MQTT topics are received by NodeRed and Home Assistant.

  • MQTT test button from setup works
  • AI Tool triggers the cameras to record with motion
  • MQTT test button from individual camera works

    An AI Tool trigger from motion DOES NOT trigger the MQTT payload, or push notifications for that matter
I don’t know what I’m missing or where the disconnect is coming from. Anyone have any ideas?

UPDATE: I set up an MQTT for some other cameras I have which are not running on AI Tool. The MQTT triggered as it should. So since it is not a connection between Blue Iris and MQTT it must be related to AI Tool. I am currently using AI Tool 1.64 because 1.65 was causing errors writing to history.csv.

@GentlePumpkin do you have any ideas why AI Tool would trigger a recording in BI but somehow prevent alerts using MQTT or push notificaiton?
I am experiencing this at the moment... I know it's an older post.

Clicking "test" works perfectly, but when the time comes for a real detection, nothing is sent out over MQTT... not sure what I'm doing wrong.
 

jz3082

Young grasshopper
Joined
Dec 13, 2019
Messages
77
Reaction score
22
Location
Oklahoma, US
I am experiencing this at the moment... I know it's an older post.

Clicking "test" works perfectly, but when the time comes for a real detection, nothing is sent out over MQTT... not sure what I'm doing wrong.
I have been using AiTool since 2.0.720 and MQTTT messages have worked for me with no issues. Make sure that on the Camera Actions tab you configure the triggering objects for MQTT and set the object priority and threshold the same or lower than under Relevant Objects. For example on the Cameras tab under Relevant Objects if you have the minimum threshold for person set at 40% but on the MQTT Triggering Objects the threshold of a person is say 60% you have a gap between 40% and 60% where you would not get any MQTT topics and payloads for person. Make sure your logging level is set to debug. You might disable Dynamic Masking for this test. A difference in the log for the Test and an image that triggered an alert will give you a place to start.
 
Joined
Apr 14, 2020
Messages
5
Reaction score
3
Location
Illinois, USA
I have been using AiTool since 2.0.720 and MQTTT messages have worked for me with no issues. Make sure that on the Camera Actions tab you configure the triggering objects for MQTT and set the object priority and threshold the same or lower than under Relevant Objects. For example on the Cameras tab under Relevant Objects if you have the minimum threshold for person set at 40% but on the MQTT Triggering Objects the threshold of a person is say 60% you have a gap between 40% and 60% where you would not get any MQTT topics and payloads for person. Make sure your logging level is set to debug. You might disable Dynamic Masking for this test. A difference in the log for the Test and an image that triggered an alert will give you a place to start.
It seems like maybe it has to do with the fact that I tried to change the MQTT topic (just out of the irrational desire to standardize some syntax across everything I do).

Reverting things back to ai/[Camera]/motion seems to have fixed this problem. Still strange that it worked when I was hitting "Test"... but there must be something internal somewhere on the "real" notification. It also was still executing the trigger URL and everything on the BlueIris side was working fine... just nothing going to the MQTT broker.

Anyway, it appears to be working now with the default MQTT topic! Now I can have a binary sensor in Home Assistant specifically for vehicle and person in the driveway.

Thanks for the input.
 

jz3082

Young grasshopper
Joined
Dec 13, 2019
Messages
77
Reaction score
22
Location
Oklahoma, US
It seems like maybe it has to do with the fact that I tried to change the MQTT topic (just out of the irrational desire to standardize some syntax across everything I do).

Reverting things back to ai/[Camera]/motion seems to have fixed this problem. Still strange that it worked when I was hitting "Test"... but there must be something internal somewhere on the "real" notification. It also was still executing the trigger URL and everything on the BlueIris side was working fine... just nothing going to the MQTT broker.

Anyway, it appears to be working now with the default MQTT topic! Now I can have a binary sensor in Home Assistant specifically for vehicle and person in the driveway.

Thanks for the input.
I am triggering BI via HomeSeer. For example if the camera detects activity in the yard in the daytime when we are home BI is not triggered unless a car has been identified within the last few minutes (car pulling into the driveway and someone getting out) then I trigger the doorbell chime. HomeSeer triggers BI whenever a car pulls into the yard but I am not interested in recording the family in the yard. Another example is that I only want to record animals in the yard when we are not home or at night when we are sleeping. You can really cut down on the number of alerts that BI generates if you trigger BI with additional conditions in HA.
 
Joined
Apr 14, 2020
Messages
5
Reaction score
3
Location
Illinois, USA
I am triggering BI via HomeSeer. For example if the camera detects activity in the yard in the daytime when we are home BI is not triggered unless a car has been identified within the last few minutes (car pulling into the driveway and someone getting out) then I trigger the doorbell chime. HomeSeer triggers BI whenever a car pulls into the yard but I am not interested in recording the family in the yard. Another example is that I only want to record animals in the yard when we are not home or at night when we are sleeping. You can really cut down on the number of alerts that BI generates if you trigger BI with additional conditions in HA.
Yeah that's basically what I'm up to here too!

As far as notifications on mobile, AI Tool was an absolute game-changer. I don't even remember the last time we got notifications on our phones that weren't wanted. Prior to AI Tool, I was constantly battling the detection settings in BI between not high enough (missing obvious alerts) and being too sensitive (getting notified for every gust of wind and cloud change).

With AI Tool flagging alerts, and notifications only going out for flagged alerts, the problem is completely solved.

However, the Blue Iris integration for Home Assistant doesn't give me the specific detection from AI Tools that caused the trigger, and I wanted to play different sounds on the indoor door chime when a vehicle enters the driveway, or a person is approaching the doorbell. (Just a subtle notification sound in case we don't have phones in-hand)

So, being able to have AI Tool call out directly via MQTT is what did the trick there.
 
Top