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

Yes, it does. I had that working before I switched to my Docker implementation that natively supports MQTT.

Yes I am waiting for CUDA w/ wsl2 support in docker windows. which is coming later this year for deepstackgpu before I make the switch. Thanks for all the bringing the Docker support.
 
Last edited:
I just updated the software because there was a bug. When after the first analysis more images were found and analyzed, the program would not delete them.


GentlePumpkin, I just wanted to say thank you! I have been struggling with improving the alerts on my cameras for years. Nothing really worked. A shadow, a tree swaying in the wind even clouds moving all triggered alerts. So do you know what I did? I turned them off. I experimented with other VMSs open source paid. Either the detection didn't work properly or the VMS didn't work right. Some of them killed the CPU completely! So I just stuck to my Synology with continuous recording and no alerts. When I came across your post your AI Tool was the most elegant solution I had seen. Free (thanks for your hard work) local and integrated with a good VMS. I downloaded the demo of blue iris and said it up in like 10 minutes and WOW!!! It worked!!!! My wife was wondering why I kept on leaving the house at 2AM and coming right back in. I bought the BI license that day and have been tweaking ever since. There are some issues with the docker but I seemed to have fixed it by installing the docker directly from portioner as opposed to Unraid where I had it previously. I cant wait to see how this project improves with as DeepStack migrates to fully open source! I would like to buy you a beer my friend. How can I contribute?
 
Last edited:
This is pretty neat, and I am looking forward to getting it working. Win10 running with HomeAssistant via VBOX, I followed along with the video from "The Hook Up" on the installation with Portainer. The deployment would fail using the UI, so I downloaded the container via terminal. This download failed a few times during unpacking one compressed file, but after a couple of tries it was successful. I was then able to find the container via the Portainer UI and complete the set up. I can access the Deepstack UI just fine, but I too am getting the "ERROR: Processing the following image 'E:\AIinput/DriveWay_West_SD.20200612_173229102.jpg' failed. Can't reach DeepQuestAI Server at http://:192.168.1.98:83.

My processor supports AVX, but figured I would give the NOAVX version a try. Same issue downloading, finally got it ok, and once installed the AI Tool is giving me the same error. I even tried installed the windows version as a localhost and still get the same.

I am new to HomeAssistant, Linux, VBox and might be missing something more basic in the installation. Thoughts on what else might be causing my issue?
 
If you confirmed that Deepstack silently crashed you can eigther try to resolve thr problem in accordance with the Windows log, or just install the Docker version.
I'm sorry, I was unclear
I confirmed Deepstack did not crash, it just cannot be contacted by AI tool, according to log. I can contact it fine using browse to localhost:83
 
This is pretty neat, and I am looking forward to getting it working. Win10 running with HomeAssistant via VBOX, I followed along with the video from "The Hook Up" on the installation with Portainer. The deployment would fail using the UI, so I downloaded the container via terminal. This download failed a few times during unpacking one compressed file, but after a couple of tries it was successful. I was then able to find the container via the Portainer UI and complete the set up. I can access the Deepstack UI just fine, but I too am getting the "ERROR: Processing the following image 'E:\AIinput/DriveWay_West_SD.20200612_173229102.jpg' failed. Can't reach DeepQuestAI Server at http://:192.168.1.98:83.

My processor supports AVX, but figured I would give the NOAVX version a try. Same issue downloading, finally got it ok, and once installed the AI Tool is giving me the same error. I even tried installed the windows version as a localhost and still get the same.

I am new to HomeAssistant, Linux, VBox and might be missing something more basic in the installation. Thoughts on what else might be causing my issue?

Make sure you are exposing port 83 on the Docker container. By default Docker does not expose ports, you have to explicitly allow them to be used.
 
Make sure you are exposing port 83 on the Docker container. By default Docker does not expose ports, you have to explicitly allow them to be used.

Appreciate the assist. In Portainer when I set up the container I did the "port configuration" so that 0.0.0.0:83>> 5000/tcp - assuming that exposes the port? Also visiting the actual 192.168.1.xxx:83 does show that Deepstack is running. Finally, figuring I may be missing something basic like this in the set up so I tried the Windows exe localhost and have the same issue :(
 
Windows, it was working previously which is what I don't understand. API is running and activated.

View attachment 63645

Ditch the deepstack AI Windows program and run it in docker instead. I had so many issues running the windows version randomly stopping processing images, since moving to docker it's been working reliably for days now. No issues at all.
 
Check out this tutorial on how to set it up.



I followed this video when I set mine up, I am new to BI so I am having some issues with streams becoming stale after a while and need to be viewed live again before working again.

That aside, is there a way I can setup like this video guide but record in full camera resolution? Do I still need to have duplicate cameras to achieve this?
 
@GentlePumpkin

First I just want to say great job on this! I registered just for you after years lurking around LOL.

Since flagging is an option now in the latest releases could you also add the ability to send a request for a non-relevent so that we can use flagalert=0 to cancel an alert when used in combo with "Allow disarm time by delaying alerts" in BI?
So basically if an image is relevant it works as does now, but if not it has a second URL where we can basically use the same info but use this 0 flag to cancel actual alerting done. For those of us that have no use for cloned feeds and record 24/7 HD this allows us to keep a single camera still and use alerting on that single camera still.
One possible thing here could be if multiple images are taken for the same alert and one cancels or flags and the other doesn't but that can be solved by just using a single image

As is yea we can tell it to flag an alert but BI will still take all the alert actions since it triggered and we did not use the disarm function.

Also maybe instead of check boxes change the objects to be a list box and add the other missing objects? I think they have about 80 actually supported items.

And maybe a donate button for yourself? :P While I get this is open source/free I don't think some of us would be opposed to buying you a drink or two for the efforts!
In my case I run BI as a VM already and don't want to install docker on a VM or have to manage another VM. I'd like to keep it all one system so the container methods others are doing while great don't fit my desire so I'll be sticking to your model I think :)
 
This is what I am getting in my log. Anyone else have the same issue?

[16.06.2020, 17:05:23.451]: Starting analysis of Z:\BlueIris\aiinput/aiDriveway.20200616_170523436.jpg
[16.06.2020, 17:05:23.453]: (1/6) Uploading image to DeepQuestAI Server
[16.06.2020, 17:05:23.463]: (2/6) Waiting for results
[16.06.2020, 17:05:23.464]: (3/6) Processing results:
[16.06.2020, 17:05:23.465]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[16.06.2020, 17:05:23.466]: ERROR: Processing the following image 'Z:\BlueIris\aiinput/aiDriveway.20200616_170523436.jpg' failed. Failure in AI Tool processing the image.
 
This is what I am getting in my log. Anyone else have the same issue?

[16.06.2020, 17:05:23.451]: Starting analysis of Z:\BlueIris\aiinput/aiDriveway.20200616_170523436.jpg
[16.06.2020, 17:05:23.453]: (1/6) Uploading image to DeepQuestAI Server
[16.06.2020, 17:05:23.463]: (2/6) Waiting for results
[16.06.2020, 17:05:23.464]: (3/6) Processing results:
[16.06.2020, 17:05:23.465]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[16.06.2020, 17:05:23.466]: ERROR: Processing the following image 'Z:\BlueIris\aiinput/aiDriveway.20200616_170523436.jpg' failed. Failure in AI Tool processing the image.

Yep. I'm getting the same thing. Have not figured out the issue yet. Have tried on multiple computers with different install options and no luck. If i figure it out i will post. Anyone have any other ideas?
 
Since I see you have a z: drive I assume it's a network map? I suspect that may be your issue.
Network drive maps work slightly different and it could be the tool is seeing the file and trying to grab it before it's done being written so DeepQuest gets a garbled file. This isn't always an issue but for some it can be.
To test, try making a local folder on the computer running AI tool and point it to that, now drop an new image into that folder and see what it does?

I have this tool on the same machine as BI and the files are local, the DeepQuestAI is a different vm though (and my BI is VM also fwiw) and no issues and I've thrown thousands of images at it.

Also make sure AI is run from a non "Program Files" folder because those require admin to write to and for example the camera settings, history and log file can't properly write to anything in that. I have mine in an AI folder on C root.
 
Thanks for the suggestion about the network map. The drive is not networked though. It is an additional internal drive (that I use for storage) that I added to my system. That said, I did change the destination to my desktop on my c: drive. I also moved the AI program from my Program Files folder to my desktop. The same issue remains.

[17.06.2020, 10:43:56.821]: Starting analysis of C:\Users\Adam\Desktop\AIPics/aiDriveway.20200617_104356828.jpg
[17.06.2020, 10:43:56.822]: (1/6) Uploading image to DeepQuestAI Server
[17.06.2020, 10:43:56.835]: (2/6) Waiting for results
[17.06.2020, 10:43:56.837]: (3/6) Processing results:
[17.06.2020, 10:43:56.838]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[17.06.2020, 10:43:56.839]: ERROR: Processing the following image 'C:\Users\Adam\Desktop\AIPics/aiDriveway.20200617_104356828.jpg' failed. Failure in AI Tool processing the image.
 
The next thing that would leave is the AI server.
Is it running local or docker? Have you tried re-doing that? If you're running it as the windows app try the docker one if you have a way. If docker try the local/windows one and see if you can narrow it down.

I'm not sure beyond so we'll have to see what our good friend here thinks.
I've thrown 5meg 4k images at mine even and have the AI server set to high accuracy mode even which pushes it harder and don't have any issues with processing. I am running the 1.67 AI tool though, if you're not maybe try that one. You can get it directly on GIT. It may fix something the 1.65 doesn't.
 
Some other ideas:

1. The forward slash in the path is causing issues
2. You're using the NOAVX image and didn't register a developer license with it. Try hitting port 5000 on the Deepstack container to see if it asks for a developer license.
 
The deepstack server is running on docker. I had it previously running on my windows machine, but the AI tool couldn't even access Deepstack. In my log file, the process never got past step 1 of 6.

I grabbed 1.67 from git and same issue persists.

I've tried changing the direction of the slashes in the AI Tool. Same issue persists.

I am using the noavx version. I did put in the api key the first time I accessed the webpage at the port I designated. When i go to that page now it doesn't ask for the key anymore which is I think what I should be seeing
 
I am having trouble with AI Tool sending the trigger command. It works when I copy and paste into browser, but not when AI Tool does a positive ID. Any ideas?