Blue Iris integrated directly with the Deepstack open source AI project with the 5.4.0 release. This is an on-prem only AI solution requested by many users. Deepstack (deepstack.cc) was a private AI company (December 2018) located in Nigeria that recently open sourced their work (March 2019). If you prefer to listen instead of read, watch the DeepStack AI webinar associated with this article.
The DeepStack user experience article goes under the covers of the integration to explain the user interface as well as the unique advantages of the integration.
The DeepStack Fine tuning article explains the DeepStack analysis feature. Makes trouble-shooting AI alerts so easy now.
The DeepStack Gotchas article are all the lessons learned from past tickets.
Architecture
Deepstack AI Installation
Depending on your machine, you can choose the many Windows installation options. Below is the link to the Windows installation page. The CPU version is very easy to install. Just run the installer.
https://docs.deepstack.cc/windows/
Here is a link to a great video on setting up BI + DeepStack.
Intel from a user. 20220-Jan-28
A new version of DeepStack was just released. There is an issue with the way Blue Iris starts up the new version of DeepStack. The issue is DS version 2021.09.01 had two of the same files just named differently in the folder "C:\DeepStack\server". One was named deepstack.exe and the other was named server.exe. Blue Iris is trying to start up server.exe.
DeepStack version 2022.01.1 only has one file in folder "C:\DeepStack\server" named deepstack.exe. I did a temporary fix by copying deepstack.exe in the same folder with the file name server.exe.
Link: https://github.com/johnolafenwa/DeepSta ... /2022.01.1
Engineering states 5.5.5.1 will have the fix.
The DeepStack website needs some cleanup. There are pages on the site that point to a legacy installer that does not work! Stick to the URL above and you will be fine. In particular, the incorrect installer name is DeepStack.Installer.exe. My hunch is this version was created around 2019 before the company decided to open source their software. Another clue you have the wrong version is when you bring up the DeepStack splash page, Activation Key information is part of the page.DeepStack version 2022.01.1 only has one file in folder "C:\DeepStack\server" named deepstack.exe. I did a temporary fix by copying deepstack.exe in the same folder with the file name server.exe.
Link: https://github.com/johnolafenwa/DeepSta ... /2022.01.1
Engineering states 5.5.5.1 will have the fix.
If you choose the wrong version, you will find BI cannot start DeepStack automatically. It cannot communicate with the server either with below errors in the Status -> Log.
As a final check, below is a screenshot of my install directory. I installed the Windows GPU version so your directory may be different based on the version installed. I have seen tickets where the install directory did not even have a README.md file which made me suspicious as to whether the installation was valid.
- Deepstack forum: https://forum.deepstack.cc/
- Deepstack AI Server website: https://deepstack.cc/
According to the documentation, the GPU installation also requires CUDA 10.1 and cuDNN. The latest version of CUDA is 11.2. I took a chance with CUDA 11.2 and it seems to be working fine for me. I will share issues if I come across any. For those who are curious, CUDA is an API created by NVidia to make parallel programming on NVidia GPUs easier.
Manual start
Run DeepStack manually to confirm Installation.
I prefer to work in stages. For me a good first step is to install/run DeepStack manually. To start DeepStack manually, from a CMD prompt run the below command.
Code: Select all
deepstack --VISION-DETECTION True --PORT 82
In addition to the console, you also get confirmation via the DeepStack browser confirmation page. From a browser go to localhost:82 (or port chosen to run the server)
If DeepStack is running correctly, connect BI to DeepStack to confirm BI and DeepStack can work together. To do so, edit Global settings -> AI tab. The below settings tell BI where the DeepStack server is running, i.e. on the same machine on port 82. With this information, BI is able to send AI requests to DeepStack.
Checklist: Confirm whether BI can communicate successfully with the DeepStack server.
- Global settings -> AI tab:
Select "Use DeepStack server on IP/port". (see above)
Specify which port to use for DeepStack. 82 is the default. As long as it is NOT the same port as the BI web server you are fine. I'm assuming you installed DeepStack on your BI machine, thus IP Address = 127.0.0.1. BI does allow the ability to run DeepStack on a separate server. - DO NOT check Auto start/stop with Blue Iris.
- Jump to Blue Iris AI Camera settings section below and turn on DeepStack for one camera.
- Check for any errors in Status -> log.
When working correctly, the motion event in the log should be followed by a DeepStack response as seen below. - Check the DeepStack console as well. Are requests / response being processed by DeepStack?
BI Manages DeepStack
Once you confirmed BI/DeepStack communication, you can consider tightly connecting BI to DeepStack by activating "Auto start/stop" via Global settings -> AI tab as seen below.
Checklist: Now you can automate start/stop of DeepStack from BI.
- Check "Auto start/stop with Blue Iris.
Best to install DeepStack in default location (C:\DeepStack). If you choose a different location, please specify accordingly. - Stop the DeepStack server you started manually. May need to restart machine just to make sure all processes run by DeepStack are shutdown.
- Hit Start now.
- Use Test in browser link to confirm Deepstack is running.
- Similar to above, confirm one camera is processing DeepStack motion events properly.
- If you want to play with Facial recognition, you can activate the feature as well.
Bring up task manager. If you see the below processes running, you know DeepStack is running.
server.exe and redis-server.exe are must processes.
python processes will also be seen but not sure if 2 or 1 or more python processes will be created based on load.
Distributed Systems
It is feasible to run BI on one machine and Deepstack on a completely separate machine. A separate machine could mean a completely separate hardware server or a VM or a Dockers container.
One user stated he did so successfully by running a Docker container in an Ubuntu 18.04 VM. In his implementation the IP Address for the Docker container was 10.32.1.9.
The docker command was:
Code: Select all
docker run -d \
--name=deepstack \
-p 80:5000 \
-v /opt/deepstack-storage:/datastore:rw \
-e "VISION-DETECTION=True" \
-e "VISION-FACE=True" \
deepquestai/deepstack
Once setup, similar to the non-distributed system (above), check/confirm that you can access the Deepstack confirmation page from a browser on the BI server (Test in browser link). In BI, the AI settings based on the Docker IP Address mentioned above would be:
If you see traffic on the AI machine but no objects in BI, you likely did not enable the vision detection when starting DeepStack. The parameters BI uses to start DeepStack below.
Code: Select all
-VISION-SCENE=False -VISION-DETECTION=True -VISION-FACE=True -ADMIN-KEY= -API-KEY= -PORT=82
Next steps / Submit a ticket
This article is about installing and running DeepStack.
If you are having issues with installing or running DeepStack, it is best to go to the Gotchas article to see if others have seen and resolved the same issue.
DeepStack is an open source 3rd party AI solution. Issues running it are probably better addressed by experts on the DeepStack forum.