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

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
278
Reaction score
1,350
Location
Washington State
I know a few of you are running deepstack on a raspberry pi, any feedback on reliability? My celeron NUC isn't cutting it. Docker on windows 10 it does a 720p res image in about 5 seconds. In the VM I originally had it took 20plus seconds. I see some feedback about the pi and NCS2 running in under a second, so looking for some feedback before I go down that route. It appears it's still in alpha
This is from the DeepStack forum. I'm quite interested in the Jetson version. I envision a couple of Jetsons sitting on top of my BI machine.

"Hello we are planning on releasing an embedded version of DeepStack as a docker image on the Nvidia Jetson nano. Support for a stable version of DeepStack on the pi is still on the radar, however we are considering the performance limits and might instead go all in on the jetson which comes at a better price when the cost of the ncs is added to that of the pi, while still offering better performance."

DeepStack Beta Release
 
Last edited:

Roger

Getting the hang of it
Joined
May 30, 2014
Messages
89
Reaction score
47
Location
Bellevue, WA
I have just set this up on my BI server and am seeing a lot of these errors:
[02.09.2020, 15:01:24]: ...Putting image back in queue due to URL '' failure (ErrCount=0): 'D:\Images\SideYardSD.20200902_150123487.jpg'
[02.09.2020, 15:01:25]: Value cannot be null. | Parameter name: stringToEscape [ArgumentNullException] Mod: <Trigger>d__25 Line:1129:29
[02.09.2020, 15:01:29]: Value cannot be null. | Parameter name: stringToEscape [ArgumentNullException] Mod: <Trigger>d__25 Line:1129:29
[02.09.2020, 15:01:34]: 127.0.0.1:88 - (Error: No predictions? JSON: '{"success":false,"error":"invalid image"}')
[02.09.2020, 15:01:34]: 127.0.0.1:88 - ERROR: Failure response from DeepStack. JSON: '{"success":false,"error":"invalid image"}'
[02.09.2020, 15:01:34]: ...Putting image back in queue due to URL '' failure (ErrCount=0): 'D:\Images\SideYardSD.20200902_150133487.jpg'
[02.09.2020, 15:01:35]: Value cannot be null. | Parameter name: stringToEscape [ArgumentNullException] Mod: <Trigger>d__25 Line:1129:29
 

Eatoff

n3wb
Joined
Aug 28, 2020
Messages
19
Reaction score
3
Location
Australia
This is from the DeepStack forum. I'm quite interested in the Jetson version. I envision a couple of Jetsons sitting on top of my BI machine.

"Hello we are planning on releasing an embedded version of DeepStack as a docker image on the Nvidia Jetson nano. Support for a stable version of DeepStack on the pi is still on the radar, however we are considering the performance limits and might instead go all in on the jetson which comes at a better price when the cost of the ncs is added to that of the pi, while still offering better performance."

DeepStack Beta Release
Thanks for that quote. That's pretty disappointing as I just ordered the Intel stick... Maybe I'll go the route or upgrading from a celeron to an i5 instead.

Has anyone done a comparison between the noavx docker container and the regular container? What sort of performance increase does avx bring (all other things being equal)? I don't have a avx capable system to test on

Edit: actually, reading that forum link you posted, there should have been a stable release for the Pi released end of August, so can't be too far off. And one user reporting faster times from his Pi than from his i5, so that's promising
 
Last edited:

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
278
Reaction score
1,350
Location
Washington State
Edit: actually, reading that forum link you posted, there should have been a stable release for the Pi released end of August, so can't be too far off. And one user reporting faster times from his Pi than from his i5, so that's promising
I don't put much faith into the release date estimates in that thread. On July 8th the developers said that they were considering going "all in" on the Jetson which suggests to me that they would abandon the Pi or at least treat it with low priority. They didn't seem too hot on the Pi, and then four days later on the 12th they said they were going to release a stable version for the Pi soon. It sounds to me like they aren't quite sure of their direction. I have a Jetson Nano in my Amazon cart but I'm not pulling the trigger until I see at least some version of DeepStack available for the Jetson platform. Alpha, Beta, or otherwise.

The people calling for Pi support seem to be doing so because they have already invested in the hardware or perhaps they just have more experience with the Pi and are more comfortable using it. However, since the Jetson is less expensive and more powerful than the Pi with an NCS it makes better sense to me for the developers to focus their efforts toward the Jetson platform.

There's an interesting video on YouTube showing a Jetson Nano running DeepStream doing object detection on 8 video streams simultaneously.

 

Eatoff

n3wb
Joined
Aug 28, 2020
Messages
19
Reaction score
3
Location
Australia
They didn't seem too hot on the Pi, and then four days later on the 12th they said they were going to release a stable version for the Pi soon. It sounds to me like they aren't quite sure of their direction
Yeah, the more I read, the more I worry about the maturity. I know it's free and all, but perhaps the tensorflow AI is a bit more mature at this stage. I should have held off on the NCS2, but lesson learnt
 

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
278
Reaction score
1,350
Location
Washington State
Yeah, the more I read, the more I worry about the maturity. I know it's free and all, but perhaps the tensorflow AI is a bit more mature at this stage. I should have held off on the NCS2, but lesson learnt
It might just be that things are in transition for DeepStack. They have discontinued their Premium (paid) plan and they are working to release their code as open source. The Alpha Pi version was released in August of 2019 and it doesn't seem that much has been done since then, but it's not their core product. They have likely been putting more effort into their primary Docker and Windows versions. I'm hopeful and optimistic that after the transition that they will work on the Jetson version. I'm not expecting to see a dependable Jetson version until the end of the year, but if it comes sooner then I'll be happy.

I run the Windows version (no Docker) on my Blue Iris computer that has an i7-4770 which dates back to 2013 and DS returns results in around 700ms. I also run DS on my personal computer which has an i7-4790 from 2014 which also returns results in around 700ms. I have AI Tool set to use the 4790 first and if the 4790 is busy then the 4770 is used. Three of my cameras cover overlapping areas so it's possible to trigger all three cameras at once and I don't have a problem with the two DeepStacks keeping up. I still get notifications pretty quickly on my phone.

I understand that you currently have a Celeron system that's not working for you and you probably don't want to wait for the Pi or Jetson versions to be stable. So if you don't have another computer on your network that can pitch in to handle DeepStack processing then maybe your best route is to pick up a used computer. I don't know the computer prices in your area but in the US you can get a refurbished i7 computer similar to what I have with 16GB of RAM, a SSD, and Windows 10 Pro on Amazon for around $300. Much more than a Pi or a Jetson but it will do the job with the current version of DeepStack. If you look locally you might be able to find a similar system for much less. I run a computer shop in a small town. We install and maintain networks of around 50 computers or less, and we do computer repair. It's common for customers to not want to repair a computer that's a few years old even if it just needs a software reload. They buy a new computer, we transfer their data, and then they leave their old computer behind for recycling. After erasing the drive I often give the computers away to needy people that want to reload Windows themselves, or I spend the time to run diagnostics and install a fresh copy of Windows and sell them for $200 to cover my labor and the fact that I have to give some kind of warranty and support. If you want a bargain system then perhaps a computer shop in your area can help. If a computer is left behind that doesn't have a Win 10 entitlement then I don't sell it. I either give it away or take it to the recycler. So if you are willing to run Linux and Docker then you have a better chance of finding a cheap or free used computer.
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
448
Reaction score
126
Location
UK
I've just bought an new Pi and Neural stick for less than the price of a Nvidia Jetson nano.
 

VLITKOWSKI

Young grasshopper
Joined
May 9, 2019
Messages
75
Reaction score
7
Location
France
I know a few of you are running deepstack on a raspberry pi, any feedback on reliability? My celeron NUC isn't cutting it. Docker on windows 10 it does a 720p res image in about 5 seconds. In the VM I originally had it took 20plus seconds. I see some feedback about the pi and NCS2 running in under a second, so looking for some feedback before I go down that route. It appears it's still in alpha
Still in alpha but works very well !!! i've a Pi4 & NCS2.
Beta should be delivered on september
 

ChrisX

Getting the hang of it
Joined
Nov 18, 2016
Messages
130
Reaction score
4
hey i will use sub streams to save CPU.
I first need to delete my clone cam ? Config my maincam with sub and create a new AI clone cam ?

Clone cam working with sub streams ?
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,304
Reaction score
3,282
Location
United Kingdom
hey i will use sub streams to save CPU.
I first need to delete my clone cam ? Config my maincam with sub and create a new AI clone cam ?

Clone cam working with sub streams ?
You can use clones with substreams but an issue I found is that the snapshot captured is from the substream so a lower res which for me caused issues with reliable recognition of objects in DQ. I’ve submitted a request to BI to see if an option to have the snapshots from the main stream when using substreams, I think a few others may have also submitted the same request so am hoping that it will be implemented soon.

Right now my clone cams for AI aren’t really clones as far as BI is concerned as I’ve removed the substream to get the higher res snapshots.
 

Eatoff

n3wb
Joined
Aug 28, 2020
Messages
19
Reaction score
3
Location
Australia
I run the Windows version (no Docker) on my Blue Iris computer that has an i7-4770 which dates back to 2013 and DS returns results in around 700ms
Those are some good times, and thanks for the advice. I have been offered a i5 NUC for a good price, hence my indecision.

Still in alpha but works very well !!! i've a Pi4 & NCS2.
Good to hear, thanks. I'll have a look at how to get it all set up. Planning to run it headless.
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
It might just be that things are in transition for DeepStack. They have discontinued their Premium (paid) plan and they are working to release their code as open source. The Alpha Pi version was released in August of 2019 and it doesn't seem that much has been done since then, but it's not their core product. They have likely been putting more effort into their primary Docker and Windows versions. I'm hopeful and optimistic that after the transition that they will work on the Jetson version. I'm not expecting to see a dependable Jetson version until the end of the year, but if it comes sooner then I'll be happy.

I run the Windows version (no Docker) on my Blue Iris computer that has an i7-4770 which dates back to 2013 and DS returns results in around 700ms. I also run DS on my personal computer which has an i7-4790 from 2014 which also returns results in around 700ms. I have AI Tool set to use the 4790 first and if the 4790 is busy then the 4770 is used. Three of my cameras cover overlapping areas so it's possible to trigger all three cameras at once and I don't have a problem with the two DeepStacks keeping up. I still get notifications pretty quickly on my phone.

I understand that you currently have a Celeron system that's not working for you and you probably don't want to wait for the Pi or Jetson versions to be stable. So if you don't have another computer on your network that can pitch in to handle DeepStack processing then maybe your best route is to pick up a used computer. I don't know the computer prices in your area but in the US you can get a refurbished i7 computer similar to what I have with 16GB of RAM, a SSD, and Windows 10 Pro on Amazon for around $300. Much more than a Pi or a Jetson but it will do the job with the current version of DeepStack. If you look locally you might be able to find a similar system for much less. I run a computer shop in a small town. We install and maintain networks of around 50 computers or less, and we do computer repair. It's common for customers to not want to repair a computer that's a few years old even if it just needs a software reload. They buy a new computer, we transfer their data, and then they leave their old computer behind for recycling. After erasing the drive I often give the computers away to needy people that want to reload Windows themselves, or I spend the time to run diagnostics and install a fresh copy of Windows and sell them for $200 to cover my labor and the fact that I have to give some kind of warranty and support. If you want a bargain system then perhaps a computer shop in your area can help. If a computer is left behind that doesn't have a Win 10 entitlement then I don't sell it. I either give it away or take it to the recycler. So if you are willing to run Linux and Docker then you have a better chance of finding a cheap or free used computer.
How are you load balancing the two Deepsack servers, are you using the VorlonCD fork to do this?
/
 

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
278
Reaction score
1,350
Location
Washington State
I am as well and likewise though I am getting some duplications so once that's sorted it'll be even better.
I've had issues with duplicates being sent to DS since moving to the VorlonCD fork, before it supported multiple DS servers. At one time all images were being sent to DS two or three times. Chris Dodge suggested removing the default input path and only having the input path in the camera settings. After making the change everything worked correctly. However, some time after that while messing around with settings the duplicates came back. The way I worked around it was to remove the input path from each camera, save the settings, then enter the input path back into each camera, save the settings, close AI Tool and then reopen it.

After upgrading to the VorlonCD version that supports multiple DS servers I noticed some random duplicates so I went through my regular routine to fix it. I didn't monitor much after that so I don't know if I'm still getting random duplicates. I noticed in the log that the random duplicates were happening when both DS servers were being used during heavy load.
 

Chris Dodge

Pulling my weight
Joined
Aug 9, 2019
Messages
92
Reaction score
115
Location
massachusetts
An update to my VorlonCD mod:

  • Adds ability to copy alert images to any folder
  • Can run any external script on alert
  • Can play sounds based on object detected
  • Allows you to graphically create a masked area similar to how BI does it
  • Maybe fix dupe image issues sigh
  • Misc bugs fixed AND added

 

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
278
Reaction score
1,350
Location
Washington State
For comparison with my i7-4790 running Windows DeepStack in High mode I get times of 660 to 707ms when feeding it images of 2688 x 1520, 2048 x 1536, and 1920 x 1080.

I have a Celeron J1900 and an old i5-4460 system laying around and this coming weekend I plan to put fresh copies of Windows on them and check DS times, just out of curiosity and to see how they do against the Pi. The Celeron is a dog and I don't expect it to do well, but I'm curious to see how the old i5 does.
 
Top