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

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
209
Reaction score
125
Location
Pennsylvania
Has anyone been able to get this working recently? I had it working for awhile running on my BI machine, but then it stopped working. I’ve since built a windows 10 VM and installed DeepStack using the instructions posted by @GentlePumpkin as well as tried running AI tool on the same VM as well as running AI Tool on the BI machine. I’ve also built a Ubuntu VM running DeepStack in Docker, but I keep getting the same error that AI Tool can’t contact DeepStack. I’m thinking that there’s an issue with DeepStack. Just wondering if others are having the same issues.


Sent from my iPhone using Tapatalk
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
209
Reaction score
125
Location
Pennsylvania
Has anyone been able to get this working recently? I had it working for awhile running on my BI machine, but then it stopped working. I’ve since built a windows 10 VM and installed DeepStack using the instructions posted by @GentlePumpkin as well as tried running AI tool on the same VM as well as running AI Tool on the BI machine. I’ve also built a Ubuntu VM running DeepStack in Docker, but I keep getting the same error that AI Tool can’t contact DeepStack. I’m thinking that there’s an issue with DeepStack. Just wondering if others are having the same issues.


Sent from my iPhone using Tapatalk
Update: This is now working. It ran overnight and then began working this morning. I restarted the Ubuntu VM and ran DeepStack inside Docker last night. Just wanted to pass this good news along. I'm just unsure why it had to run so long before beginning to work. I believe that others have had the same experience though.
 
Joined
Oct 22, 2015
Messages
5
Reaction score
4
Is it possible to transfer the files via email or other method instead of to Telegram?
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
209
Reaction score
125
Location
Pennsylvania
Is it possible to transfer the files via email or other method instead of to Telegram?
The easiest way to do this would be to trigger a camera in BI from AI Tool and then have BI send an email alert based on the triggered event.


Sent from my iPhone using Tapatalk
 

Alan_F

n3wb
Joined
May 17, 2019
Messages
8
Reaction score
1
Location
Maryland
The only issue would be that the image sent from BI will not be the same image that was analyzed by the AI. It would be the image from a second or two later after the AI has analyzed the images and the AITool triggers BI.

I tried this originally, triggering BI to send an SMS message on detection and some of the images didn't show a person. There was just enough delay in image processing and triggering BI that the person had left the frame. Depending on your setup this may or may not be an issue for you.

It would probably be fairly easy to add a 'send alert to email' function into the program. I can try to add that, assuming @GentlePumpkin has no objection.
 

K98045

n3wb
Joined
Jan 17, 2020
Messages
1
Reaction score
0
Location
Seattle WA
Great Job!

Now, time for the request....

What I would really like to do is trigger another http listener at the same time I trigger Blue Iris. I can do that now with an empty URL. However, it would be awesome if you could have optional parameters for the object type, and the confidence rating.

I'm relatively sure all that information available when you call the trigger URLs. Something like: "". This seems like it would be about 2 lines of code (1) determine if details request exists (2) call String.Format with the parameters inserted in URL you pass on. OK, may 30 line of code with error checking!
 

danbutter

Getting the hang of it
Joined
May 28, 2017
Messages
121
Reaction score
32
This looks awesome. I'm using tensorflow with Home Assistant, but it is on an old machine and is not very powerful. It takes about 30 secs/detection so I thought I'd give this a try and run it on my BI machine.
Issue seems to be that the deepstack server doesn't accept any incoming connections. Errors say "Can't reach DeepQuestAI Server at localhost:xx." I've also tried the machine's actual IP, I've tried multiple ports.
I have tried to navigate to the localhost:xx and get the page saying DeepStack activated and the subscription expires two years from now.
If I try to append /v1/vision/detection to the end of the url then I get a 404.... not sure if this is intended or not.
I've just done this in the last hour or so so the version of DeepStack is 3.4

Anybody have a clue what is going on here?

Thanks
 
Joined
Aug 9, 2019
Messages
17
Reaction score
10
Location
USA
I am having an issue when AI Tool is running as a background service and not actually in an open window. It is not receiving alert pics from BI. If I open AI Tool in an active window, it works as expected. Anyone else experiencing this? This is running on the same physical machine / windows environment as Blue Iris.
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
209
Reaction score
125
Location
Pennsylvania
This looks awesome. I'm using tensorflow with Home Assistant, but it is on an old machine and is not very powerful. It takes about 30 secs/detection so I thought I'd give this a try and run it on my BI machine.
Issue seems to be that the deepstack server doesn't accept any incoming connections. Errors say "Can't reach DeepQuestAI Server at localhost:xx." I've also tried the machine's actual IP, I've tried multiple ports.
I have tried to navigate to the localhost:xx and get the page saying DeepStack activated and the subscription expires two years from now.
If I try to append /v1/vision/detection to the end of the url then I get a 404.... not sure if this is intended or not.
I've just done this in the last hour or so so the version of DeepStack is 3.4

Anybody have a clue what is going on here?

Thanks
I had this same issue, as others have as well on this forum. My only solution that worked was to set up a Ubuntu VM and install Docker and then run Deepstack inside of Docker. I believe that there is an issue with the Deepstack version for Windows.


Sent from my iPhone using Tapatalk
 

pnakashian

n3wb
Joined
Dec 19, 2019
Messages
3
Reaction score
0
Location
Pflugerville Texas
This looks awesome. I'm using tensorflow with Home Assistant, but it is on an old machine and is not very powerful. It takes about 30 secs/detection so I thought I'd give this a try and run it on my BI machine.
Issue seems to be that the deepstack server doesn't accept any incoming connections. Errors say "Can't reach DeepQuestAI Server at localhost:xx." I've also tried the machine's actual IP, I've tried multiple ports.
I have tried to navigate to the localhost:xx and get the page saying DeepStack activated and the subscription expires two years from now.
If I try to append /v1/vision/detection to the end of the url then I get a 404.... not sure if this is intended or not.
I've just done this in the last hour or so so the version of DeepStack is 3.4

Anybody have a clue what is going on here?

Thanks
Could you be having antivirus software issue?
if you don't have antivirus installed you might need to create an inbound rule in Windows Defender Firewall and Advanced Security. I've added a rule for program "C:\Program Files\Blue Iris 5\BlueIris.exe" for any protocol, which allows any port. Normally you don't need to add a rule to connect with localhost address.
you can also download sysinternals tcpview to see what ports are being listened by what process and if its being listened on all the interfaces when it says 0.0.0.0 or specific interface when it has one of the machines interface ip address.


in options->resolve addresses uncheck so you can see port numbers, not port names. look at local address and local port.

/Pierre
 
Joined
Sep 9, 2018
Messages
12
Reaction score
2
Location
Italia
A small question... As I've read, the Sentry Integration analyzes only one images per "trigger" and has an high success, so, what image it analyze?
With the snapshot method (AI Tool) I've seen that some times the analyzed frame is not "the most releavant". There is a way to get the image that is supposed to be sent to Sentry?
 

Judman

Young grasshopper
Joined
Oct 23, 2016
Messages
32
Reaction score
10
Welp @GentlePumpkin I broke something and I cannot figure out what the deal is.

A few days ago I started getting sporadic error messages in telegram, but most images came through just fine. ERROR: Processing the following image 'C:\BlueIris\AI_Input/AiFP.20200221_180930905.jpg' failed. Can't reach DeepQuestAI Server at localhost:82.

I figured I would restart the Deepstack Server and AI tools to see if it resolved the issue. Turns out it made things worse.

Now no images are getting processed and I am getting these errors in the log.

Code:
[21.02.2020, 18:10:28.623]: Starting analysis of C:\BlueIris\AI_Input/AiFP.20200221_180929892.jpg
[21.02.2020, 18:10:28.628]: (1/6) Uploading image to DeepQuestAI Server
[21.02.2020, 18:10:28.633]: System.Net.Http.HttpRequestException | Error while copying content to a stream. (code: -2146232800 )
[21.02.2020, 18:10:28.639]: ERROR: Processing the following image 'C:\BlueIris\AI_Input/AiFP.20200221_180929892.jpg' failed. Can't reach DeepQuestAI Server at localhost:82.
[21.02.2020, 18:10:28.645]:       uploading image to chat "-*******"
I have Deepstack running on port 82 on the same windows machine BI and AI Tools is running on. Not sure what to do!

Thanks for the help!
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
88
Reaction score
137
A small question... As I've read, the Sentry Integration analyzes only one images per "trigger" and has an high success, so, what image it analyze?
With the snapshot method (AI Tool) I've seen that some times the analyzed frame is not "the most releavant". There is a way to get the image that is supposed to be sent to Sentry?
AI Tool sends the first image in which it detects an object. That's good for speed, but I agree, it's not optimal for getting the best snapshot. I currently don't have time to add this feature and and few others I've got in mind, but everyone is free to contribute to the source code on Github until I find time to implement these enhancements.


Welp @GentlePumpkin I broke something and I cannot figure out what the deal is.

A few days ago I started getting sporadic error messages in telegram, but most images came through just fine. ERROR: Processing the following image 'C:\BlueIris\AI_Input/AiFP.20200221_180930905.jpg' failed. Can't reach DeepQuestAI Server at localhost:82.

I figured I would restart the Deepstack Server and AI tools to see if it resolved the issue. Turns out it made things worse.

Now no images are getting processed and I am getting these errors in the log.

Code:
[21.02.2020, 18:10:28.623]: Starting analysis of C:\BlueIris\AI_Input/AiFP.20200221_180929892.jpg
[21.02.2020, 18:10:28.628]: (1/6) Uploading image to DeepQuestAI Server
[21.02.2020, 18:10:28.633]: System.Net.Http.HttpRequestException | Error while copying content to a stream. (code: -2146232800 )
[21.02.2020, 18:10:28.639]: ERROR: Processing the following image 'C:\BlueIris\AI_Input/AiFP.20200221_180929892.jpg' failed. Can't reach DeepQuestAI Server at localhost:82.
[21.02.2020, 18:10:28.645]:       uploading image to chat "-*******"
I have Deepstack running on port 82 on the same windows machine BI and AI Tools is running on. Not sure what to do!

Thanks for the help!
I had a similar problem a week ago and restarting Deepstack would not help, so I rebooted the whole machine which solved the problem. In the long term I would like to replace the Deepstack AI with image analysis integrated into AI Tool because
1. this would allow the analysis to learn and get better for every individual environment
2. Deepstack is not fully reliable and most issues here were caused by Deepstack and not by my AI Tool
3. Deepstack licenses are limited and require a refresh every few years.

Meanwhile, try if one of the following steps can help
1. reboot machine
2. restart Deepstack (! select correct detection mode) and change deepstack port to something else
3. reinstall Deepstack
 

Judman

Young grasshopper
Joined
Oct 23, 2016
Messages
32
Reaction score
10
I had a similar problem a week ago and restarting Deepstack would not help, so I rebooted the whole machine which solved the problem. In the long term I would like to replace the Deepstack AI with image analysis integrated into AI Tool because
1. this would allow the analysis to learn and get better for every individual environment
2. Deepstack is not fully reliable and most issues here were caused by Deepstack and not by my AI Tool
3. Deepstack licenses are limited and require a refresh every few years.

Meanwhile, try if one of the following steps can help
1. reboot machine
2. restart Deepstack (! select correct detection mode) and change deepstack port to something else
3. reinstall Deepstack
Wow, a restart did the trick. Wonder what was up with that.
 
Joined
May 25, 2019
Messages
3
Reaction score
0
Location
Italy
Hi All,
I wanted to contribute to this project but I haven't been active since months because I was really busy.
By the way, a few days ago I found a new AI software that could easily replace DeepStack.
It is called alwaysAI
Here are some advantages:
  • It is free, no need to renew licenses every two years
  • It is made for running on the edge (Raspberry Pi and similar) but it can be also installed on windows
  • Very easy to use
  • Customizable (it is required to know a little of python language)
  • Custom detection model
    • There's a model catalog here so as soon as a new (and better) model is released it can be installed in a few minutes
    • It is possible to develop a model capable of detecting only person, it should be faster and more accurate
  • Performance, it is really fast. I've made a test on 84 images (took from my surveillance system, day and night ) and this is the result. As you can see DeepStack is the most accurate with a score of 52/84 but it took an average 4.8 seconds to analyze images while alwaysAI with "ssd_mobilenet_v1_coco_2018_01_28" model scored 39/84 but it took an average of 0.108 seconds to analyze an image! I think that there are more chances to catch a potential intruder analyzing around 8 images every second instead of 1 image every 4 seconds.
I haven't tested CPU usage yet because of lack of time but at first impression it consumes less CPU.

Let me know what do you think
Regards
 

zrikz

n3wb
Joined
Dec 17, 2019
Messages
5
Reaction score
1
Location
US
Is it possible to add just animals or wildlife as an object of relevance? There are bears, dogs, cats etc.. but I frequently have deer and it didn't know what to classify it as.
 

zrikz

n3wb
Joined
Dec 17, 2019
Messages
5
Reaction score
1
Location
US
Hi All,
I wanted to contribute to this project but I haven't been active since months because I was really busy.
By the way, a few days ago I found a new AI software that could easily replace DeepStack.
It is called alwaysAI
Here are some advantages:
  • It is free, no need to renew licenses every two years
  • It is made for running on the edge (Raspberry Pi and similar) but it can be also installed on windows
  • Very easy to use
  • Customizable (it is required to know a little of python language)
  • Custom detection model
    • There's a model catalog here so as soon as a new (and better) model is released it can be installed in a few minutes
    • It is possible to develop a model capable of detecting only person, it should be faster and more accurate
  • Performance, it is really fast. I've made a test on 84 images (took from my surveillance system, day and night ) and this is the result. As you can see DeepStack is the most accurate with a score of 52/84 but it took an average 4.8 seconds to analyze images while alwaysAI with "ssd_mobilenet_v1_coco_2018_01_28" model scored 39/84 but it took an average of 0.108 seconds to analyze an image! I think that there are more chances to catch a potential intruder analyzing around 8 images every second instead of 1 image every 4 seconds.
I haven't tested CPU usage yet because of lack of time but at first impression it consumes less CPU.

Let me know what do you think
Regards
had a few free minutes and was able to get the basic starter app up and running. It does seem to quickly identify stuff, but compared to DeepStack it missed very obvious cars / people about 50% of the time. Had a car sitting in my driveway and it didn't even detect it. I'm sure there are other models that may take slightly more time and be more accurate but would have to look into it more.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
88
Reaction score
137
Hi All,
I wanted to contribute to this project but I haven't been active since months because I was really busy.
By the way, a few days ago I found a new AI software that could easily replace DeepStack.
It is called alwaysAI
Here are some advantages:
  • It is free, no need to renew licenses every two years
  • It is made for running on the edge (Raspberry Pi and similar) but it can be also installed on windows
  • Very easy to use
  • Customizable (it is required to know a little of python language)
  • Custom detection model
    • There's a model catalog here so as soon as a new (and better) model is released it can be installed in a few minutes
    • It is possible to develop a model capable of detecting only person, it should be faster and more accurate
  • Performance, it is really fast. I've made a test on 84 images (took from my surveillance system, day and night ) and this is the result. As you can see DeepStack is the most accurate with a score of 52/84 but it took an average 4.8 seconds to analyze images while alwaysAI with "ssd_mobilenet_v1_coco_2018_01_28" model scored 39/84 but it took an average of 0.108 seconds to analyze an image! I think that there are more chances to catch a potential intruder analyzing around 8 images every second instead of 1 image every 4 seconds.
I haven't tested CPU usage yet because of lack of time but at first impression it consumes less CPU.

Let me know what do you think
Regards
If I find time to invest into the software, I would prefer doing something with the built-in AI of visual studio, including the ability to locally learn in your specific environment so that the detection get's more and more accurate. Second advantage is that you don't have to install, manage and troubleshoot multiple programs anymore. Since I gained more exp in writing realiable code, the issues members had were always caused by DeepStack and not by AI Tool itself. Deepstack's detection performance already does not entirely suffice yet. If you are interested in modifying the code, just shoot me a pm and I'll give you everything you need.


Is it possible to add just animals or wildlife as an object of relevance? There are bears, dogs, cats etc.. but I frequently have deer and it didn't know what to classify it as.
The Deepstack documentation isn't online at the moment, so I can't check. Yet I think "deer" was possible, I'll check when I have more time.
 

zrikz

n3wb
Joined
Dec 17, 2019
Messages
5
Reaction score
1
Location
US
If I find time to invest into the software, I would prefer doing something with the built-in AI of visual studio, including the ability to locally learn in your specific environment so that the detection get's more and more accurate. Second advantage is that you don't have to install, manage and troubleshoot multiple programs anymore. Since I gained more exp in writing realiable code, the issues members had were always caused by DeepStack and not by AI Tool itself. Deepstack's detection performance already does not entirely suffice yet. If you are interested in modifying the code, just shoot me a pm and I'll give you everything you need.



The Deepstack documentation isn't online at the moment, so I can't check. Yet I think "deer" was possible, I'll check when I have more time.
I have edited the camera text file to include animal and deer.. having it in that file, even though it's not in the GUI would it still use them for potential classificaiton?
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
88
Reaction score
137
I think I integrated so kind of checking mechanism to prevent crashes caused by faulty config files, but let me check. I'll pm you.
 
Top