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

If anyone is willing to run a small test for me it would be appreciated. I seem to be doubling my bitrates from ~490ish MP/s to 900ish MP/s when I turn on my AI clone cameras. I run 8 cameras in total, 7 of which are cloned for purposes of the AITool.

When I just run the 7 on their own, no clones, I'm at ~20ish % CPU usage from BI. When I turn on the clone cameras, the CPU usage almost doubles.

As far as I can tell, the only difference between the main cams and the clones, is that I have motion trigger turned on in the clone cameras and not the primary cameras, and on the primary cameras they are set to continuous record vs snapshot on trigger for the AI cams.

If I disable all the AI clones, and then turn on motion trigger in the primary cams, the bitrate usage doesn't move much, from 490ish to 550ish.

For some reason I didn't think running the clones should be almost doubling the bitrate usage? Curious if this is the case for others as well?
 
Are you using sub streams? In either the main or the clones?

What I found was with substreams enabled, if cloned a cam then the jpgs captured would be the lower res from the substream. So in order to fix that I deleted the substream from the clone which has the effect that BI no longer viewed the cam as a clone and so started pulling a separate stream.

I’ve reported this, asking if maybe we could have an option to select which stream the jpg would be from, I also urge anybody else having this same problem to report it, the more that do the more likely that it might be implemented as a new feature, unless there’s a technical reason why it wouldn’t be possible.
 
Don't believe so:

1596111444959.png

Believe fenderman mentioned substreams were still a bit wonky in the 5.x versions of BI.
 
Not following what you mean (i.e., copying the main stream details?). When I set the AI cameras up, I simply copied the main camera so I'm assuming everything would be identical?
 
@pbc wait a few minutes, I'm rewriting the setup guide as we speak. It will no longer require duplicate cameras. :)

Just read your comment a page or two ago and was thrilled. Hopefully it fixes that 'issue'! :)
 
In principle, you can cut out the entire duplicate camera setup, keep motion detection on your camera enabled and just replace the trigger url with this url:

http://localhost:80/admin&camera={short cam name}&flagalert=1&memo=[summary]&user={user}&pw={password}

Replace everything in the {} brackets (together with the {}) according to your setup, and leave the [summary] untouched :D
It will flag the alert in the original camera if something was detected in it. The writeup will probably take me some hours, but that's the main difference.
This requires latest version 1.67

Download v1.67
 
  • Like
Reactions: Syc0Maniac and ReXX
update 1.67

- Flagging the original alerts replaces duplicate cameras
Blue Iris now allows us to flag AI-confirmed alerts, so duplicate cameras are no longer needed. You can use http://localhost:80/admin&camera={short cam name}&flagalert=1&memo=[summary]&user={user}&pw={password} with your BI credentials to flag alerts and display the detected object and confidence in Blue Iris. Of course you can continue to use your duplicate cameras, but for new cameras, this is the easiest way.​

- the trigger url now supports a variety of placeholders. Following url parameters (placeholders) are available: @BootsSiR
[summary]gives a nice summary with all detected objects and confidences
[camera]gives camera name
[detection]gives first detected object
[position]gives position of first detected object
[confidence]gives confidence of first detected object
[imagepath]give the full path to the image that caused the trigger
[imagefilename]gives only the filename of the image
further changes:

  • added close confirm dialog to prevent accidently closing AI Tool. On first use, AI Tool will ask if you would like to use this feature.
  • info text on Main tab shows camera and time of last trigger
  • added filter options for people, vehicles, and animals @Lazersfly
  • added analysis sleep during first half of cooldown time to reduce CPU load in busy situations
  • enhanced choppy UI content resize behavior (mainly in Cameras and Settings tab)
  • Fixed error 'Processing the following image' because paths are not properly joined @kvanhertum
  • improved DeepStack URL input @edalquist and made 127.0.0.1 default Deepstack URL (more reliable on some systems)


The setup guide is not updated yet, work in progress


Download v1.67
 
Last edited:
Will wait for the rewrite, not sure how this would prevent constant triggering/alerts by the main cameras. I.e., I assume the reason the clones were setup is that in the main camera we turn off the trigger but setup the Alerts in that cam so that when it is triggered by the AITool it results in an Action Alert, but since those Alerts are turned off in the AIClone cameras, we don't get alerts every time motion is detected. So maybe I'm not following how this prevents that...but hopefully will once the write up is done.

Now to figure out how the heck one uses Docker Desktop. Have it set up on my server, and it's on (see the little whale or whatever it is icon), but I can't figure out where I would be able to input command lines.
 
The main camera will produce an alert every time motion detection triggers it, but only AI-confirmed alerts will be flagged. So you p.e. can switch to show only flagged alerts in Blue Iris. And if you think that AI has missed something, you can easily check all triggers with one click.
 
  • Like
Reactions: pbc and Cameraguy
Thx...look forward to the write up later!
 
I have a bridge on my property that Deepstack is pretty sure is a truck. I'd like to be able to detect a truck crossing the bridge, but I cannot do that without either masking the bridge, or removing trucks from detection - both would mean i would lose truck detection. ;-)

Is there any way to tell Deepstack "that is not a truck"? Or any way to tell AItool to use confidence of 80% or higher just for trucks?

Capture.PNG
 
Last edited:
Not following what you mean (i.e., copying the main stream details?). When I set the AI cameras up, I simply copied the main camera so I'm assuming everything would be identical?

When I had a problem with a clone pulling a separate stream what I did to fix the issue was copy the string from the main cam and then paste it into the clone cam, yes I know I was overwriting the same but that had the action of doing something in BI which then recognised the cam as being a clone and it stopped pulling a separate stream.
 
  • Like
Reactions: GentlePumpkin
Hmmm...trying out the new 1.67 using the instructions. Haven't even got to setting up the cameras in the AItool yet, and am getting notifications left and right due to the wind blowing my front door plants around...I must not have something configured properly in the camera itself, as it is doing what I thought it would do!
 
My settings:

1596146255275.png1596146275821.png1596146306621.png
 
Ah...I need to uncheck Trigger Sources IIRC. What about Only when Triggered in the Record page?

Weird...something is still up. Deepstack is constantly analysing now and getting snapshots every 3 seconds due to the wind which wasn't happening before with the clones (and CPU running up to 80% every other second).

1596146731577.png

Wow, had to turn off these two cameras and Deepstack as my CPU usage was shooting to 100% the entire time.

@GentlePumpkin Any clue why that would happen? The motion triggers were otherwise the same as I had on the AI Camera Clones with 1.65, but didn't have the issue of the camera taking a snapshot every 3 seconds just because of wind. At least, I think they were, I stupidly deleted the AI cloned cameras without backing up first.
 
Last edited:
If you look back I posted the command line that I used to do the pull which also starts.

So I'm confused with how to use Docker Desktop. I have it installed, see the little whale, but am I supposed to install Linux or anything along those lines? I don't see any terminal into which I can insert the command lines.
 
So I'm confused with how to use Docker Desktop. I have it installed, see the little whale, but am I supposed to install Linux or anything along those lines? I don't see any terminal into which I can insert the command lines.

Use the windows terminal:

Example for what I used before I switched to the beta version:

Download Deepstack:
docker pull deepquestai/deepstack

Setup the container.
docker run --restart=always -e MODE=Low -e VISION-DETECTION=True -v localstorage:/datastore -p 5000:5000 --name deepstack deepquestai/deepstack

"-e MODE=Low" is optional (Default is medium). It's not as accurate but gives a faster result. I have noticed a few false results so far but not enough to switch back to medium.
"--restart=always" will keep it running if it stops or if the PC is restarted.
In the above example it runs on port 5000.

I'm using the beta version of deepstack now which doesn't require activation.


I've also modified ai tool to have it markup and save the positive images to a sub folder so I don't need to use ai tool to see what it detected. I used to have it send that image to telegram when I was debugging but now I have it save the images on my NAS server. Example of an image
I also added a [prefix] variable to mine so I can use the following trigger url which will use the "Input file begins with" camera setting.

http://localhost:80/admin?camera=[prefix]&flagalert=1&memo=[summary]&user={user}&pw={password}
 
Last edited: