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

Just updated BI and noticed that Image Resize is now an option.
 
@GentlePumpkin

Is there any chance you could indicate how the trigger function works with 1.67 and without a clone? Please see my earlier post.

the basic idea is that alerts are generated as usual by Blue Iris motion detection and that AI Tool only flags those alerts, that include humans etc. As I didn‘t use the BI alerts recently, I probably did not realize that this won‘t support BI alerts.

Can somebody confirm that it only sends alerts if in the Alert tab „external“ is set as the only input and AI Tool triggers and flag the alert?
 
the basic idea is that alerts are generated as usual by Blue Iris motion detection and that AI Tool only flags those alerts, that include humans etc. As I didn‘t use the BI alerts recently, I probably did not realize that this won‘t support BI alerts.

Can somebody confirm that it only sends alerts if in the Alert tab „external“ is set as the only input and AI Tool triggers and flag the alert?
This correct, you will only get alerts in BI if you have External selected.
 
Okay, so pulled the :gpu version (and installed this Announcing CUDA on Windows Subsystem for Linux 2 | NVIDIA Developer Blog).

This is what I'm seeing in Powershell? I assume this isn't right as nothing is going to my AItool, The below GIN messages correspond to me going outside to try and trigger a camera. I'm not sure why it's using 172.17.0.1 as the IP address?.

View attachment 67727
172.17.0.1 is the virtual network that Docker Desktop creates when it spins up the VM to run Deepstack.
 
Just got a response from BlueIris, he will implement JPEG resolutions in the next release!! So you don't need to use a substream perse, and can set custom jpeg resolutions.

Oh not quite what I wanted, I wanted to be able to pull a snapshot from the main stream while detecting motion on the substream but I’ll give it a test to see what I get.
 
the basic idea is that alerts are generated as usual by Blue Iris motion detection and that AI Tool only flags those alerts, that include humans etc. As I didn‘t use the BI alerts recently, I probably did not realize that this won‘t support BI alerts.

Can somebody confirm that it only sends alerts if in the Alert tab „external“ is set as the only input and AI Tool triggers and flag the alert?

Many thanks but I still have no idea how recorded video is triggered. If video is enabled it will simply record everything that initiates the trigger, just as it would without AITool. If video is disabled I only capture static images?
How does BI differentiate between a trigger from the camera and from AITool? Am I being really dumb?

In my mind I need to enable video record but disable the internal connection that BI makes to the internal trigger so that it will only record when AITool sends the command line.
 
Many thanks but I still have no idea how recorded video is triggered. If video is enabled it will simply record everything that initiates the trigger, just as it would without AITool. If video is disabled I only capture static images?
How does BI differentiate between a trigger from the camera and from AITool? Am I being really dumb?

In my mind I need to enable video record but disable the internal connection that BI makes to the internal trigger so that it will only record when AITool sends the command line.

i‘ll have to rewrite the setup documentation to support the trigger events. regarding recorded video: I record 24/7 and I get a short sequence of the length of the break time whenever BI detects motion. Currently this sequence will be flagged if AI Tool detects sth, but then Alerts won‘t work, so this needs some rework.
 
Hey Guys I finally got AI tool to work with DeepStack and BI. But AI Tool keeps shutting itself down. I'm getting triggers but by the time I get back to the computer AI Tool has shut down and I have to restart it. Does anyone have any idea why It keeps shutting down. I do have the latest version of AI Tool.
 
i‘ll have to rewrite the setup documentation to support the trigger events. regarding recorded video: I record 24/7 and I get a short sequence of the length of the break time whenever BI detects motion. Currently this sequence will be flagged if AI Tool detects sth, but then Alerts won‘t work, so this needs some rework.
Thank you so much for clarifying the functionality. To sum up it would seem that using a clone camera has the advantage of being able to record only when AITool triggers which how I had it working previously. Oh well, fortunately I have a backup with all the cloned cameras.
 
exactly

Damn sorry for the trouble, I‘ll update the guide. For everyone who has already set up the old version, there is no need to reconfigure everything. Duplicate cams will still work and I‘ll try to keep them working through future versions.

It works perfectly now bud! Some of us (me) can be a bit slow on the uptake at times!
 
172.17.0.1 is the virtual network that Docker Desktop creates when it spins up the VM to run Deepstack.
It looks the same as mine. Yours is running 10x faster than my cpu version on a i7-4790 so it might be using your gpu. Mine typically runs 500-700ms per query.

If you right click on the docker system tray icon and select Dashboard you can view the same info there. You can also stop and delete a container there too.

View attachment 67731 View attachment 67732

Just click on the name and it will show the image on the right

So I'm at a loss then how to get it to update my AITools folder? Getting tons of clips being viewed by Deepstack, but nothing in my AITools windows app and therefore no triggers going to my cameras?

Must be missing a command somewhere?

1596229653224.png
 
Hey Guys I finally got AI tool to work with DeepStack and BI. But AI Tool keeps shutting itself down. I'm getting triggers but by the time I get back to the computer AI Tool has shut down and I have to restart it. Does anyone have any idea why It keeps shutting down. I do have the latest version of AI Tool.
is the process aitool.exe still visible in task manager?
 
So I'm at a loss then how to get it to update my AITools folder? Getting tons of clips being viewed by Deepstack, but nothing in my AITools windows app and therefore no triggers going to my cameras?

Must be missing a command somewhere?

View attachment 67740

It's giving a HTTP 401 error. It should be 200 which is a HTTP code for OK. Error 401 = "Unauthorized client error". Seems I missed that the first time you posted it.

Did you try visiting your deepstack container in a web browser to make sure it's activated?
 
So I'm at a loss then how to get it to update my AITools folder? Getting tons of clips being viewed by Deepstack, but nothing in my AITools windows app and therefore no triggers going to my cameras?

Must be missing a command somewhere?

View attachment 67740

Regarding the procedure:
1. Blue Iris motion detection detect an movement.
2. Blue Iris stores a snapshot of the scene in the input folder
3. AI Tool detects the image and forwards it to Deepstack
4. Deepstack analyzes the images and returns the results to AI Tool
5. AI Tool triggers the camera in Blue Iris

As @mayop elaborated, Deepstack probably isn‘t activated.
 
No it just goes away. I have to restart it.
Now I can't get DeepStack to work. I keep getting is error---
[31.07.2020, 15:38:08.538]: Starting analysis of D:\Aiinput\FDCAM4HD.20200731_153315957.jpg
[31.07.2020, 15:38:08.540]: (1/6) Uploading image to DeepQuestAI Server
[31.07.2020, 15:39:48.546]: System.Threading.Tasks.TaskCanceledException | A task was canceled. (code: -2146233029 )
[31.07.2020, 15:39:48.551]: ERROR: Processing the following image 'D:\Aiinput\FDCAM4HD.20200731_153315957.jpg' failed. Can't reach DeepQuestAI Server at .
 
Now I can't get DeepStack to work. I keep getting is error---
[31.07.2020, 15:38:08.538]: Starting analysis of D:\Aiinput\FDCAM4HD.20200731_153315957.jpg
[31.07.2020, 15:38:08.540]: (1/6) Uploading image to DeepQuestAI Server
[31.07.2020, 15:39:48.546]: System.Threading.Tasks.TaskCanceledException | A task was canceled. (code: -2146233029 )
[31.07.2020, 15:39:48.551]: ERROR: Processing the following image 'D:\Aiinput\FDCAM4HD.20200731_153315957.jpg' failed. Can't reach DeepQuestAI Server at .
If I put the into the web browser it goes to the DeepStack page.
 
It's giving a HTTP 401 error. It should be 200 which is a HTTP code for OK. Error 401 = "Unauthorized client error". Seems I missed that the first time you posted it.

Did you try visiting your deepstack container in a web browser to make sure it's activated?

Apologies, how do I visit the container in a web browser? ... and if it isn't activated (which is what I thought that command line with the API key in it) is there something I need to run in Powershell from a CL perspective?

Okay, figured it out, and it is activated?

1596232425171.png
 
Last edited:
  • Like
Reactions: djernie
Apologies, how do I visit the container in a web browser?

It's the same url you put into the ai tool settings page. If you're running a browser on the same machine as deepstack it would be localhost:<port> or 127.0.0.1:<port>

However I found the api_key part of the container command might be the issue.

It seems to have stopped working since they release the free version. Noticed 401’s in the container logs so checked the docs and they have removed the API key env variable…I have updated my stack and removed the API key from both the compose file and the HA config

Now see that its returning 200’s


If you delete your current container and run the following command:

CPU Version with AVX
docker run --restart=always -e VISION-DETECTION=True -v localstorage:/datastore -p 81:5000 --name deepstack deepquestai/deepstack

It runs on port 81 for the above example. In a browser on the same machine it would be
Seems the deepstack gpu version only runs on linux right now.
 
  • Like
Reactions: djernie
Hey Guys I finally got AI tool to work with DeepStack and BI. But AI Tool keeps shutting itself down. I'm getting triggers but by the time I get back to the computer AI Tool has shut down and I have to restart it. Does anyone have any idea why It keeps shutting down. I do have the latest version of AI Tool.

Have you configured it to run as a service? Have a look at the first post on how to set it up to run as a service.
 
  • Like
Reactions: djernie