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

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
Again, i'm sorry for not responding to this, I really don't know how I screwed that up, this is VERY helpful!

So i must confess I don't fully understand the difference between Clone and Dual Stream. My amcrest cam allow for multiple streams, I (think) i send snapshots from the substream to AI Tool and then send a trigger url to start recording on the HD/Main stream. Just based on the name I would think this would be Dual Stream, but I added each camera twice in Blue Iris so i really don't know. Sorry for my confusion.

As for your second point, I thought I'm just triggering recording of the HD stream when an alert is recognized but looking in BlueIris ALL of my SD cameras have a red circle in the top right and none of the HD ones do (all same cameras just added twice) so i don't believe I'm experiencing the setup I was intending to, i'll need to go back over my setup.
OK Before you move forward you need to decide how you want your security camera's to operate.

1. The camera's record continously so you will never in theory miss anything and you wll have a full history for the period the files remain on disk. This method will rely on events being flagged. The disadvantage is that you may need significant storage space depending on how long you intend to keep your history.

2. Your camera's are setup to only record when an event happens. This has the advantage of taking considerably less storage space since it will only record to disk when an event is triggered by a camera. The disadvantage is that you will not have a full time elapsed record.

Config 1. Only needs one camera per security area being covered.

Config 2. Require's effectively two camera's, one to feed a trigger to aitool and the other for aitool to send a trigger. This only happens when the event is qualified by aitool when it will initiate a record for the desired period. To reduce cpu load this normally is accomplished by setting up BI to have a Master and a Clone feed for each camera.

Single or Dual stream has very little if any change required to the aitool configuration, it is specific to BI. It can assist aitool to capture high definition triggered images when a camera stream is monitoring in a lower resolution.
 

Shaad

n3wb
Joined
Nov 18, 2020
Messages
3
Reaction score
0
Location
France
Thanks. You answered my question ! :)
For the "Operating mode 2", you need "Solution 2", and so 2 different virtual cameras for each physical camera. Period.
 

joshwah

Pulling my weight
Joined
Apr 25, 2019
Messages
298
Reaction score
146
Location
australia
Anyone have any idea why i keep getting these errors? I have turned off 'queue actions' in settings and also each individual camera and still the same?

Skipping image because queue (101) is greater than '100'. (Adjust 'MaxImageQueueSize' in .JSON file if needed): C:\aialerts\frontdoor.20201119_223359298.jpg
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
Anyone have any idea why i keep getting these errors? I have turned off 'queue actions' in settings and also each individual camera and still the same?

Skipping image because queue (101) is greater than '100'. (Adjust 'MaxImageQueueSize' in .JSON file if needed): C:\aialerts\frontdoor.20201119_223359298.jpg
I have personally never experienced this issue, could it be that deepstack is unable to process the images fast enough and it simply runs out of alloted buffer memory? What is the maximum number of events that you estimate are being processed per second?
 

whoami ™

Pulling my weight
Joined
Aug 4, 2019
Messages
230
Reaction score
224
Location
South Florida
Anyone have any idea why i keep getting these errors? I have turned off 'queue actions' in settings and also each individual camera and still the same?

Skipping image because queue (101) is greater than '100'. (Adjust 'MaxImageQueueSize' in .JSON file if needed): C:\aialerts\frontdoor.20201119_223359298.jpg
I was getting that error because ai tool couldnt access blue Iris. I had to add 127.0.0.1 to allowed IP's because I had a whitelist set in BI. I was able to figure it out because trigger url wasnt working from local host but was working on other machines I had whitelisted. I'm guessing your trigger url isnt working for whatever reason.
 
Last edited:

Shaad

n3wb
Joined
Nov 18, 2020
Messages
3
Reaction score
0
Location
France
I have 4K cameras. What is the general recommanded usage ?

First camera using only the low-resolution sub-stream for motion detection and sending low-res screenshots to AITool/Deepstack ?
Second camera using only the 4K mainstream for video recording on demand when triggered by AITool ?

Or it would be better to also use 4K stream for the first camera to get a far better stream resolution for the motion detection in BI and also on the screenshots analyzed by Deepstack ?


I will try both and see if I can identify any real difference in detection performance/GPU usage/...
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
I have 4K cameras. What is the general recommanded usage ?

First camera using only the low-resolution sub-stream for motion detection and sending low-res screenshots to AITool/Deepstack ?
Second camera using only the 4K mainstream for video recording on demand when triggered by AITool ?

Or it would be better to also use 4K stream for the first camera to get a far better stream resolution for the motion detection in BI and also on the screenshots analyzed by Deepstack ?


I will try both and see if I can identify any real difference in detection performance/GPU usage/...
When BI is configured correctly you do not need to choose because BI will automatically store a high res image when the camera is triggered even though it is monitoring a lower resolution stream.
 

GreyTheOld

Young grasshopper
Joined
Oct 26, 2017
Messages
40
Reaction score
6
I think I want to switch to constant record for a few of my cameras because I've had it historically and it's been useful. Is there any major reason to NOT do constant record? Is there a significant improvement in using substream record + main stream alert record? I don't have substream urls for all my cams but I guess I can figure them out.
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
I think I want to switch to constant record for a few of my cameras because I've had it historically and it's been useful. Is there any major reason to NOT do constant record? Is there a significant improvement in using substream record + main stream alert record? I don't have substream urls for all my cams but I guess I can figure them out.
Please see my post #2449 as I believe it addresses your question.

Bottom line if you have the storage space continuous has the advantage.
 

seth-feinberg

Young grasshopper
Joined
Aug 28, 2020
Messages
87
Reaction score
15
1. The camera's record continously so you will never in theory miss anything and you wll have a full history for the period the files remain on disk. This method will rely on events being flagged. The disadvantage is that you may need significant storage space depending on how long you intend to keep your history.

2. Your camera's are setup to only record when an event happens. This has the advantage of taking considerably less storage space since it will only record to disk when an event is triggered by a camera. The disadvantage is that you will not have a full time elapsed record.
Thanks so much for taking the time. I have a pc i bot just for blueiris, it has a 500gb ssd and a 6tb hdd. I also have a pretty massive unraid server I can offload to, so storage isn't the biggest issue in the world. But I have 16 (for now!) 4k cameras, so I probably still need to be economical. I guess this would lead me to the first method of operation, but maybe my real question is a BI configuration. Would the "flags" that AI Tool send back to BI allow me to ONLY save the 4k streams that a relevant event has been identified on? Because if this is the case, and I believe it is, I'm having a hard time understanding how this method needs significantly more storage than the 2nd method of operation. Aside from the storage of presently recorded 4k streams, it seems to me that AI Tool should pretty quickly be able to identify which clips i should store. If that's the case, seems like it should be the same storage requirement at that point....
 

GreyTheOld

Young grasshopper
Joined
Oct 26, 2017
Messages
40
Reaction score
6
Thanks Village Guy. That's what I thought the answer would be.
Can you answer one more question for me:
If I turn on "capture alert image" and "include jpegs", it fills up the alerts window with hundreds-to-thousands of stills because that's happening before AITool processes them, and the phone app shows a notification for each one. If I turn it OFF, the opposite happens, and it still records video great and they show up great in the webUI---but the app no longer shows me any "alerts", meaning I can't see any flagged videos in the app, only in the webui. Am I may be doing something dumb here? I can't find another way to do it.
 

Palmpilot

Young grasshopper
Joined
Mar 13, 2015
Messages
66
Reaction score
15
Hi,

Is there a way to get Blue Iris to use the image that is created when the "Merge Annotations Into Images" checkbox is set, for the BI alert list, and also for the BI email action?
I can see this annotated image in Telegram, but when I try "&jpeg=[ImagePathEscaped]" in the Trigger URL I don't see how I can pass this annotated image to Blue Iris to use in the Blue Iris email alerts.
Any idea?

Thank you!
P
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
Thanks Village Guy. That's what I thought the answer would be.
Can you answer one more question for me:
If I turn on "capture alert image" and "include jpegs", it fills up the alerts window with hundreds-to-thousands of stills because that's happening before AITool processes them, and the phone app shows a notification for each one. If I turn it OFF, the opposite happens, and it still records video great and they show up great in the webUI---but the app no longer shows me any "alerts", meaning I can't see any flagged videos in the app, only in the webui. Am I may be doing something dumb here? I can't find another way to do it.
It's not clear to me what you are asking. Please advise your configuration.
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
Thanks so much for taking the time. I have a pc i bot just for blueiris, it has a 500gb ssd and a 6tb hdd. I also have a pretty massive unraid server I can offload to, so storage isn't the biggest issue in the world. But I have 16 (for now!) 4k cameras, so I probably still need to be economical. I guess this would lead me to the first method of operation, but maybe my real question is a BI configuration. Would the "flags" that AI Tool send back to BI allow me to ONLY save the 4k streams that a relevant event has been identified on? Because if this is the case, and I believe it is, I'm having a hard time understanding how this method needs significantly more storage than the 2nd method of operation. Aside from the storage of presently recorded 4k streams, it seems to me that AI Tool should pretty quickly be able to identify which clips i should store. If that's the case, seems like it should be the same storage requirement at that point....
Point 1. Records continously and fills your disk in realtime
Point 2. Only records clips from cameras that cause an alert and only records for the period that you set in BI
 

seth-feinberg

Young grasshopper
Joined
Aug 28, 2020
Messages
87
Reaction score
15
Point 1. Records continously and fills your disk in realtime
Point 2. Only records clips from cameras that cause an alert and only records for the period that you set in BI
OOOO i just assumed full on continuous recording was just simply not feasible. What does AI Tool do in that Point/Method 1? Simply give you a "bookmark" or reference point for where the action is in your, VERY LONG, recording?
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
OOOO i just assumed full on continuous recording was just simply not feasible. What does AI Tool do in that Point/Method 1?
It sends flags to BI so that your recording will be indexed with clips so that you can see events. Without aitool the events will simply be triggered unprocessed.
 

GreyTheOld

Young grasshopper
Joined
Oct 26, 2017
Messages
40
Reaction score
6
I was afraid of that. Here are some screenshots:
In a camera, there are settings on TRIGGER for"Capture an Alert List Image"
1605819429177.png
and on the Record tab for "Include all JPEG's"
1605819404663.png

If these boxes are CHECKED, I get an alert list image any time anything triggers the BI motion detect settings, which are turned DOWN because we're letting AITool do the work. This also results in an app notification for every jpeg.

1605819607769.png

However, if I turn those checkboxes OFF, the app now shows ZERO notifications (or recordings if I go to the alerts tab, or try to browse alerts from the live video button), BUT the WebUI has them there all nice and pretty as you please:
1605819743470.png

So, I either get EVERY POSSIBLE notification or ZERO, neither of which is ideal. IDK how to see my recordings in the app at all. Very odd.
 
Top