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

Jim davis

n3wb
Joined
Mar 29, 2019
Messages
6
Reaction score
0
Location
texas
Question: I have been using the AI Tool since it came out and have upgraded / updated as each new version has came out. I run everything on WIN 10, all parts (BI, AI, DS) are on the same machine. No Docker or anything like that. I have noticed when I need to reboot or re start everything, that about half the time (on the deep stack tab) instead of saying "Running" it will say "not activated running" I will either leave it alone and it changes to running or I just keep hitting stop, start or sometimes I just hit the save button and it changes back to running. I don't really think it is a issue/error but am curious as to what is going on- Any ideas?
[/QUOT
 

OccultMonk

Young grasshopper
Joined
Jul 25, 2020
Messages
52
Reaction score
7
Location
A Mountain hilltop
This sounds like the same problem I bumped into. In the 2021.02.01 version of Deepstack they have dropped support for older GPUs. To verify, go to the AI Tool Deepstack tab and hit the stderr.txt button and scroll through the log.
I also don't think this is the problem, it worked the first time with a 1080ti, but then stopped working (after reboot I think).
 

spammenotinoz

Pulling my weight
Joined
Apr 4, 2019
Messages
210
Reaction score
129
Location
Sydney
This sounds like the same problem I bumped into. In the 2021.02.01 version of Deepstack they have dropped support for older GPUs. To verify, go to the AI Tool Deepstack tab and hit the stderr.txt button and scroll through the log.
Doubt it I am running a GTX 745 and it's still working fine on the latest release. Have checked it's still using the CPU.
A 1080ti, while not a 3000 series is not an old GPU. Wasted in this application though.
 

balucanb

Getting the hang of it
Joined
Sep 19, 2020
Messages
141
Reaction score
23
Location
TX
Not sure if you were having the same issue since you quoted me however, this was quite some time ago @Jim davis and subsequent builds have corrected the issue for me.
 

drew0713

n3wb
Joined
Mar 4, 2021
Messages
3
Reaction score
0
Location
USA
Hello All,
I just recently got BI set up on a new Desktop and I have Docker running in HA with DeepStack AI Tool. I currently have one camera on the system trying to get everything working and fine tuned before I add in more cameras. I have set up 2 instances of the same camera one the substream and the other the mainstream. In the DeepStack AI tool log it shows this

[05.03.2021, 13:40:19]: ERROR: Processing the following image 'G:\Blue Iris\AI_Input\GarageSD.20210305_134019281.jpg' failed. Failure in AI Tool processing the image.
[05.03.2021, 13:51:31]: ERROR: Processing the following image 'G:\Blue Iris\AI_Input\GarageSD.20210305_135131880.jpg' failed. Failure in AI Tool processing the image.
[05.03.2021, 13:51:36]: ERROR: Processing the following image 'G:\Blue Iris\AI_Input\GarageSD.20210305_135136895.jpg' failed. Failure in AI Tool processing the image.
[05.03.2021, 13:55:24]: ERROR: Processing the following image 'G:\Blue Iris\AI_Input\GarageSD.20210305_135524669.jpg' failed. Failure in AI Tool processing the image.
[05.03.2021, 13:55:29]: ERROR: Processing the following image 'G:\Blue Iris\AI_Input\GarageSD.20210305_135529696.jpg' failed. Failure in AI Tool processing the image.
[05.03.2021, 14:34:57]: ERROR: Processing the following image 'G:\Blue Iris\AI_Input\GarageSD.20210305_143457476.jpg' failed. Failure in AI Tool processing the image.

and in the Docker logs it showing this


[GIN] 2021/03/07 - 23:26:26 | 200 | 22.145µs | 192.168.1.31 | POST /v1/vision/detection

[GIN] 2021/03/07 - 23:52:12 | 200 | 49.403µs | 192.168.1.31 | POST /v1/vision/detection

[GIN] 2021/03/07 - 23:52:19 | 200 | 16.393µs | 192.168.1.31 | POST /v1/vision/detection

[GIN] 2021/03/07 - 23:52:32 | 200 | 33.354µs | 192.168.1.31 | POST /v1/vision/detection

[GIN] 2021/03/07 - 23:52:37 | 200 | 30.917µs | 192.168.1.31 | POST /v1/vision/detection

[GIN] 2021/03/07 - 23:53:24 | 200 | 25.205µs | 192.168.1.31 | POST /v1/vision/detection

Not sure what's going on. I followed the set up from The Hook Up youtube channel for setting this up. I have set up 3 objects for detection. Any help would be greatlly appreciated!!

(Oh yeah, BI v5 and AI Tool v1.67)
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
4,816
Reaction score
6,251
Location
USA
I followed the set up from The Hook Up youtube channel for setting this up.
That's your first problem LOL. Let's hope you aren't using Reolinks too LOL...

At least you found this thread and the great folks here can get you squared away...
 

drew0713

n3wb
Joined
Mar 4, 2021
Messages
3
Reaction score
0
Location
USA
That's your first problem LOL. Let's hope you aren't using Reolinks too LOL...

At least you found this thread and the great folks here can get you squared away...
That's kind of funny you mention Reolink, cause that's what I'm using. Got the new ReoLink RLC-811a. Somehow I feel like I'm on the wrong end of a bad joke :(
I guess I'm going to have to do a deeper dive on which camera I need.
 
Last edited:

wittaj

Known around here
Joined
Apr 28, 2019
Messages
4,816
Reaction score
6,251
Location
USA
That's kind of funny you mention Reolink, cause that's what I'm using. Got the new ReoLink RLC-811a. Somehow I feel like I'm on the wrong end of a bad joke :(
I guess I'm going to have to do a deeper dive on which camera I need.
We have many threads here, several just in the past two weeks, where someone followed this youtuber advice and got reolinks and now it won't work right and they came here looking for answers (and should have came here first LOL)...

Let me give you an example as to why Blue Iris and Reolinks do not work well together, and why it then makes it even more problematic with a Reolink to try a third party application like AI Tools...just because you saw it on YouTube doesn't mean the person is an expert LOL....between paid testimonial from a camera manufacturer and ad revenue for hits...At least you found this site and the creator of AI Tools that hookup mentioned...

This was a screenshot of a user's Blue Iris status where they had set the cameras to 15FPS within the cameras and they were missing motion:

1614727286960.png



Even though they have set it for 15FPS, look at what the camera is doing - dropped some down to below 1FPS but none are 15FPS. Now look at they key - that is the iframes. Blue Iris works best when the FPS and the iframes match. Now this is a ratio, so it should be a 1 if it matches the FPS. The iframes not matching (that you cannot fix or change with a reolink) is why they miss motion in Blue Iris and why people have problems. This is mainly why people are having issues with these cameras and there are many threads showing the issues people have with this manufacturer and Blue Iris. It is these same games that make the camera look great as a still image or video but turn to crap once motion is introduced.

Now compare the BI camera status above to cameras that follow industry standards that allow you to actually set parameters and they don't manipulate them. You will see that the FPS match what is set in the camera, and the 1.00 key means the iframe matches:

1614139197822.png



The Blue Iris developer has indicated that for best reliability, sub stream frame rate should be equal to the main stream frame rate and these cameras cannot do that and there is nothing you can do about that with these cameras... The iframe rates should equal the FPS (something these cameras do not allow you to set), but at worse case be no more than double. This example shows the cameras going down to a keyrate of 0.24 means that the iframe rates are over 4 times the FPS and that is why motion is a disaster with these cameras and Blue Iris...A value of 0.5 or less is considered insufficient to trust for motion triggers reliably...and thus the difficulty it will have with any Deepstack program

This is totally out of control of Blue Iris and there is nothing that can be done about it - it is clearly a limitation of the cameras. All the updating in the world on Blue Iris will not correct this deficiency as it isn't a deficiency of Blue Iris.

Blue Iris is great and works with probably more camera brands than most VMS programs, but there are brands that don't work well or not at all - Rings, Arlos, Nest, Some Zmodo cams use proprietary systems and cannot be used with Blue Iris, and for a lot of people Reolink doesn't work well either.
 
Last edited:

balucanb

Getting the hang of it
Joined
Sep 19, 2020
Messages
141
Reaction score
23
Location
TX
Let me give you an example as to why Blue Iris and Reolinks do not work well together, and why it then makes it even more problematic with a Reolink to try a third party application like AI Tools...just because you saw it on YouTube doesn't mean the person is an expert LOL....between paid testimonial from a camera manufacturer and ad revenue for hits...At least you found this site and the creator of AI Tools that hookup mentioned...

This was a screenshot of a user's Blue Iris status where they had set the cameras to 15FPS within the cameras and they were missing motion:

1614727286960.png



Even though they have set it for 15FPS, look at what the camera is doing - dropped some down to below 1FPS but none are 15FPS. Now look at they key - that is the iframes. Blue Iris works best when the FPS and the iframes match. Now this is a ratio, so it should be a 1 if it matches the FPS. The iframes not matching (that you cannot fix or change with a reolink) is why they miss motion in Blue Iris and why people have problems. This is mainly why people are having issues with these cameras and there are many threads showing the issues people have with this manufacturer and Blue Iris. It is these same games that make the camera look great as a still image or video but turn to crap once motion is introduced.

Now compare the BI camera status above to cameras that follow industry standards that allow you to actually set parameters and they don't manipulate them. You will see that the FPS match what is set in the camera, and the 1.00 key means the iframe matches:

1614139197822.png



The Blue Iris developer has indicated that for best reliability, sub stream frame rate should be equal to the main stream frame rate and these cameras cannot do that and there is nothing you can do about that with these cameras... The iframe rates should equal the FPS (something these cameras do not allow you to set), but at worse case be no more than double. This example shows the cameras going down to a keyrate of 0.24 means that the iframe rates are over 4 times the FPS and that is why motion is a disaster with these cameras and Blue Iris...A value of 0.5 or less is considered insufficient to trust for motion triggers reliably...and thus the difficulty it will have with any Deepstack program

This is totally out of control of Blue Iris and there is nothing that can be done about it - it is clearly a limitation of the cameras. All the updating in the world on Blue Iris will not correct this deficiency as it isn't a deficiency of Blue Iris.

Blue Iris is great and works with probably more camera brands than most VMS programs, but there are brands that don't work well or not at all - Rings, Arlos, Nest, Some Zmodo cams use proprietary systems and cannot be used with Blue Iris, and for a lot of people Reolink doesn't work well either.
Not really adding anything here other than agreement with all of the above, reolinks are nice cameras but they are without question craptastic when used with BI. I wanted to upgrade a couple of my cheaper cameras and unknowingly bought a few reolinks. Nothing but issues.
 

drew0713

n3wb
Joined
Mar 4, 2021
Messages
3
Reaction score
0
Location
USA
We have many threads here, several just in the past two weeks, where someone followed this youtuber advice and got reolinks and now it won't work right and they came here looking for answers (and should have came here first LOL)...

Let me give you an example as to why Blue Iris and Reolinks do not work well together, and why it then makes it even more problematic with a Reolink to try a third party application like AI Tools...just because you saw it on YouTube doesn't mean the person is an expert LOL....between paid testimonial from a camera manufacturer and ad revenue for hits...At least you found this site and the creator of AI Tools that hookup mentioned...

This was a screenshot of a user's Blue Iris status where they had set the cameras to 15FPS within the cameras and they were missing motion:

1614727286960.png



Even though they have set it for 15FPS, look at what the camera is doing - dropped some down to below 1FPS but none are 15FPS. Now look at they key - that is the iframes. Blue Iris works best when the FPS and the iframes match. Now this is a ratio, so it should be a 1 if it matches the FPS. The iframes not matching (that you cannot fix or change with a reolink) is why they miss motion in Blue Iris and why people have problems. This is mainly why people are having issues with these cameras and there are many threads showing the issues people have with this manufacturer and Blue Iris. It is these same games that make the camera look great as a still image or video but turn to crap once motion is introduced.

Now compare the BI camera status above to cameras that follow industry standards that allow you to actually set parameters and they don't manipulate them. You will see that the FPS match what is set in the camera, and the 1.00 key means the iframe matches:

1614139197822.png



The Blue Iris developer has indicated that for best reliability, sub stream frame rate should be equal to the main stream frame rate and these cameras cannot do that and there is nothing you can do about that with these cameras... The iframe rates should equal the FPS (something these cameras do not allow you to set), but at worse case be no more than double. This example shows the cameras going down to a keyrate of 0.24 means that the iframe rates are over 4 times the FPS and that is why motion is a disaster with these cameras and Blue Iris...A value of 0.5 or less is considered insufficient to trust for motion triggers reliably...and thus the difficulty it will have with any Deepstack program

This is totally out of control of Blue Iris and there is nothing that can be done about it - it is clearly a limitation of the cameras. All the updating in the world on Blue Iris will not correct this deficiency as it isn't a deficiency of Blue Iris.

Blue Iris is great and works with probably more camera brands than most VMS programs, but there are brands that don't work well or not at all - Rings, Arlos, Nest, Some Zmodo cams use proprietary systems and cannot be used with Blue Iris, and for a lot of people Reolink doesn't work well either.

Thanks for the head up. I know you've probably done it a thousand times by now, still much appreciated. Already got the RMA for my 7 Reolink cameras and ordered an IPC-T5442T-ZE from Empire Tech last night(should be here today) and will try it out and see if I like it.
 

bohemian

n3wb
Joined
Apr 9, 2017
Messages
13
Reaction score
3
I recently installed Chris's fork over my pre-existing AI Tools. Other than some minor config tweaks, it was a smooth process and everything works just fine. Except for one thing - MQTT.

I've configured my cameras in AI Tools to send MQTT alerts except it seems there's an issue communicating with my MQTT server. Here's a relevant log post for when I hit the MQTT Test button for my Deck camera:

10-Mar-21 11:11:07 AM PublishAsync MQTT: Unexpected Topic 'ai/Deck/motion' Payload 'No Detections Found': Unable to connect to the remote server [WebSocketException] Mod: <<PublishAsync>b__0>d Line:230:41 Error AITOOLS.EXE 5 2 12 False AITool.[2021-03-10].log
AI Tools is running on the same Windows box as BI and BI has zero issue sending MQTT commands to exactly the same MQTT server. It's all on the same network (my Mosquiito container is on the same box as my Deepstack container) . I'm using the usual port 1883 and do not require login creds or TLS with my MQTT server. I installed MQTT Explorer on the same box as AI Tools / BI and also have zero issue communicating with the MQTT server. So I am truly baffled and the error message is detailed, but not helpful - at least to me.

Can anyone offer some debug advice?
 
Last edited:

seth-feinberg

Young grasshopper
Joined
Aug 28, 2020
Messages
54
Reaction score
4
Just select Add New Camera and choose Copy From Another Camera and select the camera you wish to clone from the drop down box. Then you choose which one you want to be the master. You will probably need to select direct to disk recording! I seem to remember a good while back that not selecting it caused me all sorts of issues.



View attachment 82221
Finally got around to switching over all my cameras and it seems to be working really well. I wasn't experiencing much high usage on my cpu before i cloned the cameras but it's clearly lower now, thanks so much @Village Guy ! I have since deleted all the non cloned dupe cameras

I also switched over to the latest Vorlon i found zipped in the thread, and I no longer have the boxes superimposed on my snapshots in AI Tool, where is the option to enable that?

Finally and unrelated: I'm currently running Deepstack as a Docker on a Unraid that resides on the same LAN. I get decently fast times, but I'm a little concerned the load is a little heavy for a server doing a lot of other things. It generally stays a low single digits of usage (it's dual 8core processors) but every now and then I'll get a spike on one of them. I don't have the facilities to conclusively trace it back to Deepstack but it would appear to be the most intensive Docker running. Overall, I'm just curious what everyone thinks is the best way to run Deepstack? My Blue Iris is running on a stand alone HP with Windows 10, and from what I gathered combing over the thread, often having everything on one machine can push it to the brink, but I'm not sure if that's an accurate conclusion to draw.

So from what i gather, my options are:

1) Run as is with BI on a stand alone Win10 PC with QuickSync and Deepstack on a powerful but busy Unraid server
2) Run Deepstack on the same stand alone Win10PC as Blue Iris in a Docker (I gather this is the best way to run it on WIn10)
3) Run Deepstack on one of those AI sticks I saw people playing with earlier on in the thread. This is the option i am the least comfortable in but if it's effective enough i could be convinced to make the switch...
 

daveedis

n3wb
Joined
Jan 2, 2021
Messages
2
Reaction score
0
Location
Texas
I'm using 2.0.846.7731 and trying to set different relevant objects on each camera. Whenever I change one camera it changes all the other cameras to the same selections (ie change one cam to person and car and all the others change to person and car). Anyone else having this issue?
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
220
Reaction score
100
Location
UK
So from what i gather, my options are:

1) Run as is with BI on a stand alone Win10 PC with QuickSync and Deepstack on a powerful but busy Unraid server
2) Run Deepstack on the same stand alone Win10PC as Blue Iris in a Docker (I gather this is the best way to run it on WIn10)
3) Run Deepstack on one of those AI sticks I saw people playing with earlier on in the thread. This is the option i am the least comfortable in but if it's effective enough i could be convinced to make the switch...
I would recommend option 2 on the basis that everything is running locally. Personally I like to keep things as simple as possible. If your CPU becomes overloaded then that is a whole new ball game!

Good to know you got the Clone configuration working.
 

seth-feinberg

Young grasshopper
Joined
Aug 28, 2020
Messages
54
Reaction score
4
I would recommend option 2 on the basis that everything is running locally. Personally I like to keep things as simple as possible. If your CPU becomes overloaded then that is a whole new ball game!

Good to know you got the Clone configuration working.
Thanks for the continued help @Village Guy !

Is there a best practice for getting the Docker up and running on Windows10. I remember from my read through that people were having a LOT of issues setting it up. Any good tutorial out there you'd recommend?
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
220
Reaction score
100
Location
UK
Thanks for the continued help @Village Guy !

Is there a best practice for getting the Docker up and running on Windows10. I remember from my read through that people were having a LOT of issues setting it up. Any good tutorial out there you'd recommend?
Sorry I can't help with directing you to a tutorial, I can recommend setting up to use the WSL 2 based engine as it is more efficient.

Aside from that I have noted below the commands that I personally use to download and initiate Deepstack, I suspect you will already be familiar with this information.

docker pull deepquestai/deepstack:latest

docker run --restart=always -e MODE=High -e VISION-DETECTION=True -v localstorage:/datastore -p 82:5000 deepquestai/deepstack:latest
 

jz3082

Young grasshopper
Joined
Dec 13, 2019
Messages
77
Reaction score
22
Location
Oklahoma, US
I recently installed Chris's fork over my pre-existing AI Tools. Other than some minor config tweaks, it was a smooth process and everything works just fine. Except for one thing - MQTT.

I've configured my cameras in AI Tools to send MQTT alerts except it seems there's an issue communicating with my MQTT server. Here's a relevant log post for when I hit the MQTT Test button for my Deck camera:



AI Tools is running on the same Windows box as BI and BI has zero issue sending MQTT commands to exactly the same MQTT server. It's all on the same network (my Mosquiito container is on the same box as my Deepstack container) . I'm using the usual port 1883 and do not require login creds or TLS with my MQTT server. I installed MQTT Explorer on the same box as AI Tools / BI and also have zero issue communicating with the MQTT server. So I am truly baffled and the error message is detailed, but not helpful - at least to me.

Can anyone offer some debug advice?
I had the same issue. I do not require a password either. I just populated the fields with bogus credentials and it worked.

1615490172511.png
 

bohemian

n3wb
Joined
Apr 9, 2017
Messages
13
Reaction score
3
Dang! You are right.

Clearly the code doesn't handle nulls for those fields. Thanks!
 

jz3082

Young grasshopper
Joined
Dec 13, 2019
Messages
77
Reaction score
22
Location
Oklahoma, US
Sorry I can't help with directing you to a tutorial, I can recommend setting up to use the WSL 2 based engine as it is more efficient.

Aside from that I have noted below the commands that I personally use to download and initiate Deepstack, I suspect you will already be familiar with this information.

docker pull deepquestai/deepstack:latest

docker run --restart=always -e MODE=High -e VISION-DETECTION=True -v localstorage:/datastore -p 82:5000 deepquestai/deepstack:latest
I agree with Village Guy with keeping things local. I am running Docker on Windows WSL2 on an I7 6700 with 3-4MP cameras and 1-2 MP with 24-7 recording. With heavy motion from all cameras my CPU gets to about 40%. I have 5 DeepStack Instances in Docker. I am also using the CPU version of DeepStack like Village Guy. I found a YouTube video for configuring WSL2 but can't find the specific video. You don't need to install any Linux after WSL2 is configured. The video I was watched showed how to install Linux after WSL2 so stop after WSL2 is setup. I then found directions on installing Docker Desktop for Windows. After that is installed then you will need to pull DeepStack from Docker and run the command that Village guy has from PowerShell. My commonad is slightly different. Notice I have a name for each instance. The instance below is deepstack0, the next is deepstack1 and so on. Each instance needs a unique port. The instance below is 8090, the next 8091 and so on.

docker run --restart=always -e MODE=High -e VISION-DETECTION=True -v localstorage:/datastore -p 8090:5000 --name deepstack0 deepquestai/deepstack:latest
 
Joined
Jul 12, 2017
Messages
12
Reaction score
0
I'm running two Deepstack instances (Windows and Docker container running on my QNAP) along with AWS Rekognition... AITool load balances between them and it works well for me.

View attachment 83874
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.
 
Top