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

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 .
 
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:
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
 
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:
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.
 
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
 
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?
 
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.
 
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:
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)
 
  • Like
Reactions: seth-feinberg
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.
 
Here is the API: username: password@IPADDRESS: PORT#/cgi-bin/coaxialControlIO.cgi?action=control&channel=1&info[0].Type=1&info[0].IO=0

Type=1 is for the audio
Type=2 and IO=1 is for the light

No space after the : but if I do not put a space then it shows like this here lol :P

Depending on the camera, you may have to play with the 0 and 1 to figure out which one is which. But the above is the general URL
 
  • Like
Reactions: spammenotinoz
I have an Unraid server running multiple DeepStackAI docker containers (one GPU and one CPU), when I add both of these URLs under "AI Servers" how will they be used?

1) in parallel each time an image is processed it will be processed by both?
or:
2) if server #1 is busy it would then take the next image and process it on server #2?

Thank you!
P
 
Every once in awhile AItools, 2.0.37.7608, log gives me a 'camera unreachable 503 error'

Sometimes it happens while the camera is already triggered, which make sense.

But It has been happening when that camera is not triggered.

I check and try the URL and it works fine and the cameras all work fine most of the time.

I tried manually triggering all four cameras using the URL's and they all triggered just fine

Any ideas to troubleshoot?
 
I have an Unraid server running multiple DeepStackAI docker containers (one GPU and one CPU), when I add both of these URLs under "AI Servers" how will they be used?

1) in parallel each time an image is processed it will be processed by both?
or:
2) if server #1 is busy it would then take the next image and process it on server #2?

Thank you!
P


2