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

goldandy

n3wb
Joined
Feb 26, 2019
Messages
1
Reaction score
0
Location
Moscow Russia
Hi there,
I just configured AI integration with BI and it works great, especially with Telegram notifications.

The only one issue I don't know how to deploy:
I have one camera which I don't want to have Telegram notification while I'm at home. How I can configure to notify me by Telegram only while not at home?
There are profiles in BI which I can use for that, so I can configure different alerts (push/email), but there is nothing same for Telegram notifications from aitools.

Any suggestion?

I tried to use this fork:
but I cant use Alert images from aitools in that case

Thanks!
 

Brendon06

Young grasshopper
Joined
Jan 20, 2019
Messages
33
Reaction score
16
Location
New Zealand
Hi there,
I just configured AI integration with BI and it works great, especially with Telegram notifications.

The only one issue I don't know how to deploy:
I have one camera which I don't want to have Telegram notification while I'm at home. How I can configure to notify me by Telegram only while not at home?
There are profiles in BI which I can use for that, so I can configure different alerts (push/email), but there is nothing same for Telegram notifications from aitools.

Any suggestion?

I tried to use this fork:
but I cant use Alert images from aitools in that case

Thanks!
You could set a profile in BlueIris so when you are home it doesn't capture jpeg or alert pic on that particular camera that way ai tool won't process anything
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
Hi there,
I just configured AI integration with BI and it works great, especially with Telegram notifications.

The only one issue I don't know how to deploy:
I have one camera which I don't want to have Telegram notification while I'm at home. How I can configure to notify me by Telegram only while not at home?
There are profiles in BI which I can use for that, so I can configure different alerts (push/email), but there is nothing same for Telegram notifications from aitools.

Any suggestion?
Actually, this was working fine for myself with the original, but doesn't work for me with the Vorlon version. (Will re-test with the beta).
When it was working, I had a different recording path in BI when I was away, and in AI Tools created duplicate camera (Different Name) set to look at the AWAY path with the Telegram option enabled.
Do note that for AI Tool to still Trigger BI, you can't use the [CAM] variable, you need to manually put the correct camera name in he URL.

Anyway what is happening in the Vorlon version, is it only processed against the first path, seems to be completely confused and never analyses a single image in the AWAY path.
Will re-test with the Beta and Advise,
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
Actually, this was working fine for myself with the original, but doesn't work for me with the Vorlon version. (Will re-test with the beta).
When it was working, I had a different recording path in BI when I was away, and in AI Tools created duplicate camera (Different Name) set to look at the AWAY path with the Telegram option enabled.
Do note that for AI Tool to still Trigger BI, you can't use the [CAM] variable, you need to manually put the correct camera name in he URL.

Anyway what is happening in the Vorlon version, is it only processed against the first path, seems to be completely confused and never analyses a single image in the AWAY path.
Will re-test with the Beta and Advise,
I re-tested with the Vorlon Beta version, and it still didn't work. (AI tool detects the images in the away path, but always processes them against the original CAM name)???

"This isn't recommended and will lead to other issues", but I even tried changing the Recording Name in BI settings to (ie: Adding an "A" for away and "H" for home in the Name and updating the Paths in AI Tool to commence with
&CAM.A.%Y%m%d_%H%M%S%t
&CAM.H.%Y%m%d_%H%M%S%t
BI functioned correctly,

After updating the paths AI Tool and restarting, but alas, AI Tool detects the images in the new path, but again processed against the old camera. (ie: When away, AI Tool logs show it processes the correct AWAY file names, but processes against the ORIGINAL cam name.

Cloning cameras with completely different names would also work. It's probably due to the way the Vorlon version stores the config in a database, can't have different cameras starting with the Same Name, where this isn't a problem for Gentle Pumpkin's Version.

Even tried deleting the original CAM. I am thinking perhaps if I blow away the entire AI_Tool setup, and add the Cams with the .A and .H suffixes that may work, as creating without these (using defaults) may have done something funny in the Database. Note: AT Tool Camera Name and BI Camera Names within AI Tool were tested with made up values to be sure there wasn't a conflict...:)
 

Sireone

Young grasshopper
Joined
Jul 29, 2016
Messages
32
Reaction score
5
This doesn't work 100% of the time (at least with SMS notifications). I was playing around with it, and the same camera would sometimes use the snapshot from AITOOL and others the one from BI.
I'm using BI 5.3.8.3

View attachment 79721
Yep, I noticed the same thing. Though, when I check the BI Alerts folder, all images there are AI Tool images with overlays. Seems that BI is not grabbing the Alert images at random times.
 
Joined
Jan 13, 2021
Messages
2
Reaction score
0
Location
Fl
I am recieving this error now. Does anyone know how to fix this?

17.01.2021, 19:29:54.618]: read config
[17.01.2021, 19:29:54.628]: add
[17.01.2021, 19:29:54.629]: SUCCESS: cam1 loaded.
[17.01.2021, 19:29:54.651]: Cleaning cameras/history.csv if neccessary...
[17.01.2021, 19:29:54.654]: Loading history list from cameras/history.csv ...
[17.01.2021, 19:29:54.669]: APP START complete.
[17.01.2021, 19:30:58.606]:
[17.01.2021, 19:30:58.607]: Starting analysis of C:\BlueIris\aii\Cam1.20210117_193058539.jpg
[17.01.2021, 19:30:58.622]: (1/6) Uploading image to DeepQuestAI Server
[17.01.2021, 19:31:18.270]: Loading time line from cameras/history.csv ...
[17.01.2021, 19:31:18.273]: Loading confidence-frequency chart from cameras/history.csv ...
[17.01.2021, 19:31:24.197]: Loading time line from cameras/history.csv ...
[17.01.2021, 19:31:24.199]: Loading confidence-frequency chart from cameras/history.csv ...
[17.01.2021, 19:32:38.660]: System.Threading.Tasks.TaskCanceledException | A task was canceled. (code: -2146233029 )
[17.01.2021, 19:32:38.661]: ERROR: Processing the following image 'C:\BlueIris\aii\Cam1.20210117_193058539.jpg' failed. Can't reach DeepQuestAI Server at .
[17.01.2021, 19:32:38.663]:
[17.01.2021, 19:32:38.663]: Starting analysis of C:\BlueIris\aii\Cam1.20210117_193101539.jpg
[17.01.2021, 19:32:38.664]: (1/6) Uploading image to DeepQuestAI Server
[17.01.2021, 19:34:18.668]: System.Threading.Tasks.TaskCanceledException | A task was canceled. (code: -2146233029 )
[17.01.2021, 19:34:18.669]: ERROR: Processing the following image 'C:\BlueIris\aii\Cam1.20210117_193101539.jpg' failed. Can't reach DeepQuestAI Server at .
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
You could set a profile in BlueIris so when you are home it doesn't capture jpeg or alert pic on that particular camera that way ai tool won't process anything
Okay managed to get this to work, but it is a bit tricky.

So in Blue Iris I modified the JPEG path as follows;
a) Added an extra digit after &CAM to distinguish which profile is in-use, eg: A for AWAY, and H for HOME.
b) Added .&CAM at the end as BI requires the file to start with &CAM. or end with .&CAM or it won't apply the settings.
Note: If you add a digit after the CAM., in the beta testing it was causing issues.
eg; My JPEG snapshot name is "&CAM.H%Y%m%d_%H%M%S%t" for my Actove (HOME) profile and and &CAM.A%Y%m%d_%H%M%S%t when I am away.
With this, no need to modify the path, both profiles can use the same BI Folder, no issue as the FileNames are different.

If your BI Camera is "DriveLow", in AI Tools, I create two Cameras called DriveLowA and DriveLowB.
Do not create a camera called "DriveLow" or AI Tools got confused. Even if the Starts with is unique and different.

Then I set the AI Tool Camera Name, BI Camera Name and Input File Begins With "DriveLowA" and "DriveLowB" respectively.
Then configure each as required. Custom mask can be DriveLow on both to share the same mask file.
On the trigger command, I replace the [CAM] with the Real BI Camera Name, eg: DriveLow. With more testing could find that both cams could use DriveLow as the BlueIris camera name, but this seems to be a new variable and wasn't sure exactly where\how it is used.

This allows myself to have Telegram Alerts only when Away, while still having AI Tools flag the clips when home. So it's not the most elegant but works.

You can also use the &PROFILE variable in BI for it to use the profile number. That can be a cleaner way if your cams are set to copy profiles\settings ect from a master.
 
Last edited:

astroshare

Getting the hang of it
Joined
Dec 18, 2020
Messages
76
Reaction score
41
Location
Florida Panhandle
Okay managed to get this to work, but it is a bit tricky.

So in Blue Iris I modified the JPEG path as follows;
a) Added an extra digit after &CAM to distinguish which profile is in-use, eg: A for AWAY, and H for HOME.
b) Added .&CAM at the end as BI requires the file to start with &CAM. or end with .&CAM or it won't apply the settings.
Note: If you add a digit after the CAM., in the beta testing it was causing issues.
eg; My JPEG snapshot name is "&CAM.H%Y%m%d_%H%M%S%t" for my Actove (HOME) profile and and &CAM.A%Y%m%d_%H%M%S%t when I am away.
With this, no need to modify the path, both profiles can use the same BI Folder, no issue as the FileNames are different.

If your BI Camera is "DriveLow", in AI Tools, I create two Cameras called DriveLowA and DriveLowB.
Do not create a camera called "DriveLow" or AI Tools got confused. Even if the Starts with is unique and different.

Then I set the AI Tool Camera Name, BI Camera Name and Input File Begins With "DriveLowA" and "DriveLowB" respectively.
Then configure each as required. Custom mask can be DriveLow on both to share the same mask file.
On the trigger command, I replace the [CAM] with the Real BI Camera Name, eg: DriveLow. With more testing could find that both cams could use DriveLow as the BlueIris camera name, but this seems to be a new variable and wasn't sure exactly where\how it is used.

This allows myself to have Telegram Alerts only when Away, while still having AI Tools flag the clips when home. So it's not the most elegant but works.

You can also use the &PROFILE variable in BI for it to use the profile number. That can be a cleaner way if your cams are set to copy profiles\settings ect from a master.
Great write up, however, I cant get AITOOL to match the .jpeg to a camera. Here's some screenshots.

Jpeg config:
Screen Shot 2021-01-17 at 10.32.56 PM.png

AItool Camera config:
Screen Shot 2021-01-17 at 10.33.16 PM.png

Error on AITOOL
Screen Shot 2021-01-17 at 10.35.59 PM.png
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
Great write up, however, I cant get AITOOL to match the .jpeg to a camera. Here's some screenshots.

Jpeg config:
View attachment 79848

AItool Camera config:
View attachment 79847

Error on AITOOL
View attachment 79846
Cam name needs to have a character added before the first ".", see my example", I noted in BLUE that for my home profile I added the H and the .&CAM at the end so the new string is;
&CAMH.%Y%m%d_%H%M%S%t.&CAM

The only reason I add ".&CAM" at the end is to allow Blue Iris to save the settings, as I noted above if the character is after the "." it won't be recognised by AI Tool.

1610950256229.png1610950653319.png

Here are the settings I am using in the AI Tool (Noting for the same camera I have another Camera called DriveLowA for when away.
1610951087292.png
1610951108302.png


I have no doubt, that someone smarter will find a more efficient way, but it is working.
 
Last edited:

minigranis

n3wb
Joined
Feb 17, 2018
Messages
6
Reaction score
3
I have Home assistant doing my precence detection (ie home or away) and Home assistant turns the entire motion detection in BI on or off with MQTT. Camera is always recording so I can still review the recorded material if I need. But ofcourse that means setting up Home Assistant as well.
 

motocross1

n3wb
Joined
Jan 14, 2020
Messages
2
Reaction score
0
hi im using your ai tool the newest one however the ai history is not Updating ? is like stuck ? however the processing of new imagines is fine ? running on windows sever 2019
 

motocross1

n3wb
Joined
Jan 14, 2020
Messages
2
Reaction score
0
Sorry to message. i got the newest ai tool and the History dont seem to be updating its stuck on last night ? but is procressing fine on new imagines due to they in the Folder?
 

astroshare

Getting the hang of it
Joined
Dec 18, 2020
Messages
76
Reaction score
41
Location
Florida Panhandle
Cam name needs to have a character added before the first ".", see my example", I noted in BLUE that for my home profile I added the H and the .&CAM at the end so the new string is;
&CAMH.%Y%m%d_%H%M%S%t.&CAM

The only reason I add ".&CAM" at the end is to allow Blue Iris to save the settings, as I noted above if the character is after the "." it won't be recognised by AI Tool.

View attachment 79850View attachment 79854

Here are the settings I am using in the AI Tool (Noting for the same camera I have another Camera called DriveLowA for when away.
View attachment 79856
View attachment 79857


I have no doubt, that someone smarter will find a more efficient way, but it is working.
Thanks for the clarification. I got it working now. Question, my AITOOL looks much different than yours. Which version is that? I'm using the VORLONCD fork version 2.0.37.7608 from 10/30.
 
Joined
Dec 24, 2020
Messages
2
Reaction score
3
Location
Tucson, Arizona
Im having troubles with the new version "AITool-VorlonCD-v2.0.526.zip". It was working fine late December with a much older version of AITool. I've read a bunch of pages from the forum and I know others have seen a similar problem with History not working but 154 pages is taking me forever to get through. Running Blue-Iris 5.3.2.11. Im running DQ on Docker in a Windows 10 computer and Blue IRIS and AITool on a windows 7 computer. DQ had locked up and I decided to update AITool. Problem: History for all cameras or individual cameras only shows "Empty". History settings and Filters are all checked but it still shows "Empty". On the bottom on the window, it shows 20 history items (1/MIN)|0 Errors | 16 Alerts | |1 Irrelevant|0 false|0 Skipped(0 new)|18 ImgProcessed 91/MIN)|0 ImgQueued(Masx=1,Avg=1)|0 Actions Queued Idle. I tried deleting the folder completely and reinstalling but it pulled my original settings, presumably from the registry. It seems to be processing and Triggering fine, I just dont know how to fix the history. Can anybody help?
 
Last edited:

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
I have Home assistant doing my precence detection (ie home or away) and Home assistant turns the entire motion detection in BI on or off with MQTT. Camera is always recording so I can still review the recorded material if I need. But ofcourse that means setting up Home Assistant as well.
Why not both!!
Big Fan of Home Assistant, but if you use the BI App, it's more efficient for BI to perform the presence detection, but having Home Assistant do the presence detection ensures alignment across your use cases so I get why you do it.

In this use case, we want AI\BI to Flag relevant (=DeepStack has detected relevant objects) alerts consistently when either home or away. This saves so much time reviewing footage, like you I also record 24x7.
The key here is to only send notifications when "Away" on AI Matched Relevant Alerts. ie: BI can easily send alerts when "AWAY" but not Relevant Alerts.
Yes, Home Assistant can be setup to receive all confirmed triggers and then send you the alert image if you are out, but that adds a fair bit of complexity and increases integration.
Im having troubles with the new version "AITool-VorlonCD-v2.0.526.zip". It was working fine late December with a much older version of AITool. I've read a bunch of pages from the forum and I know others have seen a similar problem with History not working but 154 pages isl taking me forever to get through. Running Blue-Iris 5.3.2.11. Im running DQ on Docker in a Windows 10 computer and Blue IRIS and AITool on a windows 7 computer. DQ had locked up and I decided to update AITool. Problem: History for all cameras or individual cameras only shows "Empty". History settings and Filters are all checked but it still shows "Empty". On the bottom on the window, it shows 20 history items (1/MIN)|0 Errors | 16 Alerts | |1 Irrelevant|0 false|0 Skipped(0 new)|18 ImgProcessed 91/MIN)|0 ImgQueued(Masx=1,Avg=1)|0 Actions Queued Idle. I tried deleting the folder completely and reinstalling but it pulled my original settings, presumably from the registry. It seems to be processing and Triggering fine, I just dont know how to fix the history. Can anybody help?
You are right it stores the config somewhere as when I delete it it always pulls in the old config, but it does refresh my history whenever I delete it.
HKEY_USERS\{your SID}\SOFTWARE\AITool\AITool\2.0

Please don't be insulted, but check the filters on the history tab.

First Filter is set to "All Cameras"
History Filters "Have nothing selected"
History Settings "Ensure Everything is selected" (Note: I personally turn off "Automatic Refresh" otherwise looking through the history is impossible, keeps sending back to the oldest clip)
 
Joined
Dec 24, 2020
Messages
2
Reaction score
3
Location
Tucson, Arizona
Not insulted at all. In fact very pleased. I misunderstood the History filters and had them all selected. I un-selected them all and now I see history. Thanks so much. I really appreciate it. Im a little embarassed that I didn't play more with those filters before asking for help. But, again; I really appreciate your prompt and accurate reply.
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
Possibly a silly question, but does anyone known if it’s possible to turn the bright white led lights on/off via a url or script on those Dahua cams with the white leds?
I have the star light plus ones but not with the led as I don’t want the light on all the time.
Thinking now though it would be good to have AI tool turn on the LED’s only when an object is recognised.

I know I really just need to get motion activated lights, but this seems more DIY and I think Andy has a sale in Feb so preparing what cam to get next.
 
Top