Help with deepstack gpu for windows

Joined
Sep 19, 2015
Messages
956
Reaction score
1,217
Location
Naples Fl
I'd use the 1080TI. It will "unload" work from the CPU, make the machine more responsive and, may, give better results with DeepStack. If it's only processing DeepStack detection the power consumption should be around, or even under, ten watts.
I killed deepstack because it was not capturing motion at night and we have a 300 pound and a 600 pound bear in the neighborhood and I did not want to surprise them at night
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,692
Location
New Jersey
Give it a shot with the 1080. Since I switched to the GPU version I'm getting, virtually, 100% detection at night using just the built-in model.
 
Joined
Sep 19, 2015
Messages
956
Reaction score
1,217
Location
Naples Fl
Give it a shot with the 1080. Since I switched to the GPU version I'm getting, virtually, 100% detection at night using just the built-in model.
I think part of my problem maybe caused by my installation being on my 8tb X drive and DS being installed on it's default C:\ drive.

I think what I need is to see some templates of what is working for others and use them for starting points
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,692
Location
New Jersey
Is that "X drive" an external drive? If so I think the additional time, especially if it's USB, will kill DeepStack detection. I'm using internal drives, 4TB and 8TB purples.
 
Joined
Sep 19, 2015
Messages
956
Reaction score
1,217
Location
Naples Fl
Is that "X drive" an external drive? If so I think the additional time, especially if it's USB, will kill DeepStack detection. I'm using internal drives, 4TB and 8TB purples.
No it's an internal drive connected to the evga x299 dark motherboard via the hard drive headers the c drive is a new SAMSUNG 970 EVO Plus SSD 2TB - M.2 NVMe Interface Internal Solid State Drive with V-NAND Technology (MZ-V7S2T0B/AM) which should make the old girl a little quicker
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,692
Location
New Jersey
Then file retrieval time shouldn't be a problem. I know it can be a PITA, but give that 1080 a chance, you may be pleasantly surprised. I know I was.
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,692
Location
New Jersey
I found out that un-install wasn't very complete. It seems to leave at least the directory structure and some files behind. I did re-install with the GPU version without deleting anything manually and it worked fine but as always YMMV.
 

whoami ™

Pulling my weight
Joined
Aug 4, 2019
Messages
230
Reaction score
224
Location
South Florida
Last night I took some time to look through the VorlonCD github and discovered there are more updates after the October 30, 2020 release hiding here. Maybe you guys already know this but DAMN... With the newer versions you can run DeepStackGPU in parallel buy creating multiple instances of DeepStack directly from AI Tool. I experimented with 3 instances of DS and had all 8 of my cams sending pics to DS and was getting around 30-35ms. It was able to use around 50% of the GPU (P400) this way.

I'm getting some errors in Deepstack which I'm about to attempt to track down. They aren't preventing DS from working though.

Code:
Process Process-1:
Traceback (most recent call last):
  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\process.py", line 297, in _bootstrap
  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\process.py", line 99, in run
  File "C:\DeepStack\intelligencelayer\shared\detection.py", line 138, in objectdetection
    os.remove(img_path)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\admin\\AppData\\Local\\Temp\\DeepStack\\b15d044d-0684-4271-bf33-ca94ab33e3fc'
 
Last edited:

SuperMiguel

Young grasshopper
Joined
Nov 13, 2017
Messages
46
Reaction score
10
Last night I took some time to look through the VorlonCD github and discovered there are more updates after the October 30, 2020 release hiding here. Maybe you guys already know this but DAMN... With the newer versions you can run DeepStackGPU in parallel buy creating multiple instances of DeepStack directly from AI Tool. I experimented with 3 instances of DS and had all 8 of my cams sending pics to DS and was getting around 30-35ms. It was able to use around 50% of the GPU (P400) this way.

I'm getting some errors in Deepstack which I'm about to attempt to track down. They aren't preventing DS from working though.

Code:
Process Process-1:
Traceback (most recent call last):
  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\process.py", line 297, in _bootstrap
  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\process.py", line 99, in run
  File "C:\DeepStack\intelligencelayer\shared\detection.py", line 138, in objectdetection
    os.remove(img_path)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\admin\\AppData\\Local\\Temp\\DeepStack\\b15d044d-0684-4271-bf33-ca94ab33e3fc'
do you know if this works using the native blueiris client?
 

SuperMiguel

Young grasshopper
Joined
Nov 13, 2017
Messages
46
Reaction score
10
after installing the deepstack GPU version, is there a way to check that it is actually using my GPU or running on GPU version mode?
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,692
Location
New Jersey
The GPU version won't use the CPU, only the GPU other than the control necessary to send the data to the GPU. You an confirm by using task manage and watching GPU utilization going up when DS is processing an image.
 

icpilot

Getting comfortable
Joined
Feb 1, 2018
Messages
293
Reaction score
394
I uninstalled the CPU version and installed the GPU version on my BI machine. It is detecting in about 1/10th the time that the CPU version was taking. The CPU was typically running 500-1000ms and frequently went to 1500ms and higher depending on the load from python, multiple triggers. In about a half hour of watching things I've seen times as low as 54ms but they are typically around 100ms and under 200ms for a maximum so far. That's a very significant difference.

On top of that the detection rate is probably over 95% now. Somehow, I can't help but think the two, speed and success, are related to each other.

A question for those with more knowledge and experience with DS and NVidia. If there is ore than one NVidia card installed will DS use both GPUs when the load gets higher?
How did you first uninstall the CPU version? Through Windows Control Panel?
 

icpilot

Getting comfortable
Joined
Feb 1, 2018
Messages
293
Reaction score
394
Yes, I used Control Panel for the uninstall.
Gotcha. I did the same AFTER I had installed the GPU version over the CPU version and had problems.

Still having a few bugs to work out with some "DeepStack: -1" errors in BI that then disappear if I open a Powershell window and access DS that way.
 

The_Oman

n3wb
Joined
Jul 18, 2021
Messages
2
Reaction score
5
Location
MN
EDIT: I forgot about the fact that BI5 uses the LOCAL DeepStack when remoting into another BI machine unless you specify the IP address direcly. The benchmarks are for a GTX2060TI. The benchmark for the N2000 is about 1/2 the time spent processing when going from medium CPU on an i7-4770 to high on an N2000 GPU with the res change. The most complex high-res frames with face detection is just under 300ms. Some are as low as 8ms when there is nothing interesting to see. There is some CPU usage but it is a small fraction of what it is with the CPU only version.

I have a server that has multiple jobs. I would prefer to do everything in VMs but hardware passthrough for GPUs is a nightmare. Therefore I have the GPU based tasks on the server host. The host server is used as a Plex server and a BI server.
After switching to BI5 and Deepstack CPU six months ago (I was using Luxriot EVO) I have been very pleased with nearly everything. I had the system tuned to be able to deal with the fact that the DeepStack AI can't be overloaded.

I purchased a used NVIDIA M2000 GPU so that I could do multiple hardware transcodes with Plex. That worked great. I finally took the last step and switched to the GPU version of DeepStack.
All I can say is wow. The GPU version on the M2000 is about 5 times the speed of the CPU version (CPU was set to Medium and GPU is now set to High) and now it doesn't hit my CPU at all. There appears to be very little impact to the transcoding ability when the compute units are loaded from DeepStack.
I did notice that DeepStack loads up the memory in the GPU but there still seems to be plenty for at least 2 transcode sessions when processing frames from BI.

I'm now sending the full frame to Deepstack vs. the reduced frame (when available). Full frames are averaging about 100ms for detection. Low res frames are running about 8ms for detection.

When multiple cameras detect motion the system doesn't start to bog down any longer. Also I've noticed that the alerts are more reliable. I'm sure that's because of the additional frames, additional resolution, and High AI mode.

This is great.
 
Last edited:

dantonio

n3wb
Joined
Apr 30, 2021
Messages
2
Reaction score
1
Location
Minnesota
I've got a 1070 Ti in my rig and followed all the instructions here. I can't get this thing to work to save my life. I can see in the logs I'm connected to Deep Stack, but I'm getting a ton of "DeepStack has been restarted."

My steps, I uninstalled all my CPU Deepstack. I then install CUDA (tried 10.1 AND then 11.4) and then I extract the CUDNN and add the files to respective folders. I can then install the GPU version and start DeepStack no problem, the IP address works, but I just can't get anything to detect or work with BlueIris.

I'm dying to use my GPU, but it doesn't look like it's in the cards. I'm going to switch back to the CPU version, unfortunately.
 

DigitalPackrat

Getting the hang of it
Joined
Dec 12, 2015
Messages
41
Reaction score
27
I've got a 1070 Ti in my rig and followed all the instructions here. I can't get this thing to work to save my life. I can see in the logs I'm connected to Deep Stack, but I'm getting a ton of "DeepStack has been restarted."

My steps, I uninstalled all my CPU Deepstack. I then install CUDA (tried 10.1 AND then 11.4) and then I extract the CUDNN and add the files to respective folders. I can then install the GPU version and start DeepStack no problem, the IP address works, but I just can't get anything to detect or work with BlueIris.

I'm dying to use my GPU, but it doesn't look like it's in the cards. I'm going to switch back to the CPU version, unfortunately.

I fought the "DeepStack has been restarted" issue for a few hours after switching from CPU to GPU. What fixed it for me was running deepstack from the shortcut in start menu after stopping it in BI. Running deepstack from its shortcut brought up some firewall exceptions to approve then GPU memory went from 0 to 2GB. After that, deepstack worked with BI starting it and continued working after a few reboots.
 

dantonio

n3wb
Joined
Apr 30, 2021
Messages
2
Reaction score
1
Location
Minnesota
I fought the "DeepStack has been restarted" issue for a few hours after switching from CPU to GPU. What fixed it for me was running deepstack from the shortcut in start menu after stopping it in BI. Running deepstack from its shortcut brought up some firewall exceptions to approve then GPU memory went from 0 to 2GB. After that, deepstack worked with BI starting it and continued working after a few reboots.
Thanks for this! That is definitely something I didn't try before switching back to the CPU version.

Can I ask what version of CUDA you're running? Is there an order of operations I might be missing? I followed the instructions for cuDNN and I just can't seem to get everything to "stick".

Also, do I need Visual Studio installed? I'm guessing, no?

EDIT: I got it working! Thank you so much! I think you were right, the Blue Iris starting the service seemed to be the issue. The desktop starting from shortcut didn't seem to fully do it though. What seemed to do the trick was shutting down BlueIris completely, using PowerShell to run:
Code:
deepstack --VISION-SCENE=True --VISION-DETECTION=True --VISION-FACE=True --PORT 80
verifying that it worked in the browser (127.0.0.1:80) and then firing up Blue Iris.

For others, I ended up completely uninstalling Deepstack CPU (via Control Panel AND deleting the leftover folders). I think installed Cuda 10.1 (no updates),downloaded cudnn-10.2, unpacked and added the files to the directories and made sure the environmental variables were present. I installed Deepstack GPU and then ran that code I referenced above in PowerShell, I then started up Blue Iris and made sure the AI/Deepstack settings matched ports/options that I selected and viola! Up and running.
 
Last edited:
Top