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

Lazersfly

n3wb
Joined
May 5, 2020
Messages
11
Reaction score
0
Location
Texas
Not currently, but the feature is on the todo list
 

kumar2020

Young grasshopper
Joined
May 8, 2020
Messages
42
Reaction score
11
Location
Iowa
Has anyone set this up to run in Container Station on QNAP NAS? I installed the Docker image into a new container and it starts OK but can't get AITool to work with it. It sees the DQ server but returns errors.

Here's the AITool log:
Code:
[08.05.2020, 10:46:03.275]: 
[08.05.2020, 10:46:03.285]: Starting analysis of C:\BlueIris\aiinput/aibasement.20200508_104603216.jpg
[08.05.2020, 10:46:03.347]: (1/6) Uploading image to DeepQuestAI Server
[08.05.2020, 10:46:03.544]: (2/6) Waiting for results
[08.05.2020, 10:46:03.872]: (3/6) Processing results:
[08.05.2020, 10:46:03.888]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[08.05.2020, 10:46:03.910]: ERROR: Processing the following image 'C:\BlueIris\aiinput/aibasement.20200508_104603216.jpg' failed. Failure in AI Tool processing the image.
[08.05.2020, 10:46:08.231]: 
[08.05.2020, 10:46:08.253]: Starting analysis of C:\BlueIris\aiinput/aibasement.20200508_104608216.jpg
[08.05.2020, 10:46:08.267]: (1/6) Uploading image to DeepQuestAI Server
[08.05.2020, 10:46:08.289]: (2/6) Waiting for results
[08.05.2020, 10:46:08.307]: (3/6) Processing results:
[08.05.2020, 10:46:08.321]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[08.05.2020, 10:46:08.335]: ERROR: Processing the following image 'C:\BlueIris\aiinput/aibasement.20200508_104608216.jpg' failed. Failure in AI Tool processing the image.
And the console output from the DS server:
Code:
v1/vision/addmodel                                                                                                                          
---------------------------------------                                                                                                     
v1/vision/listmodels                                                                                                                        
---------------------------------------                                                                                                     
v1/vision/deletemodel                                                                                                                       
---------------------------------------                                                                                                     
---------------------------------------                                                                                                     
v1/backup                                                                                                                                   
---------------------------------------                                                                                                     
v1/restore                                                                                                                                  
[GIN] 2020/05/08 - 15:46:02 | 403 |     246.421µs |    192.168.10.9 | POST     /v1/vision/detection                                         
[GIN] 2020/05/08 - 15:46:07 | 403 |     112.192µs |    192.168.10.9 | POST     /v1/vision/detection                                         
[GIN] 2020/05/08 - 15:47:39 | 403 |     110.216µs |    192.168.10.9 | POST     /v1/vision/detection                                         
[GIN] 2020/05/08 - 15:47:44 | 403 |     121.654µs |    192.168.10.9 | POST     /v1/vision/detection                                         
[GIN] 2020/05/08 - 15:48:19 | 403 |      96.128µs |    192.168.10.9 | POST     /v1/vision/detection                                         
[GIN] 2020/05/08 - 15:48:24 | 403 |     122.467µs |    192.168.10.9 | POST     /v1/vision/detection                                         
[GIN] 2020/05/08 - 15:48:29 | 403 |     123.416µs |    192.168.10.9 | POST     /v1/vision/detection                                         
[GIN] 2020/05/08 - 15:48:34 | 403 |     119.791µs |    192.168.10.9 | POST     /v1/vision/detection
From reading through all the posts here I think that VISION-DETECTION is not enabling, but I don't know how to set up Container Station correctly to do that. Or it may be something else?
Thanks!
 

TechNight

n3wb
Joined
May 6, 2020
Messages
12
Reaction score
0
Location
Germany
Has anyone set this up to run in Container Station on QNAP NAS? I installed the Docker image into a new container and it starts OK but can't get AITool to work with it. It sees the DQ server but returns errors.

Here's the AITool log:
Code:
[08.05.2020, 10:46:03.275]:
[08.05.2020, 10:46:03.285]: Starting analysis of C:\BlueIris\aiinput/aibasement.20200508_104603216.jpg
[08.05.2020, 10:46:03.347]: (1/6) Uploading image to DeepQuestAI Server
[08.05.2020, 10:46:03.544]: (2/6) Waiting for results
[08.05.2020, 10:46:03.872]: (3/6) Processing results:
[08.05.2020, 10:46:03.888]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[08.05.2020, 10:46:03.910]: ERROR: Processing the following image 'C:\BlueIris\aiinput/aibasement.20200508_104603216.jpg' failed. Failure in AI Tool processing the image.
[08.05.2020, 10:46:08.231]:
[08.05.2020, 10:46:08.253]: Starting analysis of C:\BlueIris\aiinput/aibasement.20200508_104608216.jpg
[08.05.2020, 10:46:08.267]: (1/6) Uploading image to DeepQuestAI Server
[08.05.2020, 10:46:08.289]: (2/6) Waiting for results
[08.05.2020, 10:46:08.307]: (3/6) Processing results:
[08.05.2020, 10:46:08.321]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[08.05.2020, 10:46:08.335]: ERROR: Processing the following image 'C:\BlueIris\aiinput/aibasement.20200508_104608216.jpg' failed. Failure in AI Tool processing the image.
And the console output from the DS server:
Code:
v1/vision/addmodel                                                                                                                         
---------------------------------------                                                                                                    
v1/vision/listmodels                                                                                                                       
---------------------------------------                                                                                                    
v1/vision/deletemodel                                                                                                                      
---------------------------------------                                                                                                    
---------------------------------------                                                                                                    
v1/backup                                                                                                                                  
---------------------------------------                                                                                                    
v1/restore                                                                                                                                 
[GIN] 2020/05/08 - 15:46:02 | 403 |     246.421µs |    192.168.10.9 | POST     /v1/vision/detection                                        
[GIN] 2020/05/08 - 15:46:07 | 403 |     112.192µs |    192.168.10.9 | POST     /v1/vision/detection                                        
[GIN] 2020/05/08 - 15:47:39 | 403 |     110.216µs |    192.168.10.9 | POST     /v1/vision/detection                                        
[GIN] 2020/05/08 - 15:47:44 | 403 |     121.654µs |    192.168.10.9 | POST     /v1/vision/detection                                        
[GIN] 2020/05/08 - 15:48:19 | 403 |      96.128µs |    192.168.10.9 | POST     /v1/vision/detection                                        
[GIN] 2020/05/08 - 15:48:24 | 403 |     122.467µs |    192.168.10.9 | POST     /v1/vision/detection                                        
[GIN] 2020/05/08 - 15:48:29 | 403 |     123.416µs |    192.168.10.9 | POST     /v1/vision/detection                                        
[GIN] 2020/05/08 - 15:48:34 | 403 |     119.791µs |    192.168.10.9 | POST     /v1/vision/detection
From reading through all the posts here I think that VISION-DETECTION is not enabling, but I don't know how to set up Container Station correctly to do that. Or it may be something else?
Thanks!

Yes you have to set the environment variable VISION-DETECTION=True
Under portainer you can set the env variable during setup process of container under advanced container settings>Env>Add environment variables
 

kumar2020

Young grasshopper
Joined
May 8, 2020
Messages
42
Reaction score
11
Location
Iowa
So is Portainer used to add functions to Container Stations docker engine? CS lets me set Env variables in the advanced settings for the DS container, but it doesn't like the dash in the variable. I tried it as VISION_DETECTION but then the DS engine ignored it.
 

tekbar7522

n3wb
Joined
Apr 21, 2020
Messages
1
Reaction score
0
Location
Canada
In addition to telegram, is it possible to add MQTT notification? If so, can you include what it detects within theMQTT message? That would make it possible to use something like nodered to do a custom alert based on what it detected.

By the way, great work on the app. It works great for me.
 

kumar2020

Young grasshopper
Joined
May 8, 2020
Messages
42
Reaction score
11
Location
Iowa
I got it setup and running with Portainer, Followed the steps in the video shared earlier. When I access the server with my web browser the "DeepStack Activated" page displays fine. But the AI Tool keeps saying it can't find it.
Code:
[08.05.2020, 19:14:36.986]: Starting analysis of C:\BlueIris\aiinput/aibasement.20200508_191301809.jpg
[08.05.2020, 19:14:36.996]: (1/6) Uploading image to DeepQuestAI Server
[08.05.2020, 19:16:17.006]: System.Threading.Tasks.TaskCanceledException | A task was canceled. (code: -2146233029 )
[08.05.2020, 19:16:17.022]: ERROR: Processing the following image 'C:\BlueIris\aiinput/aibasement.20200508_191301809.jpg' failed. Can't reach DeepQuestAI Server at 192.168.1.100:86.
[08.05.2020, 19:16:17.060]:
 

TechNight

n3wb
Joined
May 6, 2020
Messages
12
Reaction score
0
Location
Germany
I got it setup and running with Portainer, Followed the steps in the video shared earlier. When I access the server with my web browser the "DeepStack Activated" page displays fine. But the AI Tool keeps saying it can't find it.
Code:
[08.05.2020, 19:14:36.986]: Starting analysis of C:\BlueIris\aiinput/aibasement.20200508_191301809.jpg
[08.05.2020, 19:14:36.996]: (1/6) Uploading image to DeepQuestAI Server
[08.05.2020, 19:16:17.006]: System.Threading.Tasks.TaskCanceledException | A task was canceled. (code: -2146233029 )
[08.05.2020, 19:16:17.022]: ERROR: Processing the following image 'C:\BlueIris\aiinput/aibasement.20200508_191301809.jpg' failed. Can't reach DeepQuestAI Server at 192.168.1.100:86.
[08.05.2020, 19:16:17.060]:
For me only installing deepstack ai on a different Linux machine worked. It even won't worked under windows and under portainer. I'm running it under proxmox as lxc container, it's working fine. I have it more resources and the speed increased to under 500ms which is fast for me.
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
For me only installing deepstack ai on a different Linux machine worked. It even won't worked under windows and under portainer. I'm running it under proxmox as lxc container, it's working fine. I have it more resources and the speed increased to under 500ms which is fast for me.
For me only installing deepstack ai on a different Linux machine worked. It even won't worked under windows and under portainer. I'm running it under proxmox as lxc container, it's working fine. I have it more resources and the speed increased to under 500ms which is fast for me.
I posted the solution in post #338 to get it working under Windows; it is a Visual C++ perquisite that causes Deepstack to not respond to AI Tool. This isn’t mentioned anywhere in Deepstack’s documentation; I discovered this through testing.


Sent from my iPhone using Tapatalk
 

kumar2020

Young grasshopper
Joined
May 8, 2020
Messages
42
Reaction score
11
Location
Iowa
I posted the solution in post #338 to get it working under Windows; it is a Visual C++ perquisite that causes Deepstack to not respond to AI Tool. This isn’t mentioned anywhere in Deepstack’s documentation; I discovered this through testing.
I don't have any issues getting DS to run on same Windows 10 box as my BI server. But I want to offload the DS processing to my NAS. Between the camera streams, the AI Tool and DS my CPU gets maxed out. It would be nice if they made the DeepStack GPU version available for Windows, but it looks like Linux only. At least I couldn't find that option.

And it's running on my NAS, but AI Tool can't seem to reach it. I have no idea why because I can open the link on a browser and it connects fine.
 
Joined
May 9, 2020
Messages
1
Reaction score
0
Location
Dallas
Is it possible to wrap this whole thing into a virtual machine? It might be easier to install. Just a question.
 

nz1984

n3wb
Joined
May 9, 2020
Messages
4
Reaction score
0
Location
Oceania
Great tutorial and tool. Got it up and running in a Win10 VM under Ubuntu server. Blue Iris and AI Tool running as a service in the VM obviously and then Deepquest/deepstack running on Ubuntu. All working brilliantly, with one exception - I'm getting duplicate notifications into Telegram. [5 seconds later] But as I was typing this I figured it out - I had run AI tool in the foreground to look at what it was doing, turns out that means I have two instances of it running...
 
Joined
May 9, 2020
Messages
9
Reaction score
0
Location
USA
I set this up early this week and figured out that I needed to move DeepStack off to a different computer. I moved it to a dedication Window 10 v1903 and now when the AI Tool tries to process the image, it fails every time. I have a separate machine that runs docker so I decided I would spin an instance of deepstack there. Same issue. Anyone figure out how to get deepstack to work when not running on the same machine? ideally i would like to use my docker instance. Love this program but have to figure out how to make it work on a separate machine because i have 31 1080p cameras and 6 4k cameras. The processing power can't be on the same machine. Any help is appreciated.
 

nz1984

n3wb
Joined
May 9, 2020
Messages
4
Reaction score
0
Location
Oceania
I set this up early this week and figured out that I needed to move DeepStack off to a different computer.
My only issue with deepstack was one of the tutorials (deepstack.cc installation for linux) listed this as the run command:
docker run -e VISION-SCENE=True -v localstorage:/datastore -p 80:5000 deepquestai/deepstack

and I didn't initially notice that I needed VISION-DETECTION=True
 

nstig8

n3wb
Joined
Jan 21, 2015
Messages
23
Reaction score
11
For me only installing deepstack ai on a different Linux machine worked. It even won't worked under windows and under portainer. I'm running it under proxmox as lxc container, it's working fine. I have it more resources and the speed increased to under 500ms which is fast for me.

Code:
[08.05.2020, 19:14:36.986]: Starting analysis of C:\BlueIris\aiinput/aibasement.20200508_191301809.jpg
[08.05.2020, 19:14:36.996]: (1/6) Uploading image to DeepQuestAI Server
[08.05.2020, 19:16:17.006]: System.Threading.Tasks.TaskCanceledException | A task was canceled. (code: -2146233029 )
[08.05.2020, 19:16:17.022]: ERROR: Processing the following image 'C:\BlueIris\aiinput/aibasement.20200508_191301809.jpg' failed. Can't reach DeepQuestAI Server at 192.168.1.100:86.
[08.05.2020, 19:16:17.060]:
I had this same issue that a few people have been having running in a VM in Proxmox, actually 2 VMs - the Linux one I use for Docker and then the Windows one I use for Blue Iris. I finally figured it out. It is because the default processor type for VMs is kvm64 which does not have support for Advanced Vector Extensions (AVX) or the SSE instruction set. The deepquestai/deepstack docker image uses AVX so the image processing was failing. I only noticed because there is a noavx tagged deepstack image in the docker hub. Since my processor (Ivy Bridge) does support AVX I stopped the VMs and updated the config of the processor type in proxmox to Ivy Bridge and deepstack works now. I believe using the "host" processor type would have the same result (so long as your processor can support AVX). This would also explain TechNight's LXC working because LXCs use the host CPU directly rather than a virtual processor layer.
 

nstig8

n3wb
Joined
Jan 21, 2015
Messages
23
Reaction score
11
The DeepStack release notes from April last year I believe support my theory above: New Features, Performance Improvements and More With DeepStack 3.4
Specifically this section:
No AVX Support
We have added support for older systems with no avx optimization enabled.
On the DeepStack’s docker page https://hub.docker.com/r/deepquestai/deepstack/tags 5
you will find noavx tags with support for older systems. Note however that the noavx tags are not as fast as the standard tags.
 

kumar2020

Young grasshopper
Joined
May 8, 2020
Messages
42
Reaction score
11
Location
Iowa
Thanks @nstig8, that seems to be the issue with my setup as well. I installed the NOAVX docker image on my NAS and it worked! Unfortunately it's WAY too slow to be useful. I'm only sending it 640x480 images to analyze and it's taking around 40-50 seconds per image to process.

Next I'm going to look into a Raspberry Pi and Intel Neural stick as it seems like may be the best option at this point.
 

domenic

n3wb
Joined
May 10, 2020
Messages
1
Reaction score
0
Location
Wilmington, Delaware USA
Hi!

Quick question. With this solution is it possible to somehow maintain a count of say the total number of cars, people, etc detected within a certain period of time? I am interested in knowing how many cars & people go past my house per day, week, etc.

If no formal reporting exists perhaps a log file could be dumped into say Excel then sliced / diced?

Thanks!

Domenic
 

badandy996

n3wb
Joined
May 11, 2020
Messages
22
Reaction score
9
Location
California
I appear to be getting the same message. I am running DS on Hass.io Any suggestions on resolving this issue?

[10.05.2020, 18:31:09.010]: Starting analysis of D:\aiinput/SD_F_Side.20200510_183108971.jpg
[10.05.2020, 18:31:09.020]: (1/6) Uploading image to DeepQuestAI Server
[10.05.2020, 18:31:09.036]: (2/6) Waiting for results
[10.05.2020, 18:31:09.050]: (3/6) Processing results:
[10.05.2020, 18:31:09.070]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[10.05.2020, 18:31:09.084]: ERROR: Processing the following image 'D:\aiinput/SD_F_Side.20200510_183108971.jpg' failed. Failure in AI Tool processing the image.
 
Joined
May 9, 2020
Messages
9
Reaction score
0
Location
USA
I set this up early this week and figured out that I needed to move DeepStack off to a different computer. I moved it to a dedication Window 10 v1903 and now when the AI Tool tries to process the image, it fails every time. I have a separate machine that runs docker so I decided I would spin an instance of deepstack there. Same issue. Anyone figure out how to get deepstack to work when not running on the same machine? ideally i would like to use my docker instance. Love this program but have to figure out how to make it work on a separate machine because i have 31 1080p cameras and 6 4k cameras. The processing power can't be on the same machine. Any help is appreciated.
I just figured this out. When creating a container, my containers default to require authentication of my NAS admin user. If you uncheck the box in the container creation process, it works. I am using Portainer as my GUI which ultimately was the tool adding this selection by default.

Now I wish there was a tutoral like this for OpenALPR. :)
 
Joined
May 9, 2020
Messages
9
Reaction score
0
Location
USA
My only issue with deepstack was one of the tutorials (deepstack.cc installation for linux) listed this as the run command:
docker run -e VISION-SCENE=True -v localstorage:/datastore -p 80:5000 deepquestai/deepstack

and I didn't initially notice that I needed VISION-DETECTION=True
Thanks ! I fortunately did resolve today. I use Portainer to control my Docker hubs and it by default always adds authentication to each new container. I unchecked the authentication box in the creation process and now it functions flawlessly.
 
Top